anv: remove copied information from runtime graphics state
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 31 Jan 2023 19:09:36 +0000 (20:09 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 14 Feb 2023 09:05:35 +0000 (09:05 +0000)
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/21026>

src/intel/vulkan/anv_pipeline.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_pipeline.c

index 5677c72..03301f9 100644 (file)
@@ -2267,13 +2267,6 @@ anv_graphics_pipeline_init(struct anv_graphics_pipeline *pipeline,
             pipeline->vb_used |= BITFIELD64_BIT(state->vi->attributes[a].binding);
       }
 
-      u_foreach_bit(b, state->vi->bindings_valid) {
-         pipeline->vb[b].stride = state->vi->bindings[b].stride;
-         pipeline->vb[b].instanced = state->vi->bindings[b].input_rate ==
-                                      VK_VERTEX_INPUT_RATE_INSTANCE;
-         pipeline->vb[b].instance_divisor = state->vi->bindings[b].divisor;
-      }
-
       /* Our implementation of VK_KHR_multiview uses instancing to draw the
        * different views when primitive replication cannot be used.  If the
        * client asks for instancing, we need to multiply by the client's
index 6743e1f..58c800d 100644 (file)
@@ -3080,11 +3080,6 @@ struct anv_graphics_pipeline {
    bool                                         uses_xfb;
 
    uint32_t                                     vb_used;
-   struct anv_pipeline_vertex_binding {
-      uint32_t                                  stride;
-      bool                                      instanced;
-      uint32_t                                  instance_divisor;
-   } vb[MAX_VBS];
 
    /* Pre computed CS instructions that can directly be copied into
     * anv_cmd_buffer.
index 3cbf459..5656a7c 100644 (file)
@@ -183,8 +183,9 @@ emit_vertex_input(struct anv_graphics_pipeline *pipeline,
        * VERTEX_BUFFER_STATE which we emit later.
        */
       anv_batch_emit(&pipeline->base.batch, GENX(3DSTATE_VF_INSTANCING), vfi) {
-         bool per_instance = pipeline->vb[binding].instanced;
-         uint32_t divisor = pipeline->vb[binding].instance_divisor *
+         bool per_instance = vi->bindings[binding].input_rate ==
+                             VK_VERTEX_INPUT_RATE_INSTANCE;
+         uint32_t divisor = vi->bindings[binding].divisor *
                             pipeline->instance_multiplier;
 
          vfi.InstancingEnable = per_instance;