mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d11] Pass format swizzle to render target views
Fixes missing caterpillars in World of Tanks (#410).
This commit is contained in:
parent
05e505a844
commit
ffc2130ee6
@ -13,10 +13,14 @@ namespace dxvk {
|
|||||||
: m_device(pDevice), m_resource(pResource), m_desc(*pDesc), m_d3d10(this) {
|
: m_device(pDevice), m_resource(pResource), m_desc(*pDesc), m_d3d10(this) {
|
||||||
ResourceAddRefPrivate(m_resource);
|
ResourceAddRefPrivate(m_resource);
|
||||||
|
|
||||||
|
DXGI_VK_FORMAT_INFO formatInfo = pDevice->LookupFormat(
|
||||||
|
pDesc->Format, DXGI_VK_FORMAT_MODE_COLOR);
|
||||||
|
|
||||||
DxvkImageViewCreateInfo viewInfo;
|
DxvkImageViewCreateInfo viewInfo;
|
||||||
viewInfo.format = pDevice->LookupFormat(pDesc->Format, DXGI_VK_FORMAT_MODE_COLOR).Format;
|
viewInfo.format = formatInfo.Format;
|
||||||
viewInfo.aspect = imageFormatInfo(viewInfo.format)->aspectMask;
|
viewInfo.aspect = imageFormatInfo(viewInfo.format)->aspectMask;
|
||||||
viewInfo.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
|
viewInfo.swizzle = formatInfo.Swizzle;
|
||||||
|
viewInfo.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
|
||||||
|
|
||||||
switch (pDesc->ViewDimension) {
|
switch (pDesc->ViewDimension) {
|
||||||
case D3D11_RTV_DIMENSION_TEXTURE1D:
|
case D3D11_RTV_DIMENSION_TEXTURE1D:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user