GL FB readback: Only use "inout" if we actually want to read from the fb.

This commit is contained in:
Henrik Rydgård committed 2021-01-17 19:13:56 +01:00
1 parent ca50077341
commit c8bbf40bb0
1 file changed
+1 -1
+1 -1
View File
@@ -394,7 +394,7 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu
if (!strcmp(compat.fragColor0, "fragColor0")) {
const char *qualifierColor0 = "out";
if (compat.lastFragData && !strcmp(compat.lastFragData, compat.fragColor0)) {
if (readFramebuffer && compat.lastFragData && !strcmp(compat.lastFragData, compat.fragColor0)) {
qualifierColor0 = "inout";
}
// Output the output color definitions.