blorp: Pass the VB size to the VF cache workaround
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 25 Nov 2019 18:42:42 +0000 (12:42 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Thu, 5 Dec 2019 16:59:10 +0000 (10:59 -0600)
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/gallium/drivers/iris/iris_blorp.c
src/intel/blorp/blorp_genX_exec.h
src/intel/vulkan/genX_blorp_exec.c
src/mesa/drivers/dri/i965/genX_blorp_exec.c

index c2253ac913a23dd06945df4647bdb4ca6aa800fa..15b43ee5a6a2e0f0febd61e1a53a7eb498a39294 100644 (file)
@@ -202,6 +202,7 @@ blorp_alloc_vertex_buffer(struct blorp_batch *blorp_batch,
 static void
 blorp_vf_invalidate_for_vb_48b_transitions(struct blorp_batch *blorp_batch,
                                            const struct blorp_address *addrs,
+                                           UNUSED uint32_t *sizes,
                                            unsigned num_vbs)
 {
 #if GEN_GEN < 11
index 67b345cbf0b8a395785ada5a8de4c2fea35d84bf..53ff4f9a74cec16ad90a10826ebb65f535dfd758 100644 (file)
@@ -62,6 +62,7 @@ blorp_alloc_vertex_buffer(struct blorp_batch *batch, uint32_t size,
 static void
 blorp_vf_invalidate_for_vb_48b_transitions(struct blorp_batch *batch,
                                            const struct blorp_address *addrs,
+                                           uint32_t *sizes,
                                            unsigned num_vbs);
 
 #if GEN_GEN >= 8
@@ -344,15 +345,15 @@ blorp_emit_vertex_buffers(struct blorp_batch *batch,
    memset(vb, 0, sizeof(vb));
 
    struct blorp_address addrs[2] = {};
-   uint32_t size;
-   blorp_emit_vertex_data(batch, params, &addrs[0], &size);
-   blorp_fill_vertex_buffer_state(batch, vb, 0, addrs[0], size,
+   uint32_t sizes[2];
+   blorp_emit_vertex_data(batch, params, &addrs[0], &sizes[0]);
+   blorp_fill_vertex_buffer_state(batch, vb, 0, addrs[0], sizes[0],
                                   3 * sizeof(float));
 
-   blorp_emit_input_varying_data(batch, params, &addrs[1], &size);
-   blorp_fill_vertex_buffer_state(batch, vb, 1, addrs[1], size, 0);
+   blorp_emit_input_varying_data(batch, params, &addrs[1], &sizes[1]);
+   blorp_fill_vertex_buffer_state(batch, vb, 1, addrs[1], sizes[1], 0);
 
-   blorp_vf_invalidate_for_vb_48b_transitions(batch, addrs, num_vbs);
+   blorp_vf_invalidate_for_vb_48b_transitions(batch, addrs, sizes, num_vbs);
 
    const unsigned num_dwords = 1 + num_vbs * GENX(VERTEX_BUFFER_STATE_length);
    uint32_t *dw = blorp_emitn(batch, GENX(3DSTATE_VERTEX_BUFFERS), num_dwords);
index c68607b9526393220a758f5c4b7e9f40e2a4efac..79e18d95282f78d067cd775f475f4bb6cb265201 100644 (file)
@@ -167,6 +167,7 @@ blorp_alloc_vertex_buffer(struct blorp_batch *batch, uint32_t size,
 static void
 blorp_vf_invalidate_for_vb_48b_transitions(struct blorp_batch *batch,
                                            const struct blorp_address *addrs,
+                                           uint32_t *sizes,
                                            unsigned num_vbs)
 {
    /* anv forces all vertex buffers into the low 4GB so there are never any
index 62a8310f68bc766740338620cb2e2f3b3a456470..476849bdea6c0d292a63d191310528dd56af109c 100644 (file)
@@ -207,6 +207,7 @@ blorp_alloc_vertex_buffer(struct blorp_batch *batch, uint32_t size,
 static void
 blorp_vf_invalidate_for_vb_48b_transitions(struct blorp_batch *batch,
                                            const struct blorp_address *addrs,
+                                           UNUSED uint32_t *sizes,
                                            unsigned num_vbs)
 {
 #if GEN_GEN >= 8 && GEN_GEN < 11