summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-07-05 04:14:41 +0200
committerJakob Bornecrantz <[email protected]>2009-07-05 04:14:41 +0200
commit7ccb00b1acacb57cefca1ae789246983ef4831d9 (patch)
treefd0d56f9832aa2706e8004dc8f92250248ba2cda /src
parentf742f2c0b308430da38f8eeddfed889f883615e9 (diff)
parent4adc9b4a5be72e34d464ce341b011c42517d969a (diff)
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'src')
-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;
}
}
}