Mesa (master): radv: Flush before copying with PKT3_WRITE_DATA in CmdUpdateBuffer
Bas Nieuwenhuizen
bnieuwenhuizen at kemper.freedesktop.org
Tue Mar 14 21:26:21 UTC 2017
Module: Mesa
Branch: master
Commit: e0cc32b85bd8cf5c2202037838a208983e2d793a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0cc32b85bd8cf5c2202037838a208983e2d793a
Author: Alex Smith <asmith at feralinteractive.com>
Date: Tue Mar 14 15:26:32 2017 +0000
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 at feralinteractive.com>
Cc: 17.0 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Dave Airlie <airlied at redhat.com>
---
src/amd/vulkan/radv_meta_buffer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c
index cd2973f..1e94f3b 100644
--- a/src/amd/vulkan/radv_meta_buffer.c
+++ b/src/amd/vulkan/radv_meta_buffer.c
@@ -524,6 +524,8 @@ void radv_CmdUpdateBuffer(
assert(!(va & 3));
if (dataSize < 4096) {
+ si_emit_cache_flush(cmd_buffer);
+
cmd_buffer->device->ws->cs_add_buffer(cmd_buffer->cs, dst_buffer->bo, 8);
radeon_check_space(cmd_buffer->device->ws, cmd_buffer->cs, words + 4);
More information about the mesa-commit
mailing list