diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c index 9851a24c2cd..51575b68bcb 100644 --- a/src/broadcom/vulkan/v3dv_pipeline.c +++ b/src/broadcom/vulkan/v3dv_pipeline.c @@ -2189,6 +2189,11 @@ write_creation_feedback(struct v3dv_pipeline *pipeline, } } +/* Note that although PrimitiveTopology is now dynamic, it is still safe to + * compute the gs_input/output_primitive from the topology saved at the + * pipeline, as the topology class will not change, because we don't support + * dynamicPrimitiveTopologyUnrestricted + */ static enum mesa_prim multiview_gs_input_primitive_from_pipeline(struct v3dv_pipeline *pipeline) { diff --git a/src/broadcom/vulkan/v3dvx_cmd_buffer.c b/src/broadcom/vulkan/v3dvx_cmd_buffer.c index d7fb087d9a8..31cd9097f3b 100644 --- a/src/broadcom/vulkan/v3dvx_cmd_buffer.c +++ b/src/broadcom/vulkan/v3dvx_cmd_buffer.c @@ -2707,7 +2707,9 @@ v3dX(cmd_buffer_emit_draw_indexed)(struct v3dv_cmd_buffer *cmd_buffer, assert(job); const struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline; - uint32_t hw_prim_type = v3d_hw_prim_type(pipeline->topology); + const struct vk_dynamic_graphics_state *dyn = + &cmd_buffer->vk.dynamic_graphics_state; + uint32_t hw_prim_type = v3dv_pipeline_primitive(dyn->ia.primitive_topology); uint8_t index_type = ffs(cmd_buffer->state.index_buffer.index_size) - 1; uint32_t index_offset = firstIndex * cmd_buffer->state.index_buffer.index_size; @@ -2760,8 +2762,9 @@ v3dX(cmd_buffer_emit_draw_indirect)(struct v3dv_cmd_buffer *cmd_buffer, struct v3dv_job *job = cmd_buffer->state.job; assert(job); - const struct v3dv_pipeline *pipeline = cmd_buffer->state.gfx.pipeline; - uint32_t hw_prim_type = v3d_hw_prim_type(pipeline->topology); + const struct vk_dynamic_graphics_state *dyn = + &cmd_buffer->vk.dynamic_graphics_state; + uint32_t hw_prim_type = v3dv_pipeline_primitive(dyn->ia.primitive_topology); v3dv_cl_ensure_space_with_branch( &job->bcl, cl_packet_length(INDIRECT_VERTEX_ARRAY_INSTANCED_PRIMS));