From: Dave Airlie <[email protected]>

In order to handle pause/resume properly, the offset should
be added to the buffer binding not to the begin/end paths.

Fixes: ext_transform_feedback-alignment* under zink
---
 src/amd/vulkan/radv_cmd_buffer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 63a1fd6dff3..2c490d1f88a 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -1950,6 +1950,8 @@ radv_flush_streamout_descriptors(struct radv_cmd_buffer 
*cmd_buffer)
 
                        va = radv_buffer_get_va(buffer->bo) + buffer->offset;
 
+                       va += sb[i].offset;
+
                        /* Set the descriptor.
                         *
                         * On VI, the format must be non-INVALID, otherwise
@@ -4783,7 +4785,7 @@ void radv_CmdBeginTransformFeedbackEXT(
                                        
STRMOUT_OFFSET_SOURCE(STRMOUT_OFFSET_FROM_PACKET)); /* control */
                        radeon_emit(cs, 0); /* unused */
                        radeon_emit(cs, 0); /* unused */
-                       radeon_emit(cs, sb[i].offset >> 2); /* buffer offset in 
DW */
+                       radeon_emit(cs, 0); /* unused */
                        radeon_emit(cs, 0); /* unused */
                }
        }
-- 
2.17.2

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to