Module: Mesa Branch: master Commit: 2018371692d9ea57805989b0390b833e785881bf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2018371692d9ea57805989b0390b833e785881bf
Author: Francisco Jerez <[email protected]> Date: Tue Jul 19 20:30:24 2016 -0700 glsl: Keep track of the set of fragment outputs read by a GL program. This is the set of shader outputs whose initial value is provided to the shader by some external means when the shader is executed, rather than computed by the shader itself. Reviewed-by: Kenneth Graunke <[email protected]> --- src/compiler/glsl/ir_set_program_inouts.cpp | 3 +++ src/mesa/main/mtypes.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/compiler/glsl/ir_set_program_inouts.cpp b/src/compiler/glsl/ir_set_program_inouts.cpp index a6475b5..fcfbcd4 100644 --- a/src/compiler/glsl/ir_set_program_inouts.cpp +++ b/src/compiler/glsl/ir_set_program_inouts.cpp @@ -139,6 +139,8 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len, prog->PatchOutputsWritten |= bitfield; else if (!var->data.read_only) prog->OutputsWritten |= bitfield; + if (var->data.fb_fetch_output) + prog->OutputsRead |= bitfield; } } } @@ -444,6 +446,7 @@ do_set_program_inouts(exec_list *instructions, struct gl_program *prog, prog->InputsRead = 0; prog->OutputsWritten = 0; + prog->OutputsRead = 0; prog->PatchInputsRead = 0; prog->PatchOutputsWritten = 0; prog->SystemValuesRead = 0; diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 965de5d..d0ceda9 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1907,6 +1907,7 @@ struct gl_program GLbitfield64 InputsRead; /**< Bitmask of which input regs are read */ GLbitfield64 DoubleInputsRead; /**< Bitmask of which input regs are read and are doubles */ GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */ + GLbitfield64 OutputsRead; /**< Bitmask of which output regs are read */ GLbitfield PatchInputsRead; /**< VAR[0..31] usage for patch inputs (user-defined only) */ GLbitfield PatchOutputsWritten; /**< VAR[0..31] usage for patch outputs (user-defined only) */ GLbitfield SystemValuesRead; /**< Bitmask of SYSTEM_VALUE_x inputs used */ _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
