summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2012-12-21 21:33:37 +1300
committerChris Forbes <[email protected]>2013-03-02 11:33:54 +1300
commitffb53b4f0384fc811372644ce35471c0711eef9e (patch)
treea9600d8e15d97f25a90cec15db64dce44e3f3e86 /src/glsl/glsl_parser.yy
parent16af0aca09029e647e4b7ae53ed94b089531c080 (diff)
glsl: add support for ARB_texture_multisample
V2: - emit `sample` parameter properly for multisample texelFetch() - fix spurious whitespace change - introduce a new opcode ir_txf_ms rather than overloading the existing ir_txf further. This makes doing the right thing in the driver somewhat simpler. V3: - fix weird whitespace V4: - don't forget to include the new opcode in tex_opcode_strs[] (thanks Kenneth for spotting this) Signed-off-by: Chris Forbes <[email protected]> [V2] Reviewed-by: Eric Anholt <[email protected]> [V2] Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser.yy')
-rw-r--r--src/glsl/glsl_parser.yy11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 154ce2d098b..f52ed9b0a94 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -109,6 +109,8 @@ static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
%token USAMPLER2DARRAY USAMPLERCUBEARRAY
%token SAMPLER2DRECT ISAMPLER2DRECT USAMPLER2DRECT SAMPLER2DRECTSHADOW
%token SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER
+%token SAMPLER2DMS ISAMPLER2DMS USAMPLER2DMS
+%token SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY
%token SAMPLEREXTERNALOES
%token STRUCT VOID_TOK WHILE
%token <identifier> IDENTIFIER TYPE_IDENTIFIER NEW_IDENTIFIER
@@ -140,8 +142,7 @@ static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg)
%token SAMPLER3DRECT
%token SIZEOF CAST NAMESPACE USING
%token COHERENT RESTRICT READONLY WRITEONLY RESOURCE ATOMIC_UINT PATCH SAMPLE
-%token SUBROUTINE SAMPLER2DMS ISAMPLER2DMS USAMPLER2DMS SAMPLER2DMSARRAY
-%token ISAMPLER2DMSARRAY USAMPLER2DMSARRAY
+%token SUBROUTINE
%token ERROR_TOK
@@ -1462,6 +1463,12 @@ basic_type_specifier_nonarray:
| USAMPLER2DARRAY { $$ = "usampler2DArray"; }
| USAMPLERBUFFER { $$ = "usamplerBuffer"; }
| USAMPLERCUBEARRAY { $$ = "usamplerCubeArray"; }
+ | SAMPLER2DMS { $$ = "sampler2DMS"; }
+ | ISAMPLER2DMS { $$ = "isampler2DMS"; }
+ | USAMPLER2DMS { $$ = "usampler2DMS"; }
+ | SAMPLER2DMSARRAY { $$ = "sampler2DMSArray"; }
+ | ISAMPLER2DMSARRAY { $$ = "isampler2DMSArray"; }
+ | USAMPLER2DMSARRAY { $$ = "usampler2DMSArray"; }
;
precision_qualifier: