Module: Mesa
Branch: master
Commit: a8c51b1cd9168b621e27cf5308d0dd8fc08f8a4a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8c51b1cd9168b621e27cf5308d0dd8fc08f8a4a

Author: Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl>
Date:   Tue Mar 28 01:48:15 2017 +0200

radv: flush DB cache before and after HTILE decompress.

It reads @ writes the DB cache, and we haven't flushed dst caches yet,
so DB cache may be stale. Also the user might be shader read (and probably is),
so also flush after.

Signed-off-by: Bas Nieuwenhuizen <ba...@google.com>
Reviewed-by: Dave Airlie <airl...@redhat.com>
CC: <mesa-sta...@lists.freedesktop.org>
Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver")

---

 src/amd/vulkan/radv_cmd_buffer.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index d3397a0e00..1b13ae7bc6 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2771,7 +2771,13 @@ static void radv_handle_depth_image_transition(struct 
radv_cmd_buffer *cmd_buffe
                local_range.baseMipLevel = 0;
                local_range.levelCount = 1;
 
+               cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_DB |
+                                               
RADV_CMD_FLAG_FLUSH_AND_INV_DB_META;
+
                radv_decompress_depth_image_inplace(cmd_buffer, image, 
&local_range);
+
+               cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_DB |
+                                               
RADV_CMD_FLAG_FLUSH_AND_INV_DB_META;
        }
 }
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to