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 <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19433>
This commit is contained in:
Samuel Pitoiset
2022-11-01 09:11:17 +01:00
parent 3b9f36db47
commit d467ff7b0e
+3 -4
View File
@@ -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) |