mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
ShaderGen: Don't use interface blocks on Vulkan without GS
Doing so causes the Adreno driver to choke and spew errors about too many output locations/components, when clearly we're under the limit.
This commit is contained in:
@ -103,7 +103,7 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
|
||||
if (per_pixel_depth)
|
||||
out.Write("#define depth gl_FragDepth\n");
|
||||
|
||||
if (host_config.backend_geometry_shaders || ApiType == APIType::Vulkan)
|
||||
if (host_config.backend_geometry_shaders)
|
||||
{
|
||||
out.Write("VARYING_LOCATION(0) in VertexData {\n");
|
||||
GenerateVSOutputMembers(out, ApiType, numTexgen, host_config,
|
||||
@ -116,18 +116,26 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
|
||||
}
|
||||
else
|
||||
{
|
||||
out.Write("%s in float4 colors_0;\n", GetInterpolationQualifier(msaa, ssaa));
|
||||
out.Write("%s in float4 colors_1;\n", GetInterpolationQualifier(msaa, ssaa));
|
||||
// compute window position if needed because binding semantic WPOS is not widely supported
|
||||
// Let's set up attributes
|
||||
for (u32 i = 0; i < numTexgen; ++i)
|
||||
out.Write("%s in float3 tex%d;\n", GetInterpolationQualifier(msaa, ssaa), i);
|
||||
u32 counter = 0;
|
||||
out.Write("VARYING_LOCATION(%u) %s in float4 colors_0;\n", counter++,
|
||||
GetInterpolationQualifier(msaa, ssaa));
|
||||
out.Write("VARYING_LOCATION(%u) %s in float4 colors_1;\n", counter++,
|
||||
GetInterpolationQualifier(msaa, ssaa));
|
||||
for (unsigned int i = 0; i < numTexgen; ++i)
|
||||
{
|
||||
out.Write("VARYING_LOCATION(%u) %s in float3 tex%d;\n", counter++,
|
||||
GetInterpolationQualifier(msaa, ssaa), i);
|
||||
}
|
||||
if (!host_config.fast_depth_calc)
|
||||
out.Write("%s in float4 clipPos;\n", GetInterpolationQualifier(msaa, ssaa));
|
||||
out.Write("VARYING_LOCATION(%u) %s in float4 clipPos;\n", counter++,
|
||||
GetInterpolationQualifier(msaa, ssaa));
|
||||
if (per_pixel_lighting)
|
||||
{
|
||||
out.Write("%s in float3 Normal;\n", GetInterpolationQualifier(msaa, ssaa));
|
||||
out.Write("%s in float3 WorldPos;\n", GetInterpolationQualifier(msaa, ssaa));
|
||||
out.Write("VARYING_LOCATION(%u) %s in float3 Normal;\n", counter++,
|
||||
GetInterpolationQualifier(msaa, ssaa));
|
||||
out.Write("VARYING_LOCATION(%u) %s in float3 WorldPos;\n", counter++,
|
||||
GetInterpolationQualifier(msaa, ssaa));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user