diff options
Diffstat (limited to 'runtime/test/command_list_test.cpp')
| -rw-r--r-- | runtime/test/command_list_test.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/test/command_list_test.cpp b/runtime/test/command_list_test.cpp index e459b4cc8..e2b14e7c4 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,13 @@ 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.copy_texture({texture, 0, 0, 0, texture, true, {2, 2, 0, 2, 6, 1}})); // empty box, no-op |
| 120 | CHECK(list.copy_resource({5, 6})); | 121 | CHECK(list.copy_resource({5, 6})); |
| 121 | CHECK(!list.copy_resource({5, 5})); | 122 | CHECK(list.copy_resource({5, 5})); // DEFAULT-heap self-copy; COM layer rejects UPLOAD self-copies |
| 122 | // A volume's box has a z range, and its footprint a depth; a resolve needs two different resources. | 123 | // 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}})); | 124 | 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 | 125 | 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 | 126 | CHECK(list.copy_texture({texture, 0, 0, 0, texture, true, {0, 0, 2, 4, 4, 2}})); // empty in z, no-op |
| 126 | CHECK(list.resolve_subresource({7, 1, 8, 0})); | 127 | CHECK(list.resolve_subresource({7, 1, 8, 0})); |
| 127 | CHECK(!list.resolve_subresource({7, 0, 7, 0})); | 128 | CHECK(!list.resolve_subresource({7, 0, 7, 0})); |
| 128 | CHECK(!list.resolve_subresource({0, 0, 8, 0})); | 129 | CHECK(!list.resolve_subresource({0, 0, 8, 0})); |