summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_shader.c
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2009-07-04 07:43:01 +0200
committerJakob Bornecrantz <jakob@vmware.com>2009-07-04 07:43:01 +0200
commit28471cfa970702128d822c2ecbb1703eedbca245 (patch)
treefa91f0d366ba857e228946ac88966e1717dc879f /src/mesa/state_tracker/st_atom_shader.c
parent9982821cdaf2205443c6297368eaab4115bf92f6 (diff)
parent71633abafc935c25da9731bab48c228ceb9b4097 (diff)
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'src/mesa/state_tracker/st_atom_shader.c')
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index c02ccc3528..299aa762c2 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -137,22 +137,15 @@ find_translated_vp(struct st_context *st,
for (inAttr = 0; inAttr < FRAG_ATTRIB_MAX; inAttr++) {
if (fragInputsRead & (1 << inAttr)) {
+ stfp->input_to_slot[inAttr] = numIn;
+ numIn++;
if ((fragInputsRead & FRAG_BIT_FOGC)) {
- if (stfp->Base.UsesPointCoord) {
- stfp->input_to_slot[inAttr] = numIn;
- numIn++;
+ /* leave placeholders for the
+ * extra registers we extract from fog */
+ if (stfp->Base.UsesFrontFacing ||
+ stfp->Base.UsesPointCoord) {
+ numIn += 2;
}
- if (stfp->Base.UsesFrontFacing) {
- stfp->input_to_slot[inAttr] = numIn;
- numIn++;
- }
- if (stfp->Base.UsesFogFragCoord) {
- stfp->input_to_slot[inAttr] = numIn;
- numIn++;
- }
- } else {
- stfp->input_to_slot[inAttr] = numIn;
- numIn++;
}
}
else {