summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-02-18 02:33:50 +0100
committerGitHub <noreply@github.com>2024-02-18 02:33:50 +0100
commit9b5fd5d34e2e0c40a34d2f4937601b74f2ef3d7a (patch)
treeaf20173fb035b0eed1665d6d44793919a4649a06 /Source/Core/VideoCommon
parentb30d6e92db50d016a09d3295030734ac3ba5d641 (diff)
parent5949911a5aff7a7946fd71589c38897ffc970b36 (diff)
Merge pull request #12281 from TellowKrinkle/AsahiGL33
VideoCommon: Don't use indexed output for fbfetch
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp13
-rw-r--r--Source/Core/VideoCommon/UberShaderPixel.cpp13
2 files changed, 18 insertions, 8 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)
{
diff --git a/Source/Core/VideoCommon/UberShaderPixel.cpp b/Source/Core/VideoCommon/UberShaderPixel.cpp
index 2409dc41eb..ca7658140f 100644
--- a/Source/Core/VideoCommon/UberShaderPixel.cpp
+++ b/Source/Core/VideoCommon/UberShaderPixel.cpp
@@ -370,10 +370,15 @@ ShaderCode GenPixelShader(APIType api_type, const ShaderHostConfig& host_config,
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 (use_dual_source)
{