upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/test
diff options
context:
space:
mode:
authorPixel-Katana <359786902+Pixel-Katana@users.noreply.github.com>2026-11-23 19:44:57 -0600
committerPixel-Katana <359786902+Pixel-Katana@users.noreply.github.com>2026-11-23 19:44:57 -0600
commit0c9864c98eae8bf3a7fe9c8d758ffb9155e10b14 (patch)
tree587e6a6be2aa8bcbc0c531164f10a1bae0b064e3 /runtime/test
parent30daa6958bd08d4df402cdd0cb6d021ef072cd9d (diff)
d3d12_com_test: a depth clear outside [0, 1] closes the list (follow-up to 3ce953ae8)
3ce953ae8 made CommandList::clear_depth_stencil record a depth outside [0, 1] as given, matching WARP, and updated command_list_test, d3d12_clear_test and d3d12_close_parity_test, but d3d12_com_test still expected Close to return E_INVALIDARG for ClearDepthStencilView(depth 2.0), so it fails on main: "line 345: list->Close() == E_INVALIDARG". It now expects S_OK, as the close-parity rows do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test')
-rw-r--r--runtime/test/d3d12_com_test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/test/d3d12_com_test.cpp b/runtime/test/d3d12_com_test.cpp
index d4d3cdce7..d1d4bf3a6 100644
--- a/runtime/test/d3d12_com_test.cpp
+++ b/runtime/test/d3d12_com_test.cpp
@@ -338,11 +338,12 @@ int main(int argc, char** argv) {
338 EXPECT(context.layout(rt::d3d12::resource_id(ds_resource), 0) == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); 338 EXPECT(context.layout(rt::d3d12::resource_id(ds_resource), 0) == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
339 EXPECT(context.layout(rt::d3d12::resource_id(ds_resource), 1) == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL); 339 EXPECT(context.layout(rt::d3d12::resource_id(ds_resource), 1) == VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL);
340 340
341 // A depth outside [0, 1] makes Close report the invalid call, as D3D12 does. 341 // A depth outside [0, 1] is recorded as given and the list closes, as on WARP (3ce953ae8;
342 // d3d12_close_parity_test "ClearDepthStencilView depth 1.5", d3d12_clear_test reads the texels back).
342 EXPECT(SUCCEEDED(allocator->Reset())); 343 EXPECT(SUCCEEDED(allocator->Reset()));
343 EXPECT(SUCCEEDED(list->Reset(allocator.p, nullptr))); 344 EXPECT(SUCCEEDED(list->Reset(allocator.p, nullptr)));
344 list->ClearDepthStencilView(dsv_handle, D3D12_CLEAR_FLAG_DEPTH, 2.0f, 0, 0, nullptr); 345 list->ClearDepthStencilView(dsv_handle, D3D12_CLEAR_FLAG_DEPTH, 2.0f, 0, 0, nullptr);
345 EXPECT(list->Close() == E_INVALIDARG); 346 EXPECT(list->Close() == S_OK);
346 347
347 // State-setting calls on a closed direct list or bundle are ignored and do not mutate recorded state. 348 // State-setting calls on a closed direct list or bundle are ignored and do not mutate recorded state.
348 EXPECT(SUCCEEDED(allocator->Reset())); 349 EXPECT(SUCCEEDED(allocator->Reset()));