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:
parent
3e60c8f316
commit
56c826be85
@ -39,11 +39,13 @@ namespace dxvk {
|
||||
desc.SampleDesc = pSwapChainDesc->SampleDesc;
|
||||
desc.Usage = D3D11_USAGE_DEFAULT;
|
||||
desc.BindFlags = D3D11_BIND_RENDER_TARGET
|
||||
| D3D11_BIND_SHADER_RESOURCE
|
||||
| D3D11_BIND_UNORDERED_ACCESS;
|
||||
| D3D11_BIND_SHADER_RESOURCE;
|
||||
desc.CPUAccessFlags = 0;
|
||||
desc.MiscFlags = 0;
|
||||
|
||||
if (pSwapChainDesc->BufferUsage & DXGI_USAGE_UNORDERED_ACCESS)
|
||||
desc.BindFlags |= D3D11_BIND_UNORDERED_ACCESS;
|
||||
|
||||
try {
|
||||
*ppInterface = ref(new D3D11PresentBackBuffer(
|
||||
new D3D11Texture2D(m_device, &desc)));
|
||||
|
Loading…
Reference in New Issue
Block a user