radv: fix binding transform feedback buffers
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 5 Mar 2019 17:09:12 +0000 (18:09 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 20 Mar 2019 08:06:40 +0000 (09:06 +0100)
The mask should be accumulated if two calls are used for
binding two buffers at different indexes. Otherwise, the
driver only accounts for the last one.

Noticed while glancing at this code.

Cc: 18.3 19.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index ae8f50d03483e5821a8ec7629590dfdf044f6fbf..fdf3024147d9194f5ea88cf544d109a8052c256e 100644 (file)
@@ -4993,7 +4993,7 @@ void radv_CmdBindTransformFeedbackBuffersEXT(
                enabled_mask |= 1 << idx;
        }
 
-       cmd_buffer->state.streamout.enabled_mask = enabled_mask;
+       cmd_buffer->state.streamout.enabled_mask |= enabled_mask;
 
        cmd_buffer->state.dirty |= RADV_CMD_DIRTY_STREAMOUT_BUFFER;
 }