radv: copy rast_prim to the cmdbuf state

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22194>
This commit is contained in:
Samuel Pitoiset
2023-03-22 17:26:06 +01:00
committed by Marge Bot
parent 6ee8d33ef4
commit 8fd915098d
2 changed files with 5 additions and 2 deletions

View File

@@ -919,7 +919,6 @@ radv_emit_descriptor_pointers(struct radv_device *device, struct radeon_cmdbuf *
static unsigned static unsigned
radv_get_rasterization_prim(struct radv_cmd_buffer *cmd_buffer) radv_get_rasterization_prim(struct radv_cmd_buffer *cmd_buffer)
{ {
struct radv_graphics_pipeline *pipeline = cmd_buffer->state.graphics_pipeline;
const struct radv_shader *last_vgt_shader = cmd_buffer->state.last_vgt_shader; const struct radv_shader *last_vgt_shader = cmd_buffer->state.last_vgt_shader;
const struct radv_dynamic_state *d = &cmd_buffer->state.dynamic; const struct radv_dynamic_state *d = &cmd_buffer->state.dynamic;
@@ -928,7 +927,7 @@ radv_get_rasterization_prim(struct radv_cmd_buffer *cmd_buffer)
VK_SHADER_STAGE_GEOMETRY_BIT | VK_SHADER_STAGE_GEOMETRY_BIT |
VK_SHADER_STAGE_MESH_BIT_EXT)) { VK_SHADER_STAGE_MESH_BIT_EXT)) {
/* Ignore dynamic primitive topology for TES/GS/MS stages. */ /* Ignore dynamic primitive topology for TES/GS/MS stages. */
return pipeline->rast_prim; return cmd_buffer->state.rast_prim;
} }
return si_conv_prim_to_gs_out(d->vk.ia.primitive_topology, last_vgt_shader->info.is_ngg); return si_conv_prim_to_gs_out(d->vk.ia.primitive_topology, last_vgt_shader->info.is_ngg);
@@ -6571,6 +6570,8 @@ radv_CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipeline
radv_bind_multisample_state(cmd_buffer, &graphics_pipeline->ms); radv_bind_multisample_state(cmd_buffer, &graphics_pipeline->ms);
cmd_buffer->state.custom_blend_mode = graphics_pipeline->custom_blend_mode; cmd_buffer->state.custom_blend_mode = graphics_pipeline->custom_blend_mode;
cmd_buffer->state.rast_prim = graphics_pipeline->rast_prim;
break; break;
} }
default: default:

View File

@@ -1700,6 +1700,8 @@ struct radv_cmd_state {
/* Custom blend mode for internal operations. */ /* Custom blend mode for internal operations. */
unsigned custom_blend_mode; unsigned custom_blend_mode;
unsigned rast_prim;
}; };
struct radv_cmd_buffer_upload { struct radv_cmd_buffer_upload {