mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
Only set 2D_ARRAY_COMPATIBLE on 3D textures that will be rendered to.
It is impossible to create a 2D or 2D array SRV or UAV from a 3D texture. Nor is it possible to create a DSV from a 3D texture. Therefore, the only time we ever need to create a 2D array view from a 3D texture is when we're going to render to it.
This commit is contained in:
parent
7a69135ba1
commit
6feeb4bbba
@ -101,7 +101,8 @@ namespace dxvk {
|
||||
if (m_desc.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
|
||||
imageInfo.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
|
||||
|
||||
if (Dimension == D3D11_RESOURCE_DIMENSION_TEXTURE3D)
|
||||
if (Dimension == D3D11_RESOURCE_DIMENSION_TEXTURE3D &&
|
||||
(m_desc.BindFlags & D3D11_BIND_RENDER_TARGET))
|
||||
imageInfo.flags |= VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR;
|
||||
|
||||
// Some image formats (i.e. the R32G32B32 ones) are
|
||||
|
Loading…
x
Reference in New Issue
Block a user