pipe_reference_init(&sel->base.reference, 1);
sel->info.stage = MESA_SHADER_COMPUTE;
- sel->type = PIPE_SHADER_COMPUTE;
sel->screen = sscreen;
sel->const_and_shader_buf_descriptors_index =
- si_const_and_shader_buffer_descriptors_idx(sel->type);
+ si_const_and_shader_buffer_descriptors_idx(PIPE_SHADER_COMPUTE);
sel->sampler_and_images_descriptors_index =
- si_sampler_and_image_descriptors_idx(sel->type);
+ si_sampler_and_image_descriptors_idx(PIPE_SHADER_COMPUTE);
program->shader.selector = &program->sel;
program->ir_type = cso->ir_type;
program->local_size = cso->req_local_mem;
return sel->nir;
} else if (sel->nir_binary) {
struct pipe_screen *screen = &sel->screen->b;
- const void *options = screen->get_compiler_options(screen, PIPE_SHADER_IR_NIR, sel->type);
+ const void *options = screen->get_compiler_options(screen, PIPE_SHADER_IR_NIR,
+ pipe_shader_type_from_mesa(sel->info.stage));
struct blob_reader blob_reader;
blob_reader_init(&blob_reader, sel->nir_binary, sel->nir_size);
struct pipe_stream_output_info so;
struct si_shader_info info;
- /* PIPE_SHADER_[VERTEX|FRAGMENT|...] */
- enum pipe_shader_type type;
ubyte const_and_shader_buf_descriptors_index;
ubyte sampler_and_images_descriptors_index;
bool vs_needs_prolog;
si_nir_scan_shader(sel->nir, &sel->info);
- sel->type = pipe_shader_type_from_mesa(sel->info.stage);
+ const enum pipe_shader_type type = pipe_shader_type_from_mesa(sel->info.stage);
sel->const_and_shader_buf_descriptors_index =
- si_const_and_shader_buffer_descriptors_idx(sel->type);
+ si_const_and_shader_buffer_descriptors_idx(type);
sel->sampler_and_images_descriptors_index =
- si_sampler_and_image_descriptors_idx(sel->type);
+ si_sampler_and_image_descriptors_idx(type);
p_atomic_inc(&sscreen->num_shaders_created);
si_get_active_slot_masks(&sel->info, &sel->active_const_and_shader_buffers,