From: Lionel Landwerlin Date: Sat, 8 Aug 2020 09:05:36 +0000 (+0300) Subject: anv: move push constant allocation tracking into gfx pipeline state X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7953402e5751b4179fe778f86a60f385eb766e0e;p=mesa.git anv: move push constant allocation tracking into gfx pipeline state Signed-off-by: Lionel Landwerlin Reviewed-by: Jason Ekstrand Part-of: --- diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 8ff28bcc34a..a600db566cb 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -2829,6 +2829,8 @@ struct anv_cmd_graphics_state { struct anv_vb_cache_range vb_bound_ranges[33]; struct anv_vb_cache_range vb_dirty_ranges[33]; + VkShaderStageFlags push_constant_stages; + struct anv_dynamic_state dynamic; uint32_t primitive_topology; @@ -2879,7 +2881,6 @@ struct anv_cmd_state { struct anv_vertex_binding vertex_bindings[MAX_VBS]; bool xfb_enabled; struct anv_xfb_binding xfb_bindings[MAX_XFB_BUFFERS]; - VkShaderStageFlags push_constant_stages; struct anv_push_constants push_constants[MESA_SHADER_STAGES]; struct anv_state binding_tables[MESA_SHADER_STAGES]; struct anv_state samplers[MESA_SHADER_STAGES]; diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 09b91415784..c5faba1a2a8 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -2362,7 +2362,7 @@ cmd_buffer_alloc_push_constants(struct anv_cmd_buffer *cmd_buffer) */ stages |= VK_SHADER_STAGE_FRAGMENT_BIT | VK_SHADER_STAGE_VERTEX_BIT; - if (stages == cmd_buffer->state.push_constant_stages) + if (stages == cmd_buffer->state.gfx.push_constant_stages) return; #if GEN_GEN >= 8 @@ -2402,7 +2402,7 @@ cmd_buffer_alloc_push_constants(struct anv_cmd_buffer *cmd_buffer) alloc.ConstantBufferSize = push_constant_kb - kb_used; } - cmd_buffer->state.push_constant_stages = stages; + cmd_buffer->state.gfx.push_constant_stages = stages; /* From the BDW PRM for 3DSTATE_PUSH_CONSTANT_ALLOC_VS: *