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:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 23:10:40 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 23:10:40 -0500
commit0539527a1f45d5b4bf5bc471b4f25413356b2939 (patch)
tree53621033be6a3e9454c75d6bf33b12d4932a6c34 /runtime/test/command_list_test.cpp
parentb84027fe8690665cd57c2c5dc9f5056ba216c8a8 (diff)
parent24e3b9683e693a671071c7a39d9f78ae0b639c1d (diff)
Merge pull request #4038 from pmilewsskiedu-gif
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.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/runtime/test/command_list_test.cpp b/runtime/test/command_list_test.cpp
index 4d877d429..726dd2659 100644
--- a/runtime/test/command_list_test.cpp
+++ b/runtime/test/command_list_test.cpp
@@ -104,7 +104,8 @@ int main() {
104 CHECK(std::get<BufferBarrier>(list.commands()[2]).resource == 7); 104 CHECK(std::get<BufferBarrier>(list.commands()[2]).resource == 7);
105 CHECK(std::get<TextureBarrier>(list.commands()[3]).flags == texture_barrier_discard); 105 CHECK(std::get<TextureBarrier>(list.commands()[3]).flags == texture_barrier_discard);
106 106
107 // Copies: D3D12's own call rules (aligned footprints, a non-empty box, distinct CopyResource operands). 107 // Copies: D3D12's own call rules (aligned footprints; degenerate boxes and DEFAULT-heap
108 // CopyResource self-copies are accepted as no-ops and must not record Vulkan commands).
108 CHECK(list.reset()); 109 CHECK(list.reset());
109 CHECK(list.copy_buffer({1, 0, 2, 16, 64})); 110 CHECK(list.copy_buffer({1, 0, 2, 16, 64}));
110 CHECK(list.copy_buffer({1, 0, 2, 16, 0})); 111 CHECK(list.copy_buffer({1, 0, 2, 16, 0}));
@@ -116,13 +117,18 @@ int main() {
116 CHECK(!list.copy_texture({placed, 0, 0, 0, placed, false, {}})); // footprint to footprint 117 CHECK(!list.copy_texture({placed, 0, 0, 0, placed, false, {}})); // footprint to footprint
117 CHECK(!list.copy_texture({texture, 0, 0, 0, {4, true, 0, 100, 8, 8, 1, 256}, false, {}})); // offset not 512 118 CHECK(!list.copy_texture({texture, 0, 0, 0, {4, true, 0, 100, 8, 8, 1, 256}, false, {}})); // offset not 512
118 CHECK(!list.copy_texture({texture, 0, 0, 0, {4, true, 0, 512, 8, 8, 1, 100}, false, {}})); // pitch not 256 119 CHECK(!list.copy_texture({texture, 0, 0, 0, {4, true, 0, 512, 8, 8, 1, 100}, false, {}})); // pitch not 256
119 CHECK(!list.copy_texture({texture, 0, 0, 0, texture, true, {2, 2, 0, 2, 6, 1}})); // empty box 120 CHECK(list.commands().size() == 3);
121 CHECK(list.copy_texture({texture, 0, 0, 0, texture, true, {2, 2, 0, 2, 6, 1}})); // empty box, no-op
122 CHECK(list.commands().size() == 3);
120 CHECK(list.copy_resource({5, 6})); 123 CHECK(list.copy_resource({5, 6}));
121 CHECK(!list.copy_resource({5, 5})); 124 CHECK(list.commands().size() == 4);
125 CHECK(list.copy_resource({5, 5})); // DEFAULT-heap self-copy; COM layer rejects UPLOAD self-copies
126 CHECK(list.commands().size() == 4);
122 // A volume's box has a z range, and its footprint a depth; a resolve needs two different resources. 127 // A volume's box has a z range, and its footprint a depth; a resolve needs two different resources.
123 CHECK(list.copy_texture({texture, 0, 0, 2, {4, true, 0, 512, 4, 4, 4, 256}, true, {0, 0, 1, 4, 4, 3}})); 128 CHECK(list.copy_texture({texture, 0, 0, 2, {4, true, 0, 512, 4, 4, 4, 256}, true, {0, 0, 1, 4, 4, 3}}));
124 CHECK(!list.copy_texture({texture, 0, 0, 0, {4, true, 0, 512, 4, 4, 0, 256}, false, {}})); // no slices 129 CHECK(!list.copy_texture({texture, 0, 0, 0, {4, true, 0, 512, 4, 4, 0, 256}, false, {}})); // no slices
125 CHECK(!list.copy_texture({texture, 0, 0, 0, texture, true, {0, 0, 2, 4, 4, 2}})); // empty in z 130 CHECK(list.copy_texture({texture, 0, 0, 0, texture, true, {0, 0, 2, 4, 4, 2}})); // empty in z, no-op
131 CHECK(list.commands().size() == 5);
126 CHECK(list.resolve_subresource({7, 1, 8, 0})); 132 CHECK(list.resolve_subresource({7, 1, 8, 0}));
127 CHECK(!list.resolve_subresource({7, 0, 7, 0})); 133 CHECK(!list.resolve_subresource({7, 0, 7, 0}));
128 CHECK(!list.resolve_subresource({0, 0, 8, 0})); 134 CHECK(!list.resolve_subresource({0, 0, 8, 0}));