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)
{
}
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
_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),
_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);
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)
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)
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)
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)
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)
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)
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)
* 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);
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);
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);
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);
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);
}
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)
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);
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);
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);
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.
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,
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;
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
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)
|| !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;
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);
_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
# 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
# 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"],
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;
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) ||
*/
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))
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:
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;
}
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: