Skip to content

Commit

Permalink
[d3d11] Pass format swizzle to render target views
Browse files Browse the repository at this point in the history
Fixes missing caterpillars in World of Tanks (#410).
  • Loading branch information
doitsujin committed Sep 1, 2018
1 parent 05e505a commit ffc2130
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/d3d11/d3d11_view_rtv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ namespace dxvk {
: m_device(pDevice), m_resource(pResource), m_desc(*pDesc), m_d3d10(this) {
ResourceAddRefPrivate(m_resource);

DXGI_VK_FORMAT_INFO formatInfo = pDevice->LookupFormat(
pDesc->Format, DXGI_VK_FORMAT_MODE_COLOR);

DxvkImageViewCreateInfo viewInfo;
viewInfo.format = pDevice->LookupFormat(pDesc->Format, DXGI_VK_FORMAT_MODE_COLOR).Format;
viewInfo.aspect = imageFormatInfo(viewInfo.format)->aspectMask;
viewInfo.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
viewInfo.format = formatInfo.Format;
viewInfo.aspect = imageFormatInfo(viewInfo.format)->aspectMask;
viewInfo.swizzle = formatInfo.Swizzle;
viewInfo.usage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;

switch (pDesc->ViewDimension) {
case D3D11_RTV_DIMENSION_TEXTURE1D:
Expand Down

0 comments on commit ffc2130

Please sign in to comment.