radv: Flush before copying with PKT3_WRITE_DATA in CmdUpdateBuffer
authorAlex Smith <asmith@feralinteractive.com>
Tue, 14 Mar 2017 15:26:32 +0000 (15:26 +0000)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 14 Mar 2017 21:17:03 +0000 (22:17 +0100)
commite0cc32b85bd8cf5c2202037838a208983e2d793a
tree62e4f1c5e0eb6d84a95e197e6b7dd2eac3e4f533
parentcce43f6d8c40222099badaf52344d6a0eed993f3
radv: Flush before copying with PKT3_WRITE_DATA in CmdUpdateBuffer

Need to flush before updating the buffer to ensure that the copy is
ordered after previous accesses (assuming the app has performed the
appropriate barriers).

This fixes potential issues due to draws prior to an update reading
the new buffer content, despite having the necessary barriers between
them.

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_meta_buffer.c