anv: move primitive_topology to anv_gfx_dynamic_state

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32372>
This commit is contained in:
Lionel Landwerlin 2024-11-26 22:51:37 +02:00 committed by Marge Bot
parent fd669fa69d
commit 560ce4ba1d
3 changed files with 1 additions and 6 deletions

View file

@ -3913,7 +3913,6 @@ struct anv_cmd_graphics_state {
VkShaderStageFlags push_constant_stages;
uint32_t primitive_topology;
bool used_task_shader;
struct anv_buffer *index_buffer;

View file

@ -1081,7 +1081,7 @@ cmd_buffer_post_draw_wa(struct anv_cmd_buffer *cmd_buffer,
uint32_t access_type)
{
batch_post_draw_wa(&cmd_buffer->batch, cmd_buffer->device,
cmd_buffer->state.gfx.primitive_topology,
cmd_buffer->state.gfx.dyn_state.vft.PrimitiveTopologyType,
vertex_count);
update_dirty_vbs_for_gfx8_vb_flush(cmd_buffer, access_type);

View file

@ -964,15 +964,11 @@ update_topology(struct anv_gfx_dynamic_state *hw_state,
{
const struct vk_dynamic_graphics_state *dyn =
&cmd_buffer->vk.dynamic_graphics_state;
struct anv_cmd_graphics_state *gfx = &cmd_buffer->state.gfx;
uint32_t topology =
anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_EVAL) ?
_3DPRIM_PATCHLIST(dyn->ts.patch_control_points) :
vk_to_intel_primitive_type[dyn->ia.primitive_topology];
gfx->primitive_topology = topology;
SET(VF_TOPOLOGY, vft.PrimitiveTopologyType, topology);
}