mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
ARB prog parser: Fix handling of RECT
Require that GL_{ARB,EXT,NV}_texture_rectangle be supported before
allowing use of RECT texture target.
This commit is contained in:
parent
4821099429
commit
88018e2e07
5 changed files with 424 additions and 415 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -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);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -261,6 +261,9 @@ language: ARBvp_10
|
|||
yyerror(& @1, state, "invalid vertex program header");
|
||||
}
|
||||
state->mode = ARB_fragment;
|
||||
|
||||
state->option.TexRect =
|
||||
(state->ctx->Extensions.NV_texture_rectangle != GL_FALSE);
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ struct asm_parser_state {
|
|||
unsigned PrecisionHint:2;
|
||||
unsigned DrawBuffers:1;
|
||||
unsigned Shadow:1;
|
||||
unsigned TexRect:1;
|
||||
} option;
|
||||
|
||||
struct {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue