[Mesa-dev] [v3 PATCH 02/10] mesa:Define constants and functions for ARB_framebuffer_no_attachment extension
From: Kevin Rogovin kevin.rogo...@intel.com Define the enumeration constants, function entry points and glGet for the GL_ARB_framebuffer_no_attachments. v1 - v2 Add output=true for GetFramebufferParameteriv parameter params. Alphabetical insertion. v2 - v3 Implement _mesa_GetFramebufferParameteriv and _mesa_FramebufferParameteri as always error. Signed-off-by: Kevin Rogovin kevin.rogo...@intel.com --- .../glapi/gen/ARB_framebuffer_no_attachments.xml | 32 ++ src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/gl_API.xml | 4 ++- src/mesa/main/fbobject.c | 28 src/mesa/main/fbobject.h | 7 src/mesa/main/get.c| 3 ++ src/mesa/main/get_hash_params.py | 38 ++ src/mesa/main/tests/dispatch_sanity.cpp| 4 +-- 8 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml 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 index 000..10bdebc --- /dev/null +++ b/src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml @@ -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 offset=assign +param name=target type=GLenum / +param name=pname type=GLenum / +param name=param type=GLint / +/function + +function name=GetFramebufferParameteriv offset=assign +param name=target type=GLenum / +param name=pname type=GLenum / +param name=params type=GLint * output=true / +/function + +/category + +/OpenGLAPI diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am index adebd5c..5099f12 100644 --- a/src/mapi/glapi/gen/Makefile.am +++ b/src/mapi/glapi/gen/Makefile.am @@ -130,6 +130,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 \ diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 3090b9f..5079d30 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -8188,7 +8188,9 @@ !-- 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 diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 8fea7f8..4ac3f20 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1335,6 +1335,34 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer) bind_renderbuffer(target, renderbuffer, true); } +extern 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)); +} + +extern 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, + glGetNamedFramebufferParameteriv not supported + (ARB_framebuffer_no_attachments not implemented)); +} + /** * Remove the specified renderbuffer or texture from any attachment point in diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 9f570db..21f5b12 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -288,4 +288,11 @@ 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 /*
Re: [Mesa-dev] [v3 PATCH 02/10] mesa:Define constants and functions for ARB_framebuffer_no_attachment extension
Again, space after mesa: in the subject. On Thu, May 21, 2015 at 2:30 PM, kevin.rogo...@intel.com wrote: From: Kevin Rogovin kevin.rogo...@intel.com Define the enumeration constants, function entry points and glGet for the GL_ARB_framebuffer_no_attachments. v1 - v2 Add output=true for GetFramebufferParameteriv parameter params. Alphabetical insertion. v2 - v3 Implement _mesa_GetFramebufferParameteriv and _mesa_FramebufferParameteri as always error. Signed-off-by: Kevin Rogovin kevin.rogo...@intel.com --- .../glapi/gen/ARB_framebuffer_no_attachments.xml | 32 ++ src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/gl_API.xml | 4 ++- src/mesa/main/fbobject.c | 28 src/mesa/main/fbobject.h | 7 src/mesa/main/get.c| 3 ++ src/mesa/main/get_hash_params.py | 38 ++ src/mesa/main/tests/dispatch_sanity.cpp| 4 +-- 8 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml 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 index 000..10bdebc --- /dev/null +++ b/src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml @@ -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 offset=assign +param name=target type=GLenum / +param name=pname type=GLenum / +param name=param type=GLint / +/function + +function name=GetFramebufferParameteriv offset=assign +param name=target type=GLenum / +param name=pname type=GLenum / +param name=params type=GLint * output=true / +/function + +/category + +/OpenGLAPI diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am index adebd5c..5099f12 100644 --- a/src/mapi/glapi/gen/Makefile.am +++ b/src/mapi/glapi/gen/Makefile.am @@ -130,6 +130,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 \ diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 3090b9f..5079d30 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -8188,7 +8188,9 @@ !-- 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 diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 8fea7f8..4ac3f20 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1335,6 +1335,34 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer) bind_renderbuffer(target, renderbuffer, true); } +extern 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)); +} + +extern 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, + glGetNamedFramebufferParameteriv not supported + (ARB_framebuffer_no_attachments not implemented)); +} + /** * Remove the specified renderbuffer or texture from any attachment point in diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 9f570db..21f5b12 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -288,4 +288,11 @@ extern void GLAPIENTRY _mesa_DiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const
Re: [Mesa-dev] [v3 PATCH 02/10] mesa:Define constants and functions for ARB_framebuffer_no_attachment extension
I'm happy to see new documentation, so thanks for writing it up! But let's separate this from the functional changes related to implementing the extension. (Didn't I give this comment last time?) If you did, I missed it. Unless there are objections, I'll remove this from the series and make a tiny patch later that is just the documentation. -Kevin ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev