diff options
author | Brian Paul <brianp@vmware.com> | 2009-02-20 13:42:08 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-02-20 13:42:08 -0700 |
commit | 44e018c09e7aeba9fd9f4c380da224bd6622c470 (patch) | |
tree | cbbb9864196469018b93212550b626ea166bf0e4 /src/mesa/shader | |
parent | a79186e29efebed04c927d024b013435e7ff5725 (diff) |
mesa: add TexShadow field to prog_instruction
If the instruction is TEX/TXP/TXL/etc the TexShadow field will be true if
the instruction is a texture fetch with shadow compare.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/arbprogparse.c | 3 | ||||
-rw-r--r-- | src/mesa/shader/prog_instruction.h | 3 | ||||
-rw-r--r-- | src/mesa/shader/prog_print.c | 2 |
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; |