Module: Mesa
Branch: master
Commit: 8cc3100226d118997c1714f34d0c24e28177dc25
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8cc3100226d118997c1714f34d0c24e28177dc25

Author: Jesse Natalie <[email protected]>
Date:   Mon Apr 12 08:38:57 2021 -0700

microsoft/clc: Update unit test to always use COMMON state for buffers

New Windows versions have new debug validation warning that for resources that
aren't actually UPLOAD/READBACK (which these aren't, thanks to the
GetCustomHeapProperties call), initial state that's not COMMON doesn't actually
do anything, which causes these tests to all fail because they verify that
they don't produce debug layer messages.

Reviewed-By: Bill Kristiansen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10190>

---

 src/microsoft/clc/compute_test.cpp | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/microsoft/clc/compute_test.cpp 
b/src/microsoft/clc/compute_test.cpp
index 6611a96174a..335c52a97f4 100644
--- a/src/microsoft/clc/compute_test.cpp
+++ b/src/microsoft/clc/compute_test.cpp
@@ -247,20 +247,9 @@ ComputeTest::create_buffer(int size, D3D12_HEAP_TYPE 
heap_type)
 
    D3D12_HEAP_PROPERTIES heap_pris = dev->GetCustomHeapProperties(0, 
heap_type);
 
-   D3D12_RESOURCE_STATES initial_state = D3D12_RESOURCE_STATE_COMMON;
-   switch (heap_type) {
-   case D3D12_HEAP_TYPE_UPLOAD:
-      initial_state = D3D12_RESOURCE_STATE_GENERIC_READ;
-      break;
-
-   case D3D12_HEAP_TYPE_READBACK:
-      initial_state = D3D12_RESOURCE_STATE_COPY_DEST;
-      break;
-   }
-
    ComPtr<ID3D12Resource> res;
    if (FAILED(dev->CreateCommittedResource(&heap_pris,
-       D3D12_HEAP_FLAG_NONE, &desc, initial_state,
+       D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_COMMON,
        NULL, __uuidof(ID3D12Resource), (void **)&res)))
       throw runtime_error("CreateCommittedResource failed");
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to