FramebufferShaderGen: Don't emit SV_SampleIndex when not using SSAA

This commit is contained in:
Stenzek 2019-04-28 15:26:21 +10:00
parent 906ccdb1b4
commit 51154d6907

View File

@ -410,10 +410,13 @@ std::string GenerateFormatConversionShader(EFBReinterpretType convtype, u32 samp
{ {
std::stringstream ss; std::stringstream ss;
EmitSamplerDeclarations(ss, 0, 1, samples > 1); EmitSamplerDeclarations(ss, 0, 1, samples > 1);
EmitPixelMainDeclaration(ss, 1, 0, "float4", EmitPixelMainDeclaration(
GetAPIType() == APIType::D3D ? ss, 1, 0, "float4",
"in float4 ipos : SV_Position, in uint isample : SV_SampleIndex, " : GetAPIType() == APIType::D3D ?
""); (g_ActiveConfig.bSSAA ?
"in float4 ipos : SV_Position, in uint isample : SV_SampleIndex, " :
"in float4 ipos : SV_Position, ") :
"");
ss << "{\n"; ss << "{\n";
ss << " int layer = int(v_tex0.z);\n"; ss << " int layer = int(v_tex0.z);\n";
if (GetAPIType() == APIType::D3D) if (GetAPIType() == APIType::D3D)