[Mesa-dev] [PATCH] glsl: add missing MS sampler builtin types for GLSL ES 3.10

Kenneth Graunke kenneth at whitecape.org
Fri Aug 14 10:02:37 PDT 2015


On Friday, August 14, 2015 01:36:40 PM Tapani Pälli wrote:
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>  src/glsl/builtin_types.cpp | 6 +++---
>  src/glsl/glsl_lexer.ll     | 7 ++++---
>  2 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/src/glsl/builtin_types.cpp b/src/glsl/builtin_types.cpp
> index ffbc5e6..b0156a1 100644
> --- a/src/glsl/builtin_types.cpp
> +++ b/src/glsl/builtin_types.cpp
> @@ -182,7 +182,7 @@ const static struct builtin_type_versions {
>     T(samplerCubeArray,                400, 999)
>     T(sampler2DRect,                   140, 999)
>     T(samplerBuffer,                   140, 999)
> -   T(sampler2DMS,                     150, 999)
> +   T(sampler2DMS,                     150, 310)
>     T(sampler2DMSArray,                150, 999)
>  
>     T(isampler1D,                      130, 999)
> @@ -194,7 +194,7 @@ const static struct builtin_type_versions {
>     T(isamplerCubeArray,               400, 999)
>     T(isampler2DRect,                  140, 999)
>     T(isamplerBuffer,                  140, 999)
> -   T(isampler2DMS,                    150, 999)
> +   T(isampler2DMS,                    150, 310)
>     T(isampler2DMSArray,               150, 999)
>  
>     T(usampler1D,                      130, 999)
> @@ -206,7 +206,7 @@ const static struct builtin_type_versions {
>     T(usamplerCubeArray,               400, 999)
>     T(usampler2DRect,                  140, 999)
>     T(usamplerBuffer,                  140, 999)
> -   T(usampler2DMS,                    150, 999)
> +   T(usampler2DMS,                    150, 310)
>     T(usampler2DMSArray,               150, 999)
>  
>     T(sampler1DShadow,                 110, 999)
> diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
> index efa0bb6..88565e8 100644
> --- a/src/glsl/glsl_lexer.ll
> +++ b/src/glsl/glsl_lexer.ll
> @@ -343,9 +343,10 @@ 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);
> +   /* [iu]sampler2DMS are defined in GLSL ES 3.10 */
> +sampler2DMS        KEYWORD_WITH_ALT(150, 300, 150, 310, yyextra->ARB_texture_multisample_enable, SAMPLER2DMS);
> +isampler2DMS       KEYWORD_WITH_ALT(150, 300, 150, 310, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMS);
> +usampler2DMS       KEYWORD_WITH_ALT(150, 300, 150, 310, 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);
> 

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150814/b8dc2d9b/attachment.sig>


More information about the mesa-dev mailing list