From 2fc00a331b952b1ecba9813d892f1edf80688c68 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 27 May 2020 06:19:13 +0100 Subject: [PATCH] [dxso] Make FETCH4 swizzle ARGB https://developer.amd.com/wordpress/media/2012/10/Advanced-DX9-Capabilities-for-ATI-Radeon-Cards_v2.pdf --- src/dxso/dxso_compiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dxso/dxso_compiler.cpp b/src/dxso/dxso_compiler.cpp index b027d2c7b..806b7fc96 100644 --- a/src/dxso/dxso_compiler.cpp +++ b/src/dxso/dxso_compiler.cpp @@ -3095,8 +3095,8 @@ void DxsoCompiler::emitControlFlowGenericLoop( fetch4Operands.flags &= ~spv::ImageOperandsBiasMask; uint32_t fetch4Val = m_module.opImageGather(resultType, sampledImage, coordinates, m_module.consti32(0), fetch4Operands); - // B R G A swizzle... Funny D3D9 order. - const std::array indices = { 2, 0, 1, 3 }; + // A R G B swizzle... Funny D3D9 order. + const std::array indices = { 3, 0, 1, 2 }; fetch4Val = m_module.opVectorShuffle(resultType, fetch4Val, fetch4Val, indices.size(), indices.data()); val = m_module.opSelect(resultType, fetch4, fetch4Val, val);