1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d11] Fix image aspect mask for typeless resolve

The DXGI format info only stores the aspect mask for views created
with that format, but we're dealing with a raw resource here so we
have to query the aspect mask from the Vulkan format in question.
Fixes validation errors with typeless resolve if the formats of
the two involved images are identical.
This commit is contained in:
Philip Rebohle 2018-06-21 10:17:59 +02:00
parent 60bf471f06
commit 432708c15f
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -1016,13 +1016,16 @@ namespace dxvk {
const DXGI_VK_FORMAT_INFO dstFormatInfo = m_parent->LookupFormat(dstDesc.Format, DXGI_VK_FORMAT_MODE_ANY);
const DXGI_VK_FORMAT_INFO srcFormatInfo = m_parent->LookupFormat(srcDesc.Format, DXGI_VK_FORMAT_MODE_ANY);
auto dstVulkanFormatInfo = imageFormatInfo(dstFormatInfo.Format);
auto srcVulkanFormatInfo = imageFormatInfo(srcFormatInfo.Format);
const VkImageSubresource dstSubresource =
dstTextureInfo->GetSubresourceFromIndex(
dstFormatInfo.Aspect, DstSubresource);
dstVulkanFormatInfo->aspectMask, DstSubresource);
const VkImageSubresource srcSubresource =
srcTextureInfo->GetSubresourceFromIndex(
srcFormatInfo.Aspect, SrcSubresource);
srcVulkanFormatInfo->aspectMask, SrcSubresource);
const VkImageSubresourceLayers dstSubresourceLayers = {
dstSubresource.aspectMask,