summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_shader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_atom_shader.c')
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index ee649be885..8b3bb5cc03 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -139,6 +139,23 @@ find_translated_vp(struct st_context *st,
if (fragInputsRead & (1 << inAttr)) {
stfp->input_to_slot[inAttr] = numIn;
numIn++;
+ if (((1 << inAttr) & FRAG_BIT_FOGC)) {
+ /* leave placeholders for the
+ * extra registers we extract from fog */
+ 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;
+ }
+ }
}
else {
stfp->input_to_slot[inAttr] = UNUSED;