From 51154d6907f44768f8cc2680fb5c5148c0f19808 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 28 Apr 2019 15:26:21 +1000 Subject: [PATCH] FramebufferShaderGen: Don't emit SV_SampleIndex when not using SSAA --- Source/Core/VideoCommon/FramebufferShaderGen.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/FramebufferShaderGen.cpp b/Source/Core/VideoCommon/FramebufferShaderGen.cpp index c69f07c10d..dfb86d2be2 100644 --- a/Source/Core/VideoCommon/FramebufferShaderGen.cpp +++ b/Source/Core/VideoCommon/FramebufferShaderGen.cpp @@ -410,10 +410,13 @@ std::string GenerateFormatConversionShader(EFBReinterpretType convtype, u32 samp { std::stringstream ss; EmitSamplerDeclarations(ss, 0, 1, samples > 1); - EmitPixelMainDeclaration(ss, 1, 0, "float4", - GetAPIType() == APIType::D3D ? - "in float4 ipos : SV_Position, in uint isample : SV_SampleIndex, " : - ""); + EmitPixelMainDeclaration( + ss, 1, 0, "float4", + GetAPIType() == APIType::D3D ? + (g_ActiveConfig.bSSAA ? + "in float4 ipos : SV_Position, in uint isample : SV_SampleIndex, " : + "in float4 ipos : SV_Position, ") : + ""); ss << "{\n"; ss << " int layer = int(v_tex0.z);\n"; if (GetAPIType() == APIType::D3D)