From 9f1db78a83feebefb9e1ef889b3b6b0532482c14 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Thu, 5 Feb 2015 16:38:11 -0800 Subject: [PATCH] main: Add stubs for [Get]NamedFramebufferParameteri[v]. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Fredrik Höglund --- .../glapi/gen/ARB_direct_state_access.xml | 12 +++++++ src/mesa/main/fbobject.c | 32 +++++++++++++++++++ src/mesa/main/fbobject.h | 8 +++++ src/mesa/main/tests/dispatch_sanity.cpp | 2 ++ 4 files changed, 54 insertions(+) diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 8bafe3f0bb0..3617e48a19c 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -166,6 +166,12 @@ + + + + + + @@ -246,6 +252,12 @@ + + + + + + diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index dc1e1a67321..971dc688a04 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -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, diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 22cb139ec9a..9f570db3a26 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -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, diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index a119d0874a6..23ddabd169d 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -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 }, -- 2.30.2