mesa: Expose GL_ARB_framebuffer_no_attachments to GLES 3.1
authorMarta Lofstedt <marta.lofstedt@intel.com>
Tue, 1 Sep 2015 05:19:11 +0000 (08:19 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 1 Sep 2015 05:19:11 +0000 (08:19 +0300)
V2: Conform to new standard for exposing enums for OpenGL ES 3.1.

Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml
src/mapi/glapi/gen/apiexec.py
src/mesa/main/get_hash_params.py
src/mesa/main/tests/dispatch_sanity.cpp
src/mesa/main/version.c

index 59839a044be1d2d26fe911c381e6a90a136509da..55ad7642ff519e744e7ec125557f0dbce4fa0f2b 100644 (file)
    <enum name="MAX_FRAMEBUFFER_LAYERS"                     value="0x9317" />
    <enum name="MAX_FRAMEBUFFER_SAMPLES"                    value="0x9318" />
 
-    <function name="FramebufferParameteri">
+    <function name="FramebufferParameteri" es2="3.1">
        <param name="target" type="GLenum"/>
        <param name="pname"  type="GLenum"/>
        <param name="param"  type="GLint" />
     </function>
 
-    <function name="GetFramebufferParameteriv">
+    <function name="GetFramebufferParameteriv" es2="3.1">
        <param name="target" type="GLenum" />
        <param name="pname"  type="GLenum" />
        <param name="params" type="GLint *" output="true" />
index 3a0eb1869a83dc52a4d70cf87053471ac4fc0e2d..58ec08be4664d58afe6befa63074eed2b52b1471 100644 (file)
@@ -151,8 +151,8 @@ functions = {
 
     # OpenGL 4.3 / GL_ARB_framebuffer_no_attachments.  Mesa can expose the
     # extension with OpenGL 3.0.
-    "FramebufferParameteri": exec_info(compatibility=30, core=31),
-    "GetFramebufferParameteri": exec_info(compatibility=30, core=31),
+    "FramebufferParameteri": exec_info(compatibility=30, core=31, es2=31),
+    "GetFramebufferParameteri": exec_info(compatibility=30, core=31, es2=31),
 
     # OpenGL 4.5 / GL_ARB_direct_state_access.   Mesa can expose the extension
     # with core profile.
index b3c337e9d45a8ad75885f878bc9f7a1df1e1971c..dc5ba6fc904c630b7a6ddee2a0fd6b8a0381f762 100644 (file)
@@ -451,6 +451,11 @@ descriptor=[
   [ "MAX_COMPUTE_UNIFORM_COMPONENTS", "CONST(MAX_COMPUTE_UNIFORM_COMPONENTS), extra_ARB_compute_shader_es31" ],
   [ "MAX_COMPUTE_IMAGE_UNIFORMS", "CONST(MAX_COMPUTE_IMAGE_UNIFORMS), extra_ARB_compute_shader_es31" ],
 
+# GL_ARB_framebuffer_no_attachments / GLES 3.1
+  ["MAX_FRAMEBUFFER_WIDTH", "CONTEXT_INT(Const.MaxFramebufferWidth), extra_ARB_framebuffer_no_attachments"],
+  ["MAX_FRAMEBUFFER_HEIGHT", "CONTEXT_INT(Const.MaxFramebufferHeight), extra_ARB_framebuffer_no_attachments"],
+  ["MAX_FRAMEBUFFER_SAMPLES", "CONTEXT_INT(Const.MaxFramebufferSamples), extra_ARB_framebuffer_no_attachments"],
+
 # GL_ARB_explicit_uniform_location / GLES 3.1
   [ "MAX_UNIFORM_LOCATIONS", "CONTEXT_INT(Const.MaxUserAssignableUniformLocations), extra_ARB_explicit_uniform_location" ],
 ]},
@@ -811,10 +816,7 @@ descriptor=[
   [ "MAX_GEOMETRY_IMAGE_UNIFORMS", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxImageUniforms), extra_ARB_shader_image_load_store_and_geometry_shader"],
 
 # GL_ARB_framebuffer_no_attachments
-  ["MAX_FRAMEBUFFER_WIDTH", "CONTEXT_INT(Const.MaxFramebufferWidth), extra_ARB_framebuffer_no_attachments"],
-  ["MAX_FRAMEBUFFER_HEIGHT", "CONTEXT_INT(Const.MaxFramebufferHeight), extra_ARB_framebuffer_no_attachments"],
   ["MAX_FRAMEBUFFER_LAYERS", "CONTEXT_INT(Const.MaxFramebufferLayers), extra_ARB_framebuffer_no_attachments"],
-  ["MAX_FRAMEBUFFER_SAMPLES", "CONTEXT_INT(Const.MaxFramebufferSamples), extra_ARB_framebuffer_no_attachments"],
 
 # GL_EXT_polygon_offset_clamp
   [ "POLYGON_OFFSET_CLAMP_EXT", "CONTEXT_FLOAT(Polygon.OffsetClamp), extra_EXT_polygon_offset_clamp" ],
index b941f3e522e16404f27d45b9bb71fdde854aa23d..0ddda59410e2b3575b0228bf2317a109ade85d1f 100644 (file)
@@ -2405,10 +2405,8 @@ const struct function gles31_functions_possible[] = {
    { "glDrawArraysIndirect", 31, -1 },
    { "glDrawElementsIndirect", 31, -1 },
 
-   // FINISHME: These two functions have not been implemented yet.  They come
-   // FINISHME: from the ARB_framebuffer_no_attachments extension.
-   // { "glFramebufferParameteri", 31, -1 },
-   // { "glGetFramebufferParameteriv", 31, -1 },
+   { "glFramebufferParameteri", 31, -1 },
+   { "glGetFramebufferParameteriv", 31, -1 },
 
    { "glGetProgramInterfaceiv", 31, -1 },
    { "glGetProgramResourceIndex", 31, -1 },
index f811c1ade4ee1896fcb7e11ce677bcea7a511674..498b2f867d06379d666106c2b94bc45edf072b30 100644 (file)
@@ -451,7 +451,7 @@ compute_version_es2(const struct gl_extensions *extensions)
                          extensions->ARB_compute_shader &&
                          extensions->ARB_draw_indirect &&
                          extensions->ARB_explicit_uniform_location &&
-                         false /*extensions->ARB_framebuffer_no_attachments*/ &&
+                         extensions->ARB_framebuffer_no_attachments &&
                          extensions->ARB_shader_atomic_counters &&
                          extensions->ARB_shader_image_load_store &&
                          extensions->ARB_shader_image_size &&