diff options
author | Chris Forbes <[email protected]> | 2012-12-21 21:33:37 +1300 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2013-03-02 11:33:54 +1300 |
commit | ffb53b4f0384fc811372644ce35471c0711eef9e (patch) | |
tree | a9600d8e15d97f25a90cec15db64dce44e3f3e86 /src/glsl/glsl_lexer.ll | |
parent | 16af0aca09029e647e4b7ae53ed94b089531c080 (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_lexer.ll')
-rw-r--r-- | src/glsl/glsl_lexer.ll | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index ddc9f80737d..008ef303d88 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -315,6 +315,15 @@ usamplerCube KEYWORD(130, 300, 130, 300, USAMPLERCUBE); usampler1DArray KEYWORD(130, 300, 130, 0, USAMPLER1DARRAY); usampler2DArray KEYWORD(130, 300, 130, 300, USAMPLER2DARRAY); + /* additional keywords in ARB_texture_multisample, included in GLSL 1.50 */ + /* these are reserved but not defined in GLSL 3.00 */ +sampler2DMS KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, SAMPLER2DMS); +isampler2DMS KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMS); +usampler2DMS KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMS); +sampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, SAMPLER2DMSARRAY); +isampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMSARRAY); +usampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMSARRAY); + samplerCubeArray { if (yyextra->ARB_texture_cube_map_array_enable) return SAMPLERCUBEARRAY; @@ -531,12 +540,6 @@ atomic_uint KEYWORD(0, 300, 0, 0, ATOMIC_UINT); patch KEYWORD(0, 300, 0, 0, PATCH); sample KEYWORD(0, 300, 0, 0, SAMPLE); subroutine KEYWORD(0, 300, 0, 0, SUBROUTINE); -sampler2DMS KEYWORD(0, 300, 0, 0, SAMPLER2DMS); -isampler2DMS KEYWORD(0, 300, 0, 0, ISAMPLER2DMS); -usampler2DMS KEYWORD(0, 300, 0, 0, USAMPLER2DMS); -sampler2DMSArray KEYWORD(0, 300, 0, 0, SAMPLER2DMSARRAY); -isampler2DMSArray KEYWORD(0, 300, 0, 0, ISAMPLER2DMSARRAY); -usampler2DMSArray KEYWORD(0, 300, 0, 0, USAMPLER2DMSARRAY); [_a-zA-Z][_a-zA-Z0-9]* { |