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:
Corentin Wallez
2018-02-06 09:53:08 -05:00
committed by Corentin Wallez
parent eba7c027f9
commit 099656dc7a
3 changed files with 3 additions and 34 deletions

View File

@@ -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));
}

View File

@@ -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;
}