Skip to content

Commit 095dd98

Browse files
MarijnS95claude
andcommitted
Remove unused pWaitDstStageMask from Vulkan submit
pWaitDstStageMask is only meaningful when wait semaphores are used, which this submit path does not use. This wasn't causing errors in practice because vkWaitForFences is called after every submit, preventing concurrent in-flight command buffers. The compute dispatch submit passed VK_PIPELINE_STAGE_TRANSFER_BIT, intending to wait for the prior buffer transfer submit to complete, but pWaitDstStageMask is a destination stage mask — it specifies which stages in the current submit to block until a wait semaphore signals, not which prior stages to wait on. Without semaphores this had no effect. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ef3571c commit 095dd98

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lib/API/VK/Device.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,8 +1106,7 @@ class VulkanDevice : public offloadtest::Device {
11061106
return llvm::Error::success();
11071107
}
11081108

1109-
llvm::Error executeCommandBuffer(InvocationState &IS,
1110-
VkPipelineStageFlags WaitMask = 0) {
1109+
llvm::Error executeCommandBuffer(InvocationState &IS) {
11111110
if (vkEndCommandBuffer(IS.CmdBuffer))
11121111
return llvm::createStringError(std::errc::device_or_resource_busy,
11131112
"Could not end command buffer.");
@@ -1116,7 +1115,6 @@ class VulkanDevice : public offloadtest::Device {
11161115
SubmitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
11171116
SubmitInfo.commandBufferCount = 1;
11181117
SubmitInfo.pCommandBuffers = &IS.CmdBuffer;
1119-
SubmitInfo.pWaitDstStageMask = &WaitMask;
11201118
VkFenceCreateInfo FenceInfo = {};
11211119
FenceInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
11221120
VkFence Fence;
@@ -2305,7 +2303,7 @@ class VulkanDevice : public offloadtest::Device {
23052303
if (auto Err = createCommands(P, State))
23062304
return Err;
23072305
llvm::outs() << "Commands created.\n";
2308-
if (auto Err = executeCommandBuffer(State, VK_PIPELINE_STAGE_TRANSFER_BIT))
2306+
if (auto Err = executeCommandBuffer(State))
23092307
return Err;
23102308
llvm::outs() << "Executed compute command buffer.\n";
23112309
if (auto Err = readBackData(P, State))

0 commit comments

Comments
 (0)