From 852e30bb8ca71ae419cf5ed15c63ceba417c0f83 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 31 Jul 2017 23:29:28 +1000 Subject: Ubershaders: Fix 6-bit color truncation not being applied --- Source/Core/VideoCommon/BPStructs.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Source/Core/VideoCommon/BPStructs.cpp') diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index c686d4ff01..9706347618 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -134,18 +134,19 @@ static void BPWritten(const BPCmd& bp) GeometryShaderManager::SetLinePtWidthChanged(); return; case BPMEM_ZMODE: // Depth Control - PRIM_LOG("zmode: test=%d, func=%d, upd=%d", (int)bpmem.zmode.testenable, (int)bpmem.zmode.func, - (int)bpmem.zmode.updateenable); + PRIM_LOG("zmode: test=%u, func=%u, upd=%u", bpmem.zmode.testenable.Value(), + bpmem.zmode.func.Value(), bpmem.zmode.updateenable.Value()); SetDepthMode(); + PixelShaderManager::SetZModeControl(); return; case BPMEM_BLENDMODE: // Blending Control if (bp.changes & 0xFFFF) { - PRIM_LOG("blendmode: en=%d, open=%d, colupd=%d, alphaupd=%d, dst=%d, src=%d, sub=%d, mode=%d", - (int)bpmem.blendmode.blendenable, (int)bpmem.blendmode.logicopenable, - (int)bpmem.blendmode.colorupdate, (int)bpmem.blendmode.alphaupdate, - (int)bpmem.blendmode.dstfactor, (int)bpmem.blendmode.srcfactor, - (int)bpmem.blendmode.subtract, (int)bpmem.blendmode.logicmode); + PRIM_LOG("blendmode: en=%u, open=%u, colupd=%u, alphaupd=%u, dst=%u, src=%u, sub=%u, mode=%u", + bpmem.blendmode.blendenable.Value(), bpmem.blendmode.logicopenable.Value(), + bpmem.blendmode.colorupdate.Value(), bpmem.blendmode.alphaupdate.Value(), + bpmem.blendmode.dstfactor.Value(), bpmem.blendmode.srcfactor.Value(), + bpmem.blendmode.subtract.Value(), bpmem.blendmode.logicmode.Value()); // Set Blending Mode if (bp.changes) @@ -424,6 +425,7 @@ static void BPWritten(const BPCmd& bp) g_renderer->SetColorMask(); // alpha writing needs to be disabled if the new pixel format // doesn't have an alpha channel } + PixelShaderManager::SetZModeControl(); return; case BPMEM_MIPMAP_STRIDE: // MipMap Stride Channel -- cgit v1.2.3