From c36f7e42a78a15774ac0886c55b49874c08cdc39 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 19 Nov 2024 16:52:55 +0200 Subject: [PATCH] anv: remove 3DSTATE_VF_STATISTICS from pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lionel Landwerlin Reviewed-by: Tapani Pälli Reviewed-by: José Roberto de Souza Part-of: --- src/intel/vulkan/anv_cmd_buffer.c | 5 ----- src/intel/vulkan/anv_private.h | 1 - src/intel/vulkan/genX_gfx_state.c | 7 +++++-- src/intel/vulkan/genX_pipeline.c | 11 ----------- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 780bb20aa21..2f8babe8781 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -590,11 +590,6 @@ anv_cmd_buffer_flush_pipeline_state(struct anv_cmd_buffer *cmd_buffer, assert_empty(final.sbe_mesh); } - /* States that should never vary between pipelines, but can be affected by - * blorp etc... - */ - assert_identical(VF_STATISTICS, final.vf_statistics); - /* States that can vary in length */ diff_var_state(VF_SGVS_INSTANCING, final.vf_sgvs_instancing); diff_var_state(SO_DECL_LIST, final.so_decl_list); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 602e319255a..febe16e1f89 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -4857,7 +4857,6 @@ struct anv_graphics_pipeline { /* Fully backed instructions, ready to be emitted in the anv_cmd_buffer */ struct { struct anv_gfx_state_ptr urb; - struct anv_gfx_state_ptr vf_statistics; struct anv_gfx_state_ptr vf_sgvs; struct anv_gfx_state_ptr vf_sgvs_2; struct anv_gfx_state_ptr vf_sgvs_instancing; diff --git a/src/intel/vulkan/genX_gfx_state.c b/src/intel/vulkan/genX_gfx_state.c index ff5fbc1d0f9..39c141c4a06 100644 --- a/src/intel/vulkan/genX_gfx_state.c +++ b/src/intel/vulkan/genX_gfx_state.c @@ -1927,8 +1927,11 @@ cmd_buffer_gfx_state_emission(struct anv_cmd_buffer *cmd_buffer) final.ds, protected); } - if (BITSET_TEST(hw_state->dirty, ANV_GFX_STATE_VF_STATISTICS)) - anv_batch_emit_pipeline_state(&cmd_buffer->batch, pipeline, final.vf_statistics); + if (BITSET_TEST(hw_state->dirty, ANV_GFX_STATE_VF_STATISTICS)) { + anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_VF_STATISTICS), vfs) { + vfs.StatisticsEnable = true; + } + } if (BITSET_TEST(hw_state->dirty, ANV_GFX_STATE_SBE)) anv_batch_emit_pipeline_state(&cmd_buffer->batch, pipeline, final.sbe); diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 39c0475446e..64a9fb8bbd2 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1567,15 +1567,6 @@ emit_3dstate_ps_extra(struct anv_graphics_pipeline *pipeline, } } -static void -emit_3dstate_vf_statistics(struct anv_graphics_pipeline *pipeline) -{ - anv_pipeline_emit(pipeline, final.vf_statistics, - GENX(3DSTATE_VF_STATISTICS), vfs) { - vfs.StatisticsEnable = true; - } -} - static void compute_kill_pixel(struct anv_graphics_pipeline *pipeline, const struct vk_multisample_state *ms, @@ -1885,8 +1876,6 @@ genX(graphics_pipeline_emit)(struct anv_graphics_pipeline *pipeline, } #endif - emit_3dstate_vf_statistics(pipeline); - if (anv_pipeline_is_primitive(pipeline)) { emit_vertex_input(pipeline, state, state->vi);