main: Add stubs for [Get]NamedFramebufferParameteri[v].
authorLaura Ekstrand <laura@jlekstrand.net>
Fri, 6 Feb 2015 00:38:11 +0000 (16:38 -0800)
committerFredrik Höglund <fredrik@kde.org>
Thu, 14 May 2015 13:48:15 +0000 (15:48 +0200)
The ARB_direct_state_access specification says (as of 2015.02.05):
   "Interactions with OpenGL 4.3 or ARB_framebuffer_no_attachments

       If neither OpenGL 4.3 nor ARB_framebuffer_no_attachments are supported,
       ignore the support for NamedFramebufferParameteri and
       GetNamedFramebufferParameteriv."

This commit adds stubs for these entry points.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
src/mapi/glapi/gen/ARB_direct_state_access.xml
src/mesa/main/fbobject.c
src/mesa/main/fbobject.h
src/mesa/main/tests/dispatch_sanity.cpp

index 8bafe3f0bb094fa7ecf6a5760be38af8b0ccbdf9..3617e48a19c5d400f69134eb9bb6336d4cb98ccb 100644 (file)
       <param name="renderbuffer" type="GLuint" />
    </function>
 
+   <function name="NamedFramebufferParameteri" offset="assign">
+      <param name="framebuffer" type="GLuint" />
+      <param name="pname" type="GLenum" />
+      <param name="param" type="GLint" />
+   </function>
+
    <function name="NamedFramebufferTexture" offset="assign">
       <param name="framebuffer" type="GLuint" />
       <param name="attachment" type="GLenum" />
       <param name="target" type="GLenum" />
    </function>
 
+   <function name="GetNamedFramebufferParameteriv" offset="assign">
+      <param name="framebuffer" type="GLuint" />
+      <param name="pname" type="GLenum" />
+      <param name="param" type="GLint *" />
+   </function>
+
    <function name="GetNamedFramebufferAttachmentParameteriv" offset="assign">
       <param name="framebuffer" type="GLuint" />
       <param name="attachment" type="GLenum" />
index dc1e1a67321bf3509b0d4475805b8d02673bee5d..971dc688a04b7bd8d31ffb3b3f4e1f0a986d6a86 100644 (file)
@@ -3635,6 +3635,38 @@ _mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer,
 }
 
 
+void GLAPIENTRY
+_mesa_NamedFramebufferParameteri(GLuint framebuffer, GLenum pname,
+                                 GLint param)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   (void) framebuffer;
+   (void) pname;
+   (void) param;
+
+   _mesa_error(ctx, GL_INVALID_OPERATION,
+               "glNamedFramebufferParameteri not supported "
+               "(ARB_framebuffer_no_attachments not implemented)");
+}
+
+
+void GLAPIENTRY
+_mesa_GetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname,
+                                     GLint *param)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   (void) framebuffer;
+   (void) pname;
+   (void) param;
+
+   _mesa_error(ctx, GL_INVALID_OPERATION,
+               "glGetNamedFramebufferParameteriv not supported "
+               "(ARB_framebuffer_no_attachments not implemented)");
+}
+
+
 static void
 invalidate_framebuffer_storage(struct gl_context *ctx,
                                struct gl_framebuffer *fb,
index 22cb139ec9aeaa18547ddf890dc6e0e6ea810c28..9f570db3a26826c12224d0525220ccf8f34431b2 100644 (file)
@@ -255,6 +255,14 @@ _mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer,
                                                GLenum attachment,
                                                GLenum pname, GLint *params);
 
+extern void GLAPIENTRY
+_mesa_NamedFramebufferParameteri(GLuint framebuffer, GLenum pname,
+                                 GLint param);
+
+extern void GLAPIENTRY
+_mesa_GetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname,
+                                     GLint *param);
+
 extern void GLAPIENTRY
 _mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments,
                                const GLenum *attachments, GLint x, GLint y,
index a119d0874a612800d5cebd6ba3e586e570a01662..23ddabd169d300a607964a3caaff0dcaf178ce1b 100644 (file)
@@ -982,6 +982,7 @@ const struct function gl_core_functions_possible[] = {
    { "glGetNamedBufferSubData", 45, -1 },
    { "glCreateFramebuffers", 45, -1 },
    { "glNamedFramebufferRenderbuffer", 45, -1 },
+   { "glNamedFramebufferParameteri", 45, -1 },
    { "glNamedFramebufferTexture", 45, -1 },
    { "glNamedFramebufferTextureLayer", 45, -1 },
    { "glInvalidateNamedFramebufferSubData", 45, -1 },
@@ -992,6 +993,7 @@ const struct function gl_core_functions_possible[] = {
    { "glClearNamedFramebufferfi", 45, -1 },
    { "glBlitNamedFramebuffer", 45, -1 },
    { "glCheckNamedFramebufferStatus", 45, -1 },
+   { "glGetNamedFramebufferParameteriv", 45, -1 },
    { "glGetNamedFramebufferAttachmentParameteriv", 45, -1 },
    { "glCreateRenderbuffers", 45, -1 },
    { "glNamedRenderbufferStorage", 45, -1 },