From 53b2b30d0b396e65de704cfd8e0bc97eeaa14238 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 29 Mar 2023 16:05:32 +0200 Subject: [PATCH] radv: remove radv_graphics_pipeline::next_vertex_stage Use the active stages bitfield instead. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_cmd_buffer.c | 2 +- src/amd/vulkan/radv_pipeline.c | 8 +------- src/amd/vulkan/radv_private.h | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index a29f946ec87..c7d10436059 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -3715,7 +3715,7 @@ lookup_vs_prolog(struct radv_cmd_buffer *cmd_buffer, const struct radv_shader *v key.as_ls = vs_shader->info.vs.as_ls && instance_rate_inputs; key.is_ngg = vs_shader->info.is_ngg; key.wave32 = vs_shader->info.wave_size == 32; - key.next_stage = pipeline->next_vertex_stage; + key.next_stage = ffs(cmd_buffer->state.active_stages) - 1; union vs_prolog_key_header header; header.v = 0; diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index d182cc5446c..55c7c814669 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -4409,13 +4409,7 @@ radv_pipeline_init_vertex_input_state(const struct radv_device *device, } } - if (pipeline->base.shaders[MESA_SHADER_VERTEX]) - pipeline->next_vertex_stage = MESA_SHADER_VERTEX; - else if (pipeline->base.shaders[MESA_SHADER_TESS_CTRL]) - pipeline->next_vertex_stage = MESA_SHADER_TESS_CTRL; - else - pipeline->next_vertex_stage = MESA_SHADER_GEOMETRY; - if (pipeline->next_vertex_stage == MESA_SHADER_VERTEX) { + if (pipeline->base.shaders[MESA_SHADER_VERTEX]) { const struct radv_shader *vs_shader = pipeline->base.shaders[MESA_SHADER_VERTEX]; pipeline->can_use_simple_input = vs_shader->info.is_ngg == pdevice->use_ngg && vs_shader->info.wave_size == pdevice->ge_wave_size; diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index a9c0a18a86f..97540bf52ed 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -2242,7 +2242,6 @@ struct radv_graphics_pipeline { uint32_t attrib_index_offset[MAX_VERTEX_ATTRIBS]; uint32_t vb_desc_usage_mask; uint32_t vb_desc_alloc_size; - uint8_t next_vertex_stage; uint32_t pa_sc_mode_cntl_1; uint32_t db_render_control;