Merge pull request #7379 from stenzek/drop-vulkan-index-decoration-workaround
ShaderGen: Drop broken fragment shader index workaround for Vulkan
This commit is contained in:
commit
3d560630f5
|
@ -88,8 +88,6 @@ static BugInfo m_known_bugs[] = {
|
||||||
-1.0, true},
|
-1.0, true},
|
||||||
{API_OPENGL, OS_ALL, VENDOR_MESA, DRIVER_I965, Family::UNKNOWN, BUG_BROKEN_CLIP_DISTANCE, -1.0,
|
{API_OPENGL, OS_ALL, VENDOR_MESA, DRIVER_I965, Family::UNKNOWN, BUG_BROKEN_CLIP_DISTANCE, -1.0,
|
||||||
-1.0, true},
|
-1.0, true},
|
||||||
{API_VULKAN, OS_ALL, VENDOR_ATI, DRIVER_ATI, Family::UNKNOWN,
|
|
||||||
BUG_BROKEN_FRAGMENT_SHADER_INDEX_DECORATION, -1.0, -1.0, true},
|
|
||||||
{API_OPENGL, OS_WINDOWS, VENDOR_ATI, DRIVER_ATI, Family::UNKNOWN,
|
{API_OPENGL, OS_WINDOWS, VENDOR_ATI, DRIVER_ATI, Family::UNKNOWN,
|
||||||
BUG_BROKEN_DUAL_SOURCE_BLENDING, -1.0, -1.0, true},
|
BUG_BROKEN_DUAL_SOURCE_BLENDING, -1.0, -1.0, true},
|
||||||
{API_OPENGL, OS_OSX, VENDOR_INTEL, DRIVER_INTEL, Family::UNKNOWN,
|
{API_OPENGL, OS_OSX, VENDOR_INTEL, DRIVER_INTEL, Family::UNKNOWN,
|
||||||
|
|
|
@ -220,14 +220,6 @@ enum Bug
|
||||||
// the gl_ClipDistance inputs from the vertex shader.
|
// the gl_ClipDistance inputs from the vertex shader.
|
||||||
BUG_BROKEN_CLIP_DISTANCE,
|
BUG_BROKEN_CLIP_DISTANCE,
|
||||||
|
|
||||||
// Bug: Dual-source outputs from fragment shaders are broken on AMD Vulkan drivers
|
|
||||||
// Started Version: -1
|
|
||||||
// Ended Version: -1
|
|
||||||
// Fragment shaders that specify dual-source outputs, via layout(location = 0, index = ...) cause
|
|
||||||
// the driver to fail to create graphics pipelines. The workaround for this is to specify the
|
|
||||||
// index as a MRT location instead, or omit the binding completely.
|
|
||||||
BUG_BROKEN_FRAGMENT_SHADER_INDEX_DECORATION,
|
|
||||||
|
|
||||||
// Bug: Dual-source outputs from fragment shaders are broken on AMD OpenGL drivers
|
// Bug: Dual-source outputs from fragment shaders are broken on AMD OpenGL drivers
|
||||||
// Started Version: -1
|
// Started Version: -1
|
||||||
// Ended Version: -1
|
// Ended Version: -1
|
||||||
|
|
|
@ -553,16 +553,8 @@ ShaderCode GeneratePixelShaderCode(APIType ApiType, const ShaderHostConfig& host
|
||||||
{
|
{
|
||||||
if (use_dual_source)
|
if (use_dual_source)
|
||||||
{
|
{
|
||||||
if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_FRAGMENT_SHADER_INDEX_DECORATION))
|
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0) out vec4 ocol0;\n");
|
||||||
{
|
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 1) out vec4 ocol1;\n");
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION(0) out vec4 ocol0;\n");
|
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION(1) out vec4 ocol1;\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0) out vec4 ocol0;\n");
|
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 1) out vec4 ocol1;\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (use_shader_blend)
|
else if (use_shader_blend)
|
||||||
{
|
{
|
||||||
|
@ -570,14 +562,7 @@ ShaderCode GeneratePixelShaderCode(APIType ApiType, const ShaderHostConfig& host
|
||||||
// intermediate value with multiple reads & modifications, so pull out the "real" output value
|
// intermediate value with multiple reads & modifications, so pull out the "real" output value
|
||||||
// and use a temporary for calculations, then set the output value once at the end of the
|
// and use a temporary for calculations, then set the output value once at the end of the
|
||||||
// shader
|
// shader
|
||||||
if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_FRAGMENT_SHADER_INDEX_DECORATION))
|
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0) FRAGMENT_INOUT vec4 real_ocol0;\n");
|
||||||
{
|
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION(0) FRAGMENT_INOUT vec4 real_ocol0;\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0) FRAGMENT_INOUT vec4 real_ocol0;\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,16 +69,8 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
|
||||||
{
|
{
|
||||||
if (use_dual_source)
|
if (use_dual_source)
|
||||||
{
|
{
|
||||||
if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_FRAGMENT_SHADER_INDEX_DECORATION))
|
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0) out vec4 ocol0;\n");
|
||||||
{
|
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 1) out vec4 ocol1;\n");
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION(0) out vec4 ocol0;\n");
|
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION(1) out vec4 ocol1;\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0) out vec4 ocol0;\n");
|
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 1) out vec4 ocol1;\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (use_shader_blend)
|
else if (use_shader_blend)
|
||||||
{
|
{
|
||||||
|
@ -86,14 +78,7 @@ ShaderCode GenPixelShader(APIType ApiType, const ShaderHostConfig& host_config,
|
||||||
// intermediate value with multiple reads & modifications, so pull out the "real" output value
|
// intermediate value with multiple reads & modifications, so pull out the "real" output value
|
||||||
// and use a temporary for calculations, then set the output value once at the end of the
|
// and use a temporary for calculations, then set the output value once at the end of the
|
||||||
// shader
|
// shader
|
||||||
if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_FRAGMENT_SHADER_INDEX_DECORATION))
|
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0) FRAGMENT_INOUT vec4 real_ocol0;\n");
|
||||||
{
|
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION(0) FRAGMENT_INOUT vec4 real_ocol0;\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0) FRAGMENT_INOUT vec4 real_ocol0;\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue