mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 07:30:09 +01:00
radeonsi: remove si_shader_selector::type
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6340>
This commit is contained in:
parent
23fdb79e92
commit
6925401a38
4 changed files with 7 additions and 9 deletions
|
|
@ -236,12 +236,11 @@ static void *si_create_compute_state(struct pipe_context *ctx, const struct pipe
|
|||
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -1603,7 +1603,8 @@ static struct nir_shader *get_nir_shader(struct si_shader_selector *sel, bool *f
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -431,8 +431,6 @@ struct si_shader_selector {
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -2603,11 +2603,11 @@ static void *si_create_shader_selector(struct pipe_context *ctx,
|
|||
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue