summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2016-09-24 23:13:17 +1000
committerStenzek <stenzek@gmail.com>2016-10-01 02:40:02 +1000
commitbac8c2d44147395e31c4d5a2247be1b449139272 (patch)
treeb711945822df124e9489f758c8380c457969162e /Source/Core/VideoCommon/PixelShaderGen.cpp
parentf6cdc38c8b05e1980c42e6a8fa2d8207feb9604d (diff)
Vulkan: Work around indexed fragment output bug on AMD drivers
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index 4038d9329c..e4227e8280 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -517,8 +517,16 @@ ShaderCode GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, APIType ApiType,
{
if (dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND)
{
- out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0) out vec4 ocol0;\n");
- out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 1) out vec4 ocol1;\n");
+ if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_FRAGMENT_SHADER_INDEX_DECORATION))
+ {
+ 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
{