Module: Mesa Branch: main Commit: d467ff7b0e3f213325acdfa56daacc02eb82a16d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d467ff7b0e3f213325acdfa56daacc02eb82a16d
Author: Samuel Pitoiset <[email protected]> Date: Tue Nov 1 09:11:17 2022 +0100 radv: set the correct buffer size for NGG streamout If the size is passed through CmdBindTransformFeedback() uses that. This partially fixes dEQP-VK.transform_feedback.simple.multiquery_1 by reporting the correct number of primitives written (the computation is based on the buffer size). There is still a bug around GDS offsets that will be fixed later. Tested on GFX10.3 by forcing NGG streamout. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19433> --- src/amd/vulkan/radv_cmd_buffer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 52943114b11..ab72186155e 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -4118,12 +4118,11 @@ radv_flush_streamout_descriptors(struct radv_cmd_buffer *cmd_buffer) */ uint32_t size = 0xffffffff; - /* Compute the correct buffer size for NGG streamout - * because it's used to determine the max emit per - * buffer. + /* Set the correct buffer size for NGG streamout because it's used to determine the max + * emit per buffer. */ if (cmd_buffer->device->physical_device->use_ngg_streamout) - size = buffer->vk.size - sb[i].offset; + size = sb[i].size; uint32_t rsrc_word3 = S_008F0C_DST_SEL_X(V_008F0C_SQ_SEL_X) | S_008F0C_DST_SEL_Y(V_008F0C_SQ_SEL_Y) |
