Mesa (staging/22.1): vulkan: Set signals[i].stageMask = ALL_COMMANDS for QueueSubmit2 wrapping

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 26 16:22:29 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: f6c77aa5585d04fa6338c3678cd875c30f5bc4d6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f6c77aa5585d04fa6338c3678cd875c30f5bc4d6

Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date:   Mon Apr 25 11:08:42 2022 -0500

vulkan: Set signals[i].stageMask = ALL_COMMANDS for QueueSubmit2 wrapping

My understanding of the signal masks is that they control what stages
must complete before the semaphore is signaled.  Using 0 theoretically
means the semaphore could be signaled immediately without waiting on
anything.  Use ~0 instead to say it depends on everything.

Fixes: 97f0a4494b97 ("vulkan: implement legacy entrypoints on top of VK_KHR_synchronization2")
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16145>
(cherry picked from commit 02fea6c179b00bd9dad179638ee1491c1acea65a)

---

 .pick_status.json                        | 2 +-
 src/vulkan/runtime/vk_synchronization2.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 7c68883a4e6..f3e7097af09 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -220,7 +220,7 @@
         "description": "vulkan: Set signals[i].stageMask = ALL_COMMANDS for QueueSubmit2 wrapping",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "97f0a4494b97d89146cf66dfa0c9b1946bf3fc22"
     },
diff --git a/src/vulkan/runtime/vk_synchronization2.c b/src/vulkan/runtime/vk_synchronization2.c
index aead366ce17..870f93ce1cb 100644
--- a/src/vulkan/runtime/vk_synchronization2.c
+++ b/src/vulkan/runtime/vk_synchronization2.c
@@ -370,7 +370,7 @@ vk_common_QueueSubmit(
             .sType     = VK_STRUCTURE_TYPE_SEMAPHORE_SUBMIT_INFO_KHR,
             .semaphore = pSubmits[s].pSignalSemaphores[i],
             .value     = signal_values ? signal_values[i] : 0,
-            .stageMask = 0,
+            .stageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
             .deviceIndex = group_info ? group_info->pSignalSemaphoreDeviceIndices[i] : 0,
          };
       }



More information about the mesa-commit mailing list