Module: Mesa Branch: main Commit: 1b27a6be20732b251648c5ca6f93e6c0a9279f7f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b27a6be20732b251648c5ca6f93e6c0a9279f7f
Author: Dave Airlie <[email protected]> Date: Thu Dec 7 13:14:34 2023 +1000 nvk: fix transform feedback with multiple saved counters. The SET_STREAM_OUT_BUFFER_LOAD_WRITE_POINTER registers have an 8 dword stride, but the code is only adding one dword between them then the MME is calling an illegal method. This is the simple fix, otherwise I think we'd have to multiply somehow in the MME which seems pointless. Fixes KHR-GL45.transform_feedback* on zink on nvk. Fixes: 5fd7df4aa2c3 ("nvk: Support for vertex shader transform feedback") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26558> --- src/nouveau/vulkan/nvk_cmd_draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nouveau/vulkan/nvk_cmd_draw.c b/src/nouveau/vulkan/nvk_cmd_draw.c index a5fa8109d33..0769bda0d82 100644 --- a/src/nouveau/vulkan/nvk_cmd_draw.c +++ b/src/nouveau/vulkan/nvk_cmd_draw.c @@ -2674,7 +2674,8 @@ nvk_CmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, struct nv_push *p = nvk_cmd_buffer_push(cmd, 6); P_IMMD(p, NVC597, SET_MME_DATA_FIFO_CONFIG, FIFO_SIZE_SIZE_4KB); P_1INC(p, NV9097, CALL_MME_MACRO(NVK_MME_XFB_COUNTER_LOAD)); - P_INLINE_DATA(p, cb_idx); + /* The STREAM_OUT_BUFFER_LOAD_WRITE_POINTER registers are 8 dword stride */ + P_INLINE_DATA(p, cb_idx * 8); P_INLINE_DATA(p, cb_addr >> 32); P_INLINE_DATA(p, cb_addr); } else {
