浏览代码

Refix new resource creation in rawgather test (#4443)

The previous usage of createCommittedResource3 had a parameter of the
incorrect type too
Greg Roth 3 年之前
父节点
当前提交
0d053cce0e
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      tools/clang/unittests/HLSL/ExecutionTest.cpp

+ 4 - 1
tools/clang/unittests/HLSL/ExecutionTest.cpp

@@ -937,11 +937,14 @@ public:
 #if defined(NTDDI_WIN10_CU) && WDK_NTDDI_VERSION >= NTDDI_WIN10_CU
     if (castFormat) {
       CComPtr<ID3D12Device10> pDevice10;
+      // Copy resDesc0 to resDesc1 zeroing anything new
+      D3D12_RESOURCE_DESC1 resDesc1 = {0};
+      memcpy(&resDesc1, &resDesc, sizeof(resDesc));
       VERIFY_SUCCEEDED(pDevice->QueryInterface(IID_PPV_ARGS(&pDevice10)));
       VERIFY_SUCCEEDED(pDevice10->CreateCommittedResource3(
         &defaultHeapProperties,
         D3D12_HEAP_FLAG_NONE,
-        &resDesc,
+        &resDesc1,
         D3D12_BARRIER_LAYOUT_COPY_DEST,
         nullptr,
         nullptr,