summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_lexer.l
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-07-27 15:47:52 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-07-27 15:47:52 -0700
commit88018e2e073909ae807f16707f2701e068900926 (patch)
treec693fba04321b7f6ab19e81673d3819996889ad6 /src/mesa/shader/program_lexer.l
parent4821099429ec059dc00a28f448bc3c537296ab55 (diff)
ARB prog parser: Fix handling of RECT
Require that GL_{ARB,EXT,NV}_texture_rectangle be supported before allowing use of RECT texture target.
Diffstat (limited to 'src/mesa/shader/program_lexer.l')
-rw-r--r--src/mesa/shader/program_lexer.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l
index c952f090401..2a5f0a85420 100644
--- a/src/mesa/shader/program_lexer.l
+++ b/src/mesa/shader/program_lexer.l
@@ -29,6 +29,7 @@
#define require_ARB_vp (yyextra->mode == ARB_vertex)
#define require_ARB_fp (yyextra->mode == ARB_fragment)
+#define require_rect (yyextra->option.TexRect)
#define return_token_or_IDENTIFIER(condition, token) \
do { \
@@ -293,7 +294,7 @@ texture { return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_U
2D { return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); }
3D { return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); }
CUBE { return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); }
-RECT { return_token_or_IDENTIFIER(require_ARB_fp, TEX_RECT); }
+RECT { return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); }
[_a-zA-Z$][_a-zA-Z0-9$]* {
yylval->string = strdup(yytext);