upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/test/command_list_test.cpp
diff options
context:
space:
mode:
authorkotorvr <332716892+kotorvr@users.noreply.github.com>2026-11-22 01:29:19 +0000
committerkotorvr <332716892+kotorvr@users.noreply.github.com>2026-11-22 01:29:19 +0000
commite40bd6563e2efe885e8c13884a34c798b15610b5 (patch)
tree436506d8470d33100285499852b8800542073222 /runtime/test/command_list_test.cpp
parent1eaca53672187aed2d86b98264f9d617cd6c9720 (diff)
parentc432cdce127ed2d22a99aa6ef57d91db4a10b5bb (diff)
Merge main into D3D-26: predication and reserved resources on main
main added SetPredication (D3D-18) and reserved resources; both sides are kept. The predication replay test took part E, so the D3D-26 test is now part F. An atomic copy recorded under a predicate is counted with the other copies that Vulkan's conditional rendering cannot skip, and SetPredication, DiscardResource and the atomic copies are all refused in a bundle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/command_list_test.cpp')
-rw-r--r--runtime/test/command_list_test.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/test/command_list_test.cpp b/runtime/test/command_list_test.cpp
index 101baf218..968288697 100644
--- a/runtime/test/command_list_test.cpp
+++ b/runtime/test/command_list_test.cpp
@@ -210,5 +210,21 @@ int main() {
210 CHECK(!open_parent.execute_bundle(open_parent)); // a list cannot execute itself 210 CHECK(!open_parent.execute_bundle(open_parent)); // a list cannot execute itself
211 CHECK(open_parent.commands().empty()); 211 CHECK(open_parent.commands().empty());
212 212
213 // SetPredication (D3D-18): the op must be one of the two D3D12 values and the offset 8-byte aligned; a null
214 // buffer turns it off whatever the other arguments are.
215 namespace pred = d3d12_predication;
216 CommandList predicated;
217 CHECK(predicated.set_predication({7, 0, pred::equal_zero}));
218 CHECK(predicated.set_predication({7, 16, pred::not_equal_zero}));
219 CHECK(!predicated.set_predication({7, 4, pred::equal_zero})); // not 8-byte aligned
220 CHECK(!predicated.set_predication({7, 0, 2})); // no such op
221 CHECK(predicated.set_predication({0, 4, 2})); // off: offset and op ignored
222 CHECK(predicated.close());
223 CHECK(!predicated.set_predication({7, 0, pred::equal_zero})); // closed
224 CHECK(predicated.commands().size() == 3);
225 CHECK(std::get<Predication>(predicated.commands()[0]).op == pred::equal_zero);
226 CHECK(std::get<Predication>(predicated.commands()[1]).offset == 16);
227 const auto& off = std::get<Predication>(predicated.commands()[2]);
228 CHECK(off.buffer == 0 && off.offset == 0 && off.op == 0);
213 return 0; 229 return 0;
214} 230}