Lines Matching defs:shader

58    nir_visitor(const struct gl_constants *consts, nir_shader *shader);
101 nir_shader *shader;
222 nir_shader *shader = nir_shader_create(NULL, stage, options,
225 nir_visitor v1(consts, shader);
234 nir_validate_shader(shader, "after glsl to nir, before function inline");
240 nir_lower_variable_initializers(shader, nir_var_all);
241 nir_lower_returns(shader);
242 nir_inline_functions(shader);
243 nir_opt_deref(shader);
245 nir_validate_shader(shader, "after function inlining and return lowering");
250 foreach_list_typed_safe(nir_function, function, node, &(shader)->functions){
256 shader->info.name = ralloc_asprintf(shader, "GLSL%d", shader_prog->Name);
258 shader->info.label = ralloc_strdup(shader, shader_prog->Label);
260 shader->info.subgroup_size = SUBGROUP_SIZE_UNIFORM;
262 if (shader->info.stage == MESA_SHADER_FRAGMENT) {
263 shader->info.fs.pixel_center_integer = sh->Program->info.fs.pixel_center_integer;
264 shader->info.fs.origin_upper_left = sh->Program->info.fs.origin_upper_left;
265 shader->info.fs.advanced_blend_modes = sh->Program->info.fs.advanced_blend_modes;
267 nir_foreach_variable_with_modes(var, shader,
273 shader->info.fs.uses_sample_shading = true;
276 shader->info.fs.uses_sample_shading = true;
280 shader->info.fs.uses_sample_shading = true;
283 return shader;
286 nir_visitor::nir_visitor(const struct gl_constants *consts, nir_shader *shader)
289 this->shader = shader;
500 nir_variable *var = rzalloc(shader, nir_variable);
539 if (shader->info.stage == MESA_SHADER_GEOMETRY &&
547 if (shader->info.stage == MESA_SHADER_TESS_EVAL &&
553 if (shader->info.stage > MESA_SHADER_VERTEX &&
563 if (shader->info.stage == MESA_SHADER_TESS_CTRL &&
569 if (shader->info.stage <= MESA_SHADER_GEOMETRY &&
718 nir_shader_add_variable(shader, var);
738 nir_function *func = nir_function_create(shader, ir->function_name());
744 func->params = ralloc_array(shader, nir_parameter, func->num_params);
848 * they can appear anywhere in the shader and the stuff after them may still
892 nir_jump_instr *instr = nir_jump_instr_create(this->shader, type);
908 nir_jump_instr *instr = nir_jump_instr_create(this->shader, nir_jump_return);
1228 nir_intrinsic_instr *instr = nir_intrinsic_instr_create(shader, op);
1684 nir_call_instr *call = nir_call_instr_create(this->shader, callee);
1906 /* This case can happen if the vertex shader does not write the
1916 nir_intrinsic_instr *intrin = nir_intrinsic_instr_create(shader, op);
1941 nir_intrinsic_instr_create(b.shader,
2166 this->shader,
2483 nir_tex_instr *instr = nir_tex_instr_create(this->shader, num_srcs);
2714 if (shader->info.stage == MESA_SHADER_COMPUTE)
2716 else if (shader->info.stage == MESA_SHADER_TESS_CTRL)
2733 /* We pretend it's a vertex shader. Ultimately, the stage shouldn't
2768 /* Do some optimizations to clean up the shader now. By optimizing the