mesa: Add support for OES_texture_cube_map_array
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 17 Aug 2016 09:20:34 +0000 (10:20 +0100)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 26 Aug 2016 22:03:15 +0000 (15:03 -0700)
This has a separate enable flag because this extension also requires
OES_geometry_shader.  It is possible that some drivers may support
OpenGL ES 3.1 and ARB_texture_cube_map but not support
OES_geometry_shader.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
14 files changed:
src/compiler/glsl/builtin_functions.cpp
src/compiler/glsl/builtin_types.cpp
src/compiler/glsl/glsl_lexer.ll
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/glsl_parser_extras.h
src/mesa/main/context.h
src/mesa/main/extensions_table.h
src/mesa/main/genmipmap.c
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h
src/mesa/main/texobj.c
src/mesa/main/texparam.c
src/mesa/main/texstorage.c

index 161c98bd01881d9cf8118321c1fc3641ce9135b7..64bf8d8a48a444cfbb47b4e2bb81818b07583990 100644 (file)
@@ -244,6 +244,14 @@ gpu_shader5_es(const _mesa_glsl_parse_state *state)
           state->OES_gpu_shader5_enable;
 }
 
+static bool
+gpu_shader5_or_OES_texture_cube_map_array(const _mesa_glsl_parse_state *state)
+{
+   return state->is_version(400, 320) ||
+          state->ARB_gpu_shader5_enable ||
+          state->OES_texture_cube_map_array_enable;
+}
+
 static bool
 es31_not_gs5(const _mesa_glsl_parse_state *state)
 {
@@ -358,11 +366,12 @@ texture_query_lod(const _mesa_glsl_parse_state *state)
 }
 
 static bool
-texture_gather(const _mesa_glsl_parse_state *state)
+texture_gather_cube_map_array(const _mesa_glsl_parse_state *state)
 {
-   return state->is_version(400, 0) ||
+   return state->is_version(400, 320) ||
           state->ARB_texture_gather_enable ||
-          state->ARB_gpu_shader5_enable;
+          state->ARB_gpu_shader5_enable ||
+          state->OES_texture_cube_map_array_enable;
 }
 
 static bool
@@ -2554,9 +2563,9 @@ builtin_builder::create_builtins()
                 _texture(ir_tg4, texture_gather_or_es31, glsl_type::ivec4_type, glsl_type::isamplerCube_type, glsl_type::vec3_type),
                 _texture(ir_tg4, texture_gather_or_es31, glsl_type::uvec4_type, glsl_type::usamplerCube_type, glsl_type::vec3_type),
 
-                _texture(ir_tg4, texture_gather, glsl_type::vec4_type, glsl_type::samplerCubeArray_type, glsl_type::vec4_type),
-                _texture(ir_tg4, texture_gather, glsl_type::ivec4_type, glsl_type::isamplerCubeArray_type, glsl_type::vec4_type),
-                _texture(ir_tg4, texture_gather, glsl_type::uvec4_type, glsl_type::usamplerCubeArray_type, glsl_type::vec4_type),
+                _texture(ir_tg4, texture_gather_cube_map_array, glsl_type::vec4_type, glsl_type::samplerCubeArray_type, glsl_type::vec4_type),
+                _texture(ir_tg4, texture_gather_cube_map_array, glsl_type::ivec4_type, glsl_type::isamplerCubeArray_type, glsl_type::vec4_type),
+                _texture(ir_tg4, texture_gather_cube_map_array, glsl_type::uvec4_type, glsl_type::usamplerCubeArray_type, glsl_type::vec4_type),
 
                 _texture(ir_tg4, gpu_shader5_or_es31, glsl_type::vec4_type, glsl_type::sampler2D_type, glsl_type::vec2_type, TEX_COMPONENT),
                 _texture(ir_tg4, gpu_shader5_or_es31, glsl_type::ivec4_type, glsl_type::isampler2D_type, glsl_type::vec2_type, TEX_COMPONENT),
@@ -2574,14 +2583,14 @@ builtin_builder::create_builtins()
                 _texture(ir_tg4, gpu_shader5_or_es31, glsl_type::ivec4_type, glsl_type::isamplerCube_type, glsl_type::vec3_type, TEX_COMPONENT),
                 _texture(ir_tg4, gpu_shader5_or_es31, glsl_type::uvec4_type, glsl_type::usamplerCube_type, glsl_type::vec3_type, TEX_COMPONENT),
 
-                _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, glsl_type::samplerCubeArray_type, glsl_type::vec4_type, TEX_COMPONENT),
-                _texture(ir_tg4, gpu_shader5, glsl_type::ivec4_type, glsl_type::isamplerCubeArray_type, glsl_type::vec4_type, TEX_COMPONENT),
-                _texture(ir_tg4, gpu_shader5, glsl_type::uvec4_type, glsl_type::usamplerCubeArray_type, glsl_type::vec4_type, TEX_COMPONENT),
+                _texture(ir_tg4, gpu_shader5_or_OES_texture_cube_map_array, glsl_type::vec4_type, glsl_type::samplerCubeArray_type, glsl_type::vec4_type, TEX_COMPONENT),
+                _texture(ir_tg4, gpu_shader5_or_OES_texture_cube_map_array, glsl_type::ivec4_type, glsl_type::isamplerCubeArray_type, glsl_type::vec4_type, TEX_COMPONENT),
+                _texture(ir_tg4, gpu_shader5_or_OES_texture_cube_map_array, glsl_type::uvec4_type, glsl_type::usamplerCubeArray_type, glsl_type::vec4_type, TEX_COMPONENT),
 
                 _texture(ir_tg4, gpu_shader5_or_es31, glsl_type::vec4_type, glsl_type::sampler2DShadow_type, glsl_type::vec2_type),
                 _texture(ir_tg4, gpu_shader5_or_es31, glsl_type::vec4_type, glsl_type::sampler2DArrayShadow_type, glsl_type::vec3_type),
                 _texture(ir_tg4, gpu_shader5_or_es31, glsl_type::vec4_type, glsl_type::samplerCubeShadow_type, glsl_type::vec3_type),
-                _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, glsl_type::samplerCubeArrayShadow_type, glsl_type::vec4_type),
+                _texture(ir_tg4, gpu_shader5_or_OES_texture_cube_map_array, glsl_type::vec4_type, glsl_type::samplerCubeArrayShadow_type, glsl_type::vec4_type),
                 _texture(ir_tg4, gpu_shader5, glsl_type::vec4_type, glsl_type::sampler2DRectShadow_type, glsl_type::vec2_type),
                 NULL);
 
index 5f208f8e9d6b427e89d5f76a46cb4d9677adb59c..d40f785c283ba37ef3dd8e6a71d30806a940ab36 100644 (file)
@@ -177,7 +177,7 @@ static const struct builtin_type_versions {
    T(samplerCube,                     110, 100)
    T(sampler1DArray,                  130, 999)
    T(sampler2DArray,                  130, 300)
-   T(samplerCubeArray,                400, 999)
+   T(samplerCubeArray,                400, 320)
    T(sampler2DRect,                   140, 999)
    T(samplerBuffer,                   140, 320)
    T(sampler2DMS,                     150, 310)
@@ -189,7 +189,7 @@ static const struct builtin_type_versions {
    T(isamplerCube,                    130, 300)
    T(isampler1DArray,                 130, 999)
    T(isampler2DArray,                 130, 300)
-   T(isamplerCubeArray,               400, 999)
+   T(isamplerCubeArray,               400, 320)
    T(isampler2DRect,                  140, 999)
    T(isamplerBuffer,                  140, 320)
    T(isampler2DMS,                    150, 310)
@@ -201,7 +201,7 @@ static const struct builtin_type_versions {
    T(usamplerCube,                    130, 300)
    T(usampler1DArray,                 130, 999)
    T(usampler2DArray,                 130, 300)
-   T(usamplerCubeArray,               400, 999)
+   T(usamplerCubeArray,               400, 320)
    T(usampler2DRect,                  140, 999)
    T(usamplerBuffer,                  140, 320)
    T(usampler2DMS,                    150, 310)
@@ -212,7 +212,7 @@ static const struct builtin_type_versions {
    T(samplerCubeShadow,               130, 300)
    T(sampler1DArrayShadow,            130, 999)
    T(sampler2DArrayShadow,            130, 300)
-   T(samplerCubeArrayShadow,          400, 999)
+   T(samplerCubeArrayShadow,          400, 320)
    T(sampler2DRectShadow,             140, 999)
 
    T(struct_gl_DepthRangeParameters,  110, 100)
@@ -225,7 +225,7 @@ static const struct builtin_type_versions {
    T(imageBuffer,                     420, 320)
    T(image1DArray,                    420, 999)
    T(image2DArray,                    420, 310)
-   T(imageCubeArray,                  420, 999)
+   T(imageCubeArray,                  420, 320)
    T(image2DMS,                       420, 999)
    T(image2DMSArray,                  420, 999)
    T(iimage1D,                        420, 999)
@@ -236,7 +236,7 @@ static const struct builtin_type_versions {
    T(iimageBuffer,                    420, 320)
    T(iimage1DArray,                   420, 999)
    T(iimage2DArray,                   420, 310)
-   T(iimageCubeArray,                 420, 999)
+   T(iimageCubeArray,                 420, 320)
    T(iimage2DMS,                      420, 999)
    T(iimage2DMSArray,                 420, 999)
    T(uimage1D,                        420, 999)
@@ -247,7 +247,7 @@ static const struct builtin_type_versions {
    T(uimageBuffer,                    420, 320)
    T(uimage1DArray,                   420, 999)
    T(uimage2DArray,                   420, 310)
-   T(uimageCubeArray,                 420, 999)
+   T(uimageCubeArray,                 420, 320)
    T(uimage2DMS,                      420, 999)
    T(uimage2DMSArray,                 420, 999)
 
@@ -298,7 +298,8 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
     * by the version-based loop, but attempting to add them a second time
     * is harmless.
     */
-   if (state->ARB_texture_cube_map_array_enable) {
+   if (state->ARB_texture_cube_map_array_enable ||
+       state->OES_texture_cube_map_array_enable) {
       add_type(symbols, glsl_type::samplerCubeArray_type);
       add_type(symbols, glsl_type::samplerCubeArrayShadow_type);
       add_type(symbols, glsl_type::isamplerCubeArray_type);
@@ -337,6 +338,13 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
       add_type(symbols, glsl_type::sampler3D_type);
    }
 
+   if (state->ARB_shader_image_load_store_enable ||
+       state->OES_texture_cube_map_array_enable) {
+      add_type(symbols, glsl_type::imageCubeArray_type);
+      add_type(symbols, glsl_type::iimageCubeArray_type);
+      add_type(symbols, glsl_type::uimageCubeArray_type);
+   }
+
    if (state->ARB_shader_image_load_store_enable) {
       add_type(symbols, glsl_type::image1D_type);
       add_type(symbols, glsl_type::image2D_type);
@@ -346,7 +354,6 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
       add_type(symbols, glsl_type::imageBuffer_type);
       add_type(symbols, glsl_type::image1DArray_type);
       add_type(symbols, glsl_type::image2DArray_type);
-      add_type(symbols, glsl_type::imageCubeArray_type);
       add_type(symbols, glsl_type::image2DMS_type);
       add_type(symbols, glsl_type::image2DMSArray_type);
       add_type(symbols, glsl_type::iimage1D_type);
@@ -357,7 +364,6 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
       add_type(symbols, glsl_type::iimageBuffer_type);
       add_type(symbols, glsl_type::iimage1DArray_type);
       add_type(symbols, glsl_type::iimage2DArray_type);
-      add_type(symbols, glsl_type::iimageCubeArray_type);
       add_type(symbols, glsl_type::iimage2DMS_type);
       add_type(symbols, glsl_type::iimage2DMSArray_type);
       add_type(symbols, glsl_type::uimage1D_type);
@@ -368,7 +374,6 @@ _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state)
       add_type(symbols, glsl_type::uimageBuffer_type);
       add_type(symbols, glsl_type::uimage1DArray_type);
       add_type(symbols, glsl_type::uimage2DArray_type);
-      add_type(symbols, glsl_type::uimageCubeArray_type);
       add_type(symbols, glsl_type::uimage2DMS_type);
       add_type(symbols, glsl_type::uimage2DMSArray_type);
    }
index ad95f0298f5845f1391e6cca93a73fa1a4b5db58..2ed11ef87071832288fb5c2303fdcf09feab256a 100644 (file)
@@ -348,10 +348,10 @@ isampler2DMSArray  KEYWORD_WITH_ALT(150, 300, 150, 320, yyextra->ARB_texture_mul
 usampler2DMSArray  KEYWORD_WITH_ALT(150, 300, 150, 320, yyextra->ARB_texture_multisample_enable || yyextra->OES_texture_storage_multisample_2d_array_enable, USAMPLER2DMSARRAY);
 
    /* keywords available with ARB_texture_cube_map_array_enable extension on desktop GLSL */
-samplerCubeArray   KEYWORD_WITH_ALT(400, 310, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAY);
-isamplerCubeArray KEYWORD_WITH_ALT(400, 310, 400, 0, yyextra->ARB_texture_cube_map_array_enable, ISAMPLERCUBEARRAY);
-usamplerCubeArray KEYWORD_WITH_ALT(400, 310, 400, 0, yyextra->ARB_texture_cube_map_array_enable, USAMPLERCUBEARRAY);
-samplerCubeArrayShadow   KEYWORD_WITH_ALT(400, 310, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAYSHADOW);
+samplerCubeArray   KEYWORD_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable, SAMPLERCUBEARRAY);
+isamplerCubeArray KEYWORD_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable, ISAMPLERCUBEARRAY);
+usamplerCubeArray KEYWORD_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable, USAMPLERCUBEARRAY);
+samplerCubeArrayShadow   KEYWORD_WITH_ALT(400, 310, 400, 320, yyextra->ARB_texture_cube_map_array_enable || yyextra->OES_texture_cube_map_array_enable, SAMPLERCUBEARRAYSHADOW);
 
 samplerExternalOES             {
                          if (yyextra->OES_EGL_image_external_enable)
@@ -372,7 +372,7 @@ imageCube       KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_l
 imageBuffer     KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, IMAGEBUFFER);
 image1DArray    KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE1DARRAY);
 image2DArray    KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, IMAGE2DARRAY);
-imageCubeArray  KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGECUBEARRAY);
+imageCubeArray  KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->OES_texture_cube_map_array_enable, IMAGECUBEARRAY);
 image2DMS       KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DMS);
 image2DMSArray  KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DMSARRAY);
 iimage1D        KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE1D);
@@ -383,7 +383,7 @@ iimageCube      KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_l
 iimageBuffer    KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, IIMAGEBUFFER);
 iimage1DArray   KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE1DARRAY);
 iimage2DArray   KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DARRAY);
-iimageCubeArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGECUBEARRAY);
+iimageCubeArray KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->OES_texture_cube_map_array_enable, IIMAGECUBEARRAY);
 iimage2DMS      KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DMS);
 iimage2DMSArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DMSARRAY);
 uimage1D        KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE1D);
@@ -394,7 +394,7 @@ uimageCube      KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_l
 uimageBuffer    KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->EXT_texture_buffer_enable || yyextra->OES_texture_buffer_enable, UIMAGEBUFFER);
 uimage1DArray   KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE1DARRAY);
 uimage2DArray   KEYWORD_WITH_ALT(130, 300, 420, 310, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DARRAY);
-uimageCubeArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGECUBEARRAY);
+uimageCubeArray KEYWORD_WITH_ALT(130, 300, 420, 320, yyextra->ARB_shader_image_load_store_enable || yyextra->OES_texture_cube_map_array_enable, UIMAGECUBEARRAY);
 uimage2DMS      KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DMS);
 uimage2DMSArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DMSARRAY);
 image1DShadow           KEYWORD(130, 300, 0, 0, IMAGE1DSHADOW);
index b5c5fdc574c94afdcfa024c372ba62b2688b5e4c..80f37f34f2db8420805727919701df4061b1acc3 100644 (file)
@@ -640,6 +640,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(OES_tessellation_shader),
    EXT(OES_texture_3D),
    EXT(OES_texture_buffer),
+   EXT(OES_texture_cube_map_array),
    EXT(OES_texture_storage_multisample_2d_array),
 
    /* All other extensions go here, sorted alphabetically.
index 82ce6a781644958f27cc3fcd9cbc265711445078..63a8a676b7d609db1b7bb084b31b332f9e66dd2f 100644 (file)
@@ -320,7 +320,8 @@ struct _mesa_glsl_parse_state {
    bool has_texture_cube_map_array() const
    {
       return ARB_texture_cube_map_array_enable ||
-             is_version(400, 0);
+             OES_texture_cube_map_array_enable ||
+             is_version(400, 320);
    }
 
    void process_version_directive(YYLTYPE *locp, int version,
@@ -688,6 +689,8 @@ struct _mesa_glsl_parse_state {
    bool OES_texture_3D_warn;
    bool OES_texture_buffer_enable;
    bool OES_texture_buffer_warn;
+   bool OES_texture_cube_map_array_enable;
+   bool OES_texture_cube_map_array_warn;
    bool OES_texture_storage_multisample_2d_array_enable;
    bool OES_texture_storage_multisample_2d_array_warn;
 
index 9100ae75cdc8e705f87e10b713c60fdefd1f7459..4cd149de14ed32f64638bee8d0657932c125a640 100644 (file)
@@ -354,7 +354,8 @@ _mesa_has_tessellation(const struct gl_context *ctx)
 static inline bool
 _mesa_has_texture_cube_map_array(const struct gl_context *ctx)
 {
-   return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_cube_map_array;
+   return _mesa_has_ARB_texture_cube_map_array(ctx) ||
+          _mesa_has_OES_texture_cube_map_array(ctx);
 }
 
 #ifdef __cplusplus
index 9d0677af4991af9976ac3c392f17132292c1cb29..a3fcad52121893c45e2ae824139e06bb680dfd28 100644 (file)
@@ -373,6 +373,7 @@ EXT(OES_texture_border_clamp                , ARB_texture_border_clamp
 EXT(OES_texture_buffer                      , OES_texture_buffer                     ,  x ,  x ,  x ,  31, 2014)
 EXT(OES_texture_compression_astc            , OES_texture_compression_astc           ,  x ,  x , ES1, ES2, 2015)
 EXT(OES_texture_cube_map                    , ARB_texture_cube_map                   ,  x ,  x , ES1,  x , 2007)
+EXT(OES_texture_cube_map_array              , OES_texture_cube_map_array             ,  x ,  x ,  x ,  31, 2014)
 EXT(OES_texture_env_crossbar                , ARB_texture_env_crossbar               ,  x ,  x , ES1,  x , 2005)
 EXT(OES_texture_float                       , OES_texture_float                      ,  x ,  x ,  x , ES2, 2005)
 EXT(OES_texture_float_linear                , OES_texture_float_linear               ,  x ,  x ,  x , ES2, 2005)
index 5038d5cc053efed2a393b41185b5d107c2d432ca..6021c026f53915c95a0859cb176fc98cd98a1fee 100644 (file)
@@ -65,7 +65,7 @@ _mesa_is_valid_generate_texture_mipmap_target(struct gl_context *ctx,
          || !ctx->Extensions.EXT_texture_array;
       break;
    case GL_TEXTURE_CUBE_MAP_ARRAY:
-      error = !_mesa_has_ARB_texture_cube_map_array(ctx);
+      error = !_mesa_has_texture_cube_map_array(ctx);
       break;
    default:
       error = true;
index e22bb5ff6a530d4ef79fdc9921b988d59b12c3e4..0aa9065764bd92acca47f7e2233a9ad38a302e4f 100644 (file)
@@ -442,7 +442,7 @@ EXTRA_EXT(OES_EGL_image_external);
 EXTRA_EXT(ARB_blend_func_extended);
 EXTRA_EXT(ARB_uniform_buffer_object);
 EXTRA_EXT(ARB_timer_query);
-EXTRA_EXT(ARB_texture_cube_map_array);
+EXTRA_EXT2(ARB_texture_cube_map_array, OES_texture_cube_map_array);
 EXTRA_EXT(ARB_texture_buffer_range);
 EXTRA_EXT(ARB_texture_multisample);
 EXTRA_EXT(ARB_texture_gather);
@@ -1858,7 +1858,7 @@ tex_binding_to_index(const struct gl_context *ctx, GLenum binding)
               _mesa_has_OES_texture_buffer(ctx)) ?
              TEXTURE_BUFFER_INDEX : -1;
    case GL_TEXTURE_BINDING_CUBE_MAP_ARRAY:
-      return _mesa_has_ARB_texture_cube_map_array(ctx)
+      return _mesa_has_texture_cube_map_array(ctx)
          ? TEXTURE_CUBE_ARRAY_INDEX : -1;
    case GL_TEXTURE_BINDING_2D_MULTISAMPLE:
       return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_multisample
index 3414743ddbf94aece6e7c1f191183bf99d59c9d4..35af48b96aae00066c800a6e939484cba4ae3a9f 100644 (file)
@@ -516,6 +516,9 @@ descriptor=[
   # GL_ARB_shader_image_load_store / GL_ARB_shader_storage_buffer_object / GLES 3.1
   # (MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS in GL_ARB_shader_image_load_store)
   [ "MAX_COMBINED_SHADER_OUTPUT_RESOURCES", "CONTEXT_INT(Const.MaxCombinedShaderOutputResources), extra_ARB_shader_image_load_store_shader_storage_buffer_object_es31" ],
+
+  # GL_ARB_texture_cube_map_array
+  [ "TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB", "LOC_CUSTOM, TYPE_INT, TEXTURE_CUBE_ARRAY_INDEX, extra_ARB_texture_cube_map_array_OES_texture_cube_map_array" ],
 ]},
 
 # Enums in OpenGL Core profile and ES 3.0
@@ -899,9 +902,6 @@ descriptor=[
 # GL_ARB_map_buffer_alignment
   [ "MIN_MAP_BUFFER_ALIGNMENT", "CONTEXT_INT(Const.MinMapBufferAlignment), NO_EXTRA" ],
 
-# GL_ARB_texture_cube_map_array
-  [ "TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB", "LOC_CUSTOM, TYPE_INT, TEXTURE_CUBE_ARRAY_INDEX, extra_ARB_texture_cube_map_array" ],
-
 # GL_ARB_texture_gather
   [ "MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB", "CONTEXT_INT(Const.MaxProgramTextureGatherComponents), extra_ARB_texture_gather"],
 
index 76371609e6c67fab30452f0e1357ef20c96dfa36..fceed95b17c579e34baf20eb64acbc7019437a51 100644 (file)
@@ -3944,6 +3944,7 @@ struct gl_extensions
    GLboolean OES_shader_io_blocks;
    GLboolean OES_standard_derivatives;
    GLboolean OES_texture_buffer;
+   GLboolean OES_texture_cube_map_array;
    /* vendor extensions */
    GLboolean AMD_performance_monitor;
    GLboolean AMD_pinned_memory;
index 655627b92c33c00dc051ada0baac76e6f05a0582..9a051bc8e2b8bce859f17ccf65337141279087d1 100644 (file)
@@ -1579,7 +1579,7 @@ _mesa_tex_target_to_index(const struct gl_context *ctx, GLenum target)
       return _mesa_is_gles(ctx) && ctx->Extensions.OES_EGL_image_external
          ? TEXTURE_EXTERNAL_INDEX : -1;
    case GL_TEXTURE_CUBE_MAP_ARRAY:
-      return _mesa_has_ARB_texture_cube_map_array(ctx)
+      return _mesa_has_texture_cube_map_array(ctx)
          ? TEXTURE_CUBE_ARRAY_INDEX : -1;
    case GL_TEXTURE_2D_MULTISAMPLE:
       return ((_mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_multisample) ||
index ba83f8fda9a9bbd9b1835db9e615419f6694ab2c..bdd3fcb72dd846224d84b0871dc0172805c2de21 100644 (file)
@@ -1243,6 +1243,8 @@ _mesa_legal_get_tex_level_parameter_target(struct gl_context *ctx, GLenum target
        */
       return (ctx->API == API_OPENGL_CORE && ctx->Version >= 31) ||
          _mesa_has_OES_texture_buffer(ctx);
+   case GL_TEXTURE_CUBE_MAP_ARRAY:
+      return _mesa_has_texture_cube_map_array(ctx);
    }
 
    if (!_mesa_is_desktop_gl(ctx))
@@ -1257,8 +1259,7 @@ _mesa_legal_get_tex_level_parameter_target(struct gl_context *ctx, GLenum target
       return GL_TRUE;
    case GL_PROXY_TEXTURE_CUBE_MAP:
       return ctx->Extensions.ARB_texture_cube_map;
-   case GL_TEXTURE_CUBE_MAP_ARRAY_ARB:
-   case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB:
+   case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY:
       return ctx->Extensions.ARB_texture_cube_map_array;
    case GL_TEXTURE_RECTANGLE_NV:
    case GL_PROXY_TEXTURE_RECTANGLE_NV:
index c43f2d402d63e2ac9e7f08f9a0df1b010f797bb4..817a7464d9f2144a3b2e06bf076f109a307613e6 100644 (file)
@@ -71,6 +71,8 @@ legal_texobj_target(const struct gl_context *ctx, GLuint dims, GLenum target)
          return true;
       case GL_TEXTURE_2D_ARRAY:
          return ctx->Extensions.EXT_texture_array;
+      case GL_TEXTURE_CUBE_MAP_ARRAY:
+         return _mesa_has_texture_cube_map_array(ctx);
       }
       break;
    }
@@ -108,7 +110,6 @@ legal_texobj_target(const struct gl_context *ctx, GLuint dims, GLenum target)
          return true;
       case GL_PROXY_TEXTURE_2D_ARRAY:
          return ctx->Extensions.EXT_texture_array;
-      case GL_TEXTURE_CUBE_MAP_ARRAY:
       case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY:
          return ctx->Extensions.ARB_texture_cube_map_array;
       default: