Blender V4.3
gpu_shader_test_info.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
11
12GPU_SHADER_CREATE_INFO(gpu_shader_test)
13 .typedef_source("GPU_shader_shared.hh")
14 .fragment_out(0, Type::UVEC4, "out_test")
15 .additional_info("draw_fullscreen");
16
17GPU_SHADER_CREATE_INFO(gpu_math_test)
18 .fragment_source("gpu_math_test.glsl")
19 .additional_info("gpu_shader_test")
20 .do_static_compilation(true);
21
22GPU_SHADER_CREATE_INFO(gpu_compute_1d_test)
23 .local_group_size(1)
24 .image(1, GPU_RGBA32F, Qualifier::WRITE, ImageType::FLOAT_1D, "img_output")
25 .compute_source("gpu_compute_1d_test.glsl")
26 .do_static_compilation(true);
27
28GPU_SHADER_CREATE_INFO(gpu_compute_2d_test)
29 .local_group_size(1, 1)
30 .image(1, GPU_RGBA32F, Qualifier::WRITE, ImageType::FLOAT_2D, "img_output")
31 .compute_source("gpu_compute_2d_test.glsl")
32 .do_static_compilation(true);
33
34GPU_SHADER_CREATE_INFO(gpu_compute_ibo_test)
35 .local_group_size(1)
36 .storage_buf(0, Qualifier::WRITE, "uint", "out_indices[]")
37 .compute_source("gpu_compute_ibo_test.glsl")
38 .do_static_compilation(true);
39
40GPU_SHADER_CREATE_INFO(gpu_compute_vbo_test)
41 .local_group_size(1)
42 .storage_buf(0, Qualifier::WRITE, "vec4", "out_positions[]")
43 .compute_source("gpu_compute_vbo_test.glsl")
44 .do_static_compilation(true);
45
46GPU_SHADER_CREATE_INFO(gpu_compute_ssbo_test)
47 .local_group_size(1)
48 .storage_buf(0, Qualifier::WRITE, "int", "data_out[]")
49 .compute_source("gpu_compute_ssbo_test.glsl")
50 .do_static_compilation(true);
51
52GPU_SHADER_CREATE_INFO(gpu_compute_ssbo_binding_test)
53 .local_group_size(1)
54 .storage_buf(0, Qualifier::WRITE, "int", "data0[]")
55 .storage_buf(1, Qualifier::WRITE, "int", "data1[]")
56 .compute_source("gpu_compute_dummy_test.glsl")
57 .do_static_compilation(true);
58
59/* Push constants. */
60GPU_SHADER_CREATE_INFO(gpu_push_constants_base_test)
61 .local_group_size(1)
62 .storage_buf(0, Qualifier::WRITE, "float", "data_out[]")
63 .compute_source("gpu_push_constants_test.glsl");
64
65GPU_SHADER_CREATE_INFO(gpu_push_constants_test)
66 .additional_info("gpu_push_constants_base_test")
67 .push_constant(Type::FLOAT, "float_in")
68 .push_constant(Type::VEC2, "vec2_in")
69 .push_constant(Type::VEC3, "vec3_in")
70 .push_constant(Type::VEC4, "vec4_in")
71 .do_static_compilation(true);
72
73/* Push constants size test. */
74GPU_SHADER_CREATE_INFO(gpu_push_constants_128bytes_test)
75 .additional_info("gpu_push_constants_test")
76 .push_constant(Type::FLOAT, "filler", 20)
77 .do_static_compilation(true);
78
79GPU_SHADER_CREATE_INFO(gpu_push_constants_256bytes_test)
80 .additional_info("gpu_push_constants_128bytes_test")
81 .push_constant(Type::FLOAT, "filler2", 32)
82 .do_static_compilation(true);
83
84GPU_SHADER_CREATE_INFO(gpu_push_constants_512bytes_test)
85 .additional_info("gpu_push_constants_256bytes_test")
86 .push_constant(Type::FLOAT, "filler3", 64)
87 .do_static_compilation(true);
88
89GPU_SHADER_CREATE_INFO(gpu_push_constants_8192bytes_test)
90 .additional_info("gpu_push_constants_512bytes_test")
91 .push_constant(Type::FLOAT, "filler4", 1920)
92 .do_static_compilation(true);
93
94GPU_SHADER_CREATE_INFO(gpu_buffer_texture_test)
95 .local_group_size(1)
96 .sampler(0, ImageType::FLOAT_BUFFER, "bufferTexture")
97 .storage_buf(0, Qualifier::WRITE, "float", "data_out[]")
98 .compute_source("gpu_buffer_texture_test.glsl")
99 .do_static_compilation(true);
100
101/* Specialization constants. */
102
103GPU_SHADER_CREATE_INFO(gpu_specialization_constants_base_test)
104 .storage_buf(0, Qualifier::WRITE, "int", "data_out[]")
105 .specialization_constant(Type::FLOAT, "float_in", 2)
106 .specialization_constant(Type::UINT, "uint_in", 3)
107 .specialization_constant(Type::INT, "int_in", 4)
108 .specialization_constant(Type::BOOL, "bool_in", true);
109
110GPU_SHADER_CREATE_INFO(gpu_compute_specialization_test)
111 .local_group_size(1)
112 .additional_info("gpu_specialization_constants_base_test")
113 .compute_source("gpu_specialization_test.glsl")
114 .do_static_compilation(true);
115
116GPU_SHADER_CREATE_INFO(gpu_graphic_specialization_test)
117 .additional_info("gpu_specialization_constants_base_test")
118 .vertex_source("gpu_specialization_test.glsl")
119 .fragment_source("gpu_specialization_test.glsl")
120 .do_static_compilation(true);
121
122/* EEVEE test. */
123
124GPU_SHADER_CREATE_INFO(eevee_shadow_test)
125 .fragment_source("eevee_shadow_test.glsl")
126 .additional_info("gpu_shader_test")
127 .additional_info("eevee_shared")
128 .do_static_compilation(true);
129
130GPU_SHADER_CREATE_INFO(eevee_occupancy_test)
131 .fragment_source("eevee_occupancy_test.glsl")
132 .additional_info("gpu_shader_test")
133 .additional_info("eevee_shared")
134 .do_static_compilation(true);
135
136GPU_SHADER_CREATE_INFO(eevee_gbuffer_normal_test)
137 .fragment_source("eevee_gbuffer_normal_test.glsl")
138 .additional_info("gpu_shader_test")
139 .additional_info("eevee_shared")
140 .do_static_compilation(true);
141
142GPU_SHADER_CREATE_INFO(eevee_gbuffer_closure_test)
143 .fragment_source("eevee_gbuffer_closure_test.glsl")
144 .additional_info("gpu_shader_test")
145 .additional_info("eevee_shared")
146 .do_static_compilation(true);
#define GPU_SHADER_CREATE_INFO(_info)