[Mesa-dev] [PATCH 1/4] mesa: Add scaffolding for OES_texture_cube_map_array

Chris Forbes chrisf at ijw.co.nz
Tue May 31 05:28:40 UTC 2016


This is the same as ARB_texture_cube_map_array plus some image
interactions.

Signed-off-by: Chris Forbes <chrisforbes at google.com>
---
 src/compiler/glsl/glcpp/glcpp-parse.y    |  5 ++++-
 src/compiler/glsl/glsl_parser_extras.cpp |  2 ++
 src/compiler/glsl/glsl_parser_extras.h   |  4 ++++
 src/mapi/glapi/gen/es_EXT.xml            | 24 ++++++++++++++++++++++++
 src/mesa/main/extensions_table.h         |  2 ++
 5 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/glcpp/glcpp-parse.y b/src/compiler/glsl/glcpp/glcpp-parse.y
index 4022727..ffc309a 100644
--- a/src/compiler/glsl/glcpp/glcpp-parse.y
+++ b/src/compiler/glsl/glcpp/glcpp-parse.y
@@ -2329,7 +2329,10 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
                add_builtin_define(parser, "GL_EXT_texture_buffer", 1);
                add_builtin_define(parser, "GL_OES_texture_buffer", 1);
             }
-
+            if (extensions->ARB_texture_cube_map_array) {
+               add_builtin_define(parser, "GL_EXT_texture_cube_map_array", 1);
+               add_builtin_define(parser, "GL_OES_texture_cube_map_array", 1);
+            }
             if (extensions->OES_shader_io_blocks) {
                add_builtin_define(parser, "GL_EXT_shader_io_blocks", 1);
                add_builtin_define(parser, "GL_OES_shader_io_blocks", 1);
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 843998d..96c021a 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -631,6 +631,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(OES_standard_derivatives,       false, true,      OES_standard_derivatives),
    EXT(OES_texture_3D,                 false, true,      dummy_true),
    EXT(OES_texture_buffer,             false, true,      OES_texture_buffer),
+   EXT(OES_texture_cube_map_array,     false, true,      ARB_texture_cube_map_array),
    EXT(OES_texture_storage_multisample_2d_array, false, true, ARB_texture_multisample),
 
    /* All other extensions go here, sorted alphabetically.
@@ -650,6 +651,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(EXT_shader_samples_identical,   true,  true,      EXT_shader_samples_identical),
    EXT(EXT_texture_array,              true,  false,     EXT_texture_array),
    EXT(EXT_texture_buffer,             false, true,      OES_texture_buffer),
+   EXT(EXT_texture_cube_map_array,     false, true,      ARB_texture_cube_map_array),
 };
 
 #undef EXT
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index a0c1903..eee949e 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -643,6 +643,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;
 
@@ -678,6 +680,8 @@ struct _mesa_glsl_parse_state {
    bool EXT_texture_array_warn;
    bool EXT_texture_buffer_enable;
    bool EXT_texture_buffer_warn;
+   bool EXT_texture_cube_map_array_enable;
+   bool EXT_texture_cube_map_array_warn;
    /*@}*/
 
    /** Extensions supported by the OpenGL implementation. */
diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml
index 6886dab..b21e85a 100644
--- a/src/mapi/glapi/gen/es_EXT.xml
+++ b/src/mapi/glapi/gen/es_EXT.xml
@@ -924,6 +924,18 @@
 
 </category>
 
+<category name="GL_EXT_texture_cube_map_array" number="184">
+    <enum name="TEXTURE_CUBE_MAP_ARRAY_EXT"              value="0x9009"/>
+    <enum name="TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT"      value="0x900A"/>
+    <enum name="SAMPLER_CUBE_MAP_ARRAY_EXT"              value="0x900C"/>
+    <enum name="SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT"       value="0x900D"/>
+    <enum name="INT_SAMPLER_CUBE_MAP_ARRAY_EXT"          value="0x900E"/>
+    <enum name="UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT" value="0x900F"/>
+    <enum name="IMAGE_CUBE_MAP_ARRAY_EXT"                value="0x9054"/>
+    <enum name="INT_IMAGE_CUBE_MAP_ARRAY_EXT"            value="0x905F"/>
+    <enum name="UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT"   value="0x906A"/>
+</category>
+
 <xi:include href="KHR_robustness_es.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
 <category name="GL_EXT_base_instance" number="203">
@@ -1297,4 +1309,16 @@
 
 </category>
 
+<category name="GL_OES_texture_cube_map_array" number="217">
+    <enum name="TEXTURE_CUBE_MAP_ARRAY_OES"              value="0x9009"/>
+    <enum name="TEXTURE_BINDING_CUBE_MAP_ARRAY_OES"      value="0x900A"/>
+    <enum name="SAMPLER_CUBE_MAP_ARRAY_OES"              value="0x900C"/>
+    <enum name="SAMPLER_CUBE_MAP_ARRAY_SHADOW_OES"       value="0x900D"/>
+    <enum name="INT_SAMPLER_CUBE_MAP_ARRAY_OES"          value="0x900E"/>
+    <enum name="UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_OES" value="0x900F"/>
+    <enum name="IMAGE_CUBE_MAP_ARRAY_OES"                value="0x9054"/>
+    <enum name="INT_IMAGE_CUBE_MAP_ARRAY_OES"            value="0x905F"/>
+    <enum name="UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_OES"   value="0x906A"/>
+</category>
+
 </OpenGLAPI>
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index b715f7c..be1aeb9 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -243,6 +243,7 @@ EXT(EXT_texture_compression_latc            , EXT_texture_compression_latc
 EXT(EXT_texture_compression_rgtc            , ARB_texture_compression_rgtc           , GLL, GLC,  x ,  x , 2004)
 EXT(EXT_texture_compression_s3tc            , EXT_texture_compression_s3tc           , GLL, GLC,  x ,  x , 2000)
 EXT(EXT_texture_cube_map                    , ARB_texture_cube_map                   , GLL,  x ,  x ,  x , 2001)
+EXT(EXT_texture_cube_map_array              , ARB_texture_cube_map_array             ,  x,   x ,  x ,  31, 2014)
 EXT(EXT_texture_edge_clamp                  , dummy_true                             , GLL,  x ,  x ,  x , 1997)
 EXT(EXT_texture_env_add                     , dummy_true                             , GLL,  x ,  x ,  x , 1999)
 EXT(EXT_texture_env_combine                 , dummy_true                             , GLL,  x ,  x ,  x , 2000)
@@ -360,6 +361,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              , ARB_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)
-- 
2.8.3



More information about the mesa-dev mailing list