1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 19:24:12 +01:00

[d3d11] Do not enable D3D11_BIND_UNORDERED_ACCESS for back buffers

Not all formats can be used for unordered access views. An application
must explicitly request this feature during swap chain creation.
This commit is contained in:
Philip Rebohle 2018-03-12 13:03:33 +01:00
parent 3e60c8f316
commit 56c826be85
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -39,11 +39,13 @@ namespace dxvk {
desc.SampleDesc = pSwapChainDesc->SampleDesc; desc.SampleDesc = pSwapChainDesc->SampleDesc;
desc.Usage = D3D11_USAGE_DEFAULT; desc.Usage = D3D11_USAGE_DEFAULT;
desc.BindFlags = D3D11_BIND_RENDER_TARGET desc.BindFlags = D3D11_BIND_RENDER_TARGET
| D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_SHADER_RESOURCE;
| D3D11_BIND_UNORDERED_ACCESS;
desc.CPUAccessFlags = 0; desc.CPUAccessFlags = 0;
desc.MiscFlags = 0; desc.MiscFlags = 0;
if (pSwapChainDesc->BufferUsage & DXGI_USAGE_UNORDERED_ACCESS)
desc.BindFlags |= D3D11_BIND_UNORDERED_ACCESS;
try { try {
*ppInterface = ref(new D3D11PresentBackBuffer( *ppInterface = ref(new D3D11PresentBackBuffer(
new D3D11Texture2D(m_device, &desc))); new D3D11Texture2D(m_device, &desc)));