Skip to content

Commit 0d053cc

Browse files
authored
Refix new resource creation in rawgather test (microsoft#4443)
The previous usage of createCommittedResource3 had a parameter of the incorrect type too
1 parent 2556103 commit 0d053cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/clang/unittests/HLSL/ExecutionTest.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,11 +937,14 @@ class ExecutionTest {
937937
#if defined(NTDDI_WIN10_CU) && WDK_NTDDI_VERSION >= NTDDI_WIN10_CU
938938
if (castFormat) {
939939
CComPtr<ID3D12Device10> pDevice10;
940+
// Copy resDesc0 to resDesc1 zeroing anything new
941+
D3D12_RESOURCE_DESC1 resDesc1 = {0};
942+
memcpy(&resDesc1, &resDesc, sizeof(resDesc));
940943
VERIFY_SUCCEEDED(pDevice->QueryInterface(IID_PPV_ARGS(&pDevice10)));
941944
VERIFY_SUCCEEDED(pDevice10->CreateCommittedResource3(
942945
&defaultHeapProperties,
943946
D3D12_HEAP_FLAG_NONE,
944-
&resDesc,
947+
&resDesc1,
945948
D3D12_BARRIER_LAYOUT_COPY_DEST,
946949
nullptr,
947950
nullptr,

0 commit comments

Comments
 (0)