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:
authorpmilewsskiedu-gif <pmilewsskiedu-gif@users.noreply.github.com>2026-11-22 18:45:33 -0500
committerpmilewsskiedu-gif <pmilewsskiedu-gif@users.noreply.github.com>2026-11-22 18:45:33 -0500
commit24e3b9683e693a671071c7a39d9f78ae0b639c1d (patch)
treeb5d5ade696d917c0e08e0fa0e3026d4e000d57b2 /runtime/test/command_list_test.cpp
parentaf835743789de65b82f38b3bc24c1cc036fa09a0 (diff)
test: assert legal no-op copies emit no recorded commands
Diffstat (limited to 'runtime/test/command_list_test.cpp')
-rw-r--r--runtime/test/command_list_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/test/command_list_test.cpp b/runtime/test/command_list_test.cpp
index e2b14e7c4..1a10f8806 100644
--- a/runtime/test/command_list_test.cpp
+++ b/runtime/test/command_list_test.cpp
@@ -117,13 +117,18 @@ int main() {
117 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
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, 100, 8, 8, 1, 256}, false, {}})); // offset not 512
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, {4, true, 0, 512, 8, 8, 1, 100}, false, {}})); // pitch not 256
120 CHECK(list.commands().size() == 3);
120 CHECK(list.copy_texture({texture, 0, 0, 0, texture, true, {2, 2, 0, 2, 6, 1}})); // empty box, no-op 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);
121 CHECK(list.copy_resource({5, 6})); 123 CHECK(list.copy_resource({5, 6}));
124 CHECK(list.commands().size() == 4);
122 CHECK(list.copy_resource({5, 5})); // DEFAULT-heap self-copy; COM layer rejects UPLOAD self-copies 125 CHECK(list.copy_resource({5, 5})); // DEFAULT-heap self-copy; COM layer rejects UPLOAD self-copies
126 CHECK(list.commands().size() == 4);
123 // 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.
124 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}}));
125 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
126 CHECK(list.copy_texture({texture, 0, 0, 0, texture, true, {0, 0, 2, 4, 4, 2}})); // empty in z, no-op 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);
127 CHECK(list.resolve_subresource({7, 1, 8, 0})); 132 CHECK(list.resolve_subresource({7, 1, 8, 0}));
128 CHECK(!list.resolve_subresource({7, 0, 7, 0})); 133 CHECK(!list.resolve_subresource({7, 0, 7, 0}));
129 CHECK(!list.resolve_subresource({0, 0, 8, 0})); 134 CHECK(!list.resolve_subresource({0, 0, 8, 0}));