mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[dxvk] Fix up component swizzle for render target views
Vulkan does not support non-identity swizzles for image views that are used for rendering, but we have to keep the information around in order to support rendering to swizzled image formats.
This commit is contained in:
parent
f74661daa4
commit
7c97e276f2
@ -193,6 +193,12 @@ namespace dxvk {
|
||||
viewInfo.format = m_info.format;
|
||||
viewInfo.components = m_info.swizzle;
|
||||
viewInfo.subresourceRange = subresourceRange;
|
||||
|
||||
if (m_info.usage == VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) {
|
||||
viewInfo.components = {
|
||||
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
|
||||
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY };
|
||||
}
|
||||
|
||||
if (m_vkd->vkCreateImageView(m_vkd->device(),
|
||||
&viewInfo, nullptr, &m_views[type]) != VK_SUCCESS) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user