From 111ca4380010ba4086de6d08d1a156334dd3ecfa Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 19 Nov 2019 17:41:25 +0000 Subject: [PATCH] Fix handling of sub-8bit packed formats in DDS --- renderdoc/common/dds_readwrite.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renderdoc/common/dds_readwrite.cpp b/renderdoc/common/dds_readwrite.cpp index 7f8b12044..e9798e821 100644 --- a/renderdoc/common/dds_readwrite.cpp +++ b/renderdoc/common/dds_readwrite.cpp @@ -295,11 +295,11 @@ ResourceFormat DXGIFormat2ResourceFormat(DXGI_FORMAT format) return special; case DXGI_FORMAT_R11G11B10_FLOAT: special.type = ResourceFormatType::R11G11B10; return special; case DXGI_FORMAT_B5G6R5_UNORM: - fmt8.SetBGRAOrder(true); + special.SetBGRAOrder(true); special.type = ResourceFormatType::R5G6B5; return special; case DXGI_FORMAT_B5G5R5A1_UNORM: - fmt8.SetBGRAOrder(true); + special.SetBGRAOrder(true); special.type = ResourceFormatType::R5G5B5A1; return special; case DXGI_FORMAT_R9G9B9E5_SHAREDEXP: @@ -307,7 +307,7 @@ ResourceFormat DXGIFormat2ResourceFormat(DXGI_FORMAT format) return special; case DXGI_FORMAT_A8_UNORM: special.type = ResourceFormatType::A8; return special; case DXGI_FORMAT_B4G4R4A4_UNORM: - fmt8.SetBGRAOrder(true); + special.SetBGRAOrder(true); special.type = ResourceFormatType::R4G4B4A4; return special; case DXGI_FORMAT_D24_UNORM_S8_UINT: special.type = ResourceFormatType::D24S8; return special;