Mesa (master): radv/gfx10: make GDS idle when leaving the IB
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Sep 16 10:12:48 UTC 2019
Module: Mesa
Branch: master
Commit: 7314f6ef97cd3dabb75774abc6283a8813e158ca
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7314f6ef97cd3dabb75774abc6283a8813e158ca
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Tue Sep 10 10:56:24 2019 +0200
radv/gfx10: make GDS idle when leaving the IB
NGG streamout uses GDS and we have to make sure that another
process isn't going to overwrite GDS while our shaders are busy.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
src/amd/vulkan/radv_cmd_buffer.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 5b736c67ae8..f0fdad68a94 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -3615,6 +3615,13 @@ VkResult radv_EndCommandBuffer(
*/
cmd_buffer->state.flush_bits |= cmd_buffer->active_query_flush_bits;
+ /* Since NGG streamout uses GDS, we need to make GDS idle when
+ * we leave the IB, otherwise another process might overwrite
+ * it while our shaders are busy.
+ */
+ if (cmd_buffer->gds_needed)
+ cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_PS_PARTIAL_FLUSH;
+
si_emit_cache_flush(cmd_buffer);
}
More information about the mesa-commit
mailing list