Mesa (master): turnip: Fix crashes in compute with no descriptors to load.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 9 19:04:02 UTC 2020
Module: Mesa
Branch: master
Commit: 58dd904c592850a4886c02e65b56e87641d2ecbf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=58dd904c592850a4886c02e65b56e87641d2ecbf
Author: Eric Anholt <eric at anholt.net>
Date: Tue Jun 9 11:03:12 2020 -0700
turnip: Fix crashes in compute with no descriptors to load.
Found when trying to rebase cheza VK CI on top of this change.
Fixes: 334204823eee ("tu: Fix context faults loading unused descriptor sets")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5266>
---
src/freedreno/vulkan/tu_cmd_buffer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c
index 02cae98e3e9..af0eca07096 100644
--- a/src/freedreno/vulkan/tu_cmd_buffer.c
+++ b/src/freedreno/vulkan/tu_cmd_buffer.c
@@ -3906,8 +3906,10 @@ tu_dispatch(struct tu_cmd_buffer *cmd,
if (ib.size)
tu_cs_emit_ib(cs, &ib);
- if (cmd->state.dirty & TU_CMD_DIRTY_COMPUTE_DESCRIPTOR_SETS)
+ if ((cmd->state.dirty & TU_CMD_DIRTY_COMPUTE_DESCRIPTOR_SETS) &&
+ pipeline->load_state.state_ib.size > 0) {
tu_cs_emit_ib(cs, &pipeline->load_state.state_ib);
+ }
cmd->state.dirty &=
~(TU_CMD_DIRTY_COMPUTE_DESCRIPTOR_SETS | TU_CMD_DIRTY_COMPUTE_PIPELINE);
More information about the mesa-commit
mailing list