summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
diff options
context:
space:
mode:
authorTellowKrinkle <tellowkrinkle@gmail.com>2023-11-10 00:49:54 -0600
committerTellowKrinkle <tellowkrinkle@gmail.com>2024-02-07 03:52:31 +0100
commit5949911a5aff7a7946fd71589c38897ffc970b36 (patch)
treeb26922310daa97064cae2a79b4bf69851585331c /Source/Core/VideoCommon/PixelShaderGen.cpp
parenta50ab40a5fbf4acb179a4c17da5f68a6e7cbf09e (diff)
VideoCommon: Don't use indexed output for fbfetch
A nonzero index makes no sense, and Mesa doesn't like it when you supply an index
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index 0d6efe9f6a..bf574b8fda 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -1000,10 +1000,15 @@ ShaderCode GeneratePixelShaderCode(APIType api_type, const ShaderHostConfig& hos
else
#endif
{
- out.Write("{} {} {} {};\n", "FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0)",
- use_framebuffer_fetch ? "FRAGMENT_INOUT" : "out",
- uid_data->uint_output ? "uvec4" : "vec4",
- use_framebuffer_fetch ? "real_ocol0" : "ocol0");
+ if (use_framebuffer_fetch)
+ {
+ out.Write("FRAGMENT_OUTPUT_LOCATION(0) FRAGMENT_INOUT vec4 real_ocol0;\n");
+ }
+ else
+ {
+ out.Write("FRAGMENT_OUTPUT_LOCATION_INDEXED(0, 0) out {} ocol0;\n",
+ uid_data->uint_output ? "uvec4" : "vec4");
+ }
if (!uid_data->no_dual_src)
{