Module: Mesa
Branch: main
Commit: d091609d814fd9ab47b6d55b6c93e83884b75f43
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d091609d814fd9ab47b6d55b6c93e83884b75f43

Author: Lionel Landwerlin <[email protected]>
Date:   Sat Oct  7 16:13:35 2023 +0300

anv: fix index buffer size programming

This is a merge issue due to 2 MRs touching the same code.

Fixes a few maintence5 tests like : 
dEQP-VK.robustness.bind_index_buffer2.offset_0.draw_indexed.oo_size

Signed-off-by: Lionel Landwerlin <[email protected]>
Fixes: 50f6903bd9 ("anv: add new low level emission & dirty state tracking")
Reviewed-by: Tapani Pälli <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25599>

---

 src/intel/vulkan/genX_gfx_state.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/intel/vulkan/genX_gfx_state.c 
b/src/intel/vulkan/genX_gfx_state.c
index 1bd3e61cf9a..8041bd48eb6 100644
--- a/src/intel/vulkan/genX_gfx_state.c
+++ b/src/intel/vulkan/genX_gfx_state.c
@@ -1585,8 +1585,7 @@ genX(cmd_buffer_flush_gfx_hw_state)(struct anv_cmd_buffer 
*cmd_buffer)
          ib.L3BypassDisable       = true;
 #endif
          ib.BufferStartingAddress = anv_address_add(buffer->address, offset);
-         ib.BufferSize            = vk_buffer_range(&buffer->vk, offset,
-                                                    VK_WHOLE_SIZE);
+         ib.BufferSize            = cmd_buffer->state.gfx.index_size;
       }
    }
 

Reply via email to