summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2009-07-07 12:48:50 -0700
committerZack Rusin <[email protected]>2009-07-07 12:48:50 -0700
commit7b861b9b9efdb3ac0dfc3806afcd494cd0ea006c (patch)
tree3d05123f38a7b5a4e44fc3e7032ea6216a4b28c5 /src/mesa
parent71633abafc935c25da9731bab48c228ceb9b4097 (diff)
gallium: fixup register indexes for fog/frontface/point coord
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index 299aa762c20..5219119c818 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -142,9 +142,18 @@ find_translated_vp(struct st_context *st,
if ((fragInputsRead & FRAG_BIT_FOGC)) {
/* leave placeholders for the
* extra registers we extract from fog */
- if (stfp->Base.UsesFrontFacing ||
- stfp->Base.UsesPointCoord) {
- numIn += 2;
+ if (stfp->Base.UsesFrontFacing) {
+ if (!stfp->Base.UsesFogFragCoord)
+ --stfp->input_to_slot[inAttr];
+ else
+ ++numIn;
+ }
+ if (stfp->Base.UsesPointCoord) {
+ if (!stfp->Base.UsesFrontFacing &&
+ !stfp->Base.UsesFogFragCoord)
+ stfp->input_to_slot[inAttr] -= 2;
+ else
+ ++numIn;
}
}
}