From 993fa3bf945b0effdf8d3ae841d1adb4b147ef1e Mon Sep 17 00:00:00 2001 From: iwubcode Date: Thu, 19 May 2022 21:37:34 -0500 Subject: [PATCH] VideoCommon: update UberShaderPixel to properly support logic ops, matching the specialized shader --- Source/Core/VideoCommon/UberShaderPixel.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp index bfbe1a08f2..eff6bfae44 100644 --- a/Source/Core/VideoCommon/UberShaderPixel.cpp +++ b/Source/Core/VideoCommon/UberShaderPixel.cpp @@ -103,17 +103,19 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config, bool has_broken_decoration = DriverDetails::HasBug(DriverDetails::BUG_BROKEN_FRAGMENT_SHADER_INDEX_DECORATION); - out.Write("{} {} vec4 {};\n", + out.Write("{} {} {} {};\n", has_broken_decoration ? "FRAGMENT_OUTPUT_LOCATION(0)" : "FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0)", use_framebuffer_fetch ? "FRAGMENT_INOUT" : "out", + uid_data->uint_output ? "uvec4" : "vec4", use_framebuffer_fetch ? "real_ocol0" : "ocol0"); if (use_dual_source) { - out.Write("{} out vec4 ocol1;\n", has_broken_decoration ? - "FRAGMENT_OUTPUT_LOCATION(1)" : - "FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 1)"); + out.Write("{} out {} ocol1;\n", + has_broken_decoration ? "FRAGMENT_OUTPUT_LOCATION(1)" : + "FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 1)", + uid_data->uint_output ? "uvec4" : "vec4"); } }