[Mesa-dev] [PATCH 14/17] glsl: Don't consider read-only fragment outputs to be written to.
Francisco Jerez
currojerez at riseup.net
Thu Jul 21 04:49:44 UTC 2016
Since they cannot be written. This prevents adding fragment outputs
to the OutputsWritten set that are only read from via the
gl_LastFragData array but never written to.
---
src/compiler/glsl/ir_set_program_inouts.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp b/src/compiler/glsl/ir_set_program_inouts.cpp
index 7c61994..0809497 100644
--- a/src/compiler/glsl/ir_set_program_inouts.cpp
+++ b/src/compiler/glsl/ir_set_program_inouts.cpp
@@ -137,7 +137,7 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
assert(var->data.mode == ir_var_shader_out);
if (is_patch_generic)
prog->PatchOutputsWritten |= bitfield;
- else
+ else if (!var->data.read_only)
prog->OutputsWritten |= bitfield;
}
}
--
2.9.0
More information about the mesa-dev
mailing list