summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-09-03 11:55:17 -0700
committerPaul Berry <[email protected]>2013-09-16 12:53:43 -0700
commita4546ec114853235db375b20fb47ddcd6a7f21e7 (patch)
treeb2104a8243f8724eec4beae4d2cbc2f0f1137621 /src/mesa
parent8a36f4382be0b9ad357f589dc326e14593bdbe8e (diff)
i965/fs: Simplify computation of key.input_slots_valid during precompile.
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 <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 9cb79506326..004b3b55a2b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3150,17 +3150,7 @@ brw_fs_precompile(struct gl_context *ctx, struct gl_shader_program *prog)
}
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;