mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-13 19:29:14 +01:00
[d3d11] Fix issue with back buffer creation
In case the window size is 0 in either dimension, we ended up creating an image with an invalid size. Fixes Vulkan validation errors in Hearthstone.
This commit is contained in:
parent
255712a1f2
commit
60bf471f06
@ -46,8 +46,8 @@ namespace dxvk {
|
||||
const DXGI_SWAP_CHAIN_DESC1* pSwapChainDesc,
|
||||
IDXGIVkBackBuffer** ppInterface) {
|
||||
D3D11_COMMON_TEXTURE_DESC desc;
|
||||
desc.Width = pSwapChainDesc->Width;
|
||||
desc.Height = pSwapChainDesc->Height;
|
||||
desc.Width = std::max(pSwapChainDesc->Width, 1u);
|
||||
desc.Height = std::max(pSwapChainDesc->Height, 1u);
|
||||
desc.Depth = 1;
|
||||
desc.MipLevels = 1;
|
||||
desc.ArraySize = 1;
|
||||
@ -58,7 +58,7 @@ namespace dxvk {
|
||||
| D3D11_BIND_SHADER_RESOURCE;
|
||||
desc.CPUAccessFlags = 0;
|
||||
desc.MiscFlags = 0;
|
||||
|
||||
|
||||
if (pSwapChainDesc->BufferUsage & DXGI_USAGE_UNORDERED_ACCESS)
|
||||
desc.BindFlags |= D3D11_BIND_UNORDERED_ACCESS;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user