Lines Matching defs:shader

155 nir_assign_var_locations(nir_shader *shader, nir_variable_mode mode,
161 nir_foreach_variable_with_modes(var, shader, mode) {
174 * of array indexing to handle mismatches between the shader interface and the
175 * dispatch pattern of the shader. For instance, geometry shaders are
209 if (nir_is_arrayed_io(var, state->builder.shader->info.stage)) {
221 if (state->builder.shader->info.stage == MESA_SHADER_MESH &&
223 !nir_is_arrayed_io(var, state->builder.shader->info.stage))
241 /* For arrayed I/O (e.g., per-vertex input arrays in geometry shader
299 const nir_shader *nir = b->shader;
347 nir_intrinsic_instr_create(state->builder.shader, op);
456 nir_intrinsic_instr_create(state->builder.shader, op);
476 if (state->builder.shader->info.stage == MESA_SHADER_GEOMETRY) {
606 nir_intrinsic_instr_create(state->builder.shader, bary_op);
644 const nir_shader_compiler_options *options = b->shader->options;
680 const bool is_arrayed = nir_is_arrayed_io(var, b->shader->info.stage);
793 * This pass is intended to be used for cross-stage shader I/O and driver-
795 * locations or offsets. For fragment shader inputs, it can optionally turn
801 nir_lower_io(nir_shader *shader, nir_variable_mode modes,
807 nir_foreach_function(function, shader) {
1411 assert(b->shader->info.stage == MESA_SHADER_KERNEL);
1471 nir_intrinsic_instr *load = nir_intrinsic_instr_create(b->shader, op);
1499 nir_intrinsic_set_range(load, b->shader->constant_data_size);
1687 nir_intrinsic_instr *store = nir_intrinsic_instr_create(b->shader, op);
1811 nir_intrinsic_instr *atomic = nir_intrinsic_instr_create(b->shader, op);
2303 * to the shader or which is directly visible to the client. It requires that
2330 * embedded enum. If nir_lower_explicit_io is called on any shader that
2335 nir_lower_explicit_io(nir_shader *shader, nir_variable_mode modes,
2340 nir_foreach_function(function, shader) {
2396 lower_vars_to_explicit(nir_shader *shader,
2404 assert(shader->info.stage == MESA_SHADER_KERNEL);
2409 offset = shader->scratch_size;
2412 offset = shader->info.shared_size;
2415 offset = shader->info.task_payload_size;
2418 offset = shader->global_mem_size;
2421 offset = shader->constant_data_size;
2453 assert(shader->info.stage == MESA_SHADER_KERNEL);
2454 shader->num_uniforms = offset;
2458 shader->scratch_size = offset;
2461 shader->info.shared_size = offset;
2464 shader->info.task_payload_size = offset;
2467 shader->global_mem_size = offset;
2470 shader->constant_data_size = offset;
2482 /* If nir_lower_vars_to_explicit_types is called on any shader that contains
2487 nir_lower_vars_to_explicit_types(nir_shader *shader,
2493 * - compact shader inputs/outputs
2506 progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_uniform, type_info);
2508 progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_mem_global, type_info);
2511 assert(!shader->info.shared_memory_explicit_layout);
2512 progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_mem_shared, type_info);
2516 progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_shader_temp, type_info);
2518 progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_mem_constant, type_info);
2520 progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_shader_call_data, type_info);
2522 progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_ray_hit_attrib, type_info);
2524 progress |= lower_vars_to_explicit(shader, &shader->variables, nir_var_mem_task_payload, type_info);
2526 nir_foreach_function(function, shader) {
2529 progress |= lower_vars_to_explicit(shader, &function->impl->locals, nir_var_function_temp, type_info);
2592 nir_gather_explicit_io_initializers(nir_shader *shader,
2602 nir_foreach_variable_with_modes(var, shader, mode) {
2892 if (b->shader->info.stage == MESA_SHADER_MESH &&
2894 !(b->shader->info.per_primitive_outputs &