mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 14:46:08 +00:00
D3D12: Fix swapchains after 921fb5e1ce
The Swapchain::Configure was changed to not require an initial usage anymore. Previously the code was doing a transition to this usage causing the code to now transition to <uninitialized data> usage. Fix this by deleting code. Also make TextureD3D12 responsible for the transition to PRESENT.
This commit is contained in:
committed by
Corentin Wallez
parent
eba7c027f9
commit
099656dc7a
@@ -62,22 +62,11 @@ namespace backend { namespace d3d12 {
|
||||
backendDevice->NextSerial();
|
||||
}
|
||||
|
||||
void ExecuteCommandLists(nxtDevice device,
|
||||
std::initializer_list<ID3D12CommandList*> commandLists) {
|
||||
Device* backendDevice = reinterpret_cast<Device*>(device);
|
||||
backendDevice->ExecuteCommandLists(commandLists);
|
||||
}
|
||||
|
||||
void WaitForSerial(nxtDevice device, uint64_t serial) {
|
||||
Device* backendDevice = reinterpret_cast<Device*>(device);
|
||||
backendDevice->WaitForSerial(serial);
|
||||
}
|
||||
|
||||
void OpenCommandList(nxtDevice device, ComPtr<ID3D12GraphicsCommandList>* commandList) {
|
||||
Device* backendDevice = reinterpret_cast<Device*>(device);
|
||||
return backendDevice->OpenCommandList(commandList);
|
||||
}
|
||||
|
||||
void ASSERT_SUCCESS(HRESULT hr) {
|
||||
ASSERT(SUCCEEDED(hr));
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ namespace backend { namespace d3d12 {
|
||||
resourceState |= D3D12_RESOURCE_STATE_RENDER_TARGET;
|
||||
}
|
||||
}
|
||||
if (usage & nxt::TextureUsageBit::Present) {
|
||||
resourceState |= D3D12_RESOURCE_STATE_PRESENT;
|
||||
}
|
||||
|
||||
return resourceState;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user