mesa: Constants and functions for ARB_framebuffer_no_attachments
authorKevin Rogovin <kevin.rogovin@intel.com>
Wed, 17 Jun 2015 10:29:51 +0000 (13:29 +0300)
committerMartin Peres <martin.peres@linux.intel.com>
Wed, 17 Jun 2015 11:39:02 +0000 (14:39 +0300)
Define the enumeration constants, function entry points and
glGet for the GL_ARB_framebuffer_no_attachments.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml [new file with mode: 0644]
src/mapi/glapi/gen/Makefile.am
src/mapi/glapi/gen/apiexec.py
src/mapi/glapi/gen/gl_API.xml
src/mesa/main/fbobject.c
src/mesa/main/fbobject.h
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/tests/dispatch_sanity.cpp

diff --git a/src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml b/src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml
new file mode 100644 (file)
index 0000000..59839a0
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_ARB_framebuffer_no_attachments" number="130">
+
+   <enum name="FRAMEBUFFER_DEFAULT_WIDTH"                  value="0x9310" />
+   <enum name="FRAMEBUFFER_DEFAULT_HEIGHT"                 value="0x9311" />
+   <enum name="FRAMEBUFFER_DEFAULT_LAYERS"                 value="0x9312" />
+   <enum name="FRAMEBUFFER_DEFAULT_SAMPLES"                value="0x9313" />
+   <enum name="FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS" value="0x9314" />
+   <enum name="MAX_FRAMEBUFFER_WIDTH"                      value="0x9315" />
+   <enum name="MAX_FRAMEBUFFER_HEIGHT"                     value="0x9316" />
+   <enum name="MAX_FRAMEBUFFER_LAYERS"                     value="0x9317" />
+   <enum name="MAX_FRAMEBUFFER_SAMPLES"                    value="0x9318" />
+
+    <function name="FramebufferParameteri">
+       <param name="target" type="GLenum"/>
+       <param name="pname"  type="GLenum"/>
+       <param name="param"  type="GLint" />
+    </function>
+
+    <function name="GetFramebufferParameteriv">
+       <param name="target" type="GLenum" />
+       <param name="pname"  type="GLenum" />
+       <param name="params" type="GLint *" output="true" />
+    </function>
+
+</category>
+
+</OpenGLAPI>
index 34602579c8a0ffddb7de07b971927ce017ba9c82..5b163b02e00bfb8124d67348bc6e38c07f4cd74d 100644 (file)
@@ -131,6 +131,7 @@ API_XML = \
        ARB_draw_instanced.xml \
        ARB_ES2_compatibility.xml \
        ARB_ES3_compatibility.xml \
+       ARB_framebuffer_no_attachments.xml \
        ARB_framebuffer_object.xml \
        ARB_geometry_shader4.xml \
        ARB_get_program_binary.xml \
index 535de8a434b3d807d1964dc7c6f0b523a71109f4..b623b44beebe3e536967459ef494a17355469cce 100644 (file)
@@ -138,6 +138,11 @@ functions = {
     # with OpenGL 3.1.
     "TexBufferRange": exec_info(core=31),
 
+    # 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),
+
     # OpenGL 4.5 / GL_ARB_direct_state_access.   Mesa can expose the extension
     # with core profile.
     "CreateTransformFeedbacks": exec_info(core=31),
index bd8db62033e60921b413c988cee622e41245bc86..2f330756f2270998f8ce6a1359ebeb1ae62848ca 100644 (file)
     <!-- No new functions, types, enums. -->
 </category>
 
-<!-- ARB extensions #130..#131 -->
+<xi:include href="ARB_framebuffer_no_attachments.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- ARB extensions #131 -->
 
 <category name="GL_ARB_explicit_uniform_location" number="128">
     <enum name="MAX_UNIFORM_LOCATIONS" count="1" value="0x826E" >
index 498edfb564c95440eed2e5ced2b9e7e1d07fa66b..6d75209c6a584a0fa8b60c285943932d58b366ca 100644 (file)
@@ -1335,6 +1335,34 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer)
    bind_renderbuffer(target, renderbuffer, true);
 }
 
+void GLAPIENTRY
+_mesa_FramebufferParameteri(GLenum target, GLenum pname, GLint param)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   (void) target;
+   (void) pname;
+   (void) param;
+
+   _mesa_error(ctx, GL_INVALID_OPERATION,
+               "glFramebufferParameteri not supported "
+               "(ARB_framebuffer_no_attachments not implemented)");
+}
+
+void GLAPIENTRY
+_mesa_GetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   (void) target;
+   (void) pname;
+   (void) param;
+
+   _mesa_error(ctx, GL_INVALID_OPERATION,
+               "glGetFramebufferParameteriv not supported "
+               "(ARB_framebuffer_no_attachments not implemented)");
+}
+
 
 /**
  * Remove the specified renderbuffer or texture from any attachment point in
index 9f570db3a26826c12224d0525220ccf8f34431b2..8dad0ff34e7f962e148ea32afdc4c175b5c527d5 100644 (file)
@@ -288,4 +288,10 @@ extern void GLAPIENTRY
 _mesa_DiscardFramebufferEXT(GLenum target, GLsizei numAttachments,
                             const GLenum *attachments);
 
+extern void GLAPIENTRY
+_mesa_FramebufferParameteri(GLenum target, GLenum pname, GLint param);
+
+extern void GLAPIENTRY
+_mesa_GetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params);
+
 #endif /* FBOBJECT_H */
index 1bc9b5d82cfe1b2b6c86d9ffcf9d450daf455c4c..3d6d63916b383b436cd60f8d34f4e3677f2e056c 100644 (file)
@@ -400,6 +400,7 @@ EXTRA_EXT(INTEL_performance_query);
 EXTRA_EXT(ARB_explicit_uniform_location);
 EXTRA_EXT(ARB_clip_control);
 EXTRA_EXT(EXT_polygon_offset_clamp);
+EXTRA_EXT(ARB_framebuffer_no_attachments);
 
 static const int
 extra_ARB_color_buffer_float_or_glcore[] = {
index 513d5d21b3f98d2be779c620ada2de851cc3dfcb..84c5aa31a68af03de4d0c5f2e7289cf25d9c9b82 100644 (file)
@@ -804,6 +804,12 @@ descriptor=[
   [ "MIN_FRAGMENT_INTERPOLATION_OFFSET", "CONTEXT_FLOAT(Const.MinFragmentInterpolationOffset), extra_ARB_gpu_shader5" ],
   [ "MAX_FRAGMENT_INTERPOLATION_OFFSET", "CONTEXT_FLOAT(Const.MaxFragmentInterpolationOffset), extra_ARB_gpu_shader5" ],
   [ "FRAGMENT_INTERPOLATION_OFFSET_BITS", "CONST(FRAGMENT_INTERPOLATION_OFFSET_BITS), extra_ARB_gpu_shader5" ],
+
+# 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"],
 ]},
 
 # Enums restricted to OpenGL Core profile
index 0b7262a21e7801ab03fa3d254f6b09137f3343fb..800720b798ed70a4cb555c58adb2d314c1f4d647 100644 (file)
@@ -823,8 +823,8 @@ const struct function common_desktop_functions_possible[] = {
 // { "glVertexArrayVertexAttribIFormatEXT", 43, -1 },   // XXX: Add to xml
 // { "glVertexArrayVertexAttribBindingEXT", 43, -1 },   // XXX: Add to xml
 // { "glVertexArrayVertexBindingDivisorEXT", 43, -1 },  // XXX: Add to xml
-// { "glFramebufferParameteri", 43, -1 },               // XXX: Add to xml
-// { "glGetFramebufferParameteriv", 43, -1 },           // XXX: Add to xml
+   { "glFramebufferParameteri", 43, -1 },
+   { "glGetFramebufferParameteriv", 43, -1 },
 // { "glNamedFramebufferParameteriEXT", 43, -1 },       // XXX: Add to xml
 // { "glGetNamedFramebufferParameterivEXT", 43, -1 },   // XXX: Add to xml
 // { "glGetInternalformati64v", 43, -1 },               // XXX: Add to xml