summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/arbprogparse.c3
-rw-r--r--src/mesa/shader/prog_instruction.h3
-rw-r--r--src/mesa/shader/prog_print.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 2e0fc3694a..62edb7f595 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -3104,6 +3104,9 @@ parse_fp_instruction (GLcontext * ctx, const GLubyte ** inst,
break;
}
+ if (shadow_tex)
+ fp->TexShadow = 1;
+
/* Don't test the first time a particular sampler is seen. Each time
* after that, make sure the shadow state is the same.
*/
diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h
index 84dd98b498..e3bb7ac01d 100644
--- a/src/mesa/shader/prog_instruction.h
+++ b/src/mesa/shader/prog_instruction.h
@@ -396,6 +396,9 @@ struct prog_instruction
/** Source texture target, one of TEXTURE_{1D,2D,3D,CUBE,RECT}_INDEX */
GLuint TexSrcTarget:3;
+
+ /** True if tex instruction should do shadow comparison */
+ GLuint TexShadow:1;
/*@}*/
/**
diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index 516ea73301..80be51c3c5 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -592,6 +592,8 @@ _mesa_fprint_instruction_opt(FILE *f,
default:
;
}
+ if (inst->TexShadow)
+ _mesa_fprintf(f, " SHADOW");
fprint_comment(f, inst);
break;