upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/shims/d3d12_com.cpp
diff options
context:
space:
mode:
authorExopus <230622659+Exopus-0x65f7ad0@users.noreply.github.com>2026-11-23 00:12:06 +0100
committerExopus <230622659+Exopus-0x65f7ad0@users.noreply.github.com>2026-11-23 00:12:06 +0100
commitb70fdadc8bb0e390d33ef4ca0034defb61c523d2 (patch)
tree1e87ea0f01d3cac4f06db42abab536034b004aff /runtime/shims/d3d12_com.cpp
parentaa2988cc555bad7ecd508b48a702adbb32fe7c95 (diff)
d3d12: ExecuteCommandLists refuses a list whose type isn't the queue's
ID3D12CommandQueue::ExecuteCommandLists only refused bundles: a DIRECT list ran on a COPY or COMPUTE queue (its draws recorded for a transfer-only or compute-only Vulkan family) and a COMPUTE or COPY list on any queue. D3D12 requires the list's type to be the queue's (the debug layer's EXECUTECOMMANDLISTS_COMMANDLISTMISMATCH, message 836). A mismatched list now refuses the whole batch with nothing submitted, like the layer's other ExecuteCommandLists checks. d3d12_queue_list_type_test: every list type on every queue type, and a batch whose matching DIRECT list copies a marker while its second list doesn't match; the marker must not land. On the old code 8 of its 16 checks fail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/shims/d3d12_com.cpp')
-rw-r--r--runtime/shims/d3d12_com.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/shims/d3d12_com.cpp b/runtime/shims/d3d12_com.cpp
index d9b1a009c..812e9dcd9 100644
--- a/runtime/shims/d3d12_com.cpp
+++ b/runtime/shims/d3d12_com.cpp
@@ -1237,6 +1237,16 @@ public:
1237 d3d12_trace::record(method, "failed"); 1237 d3d12_trace::record(method, "failed");
1238 return; 1238 return;
1239 } 1239 }
1240 // A list runs only on a queue of its own type (the debug layer's EXECUTECOMMANDLISTS_COMMANDLISTMISMATCH,
1241 // message 836): a DIRECT list's draws would otherwise be recorded for a COPY queue's transfer-only
1242 // Vulkan family. The whole batch is refused, as for the other checks here.
1243 if (list->type() != desc_.Type) {
1244 std::fprintf(stderr, "[rt] d3d12: ExecuteCommandLists: list %u has type %d, the queue type %d\n", i,
1245 int(list->type()), int(desc_.Type));
1246 last_result_ = leonida::ReplayResult::unsupported;
1247 d3d12_trace::record(method, "failed");
1248 return;
1249 }
1240 if (!timestamps_fit(*list)) { 1250 if (!timestamps_fit(*list)) {
1241 last_result_ = leonida::ReplayResult::invalid_query; 1251 last_result_ = leonida::ReplayResult::invalid_query;
1242 d3d12_trace::record(method, "failed"); 1252 d3d12_trace::record(method, "failed");