summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program_lexer.l
diff options
context:
space:
mode:
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);