prog->SystemValuesRead |= bitfield;
} else {
assert(var->data.mode == ir_var_shader_out);
- if (is_patch_generic)
+ if (is_patch_generic) {
prog->PatchOutputsWritten |= bitfield;
- else if (!var->data.read_only)
+ } else if (!var->data.read_only) {
prog->OutputsWritten |= bitfield;
+ if (var->data.index > 0)
+ prog->SecondaryOutputsWritten |= bitfield;
+ }
+
if (var->data.fb_fetch_output)
prog->OutputsRead |= bitfield;
}
prog->InputsRead = 0;
prog->OutputsWritten = 0;
+ prog->SecondaryOutputsWritten = 0;
prog->OutputsRead = 0;
prog->PatchInputsRead = 0;
prog->PatchOutputsWritten = 0;
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 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
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) */