mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
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 <billkris@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10190>
This commit is contained in:
parent
0f2bf55c7e
commit
8cc3100226
1 changed files with 1 additions and 12 deletions
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue