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:
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 4367df6ec..7e95c5fc4 100644
--- a/runtime/test/command_list_test.cpp
+++ b/runtime/test/command_list_test.cpp
@@ -275,6 +275,22 @@ int main() {
275 CHECK(std::get<Predication>(predicated.commands()[1]).offset == 16); 275 CHECK(std::get<Predication>(predicated.commands()[1]).offset == 16);
276 const auto& off = std::get<Predication>(predicated.commands()[2]); 276 const auto& off = std::get<Predication>(predicated.commands()[2]);
277 CHECK(off.buffer == 0 && off.offset == 0 && off.op == 0); 277 CHECK(off.buffer == 0 && off.offset == 0 && off.op == 0);
278 CHECK(SamplePositions::valid_grid(16, 1));
279 CHECK(SamplePositions::valid_grid(4, 4));
280 CHECK(!SamplePositions::valid_grid(8, 4));
281 CHECK(!SamplePositions::valid_grid(3, 1));
282 CHECK(!SamplePositions::valid_grid(4, 0));
283 CommandList sampled;
284 SamplePositions pattern{4, 4};
285 pattern.positions[15] = {-8, 7};
286 CHECK(sampled.set_sample_positions(pattern));
287 pattern.positions[15] = {0, 0};
288 CHECK(sampled.set_sample_positions({}));
289 CHECK(sampled.close());
290 CHECK(!sampled.set_sample_positions(pattern));
291 const auto& recorded_pattern = std::get<SamplePositions>(sampled.commands()[0]);
292 CHECK(recorded_pattern.positions[15].x == -8 && recorded_pattern.positions[15].y == 7);
293 CHECK(std::get<SamplePositions>(sampled.commands()[1]).samples == 0);
278 // Queries: timestamps only end; other queries are begun and ended in one list, with the same type, and are not 294 // Queries: timestamps only end; other queries are begun and ended in one list, with the same type, and are not
279 // begun twice or resolved while running. Resolve offsets are multiples of 8; a resolve of nothing records nothing. 295 // begun twice or resolved while running. Resolve offsets are multiples of 8; a resolve of nothing records nothing.
280 namespace q = d3d12_query; 296 namespace q = d3d12_query;