The for loop was rather silly. In addition to checking brw->gen < 6
on each loop iteration, it took pains to exclude bits from
fp->Base.InputsRead that don't correspond to fragment shader inputs.
But those bits would never have been set in the first place, since the
only bits that are ever set in fp->Base.InputsRead are fragment shader
inputs.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
}
if (brw->gen < 6)
- key.input_slots_valid |= BITFIELD64_BIT(VARYING_SLOT_POS);
-
- for (int i = 0; i < VARYING_SLOT_MAX; i++) {
- if (!(fp->Base.InputsRead & BITFIELD64_BIT(i)))
- continue;
-
- if (brw->gen < 6) {
- if (_mesa_varying_slot_in_fs((gl_varying_slot) i))
- key.input_slots_valid |= BITFIELD64_BIT(i);
- }
- }
+ key.input_slots_valid = fp->Base.InputsRead | VARYING_BIT_POS;
key.clamp_fragment_color = ctx->API == API_OPENGL_COMPAT;