Lines Matching defs:shader

31  * in a non-main shader.
33 * [ This can happen if only a secondary shader has the layout(local_size_*)
54 explicit lower_cs_derived_visitor(gl_linked_shader *shader)
56 shader(shader),
57 local_size_variable(shader->Program->info.workgroup_size_variable),
64 main_sig = _mesa_get_main_function_signature(shader->symbols);
79 gl_linked_shader *shader;
97 ir_variable *var = new(shader) ir_variable(type, name, ir_var_system_value);
103 shader->ir->push_head(var);
116 WorkGroupSize = shader->symbols->get_variable("gl_LocalGroupSizeARB");
118 WorkGroupSize = shader->symbols->get_variable("gl_WorkGroupSize");
120 gl_WorkGroupSize = new(shader) ir_dereference_variable(WorkGroupSize);
121 gl_WorkGroupID = shader->symbols->get_variable("gl_WorkGroupID");
122 gl_LocalInvocationID = shader->symbols->get_variable("gl_LocalInvocationID");
127 * shader. Re-create them.
139 gl_WorkGroupSize = new(shader) ir_dereference_variable(
147 data.u[i] = shader->Program->info.workgroup_size[i];
148 gl_WorkGroupSize = new(shader) ir_constant(glsl_type::uvec3_type, &data);
164 gl_GlobalInvocationID = new(shader) ir_variable(
166 shader->ir->push_head(gl_GlobalInvocationID);
170 add(mul(gl_WorkGroupID, gl_WorkGroupSize->clone(shader, NULL)),
188 gl_LocalInvocationIndex = new(shader)
190 shader->ir->push_head(gl_LocalInvocationIndex);
193 mul(mul(swizzle_z(gl_LocalInvocationID), swizzle_x(gl_WorkGroupSize->clone(shader, NULL))),
194 swizzle_y(gl_WorkGroupSize->clone(shader, NULL)));
196 mul(swizzle_y(gl_LocalInvocationID), swizzle_x(gl_WorkGroupSize->clone(shader, NULL)));
226 lower_cs_derived(gl_linked_shader *shader)
228 if (shader->Stage != MESA_SHADER_COMPUTE)
231 lower_cs_derived_visitor v(shader);
232 v.run(shader->ir);