From f868de7d6b1370105414eb3d83b4b38b598bff66 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Fri, 23 Jan 2015 14:54:48 -0800 Subject: main: Add glCreateFramebuffers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Fredrik: Whitespace fixes] Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mesa/main/tests/dispatch_sanity.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/main/tests') diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index ccd0124a2bb..6e1293d98e5 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -980,6 +980,7 @@ const struct function gl_core_functions_possible[] = { { "glGetNamedBufferParameteri64v", 45, -1 }, { "glGetNamedBufferPointerv", 45, -1 }, { "glGetNamedBufferSubData", 45, -1 }, + { "glCreateFramebuffers", 45, -1 }, { "glCreateRenderbuffers", 45, -1 }, { "glNamedRenderbufferStorage", 45, -1 }, { "glNamedRenderbufferStorageMultisample", 45, -1 }, -- cgit v1.2.3 From a29318bf0a0385fa4fdedbdc3fb6e1f6f0d87884 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Fri, 27 Feb 2015 17:27:30 -0800 Subject: main: Add entry point for NamedFramebufferRenderbuffer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Fredrik: - Remove the DummyRenderbuffer checks now that they are done in _mesa_lookup_renderbuffer_err. - Fix the name in error messages. - Make the error message in _mesa_framebuffer_renderbuffer reflect that might not be the bound framebuffer. - Remove EXT suffixes from GL tokens.] Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 ++ src/mesa/main/fbobject.c | 129 ++++++++++++++++--------- src/mesa/main/fbobject.h | 12 +++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 105 insertions(+), 44 deletions(-) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 7801ef45bb2..f228a5286a7 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -159,6 +159,13 @@ + + + + + + + diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index f1603649f4c..ea6e273fda3 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2896,71 +2896,37 @@ _mesa_FramebufferTexture(GLenum target, GLenum attachment, } -void GLAPIENTRY -_mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment, - GLenum renderbufferTarget, - GLuint renderbuffer) +void +_mesa_framebuffer_renderbuffer(struct gl_context *ctx, + struct gl_framebuffer *fb, + GLenum attachment, + struct gl_renderbuffer *rb, + const char *func) { struct gl_renderbuffer_attachment *att; - struct gl_framebuffer *fb; - struct gl_renderbuffer *rb; - GET_CURRENT_CONTEXT(ctx); - - fb = get_framebuffer_target(ctx, target); - if (!fb) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glFramebufferRenderbuffer(target)"); - return; - } - - if (renderbufferTarget != GL_RENDERBUFFER_EXT) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glFramebufferRenderbuffer(renderbufferTarget)"); - return; - } if (_mesa_is_winsys_fbo(fb)) { /* Can't attach new renderbuffers to a window system framebuffer */ - _mesa_error(ctx, GL_INVALID_OPERATION, "glFramebufferRenderbuffer"); + _mesa_error(ctx, GL_INVALID_OPERATION, + "%s(window-system framebuffer)", func); return; } att = get_attachment(ctx, fb, attachment); if (att == NULL) { _mesa_error(ctx, GL_INVALID_ENUM, - "glFramebufferRenderbuffer(invalid attachment %s)", + "%s(invalid attachment %s)", func, _mesa_lookup_enum_by_nr(attachment)); return; } - if (renderbuffer) { - rb = _mesa_lookup_renderbuffer(ctx, renderbuffer); - if (!rb) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferRenderbuffer(non-existant" - " renderbuffer %u)", renderbuffer); - return; - } - else if (rb == &DummyRenderbuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferRenderbuffer(renderbuffer %u)", - renderbuffer); - return; - } - } - else { - /* remove renderbuffer attachment */ - rb = NULL; - } - if (attachment == GL_DEPTH_STENCIL_ATTACHMENT && rb && rb->Format != MESA_FORMAT_NONE) { /* make sure the renderbuffer is a depth/stencil format */ const GLenum baseFormat = _mesa_get_format_base_format(rb->Format); if (baseFormat != GL_DEPTH_STENCIL) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferRenderbuffer(renderbuffer" - " is not DEPTH_STENCIL format)"); + "%s(renderbuffer is not DEPTH_STENCIL format)", func); return; } } @@ -2977,6 +2943,81 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment, } +void GLAPIENTRY +_mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + struct gl_framebuffer *fb; + struct gl_renderbuffer *rb; + GET_CURRENT_CONTEXT(ctx); + + fb = get_framebuffer_target(ctx, target); + if (!fb) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glFramebufferRenderbuffer(invalid target %s)", + _mesa_lookup_enum_by_nr(target)); + return; + } + + if (renderbuffertarget != GL_RENDERBUFFER) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glFramebufferRenderbuffer(renderbuffertarget is not " + "GL_RENDERBUFFER)"); + return; + } + + if (renderbuffer) { + rb = _mesa_lookup_renderbuffer_err(ctx, renderbuffer, + "glFramebufferRenderbuffer"); + if (!rb) + return; + } + else { + /* remove renderbuffer attachment */ + rb = NULL; + } + + _mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb, + "glFramebufferRenderbuffer"); +} + + +void GLAPIENTRY +_mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer) +{ + struct gl_framebuffer *fb; + struct gl_renderbuffer *rb; + GET_CURRENT_CONTEXT(ctx); + + fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glNamedFramebufferRenderbuffer"); + + if (renderbuffertarget != GL_RENDERBUFFER) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glNamedFramebufferRenderbuffer(renderbuffertarget is not " + "GL_RENDERBUFFER)"); + return; + } + + if (renderbuffer) { + rb = _mesa_lookup_renderbuffer_err(ctx, renderbuffer, + "glNamedFramebufferRenderbuffer"); + if (!rb) + return; + } + else { + /* remove renderbuffer attachment */ + rb = NULL; + } + + _mesa_framebuffer_renderbuffer(ctx, fb, attachment, rb, + "glNamedFramebufferRenderbuffer"); +} + + void GLAPIENTRY _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params) diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 0c0bc0e4a66..63b76f1ed49 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -87,6 +87,13 @@ _mesa_FramebufferRenderbuffer_sw(struct gl_context *ctx, GLenum attachment, struct gl_renderbuffer *rb); +extern void +_mesa_framebuffer_renderbuffer(struct gl_context *ctx, + struct gl_framebuffer *fb, + GLenum attachment, + struct gl_renderbuffer *rb, + const char *func); + extern void _mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb); @@ -206,6 +213,11 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +extern void GLAPIENTRY +_mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, + GLenum renderbuffertarget, + GLuint renderbuffer); + extern void GLAPIENTRY _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 6e1293d98e5..32b082bcb28 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -981,6 +981,7 @@ const struct function gl_core_functions_possible[] = { { "glGetNamedBufferPointerv", 45, -1 }, { "glGetNamedBufferSubData", 45, -1 }, { "glCreateFramebuffers", 45, -1 }, + { "glNamedFramebufferRenderbuffer", 45, -1 }, { "glCreateRenderbuffers", 45, -1 }, { "glNamedRenderbufferStorage", 45, -1 }, { "glNamedRenderbufferStorageMultisample", 45, -1 }, -- cgit v1.2.3 From d78c831a147e8af6f6fc1a610f4c2e490e75fad1 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Wed, 28 Jan 2015 13:19:57 -0800 Subject: main: Add entry points for glNamedFramebufferTexture[Layer]. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 15 ++++++ src/mesa/main/fbobject.c | 64 ++++++++++++++++++++++++++ src/mesa/main/fbobject.h | 8 ++++ src/mesa/main/tests/dispatch_sanity.cpp | 2 + 4 files changed, 89 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index f228a5286a7..b8e90aadd45 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -166,6 +166,21 @@ + + + + + + + + + + + + + + + diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index dc730c8695c..8f759fba809 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2995,6 +2995,36 @@ _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment, } +void GLAPIENTRY +_mesa_NamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level, GLint layer) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + struct gl_texture_object *texObj; + GLboolean layered = GL_FALSE; + + /* Get the framebuffer object */ + fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glNamedFramebufferTextureLayer"); + if (!fb) + return; + + /* Get the texture object */ + if (!get_texture_for_framebuffer(ctx, texture, 0, level, layer, + &layered, + "glNamedFramebufferTextureLayer", + &texObj)) { + /* Error already recorded */ + return; + } + + _mesa_framebuffer_texture(ctx, fb, attachment, texObj, 0, level, + layer, layered, + "glNamedFramebufferTextureLayer"); +} + + void GLAPIENTRY _mesa_FramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level) @@ -3032,6 +3062,40 @@ _mesa_FramebufferTexture(GLenum target, GLenum attachment, } +void GLAPIENTRY +_mesa_NamedFramebufferTexture(GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + struct gl_texture_object *texObj; + GLboolean layered = GL_TRUE; + + if (!_mesa_has_geometry_shaders(ctx)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "unsupported function (glNamedFramebufferTexture) called"); + return; + } + + /* Get the framebuffer object */ + fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glNamedFramebufferTexture"); + if (!fb) + return; + + /* Get the texture object */ + if (!get_texture_for_framebuffer(ctx, texture, 0, level, 0, + &layered, "glNamedFramebufferTexture", + &texObj)) { + /* Error already recorded */ + return; + } + + _mesa_framebuffer_texture(ctx, fb, attachment, texObj, 0, level, + 0, layered, "glNamedFramebufferTexture"); +} + + void _mesa_framebuffer_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 974cd568f27..81159d0efa9 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -212,10 +212,18 @@ extern void GLAPIENTRY _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +extern void GLAPIENTRY +_mesa_NamedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level, GLint layer); + extern void GLAPIENTRY _mesa_FramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level); +extern void GLAPIENTRY +_mesa_NamedFramebufferTexture(GLuint framebuffer, GLenum attachment, + GLuint texture, GLint level); + extern void GLAPIENTRY _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 32b082bcb28..0994d437e24 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -982,6 +982,8 @@ const struct function gl_core_functions_possible[] = { { "glGetNamedBufferSubData", 45, -1 }, { "glCreateFramebuffers", 45, -1 }, { "glNamedFramebufferRenderbuffer", 45, -1 }, + { "glNamedFramebufferTexture", 45, -1 }, + { "glNamedFramebufferTextureLayer", 45, -1 }, { "glCreateRenderbuffers", 45, -1 }, { "glNamedRenderbufferStorage", 45, -1 }, { "glNamedRenderbufferStorageMultisample", 45, -1 }, -- cgit v1.2.3 From f93f95928d39b13e6c263b480b3e4bfdfa218df8 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Thu, 29 Jan 2015 13:15:37 -0800 Subject: main: Add entry point for CheckNamedFramebufferStatus. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Fredrik: - Retain the debugging code in CheckFramebufferStatus. - Whitespace fixes.] Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 6 ++ src/mesa/main/fbobject.c | 79 +++++++++++++++++++++----- src/mesa/main/fbobject.h | 7 +++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 78 insertions(+), 15 deletions(-) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index b8e90aadd45..1748950d120 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -181,6 +181,12 @@ + + + + + + diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 4da77a33706..ad7a85ccd9b 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2499,24 +2499,12 @@ _mesa_CreateFramebuffers(GLsizei n, GLuint *framebuffers) } -GLenum GLAPIENTRY -_mesa_CheckFramebufferStatus(GLenum target) +GLenum +_mesa_check_framebuffer_status(struct gl_context *ctx, + struct gl_framebuffer *buffer) { - struct gl_framebuffer *buffer; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glCheckFramebufferStatus(%s)\n", - _mesa_lookup_enum_by_nr(target)); - - buffer = get_framebuffer_target(ctx, target); - if (!buffer) { - _mesa_error(ctx, GL_INVALID_ENUM, "glCheckFramebufferStatus(target)"); - return 0; - } - if (_mesa_is_winsys_fbo(buffer)) { /* EGL_KHR_surfaceless_context allows the winsys FBO to be incomplete. */ if (buffer != &IncompleteFramebuffer) { @@ -2536,6 +2524,67 @@ _mesa_CheckFramebufferStatus(GLenum target) } +GLenum GLAPIENTRY +_mesa_CheckFramebufferStatus(GLenum target) +{ + struct gl_framebuffer *fb; + GET_CURRENT_CONTEXT(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glCheckFramebufferStatus(%s)\n", + _mesa_lookup_enum_by_nr(target)); + + fb = get_framebuffer_target(ctx, target); + if (!fb) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glCheckFramebufferStatus(invalid target %s)", + _mesa_lookup_enum_by_nr(target)); + return 0; + } + + return _mesa_check_framebuffer_status(ctx, fb); +} + + +GLenum GLAPIENTRY +_mesa_CheckNamedFramebufferStatus(GLuint framebuffer, GLenum target) +{ + struct gl_framebuffer *fb; + GET_CURRENT_CONTEXT(ctx); + + /* Validate the target (for conformance's sake) and grab a reference to the + * default framebuffer in case framebuffer = 0. + * Section 9.4 Framebuffer Completeness of the OpenGL 4.5 core spec + * (30.10.2014, PDF page 336) says: + * "If framebuffer is zero, then the status of the default read or + * draw framebuffer (as determined by target) is returned." + */ + switch (target) { + case GL_DRAW_FRAMEBUFFER: + case GL_FRAMEBUFFER: + fb = ctx->WinSysDrawBuffer; + break; + case GL_READ_FRAMEBUFFER: + fb = ctx->WinSysReadBuffer; + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, + "glCheckNamedFramebufferStatus(invalid target %s)", + _mesa_lookup_enum_by_nr(target)); + return 0; + } + + if (framebuffer) { + fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glCheckNamedFramebufferStatus"); + if (!fb) + return 0; + } + + return _mesa_check_framebuffer_status(ctx, fb); +} + + /** * Replicate the src attachment point. Used by framebuffer_texture() when * the same texture is attached at GL_DEPTH_ATTACHMENT and diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index e68762b429e..871a2cc280e 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -122,6 +122,10 @@ _mesa_framebuffer_texture(struct gl_context *ctx, struct gl_framebuffer *fb, GLint level, GLuint layer, GLboolean layered, const char *caller); +extern GLenum +_mesa_check_framebuffer_status(struct gl_context *ctx, + struct gl_framebuffer *fb); + extern GLboolean GLAPIENTRY _mesa_IsRenderbuffer(GLuint renderbuffer); @@ -195,6 +199,9 @@ _mesa_CreateFramebuffers(GLsizei n, GLuint *framebuffers); extern GLenum GLAPIENTRY _mesa_CheckFramebufferStatus(GLenum target); +extern GLenum GLAPIENTRY +_mesa_CheckNamedFramebufferStatus(GLuint framebuffer, GLenum target); + extern void GLAPIENTRY _mesa_FramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 0994d437e24..fdfad348a6e 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -984,6 +984,7 @@ const struct function gl_core_functions_possible[] = { { "glNamedFramebufferRenderbuffer", 45, -1 }, { "glNamedFramebufferTexture", 45, -1 }, { "glNamedFramebufferTextureLayer", 45, -1 }, + { "glCheckNamedFramebufferStatus", 45, -1 }, { "glCreateRenderbuffers", 45, -1 }, { "glNamedRenderbufferStorage", 45, -1 }, { "glNamedRenderbufferStorageMultisample", 45, -1 }, -- cgit v1.2.3 From f22fa307de780723e182d62a03c2c4c4f8a937f7 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Thu, 29 Jan 2015 17:11:37 -0800 Subject: main: Add entry point GetNamedFramebufferAttachmentParameteriv. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Fredrik: - Update one of the error messages to reflect that the framebuffer might not be the bound framebuffer. - Whitespace fixes.] Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 ++ src/mesa/main/fbobject.c | 124 +++++++++++++++++-------- src/mesa/main/fbobject.h | 10 ++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 101 insertions(+), 41 deletions(-) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 1748950d120..beb6249a6f7 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -187,6 +187,13 @@ + + + + + + + diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index ad7a85ccd9b..15878d327c6 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -3307,25 +3307,18 @@ _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, } -void GLAPIENTRY -_mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, - GLenum pname, GLint *params) +void +_mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx, + struct gl_framebuffer *buffer, + GLenum attachment, GLenum pname, + GLint *params, const char *caller) { const struct gl_renderbuffer_attachment *att; - struct gl_framebuffer *buffer; GLenum err; - GET_CURRENT_CONTEXT(ctx); /* The error differs in GL and GLES. */ err = _mesa_is_desktop_gl(ctx) ? GL_INVALID_OPERATION : GL_INVALID_ENUM; - buffer = get_framebuffer_target(ctx, target); - if (!buffer) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameteriv(target)"); - return; - } - if (_mesa_is_winsys_fbo(buffer)) { /* Page 126 (page 136 of the PDF) of the OpenGL ES 2.0.25 spec * says: @@ -3341,14 +3334,15 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, !ctx->Extensions.ARB_framebuffer_object) && !_mesa_is_gles3(ctx)) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetFramebufferAttachmentParameteriv(bound FBO = 0)"); + "%s(window-system framebuffer)", caller); return; } if (_mesa_is_gles3(ctx) && attachment != GL_BACK && attachment != GL_DEPTH && attachment != GL_STENCIL) { _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameteriv(attachment)"); + "%s(invalid attachment %s)", caller, + _mesa_lookup_enum_by_nr(attachment)); return; } /* the default / window-system FBO */ @@ -3360,8 +3354,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, } if (att == NULL) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameteriv(attachment)"); + _mesa_error(ctx, GL_INVALID_ENUM, "%s(invalid attachment %s)", caller, + _mesa_lookup_enum_by_nr(attachment)); return; } @@ -3375,9 +3369,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, * attachment, since it does not have a single format." */ _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetFramebufferAttachmentParameteriv(" - "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE" - " is invalid for depth+stencil attachment)"); + "%s(GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE" + " is invalid for depth+stencil attachment)", caller); return; } /* the depth and stencil attachments must point to the same buffer */ @@ -3385,8 +3378,7 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, stencilAtt = get_attachment(ctx, buffer, GL_STENCIL_ATTACHMENT); if (depthAtt->Renderbuffer != stencilAtt->Renderbuffer) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetFramebufferAttachmentParameteriv(DEPTH/STENCIL" - " attachments differ)"); + "%s(DEPTH/STENCIL attachments differ)", caller); return; } } @@ -3419,8 +3411,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, *params = att->TextureLevel; } else if (att->Type == GL_NONE) { - _mesa_error(ctx, err, - "glGetFramebufferAttachmentParameteriv(pname)"); + _mesa_error(ctx, err, "%s(invalid pname %s)", caller, + _mesa_lookup_enum_by_nr(pname)); } else { goto invalid_pname_enum; @@ -3436,8 +3428,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, } } else if (att->Type == GL_NONE) { - _mesa_error(ctx, err, - "glGetFramebufferAttachmentParameteriv(pname)"); + _mesa_error(ctx, err, "%s(invalid pname %s)", caller, + _mesa_lookup_enum_by_nr(pname)); } else { goto invalid_pname_enum; @@ -3447,8 +3439,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, if (ctx->API == API_OPENGLES) { goto invalid_pname_enum; } else if (att->Type == GL_NONE) { - _mesa_error(ctx, err, - "glGetFramebufferAttachmentParameteriv(pname)"); + _mesa_error(ctx, err, "%s(invalid pname %s)", caller, + _mesa_lookup_enum_by_nr(pname)); } else if (att->Type == GL_TEXTURE) { if (att->Texture && (att->Texture->Target == GL_TEXTURE_3D || att->Texture->Target == GL_TEXTURE_2D_ARRAY)) { @@ -3469,8 +3461,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, goto invalid_pname_enum; } else if (att->Type == GL_NONE) { - _mesa_error(ctx, err, - "glGetFramebufferAttachmentParameteriv(pname)"); + _mesa_error(ctx, err, "%s(invalid pname %s)", caller, + _mesa_lookup_enum_by_nr(pname)); } else { if (ctx->Extensions.EXT_framebuffer_sRGB) { @@ -3492,8 +3484,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, goto invalid_pname_enum; } else if (att->Type == GL_NONE) { - _mesa_error(ctx, err, - "glGetFramebufferAttachmentParameteriv(pname)"); + _mesa_error(ctx, err, "%s(invalid pname %s)", caller, + _mesa_lookup_enum_by_nr(pname)); } else { mesa_format format = att->Renderbuffer->Format; @@ -3508,9 +3500,9 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, if (_mesa_is_gles3(ctx) && attachment == GL_DEPTH_STENCIL_ATTACHMENT) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetFramebufferAttachmentParameteriv(cannot query " + "%s(cannot query " "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE of " - "GL_DEPTH_STENCIL_ATTACHMENT"); + "GL_DEPTH_STENCIL_ATTACHMENT)", caller); return; } @@ -3544,8 +3536,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, goto invalid_pname_enum; } else if (att->Type == GL_NONE) { - _mesa_error(ctx, err, - "glGetFramebufferAttachmentParameteriv(pname)"); + _mesa_error(ctx, err, "%s(invalid pname %s)", caller, + _mesa_lookup_enum_by_nr(pname)); } else if (att->Texture) { const struct gl_texture_image *texImage = @@ -3564,8 +3556,7 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, att->Renderbuffer->Format); } else { - _mesa_problem(ctx, "glGetFramebufferAttachmentParameterivEXT:" - " invalid FBO attachment structure"); + _mesa_problem(ctx, "%s: invalid FBO attachment structure", caller); } return; case GL_FRAMEBUFFER_ATTACHMENT_LAYERED: @@ -3574,8 +3565,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, } else if (att->Type == GL_TEXTURE) { *params = att->Layered; } else if (att->Type == GL_NONE) { - _mesa_error(ctx, err, - "glGetFramebufferAttachmentParameteriv(pname)"); + _mesa_error(ctx, err, "%s(invalid pname %s)", caller, + _mesa_lookup_enum_by_nr(pname)); } else { goto invalid_pname_enum; } @@ -3587,12 +3578,63 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, return; invalid_pname_enum: - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameteriv(pname)"); + _mesa_error(ctx, GL_INVALID_ENUM, "%s(invalid pname %s)", caller, + _mesa_lookup_enum_by_nr(pname)); return; } +void GLAPIENTRY +_mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, + GLenum pname, GLint *params) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *buffer; + + buffer = get_framebuffer_target(ctx, target); + if (!buffer) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glGetFramebufferAttachmentParameteriv(invalid target %s)", + _mesa_lookup_enum_by_nr(target)); + return; + } + + _mesa_get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname, + params, + "glGetFramebufferAttachmentParameteriv"); +} + + +void GLAPIENTRY +_mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer, + GLenum attachment, + GLenum pname, GLint *params) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *buffer; + + if (framebuffer) { + buffer = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glGetNamedFramebufferAttachmentParameteriv"); + if (!buffer) + return; + } + else { + /* + * Section 9.2 Binding and Managing Framebuffer Objects of the OpenGL + * 4.5 core spec (30.10.2014, PDF page 314): + * "If framebuffer is zero, then the default draw framebuffer is + * queried." + */ + buffer = ctx->WinSysDrawBuffer; + } + + _mesa_get_framebuffer_attachment_parameter(ctx, buffer, attachment, pname, + params, + "glGetNamedFramebufferAttachmentParameteriv"); +} + + static void invalidate_framebuffer_storage(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 871a2cc280e..71392037119 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -126,6 +126,12 @@ extern GLenum _mesa_check_framebuffer_status(struct gl_context *ctx, struct gl_framebuffer *fb); +extern void +_mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx, + struct gl_framebuffer *buffer, + GLenum attachment, GLenum pname, + GLint *params, const char *caller); + extern GLboolean GLAPIENTRY _mesa_IsRenderbuffer(GLuint renderbuffer); @@ -244,6 +250,10 @@ _mesa_NamedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, extern void GLAPIENTRY _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params); +extern void GLAPIENTRY +_mesa_GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer, + GLenum attachment, + GLenum pname, GLint *params); extern void GLAPIENTRY _mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index fdfad348a6e..f3aff5f9fa8 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -985,6 +985,7 @@ const struct function gl_core_functions_possible[] = { { "glNamedFramebufferTexture", 45, -1 }, { "glNamedFramebufferTextureLayer", 45, -1 }, { "glCheckNamedFramebufferStatus", 45, -1 }, + { "glGetNamedFramebufferAttachmentParameteriv", 45, -1 }, { "glCreateRenderbuffers", 45, -1 }, { "glNamedRenderbufferStorage", 45, -1 }, { "glNamedRenderbufferStorageMultisample", 45, -1 }, -- cgit v1.2.3 From 47b910d27587f738dd81cdb9a879726785c0bc54 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Mon, 2 Feb 2015 16:27:46 -0800 Subject: main: Add entry point for BlitNamedFramebuffer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 15 ++++++++ src/mesa/main/blit.c | 51 ++++++++++++++++++++++++++ src/mesa/main/blit.h | 6 +++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 73 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index beb6249a6f7..7ee2000d86e 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -181,6 +181,21 @@ + + + + + + + + + + + + + + + diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c index 6c78686a59a..baf3165ff9d 100644 --- a/src/mesa/main/blit.c +++ b/src/mesa/main/blit.c @@ -526,3 +526,54 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter, "glBlitFramebuffer"); } + + +void GLAPIENTRY +_mesa_BlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer, + GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *readFb, *drawFb; + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, + "glBlitNamedFramebuffer(%u %u %d, %d, %d, %d, " + " %d, %d, %d, %d, 0x%x, %s)\n", + readFramebuffer, drawFramebuffer, + srcX0, srcY0, srcX1, srcY1, + dstX0, dstY0, dstX1, dstY1, + mask, _mesa_lookup_enum_by_nr(filter)); + + /* + * According to PDF page 533 of the OpenGL 4.5 core spec (30.10.2014, + * Section 18.3 Copying Pixels): + * "... if readFramebuffer or drawFramebuffer is zero (for + * BlitNamedFramebuffer), then the default read or draw framebuffer is + * used as the corresponding source or destination framebuffer, + * respectively." + */ + if (readFramebuffer) { + readFb = _mesa_lookup_framebuffer_err(ctx, readFramebuffer, + "glBlitNamedFramebuffer"); + if (!readFb) + return; + } + else + readFb = ctx->WinSysReadBuffer; + + if (drawFramebuffer) { + drawFb = _mesa_lookup_framebuffer_err(ctx, drawFramebuffer, + "glBlitNamedFramebuffer"); + if (!drawFb) + return; + } + else + drawFb = ctx->WinSysDrawBuffer; + + _mesa_blit_framebuffer(ctx, readFb, drawFb, + srcX0, srcY0, srcX1, srcY1, + dstX0, dstY0, dstX1, dstY1, + mask, filter, "glBlitNamedFramebuffer"); +} diff --git a/src/mesa/main/blit.h b/src/mesa/main/blit.h index b854f5f84c6..54b946e3192 100644 --- a/src/mesa/main/blit.h +++ b/src/mesa/main/blit.h @@ -41,5 +41,11 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +extern void GLAPIENTRY +_mesa_BlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer, + GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); + #endif /* BLIT_H */ diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index f3aff5f9fa8..ec3c9927162 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -984,6 +984,7 @@ const struct function gl_core_functions_possible[] = { { "glNamedFramebufferRenderbuffer", 45, -1 }, { "glNamedFramebufferTexture", 45, -1 }, { "glNamedFramebufferTextureLayer", 45, -1 }, + { "glBlitNamedFramebuffer", 45, -1 }, { "glCheckNamedFramebufferStatus", 45, -1 }, { "glGetNamedFramebufferAttachmentParameteriv", 45, -1 }, { "glCreateRenderbuffers", 45, -1 }, -- cgit v1.2.3 From d890fc710f6d3472ea3837e074fafc100d41e01f Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Wed, 4 Feb 2015 14:21:48 -0800 Subject: main: Add entry points for InvalidateNamedFramebuffer[Sub]Data. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 16 ++++++ src/mesa/main/fbobject.c | 69 ++++++++++++++++++++++++++ src/mesa/main/fbobject.h | 12 +++++ src/mesa/main/tests/dispatch_sanity.cpp | 2 + 4 files changed, 99 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 7ee2000d86e..de7742088e1 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -181,6 +181,22 @@ + + + + + + + + + + + + + + + + diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 4a32f1f568b..dc1e1a67321 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -3787,6 +3787,35 @@ _mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, } +void GLAPIENTRY +_mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer, + GLsizei numAttachments, + const GLenum *attachments, + GLint x, GLint y, + GLsizei width, GLsizei height) +{ + struct gl_framebuffer *fb; + GET_CURRENT_CONTEXT(ctx); + + /* The OpenGL 4.5 core spec (02.02.2015) says (in Section 17.4 Whole + * Framebuffer Operations, PDF page 522): "If framebuffer is zero, the + * default draw framebuffer is affected." + */ + if (framebuffer) { + fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glInvalidateNamedFramebufferSubData"); + if (!fb) + return; + } + else + fb = ctx->WinSysDrawBuffer; + + invalidate_framebuffer_storage(ctx, fb, numAttachments, attachments, + x, y, width, height, + "glInvalidateNamedFramebufferSubData"); +} + + void GLAPIENTRY _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments) @@ -3821,6 +3850,46 @@ _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments, } +void GLAPIENTRY +_mesa_InvalidateNamedFramebufferData(GLuint framebuffer, + GLsizei numAttachments, + const GLenum *attachments) +{ + struct gl_framebuffer *fb; + GET_CURRENT_CONTEXT(ctx); + + /* The OpenGL 4.5 core spec (02.02.2015) says (in Section 17.4 Whole + * Framebuffer Operations, PDF page 522): "If framebuffer is zero, the + * default draw framebuffer is affected." + */ + if (framebuffer) { + fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glInvalidateNamedFramebufferData"); + if (!fb) + return; + } + else + fb = ctx->WinSysDrawBuffer; + + /* The GL_ARB_invalidate_subdata spec says: + * + * "The command + * + * void InvalidateFramebuffer(enum target, + * sizei numAttachments, + * const enum *attachments); + * + * is equivalent to the command InvalidateSubFramebuffer with , , + * , equal to 0, 0, , + * respectively." + */ + invalidate_framebuffer_storage(ctx, fb, numAttachments, attachments, + 0, 0, + MAX_VIEWPORT_WIDTH, MAX_VIEWPORT_HEIGHT, + "glInvalidateNamedFramebufferData"); +} + + void GLAPIENTRY _mesa_DiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments) diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 71392037119..22cb139ec9a 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -260,10 +260,22 @@ _mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +extern void GLAPIENTRY +_mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer, + GLsizei numAttachments, + const GLenum *attachments, + GLint x, GLint y, + GLsizei width, GLsizei height); + extern void GLAPIENTRY _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments); +extern void GLAPIENTRY +_mesa_InvalidateNamedFramebufferData(GLuint framebuffer, + GLsizei numAttachments, + const GLenum *attachments); + extern void GLAPIENTRY _mesa_DiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index ec3c9927162..e375260ff1f 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -984,6 +984,8 @@ const struct function gl_core_functions_possible[] = { { "glNamedFramebufferRenderbuffer", 45, -1 }, { "glNamedFramebufferTexture", 45, -1 }, { "glNamedFramebufferTextureLayer", 45, -1 }, + { "glInvalidateNamedFramebufferSubData", 45, -1 }, + { "glInvalidateNamedFramebufferData", 45, -1 }, { "glBlitNamedFramebuffer", 45, -1 }, { "glCheckNamedFramebufferStatus", 45, -1 }, { "glGetNamedFramebufferAttachmentParameteriv", 45, -1 }, -- cgit v1.2.3 From 6236c477990d67499f494b3c95844217fbd9a3dd Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Thu, 5 Feb 2015 13:24:43 -0800 Subject: main: Fake entry point for glClearNamedFramebufferiv. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++++++ src/mesa/main/clear.c | 20 ++++++++++++++++++++ src/mesa/main/clear.h | 4 ++++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 32 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index de7742088e1..c793c9e9c70 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -197,6 +197,13 @@ + + + + + + + diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 8d707bc34a1..4e029cf258f 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -34,6 +34,8 @@ #include "clear.h" #include "context.h" #include "enums.h" +#include "fbobject.h" +#include "get.h" #include "macros.h" #include "mtypes.h" #include "state.h" @@ -399,6 +401,24 @@ _mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) } +/** + * The ClearBuffer framework is so complicated and so riddled with the + * assumption that the framebuffer is bound that, for now, we will just fake + * direct state access clearing for the user. + */ +void GLAPIENTRY +_mesa_ClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, + GLint drawbuffer, const GLint *value) +{ + GLint oldfb; + + _mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb); + _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer); + _mesa_ClearBufferiv(buffer, drawbuffer, value); + _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, (GLuint) oldfb); +} + + /** * New in GL 3.0 * Clear unsigned integer color buffer (not depth, not stencil). diff --git a/src/mesa/main/clear.h b/src/mesa/main/clear.h index 96ce47b929e..d0b61335356 100644 --- a/src/mesa/main/clear.h +++ b/src/mesa/main/clear.h @@ -51,6 +51,10 @@ _mesa_Clear( GLbitfield mask ); extern void GLAPIENTRY _mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value); +extern void GLAPIENTRY +_mesa_ClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, + GLint drawbuffer, const GLint *value); + extern void GLAPIENTRY _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index e375260ff1f..149c8b456b2 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -986,6 +986,7 @@ const struct function gl_core_functions_possible[] = { { "glNamedFramebufferTextureLayer", 45, -1 }, { "glInvalidateNamedFramebufferSubData", 45, -1 }, { "glInvalidateNamedFramebufferData", 45, -1 }, + { "glClearNamedFramebufferiv", 45, -1 }, { "glBlitNamedFramebuffer", 45, -1 }, { "glCheckNamedFramebufferStatus", 45, -1 }, { "glGetNamedFramebufferAttachmentParameteriv", 45, -1 }, -- cgit v1.2.3 From 43db4b8465c203f9748cd2a7e08d8242573116f1 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Thu, 5 Feb 2015 13:30:50 -0800 Subject: main: Fake entry point for glClearNamedFramebufferuiv. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++++++ src/mesa/main/clear.c | 18 ++++++++++++++++++ src/mesa/main/clear.h | 4 ++++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 30 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index c793c9e9c70..95fda9676fd 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -204,6 +204,13 @@ + + + + + + + diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 4e029cf258f..05bbf1564be 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -491,6 +491,24 @@ _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value) } +/** + * The ClearBuffer framework is so complicated and so riddled with the + * assumption that the framebuffer is bound that, for now, we will just fake + * direct state access clearing for the user. + */ +void GLAPIENTRY +_mesa_ClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, + GLint drawbuffer, const GLuint *value) +{ + GLint oldfb; + + _mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb); + _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer); + _mesa_ClearBufferuiv(buffer, drawbuffer, value); + _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, (GLuint) oldfb); +} + + /** * New in GL 3.0 * Clear fixed-pt or float color buffer or depth buffer (not stencil). diff --git a/src/mesa/main/clear.h b/src/mesa/main/clear.h index d0b61335356..b74c2275cb0 100644 --- a/src/mesa/main/clear.h +++ b/src/mesa/main/clear.h @@ -58,6 +58,10 @@ _mesa_ClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, extern void GLAPIENTRY _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value); +extern void GLAPIENTRY +_mesa_ClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, + GLint drawbuffer, const GLuint *value); + extern void GLAPIENTRY _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 149c8b456b2..60d0fe9a118 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -987,6 +987,7 @@ const struct function gl_core_functions_possible[] = { { "glInvalidateNamedFramebufferSubData", 45, -1 }, { "glInvalidateNamedFramebufferData", 45, -1 }, { "glClearNamedFramebufferiv", 45, -1 }, + { "glClearNamedFramebufferuiv", 45, -1 }, { "glBlitNamedFramebuffer", 45, -1 }, { "glCheckNamedFramebufferStatus", 45, -1 }, { "glGetNamedFramebufferAttachmentParameteriv", 45, -1 }, -- cgit v1.2.3 From bbd9c55d0217c697cbe090057bfbf830b551ed36 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Thu, 5 Feb 2015 13:38:39 -0800 Subject: main: Fake entry point for glClearNamedFramebufferfv. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++++++ src/mesa/main/clear.c | 18 ++++++++++++++++++ src/mesa/main/clear.h | 4 ++++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 30 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 95fda9676fd..2bb3c716087 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -211,6 +211,13 @@ + + + + + + + diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 05bbf1564be..81e255e5ee7 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -602,6 +602,24 @@ _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) } +/** + * The ClearBuffer framework is so complicated and so riddled with the + * assumption that the framebuffer is bound that, for now, we will just fake + * direct state access clearing for the user. + */ +void GLAPIENTRY +_mesa_ClearNamedFramebufferfv(GLuint framebuffer, GLenum buffer, + GLint drawbuffer, const GLfloat *value) +{ + GLint oldfb; + + _mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb); + _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer); + _mesa_ClearBufferfv(buffer, drawbuffer, value); + _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, (GLuint) oldfb); +} + + /** * New in GL 3.0 * Clear depth/stencil buffer only. diff --git a/src/mesa/main/clear.h b/src/mesa/main/clear.h index b74c2275cb0..582159fea0f 100644 --- a/src/mesa/main/clear.h +++ b/src/mesa/main/clear.h @@ -65,6 +65,10 @@ _mesa_ClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, extern void GLAPIENTRY _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value); +extern void GLAPIENTRY +_mesa_ClearNamedFramebufferfv(GLuint framebuffer, GLenum buffer, + GLint drawbuffer, const GLfloat *value); + extern void GLAPIENTRY _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 60d0fe9a118..1f25869d1ee 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -988,6 +988,7 @@ const struct function gl_core_functions_possible[] = { { "glInvalidateNamedFramebufferData", 45, -1 }, { "glClearNamedFramebufferiv", 45, -1 }, { "glClearNamedFramebufferuiv", 45, -1 }, + { "glClearNamedFramebufferfv", 45, -1 }, { "glBlitNamedFramebuffer", 45, -1 }, { "glCheckNamedFramebufferStatus", 45, -1 }, { "glGetNamedFramebufferAttachmentParameteriv", 45, -1 }, -- cgit v1.2.3 From a0329c7b40de3db22d22c74793a7c268e8904e53 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Thu, 5 Feb 2015 13:43:12 -0800 Subject: main: Fake entry point for glClearNamedFramebufferfi. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mesa's ClearBuffer framework is very complicated and thoroughly married to the object binding model. Moreover, the OpenGL spec for ClearBuffer is also very complicated. At some point, we should implement buffer clearing for arbitrary framebuffer objects, but for now, we will just wrap ClearBuffer. Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 7 +++++++ src/mesa/main/clear.c | 18 ++++++++++++++++++ src/mesa/main/clear.h | 4 ++++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 30 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 2bb3c716087..8bafe3f0bb0 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -218,6 +218,13 @@ + + + + + + + diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 81e255e5ee7..426caea4709 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -682,3 +682,21 @@ _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer, ctx->Stencil.Clear = clearStencilSave; } } + + +/** + * The ClearBuffer framework is so complicated and so riddled with the + * assumption that the framebuffer is bound that, for now, we will just fake + * direct state access clearing for the user. + */ +void GLAPIENTRY +_mesa_ClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, + GLfloat depth, GLint stencil) +{ + GLint oldfb; + + _mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb); + _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer); + _mesa_ClearBufferfi(buffer, 0, depth, stencil); + _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, (GLuint) oldfb); +} diff --git a/src/mesa/main/clear.h b/src/mesa/main/clear.h index 582159fea0f..c29850676ca 100644 --- a/src/mesa/main/clear.h +++ b/src/mesa/main/clear.h @@ -73,4 +73,8 @@ extern void GLAPIENTRY _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +extern void GLAPIENTRY +_mesa_ClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, + GLfloat depth, GLint stencil); + #endif diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 1f25869d1ee..a119d0874a6 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -989,6 +989,7 @@ const struct function gl_core_functions_possible[] = { { "glClearNamedFramebufferiv", 45, -1 }, { "glClearNamedFramebufferuiv", 45, -1 }, { "glClearNamedFramebufferfv", 45, -1 }, + { "glClearNamedFramebufferfi", 45, -1 }, { "glBlitNamedFramebuffer", 45, -1 }, { "glCheckNamedFramebufferStatus", 45, -1 }, { "glGetNamedFramebufferAttachmentParameteriv", 45, -1 }, -- cgit v1.2.3 From 9f1db78a83feebefb9e1ef889b3b6b0532482c14 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Thu, 5 Feb 2015 16:38:11 -0800 Subject: main: Add stubs for [Get]NamedFramebufferParameteri[v]. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 --- src/mapi/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(+) (limited to 'src/mesa/main/tests') 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 }, -- cgit v1.2.3 From 642fb71277b6e4c5d57ad7a7d6f2d5aae9b746ef Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Fri, 6 Feb 2015 14:44:43 -0800 Subject: main: Add entry point for NamedFramebufferDrawBuffer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Fredrik: Fix the name of the buf parameter in the XML file] Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 5 +++++ src/mesa/main/buffers.c | 19 +++++++++++++++++++ src/mesa/main/buffers.h | 3 +++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 28 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 3617e48a19c..32e3c0afbeb 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -187,6 +187,11 @@ + + + + + diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 8b52a5392a8..9b66e38b1e1 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -297,6 +297,25 @@ _mesa_DrawBuffer(GLenum buffer) } +void GLAPIENTRY +_mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + + if (framebuffer) { + fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glNamedFramebufferDrawBuffer"); + if (!fb) + return; + } + else + fb = ctx->WinSysDrawBuffer; + + _mesa_draw_buffer(ctx, fb, buf, "glNamedFramebufferDrawBuffer"); +} + + /** * Called by glDrawBuffersARB; specifies the destination color renderbuffers * for N fragment program color outputs. diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index 4192afd3f13..12d57430a39 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -45,6 +45,9 @@ _mesa_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb, extern void GLAPIENTRY _mesa_DrawBuffer( GLenum mode ); +extern void GLAPIENTRY +_mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf); + extern void GLAPIENTRY _mesa_DrawBuffers(GLsizei n, const GLenum *buffers); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 23ddabd169d..931eeceb212 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -985,6 +985,7 @@ const struct function gl_core_functions_possible[] = { { "glNamedFramebufferParameteri", 45, -1 }, { "glNamedFramebufferTexture", 45, -1 }, { "glNamedFramebufferTextureLayer", 45, -1 }, + { "glNamedFramebufferDrawBuffer", 45, -1 }, { "glInvalidateNamedFramebufferSubData", 45, -1 }, { "glInvalidateNamedFramebufferData", 45, -1 }, { "glClearNamedFramebufferiv", 45, -1 }, -- cgit v1.2.3 From 1f0a5f32d328e54483dd623ad09bd3f6b119f7a6 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Fri, 6 Feb 2015 15:36:52 -0800 Subject: main: Add entry point for NamedFramebufferReadBuffer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Fredrik: Fix the name of the buf parameter in the XML file] Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 5 +++++ src/mesa/main/buffers.c | 19 +++++++++++++++++++ src/mesa/main/buffers.h | 3 +++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 28 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 32e3c0afbeb..6e5c4d30462 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -192,6 +192,11 @@ + + + + + diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index e1d1bafc367..d9979ad9ed5 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -697,3 +697,22 @@ _mesa_ReadBuffer(GLenum buffer) GET_CURRENT_CONTEXT(ctx); _mesa_read_buffer(ctx, ctx->ReadBuffer, buffer, "glReadBuffer"); } + + +void GLAPIENTRY +_mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + + if (framebuffer) { + fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glNamedFramebufferReadBuffer"); + if (!fb) + return; + } + else + fb = ctx->WinSysReadBuffer; + + _mesa_read_buffer(ctx, fb, src, "glNamedFramebufferReadBuffer"); +} diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index ca7ad19235b..52a23188194 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -71,5 +71,8 @@ _mesa_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb, extern void GLAPIENTRY _mesa_ReadBuffer( GLenum mode ); +extern void GLAPIENTRY +_mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src); + #endif diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 931eeceb212..dcbb0c69e4c 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -986,6 +986,7 @@ const struct function gl_core_functions_possible[] = { { "glNamedFramebufferTexture", 45, -1 }, { "glNamedFramebufferTextureLayer", 45, -1 }, { "glNamedFramebufferDrawBuffer", 45, -1 }, + { "glNamedFramebufferReadBuffer", 45, -1 }, { "glInvalidateNamedFramebufferSubData", 45, -1 }, { "glInvalidateNamedFramebufferData", 45, -1 }, { "glClearNamedFramebufferiv", 45, -1 }, -- cgit v1.2.3 From 9de7a81626304dae5ced4e202a820e353f8fc1e9 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Mon, 9 Feb 2015 14:08:00 -0800 Subject: main: Add entry point for NamedFramebufferDrawBuffers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 6 ++++++ src/mesa/main/buffers.c | 20 ++++++++++++++++++++ src/mesa/main/buffers.h | 4 ++++ src/mesa/main/tests/dispatch_sanity.cpp | 1 + 4 files changed, 31 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 6e5c4d30462..bb9baf5a3d0 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -192,6 +192,12 @@ + + + + + + diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 0c6d379309f..0536266d756 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -506,6 +506,26 @@ _mesa_DrawBuffers(GLsizei n, const GLenum *buffers) } +void GLAPIENTRY +_mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, + const GLenum *bufs) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + + if (framebuffer) { + fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glNamedFramebufferDrawBuffers"); + if (!fb) + return; + } + else + fb = ctx->WinSysDrawBuffer; + + _mesa_draw_buffers(ctx, fb, n, bufs, "glNamedFramebufferDrawBuffers"); +} + + /** * Performs necessary state updates when _mesa_drawbuffers makes an * actual change. diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index 66871d70a09..5aa79fda54b 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -55,6 +55,10 @@ _mesa_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb, extern void GLAPIENTRY _mesa_DrawBuffers(GLsizei n, const GLenum *buffers); +extern void GLAPIENTRY +_mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, + const GLenum *bufs); + extern void _mesa_drawbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint n, const GLenum *buffers, diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index dcbb0c69e4c..77dc1401d19 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -986,6 +986,7 @@ const struct function gl_core_functions_possible[] = { { "glNamedFramebufferTexture", 45, -1 }, { "glNamedFramebufferTextureLayer", 45, -1 }, { "glNamedFramebufferDrawBuffer", 45, -1 }, + { "glNamedFramebufferDrawBuffers", 45, -1 }, { "glNamedFramebufferReadBuffer", 45, -1 }, { "glInvalidateNamedFramebufferSubData", 45, -1 }, { "glInvalidateNamedFramebufferData", 45, -1 }, -- cgit v1.2.3 From 5aaabd7630ca6fd72a3333687249574e6fcbe663 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 12 May 2015 12:24:04 -0700 Subject: mesa: Remove all vestiges of glFramebufferTextureFaceARB Mesa does not (and probably never will) support GL_ARB_geometry_shader4, so this function will never exist. Having a function that is exec="skip" and offset="assign" is just weird. There are still a couple 'exec="skip" offset="assign"' functions remaining. These remain because we either support GLX protocol for them (glSampleMaskSGIS and glSamplePatternSGIS) or older DRI drivers still need them in the dispatch table (glResizeBuffersMESA). The SGIS functions can be removed later. Signed-off-by: Ian Romanick Reviewed-by: Emil Velikov --- src/mapi/glapi/gen/ARB_geometry_shader4.xml | 2 +- src/mapi/glapi/tests/check_table.cpp | 1 - src/mesa/main/dlist.c | 30 +---------------------------- src/mesa/main/tests/dispatch_sanity.cpp | 9 +++------ 4 files changed, 5 insertions(+), 37 deletions(-) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_geometry_shader4.xml b/src/mapi/glapi/gen/ARB_geometry_shader4.xml index e62047c9bd6..280e7a07599 100644 --- a/src/mapi/glapi/gen/ARB_geometry_shader4.xml +++ b/src/mapi/glapi/gen/ARB_geometry_shader4.xml @@ -45,7 +45,7 @@ - + diff --git a/src/mapi/glapi/tests/check_table.cpp b/src/mapi/glapi/tests/check_table.cpp index 5d759df76d9..09bf4f3585c 100644 --- a/src/mapi/glapi/tests/check_table.cpp +++ b/src/mapi/glapi/tests/check_table.cpp @@ -1137,7 +1137,6 @@ const struct name_offset known_dispatch[] = { { "glDrawElementsInstancedARB", _O(DrawElementsInstancedARB) }, { "glRenderbufferStorageMultisample", _O(RenderbufferStorageMultisample) }, { "glFramebufferTexture", _O(FramebufferTexture) }, - { "glFramebufferTextureFaceARB", _O(FramebufferTextureFaceARB) }, { "glProgramParameteri", _O(ProgramParameteri) }, { "glVertexAttribDivisor", _O(VertexAttribDivisor) }, { "glFlushMappedBufferRange", _O(FlushMappedBufferRange) }, diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 431c4b48b79..aafe486fb60 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -7592,28 +7592,6 @@ save_FramebufferTexture(GLenum target, GLenum attachment, } } -static void GLAPIENTRY -save_FramebufferTextureFace(GLenum target, GLenum attachment, - GLuint texture, GLint level, GLenum face) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_FRAMEBUFFER_TEXTURE_FACE, 5); - if (n) { - n[1].e = target; - n[2].e = attachment; - n[3].ui = texture; - n[4].i = level; - n[5].e = face; - } - if (ctx->ExecuteFlag) { - CALL_FramebufferTextureFaceARB(ctx->Exec, (target, attachment, texture, - level, face)); - } -} - - static void GLAPIENTRY save_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) @@ -8873,11 +8851,6 @@ execute_list(struct gl_context *ctx, GLuint list) CALL_FramebufferTexture(ctx->Exec, (n[1].e, n[2].e, n[3].ui, n[4].i)); break; - case OPCODE_FRAMEBUFFER_TEXTURE_FACE: - CALL_FramebufferTextureFaceARB(ctx->Exec, (n[1].e, n[2].e, - n[3].ui, n[4].i, n[5].e)); - break; - /* GL_ARB_sync */ case OPCODE_WAIT_SYNC: { @@ -9644,10 +9617,9 @@ _mesa_initialize_save_table(const struct gl_context *ctx) SET_BlendEquationiARB(table, save_BlendEquationi); SET_BlendEquationSeparateiARB(table, save_BlendEquationSeparatei); - /* GL_ARB_geometry_shader4 */ + /* OpenGL 3.2 */ SET_ProgramParameteri(table, save_ProgramParameteri); SET_FramebufferTexture(table, save_FramebufferTexture); - SET_FramebufferTextureFaceARB(table, save_FramebufferTextureFace); /* GL_NV_conditional_render */ SET_BeginConditionalRender(table, save_BeginConditionalRender); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 77dc1401d19..d38b68d0c9a 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -535,12 +535,9 @@ const struct function gl_core_functions_possible[] = { { "glGetInteger64i_v", 32, -1 }, { "glGetBufferParameteri64v", 32, -1 }, { "glFramebufferTexture", 32, -1 }, - - /* GL_ARB_geometry_shader4 */ - { "glProgramParameteriARB", 32, -1 }, - { "glFramebufferTextureARB", 32, -1 }, - { "glFramebufferTextureLayerARB", 32, -1 }, - { "glFramebufferTextureFaceARB", 32, -1 }, + { "glProgramParameteri", 32, -1 }, + { "glFramebufferTexture", 32, -1 }, + { "glFramebufferTextureLayer", 32, -1 }, /* GL 3.3 */ { "glVertexAttribDivisor", 33, -1 }, -- cgit v1.2.3 From 2b8c51834bcc34a70dec9b470a28c0ef972d6993 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 26 May 2015 11:41:44 -0700 Subject: glapi: Encapsulate nop table knowledge in new _mesa_new_nop_table function Encapsulate the knowledge about how to build the nop table in a new _mesa_new_nop_table function. This makes it easier for dispatch_sanity to keep working now and in the future. Signed-off-by: Ian Romanick Reviewed-by: Brian Paul Reviewed-by: Emil Velikov Tested-by: Mark Janes Cc: 10.6 --- src/mesa/main/api_exec.h | 3 +++ src/mesa/main/context.c | 16 ++++++++-------- src/mesa/main/tests/dispatch_sanity.cpp | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) (limited to 'src/mesa/main/tests') diff --git a/src/mesa/main/api_exec.h b/src/mesa/main/api_exec.h index 12249fec228..655cb32d0a4 100644 --- a/src/mesa/main/api_exec.h +++ b/src/mesa/main/api_exec.h @@ -38,6 +38,9 @@ _mesa_initialize_exec_table(struct gl_context *ctx); extern void _mesa_initialize_dispatch_tables(struct gl_context *ctx); +extern struct _glapi_table * +_mesa_new_nop_table(unsigned numEntries); + #ifdef __cplusplus } // extern "C" #endif diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 02875ba2a06..e4faf3d462a 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -962,12 +962,12 @@ generic_nop(void) * the __stdcall convention which requires the callee to clean up the * call stack. That's impossible with one generic no-op function. */ -#if !USE_GLAPI_NOP_FEATURES -static struct _glapi_table * -new_nop_table(unsigned numEntries) +struct _glapi_table * +_mesa_new_nop_table(unsigned numEntries) { struct _glapi_table *table; +#if !USE_GLAPI_NOP_FEATURES table = malloc(numEntries * sizeof(_glapi_proc)); if (table) { _glapi_proc *entry = (_glapi_proc *) table; @@ -976,9 +976,11 @@ new_nop_table(unsigned numEntries) entry[i] = (_glapi_proc) generic_nop; } } +#else + table = _glapi_new_nop_table(numEntries); +#endif return table; } -#endif /** @@ -996,10 +998,7 @@ alloc_dispatch_table(void) */ int numEntries = MAX2(_glapi_get_dispatch_table_size(), _gloffset_COUNT); -#if !USE_GLAPI_NOP_FEATURES - struct _glapi_table *table = new_nop_table(numEntries); -#else - struct _glapi_table *table = _glapi_new_nop_table(numEntries); + struct _glapi_table *table = _mesa_new_nop_table(numEntries); #if defined(_WIN32) if (table) { @@ -1023,6 +1022,7 @@ alloc_dispatch_table(void) } #endif +#if USE_GLAPI_NOP_FEATURES _glapi_set_nop_handler(nop_handler); #endif diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index d38b68d0c9a..c6f3c395733 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -96,7 +96,7 @@ DispatchSanity_test::SetUp() _mesa_init_driver_functions(&driver_functions); const unsigned size = _glapi_get_dispatch_table_size(); - nop_table = (_glapi_proc *) _glapi_new_nop_table(size); + nop_table = (_glapi_proc *) _mesa_new_nop_table(size); } void -- cgit v1.2.3 From 366ceacf72258a4a81d9c6b412dd565a4c611b17 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 28 Apr 2015 18:00:43 -0700 Subject: gles/es3.1: Enable dispatch of almost all new GLES 3.1 functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A couple functions are missing because there are no implementations of them yet. These are: glFramebufferParameteri (from GL_ARB_framebuffer_no_attachments) glGetFramebufferParameteriv (from GL_ARB_framebuffer_no_attachments) glMemoryBarrierByRegion v2: Rebase on updated dispatch_sanity.cpp test. v3: Add support for glDraw{Arrays,Elements}Indirect in vbo_exec_array.c. The updated dispatch_sanity.cpp test discovered this omission. v4: Rebase on glapi changes. Signed-off-by: Ian Romanick Reviewed-by: Tapani Pälli --- src/mapi/glapi/gen/ARB_compute_shader.xml | 4 +- src/mapi/glapi/gen/ARB_draw_indirect.xml | 4 +- src/mapi/glapi/gen/ARB_program_interface_query.xml | 10 +-- src/mapi/glapi/gen/ARB_separate_shader_objects.xml | 86 ++++++++++---------- src/mapi/glapi/gen/ARB_shader_image_load_store.xml | 4 +- src/mapi/glapi/gen/ARB_texture_multisample.xml | 4 +- .../glapi/gen/ARB_texture_storage_multisample.xml | 2 +- src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml | 10 +-- src/mapi/glapi/gen/GL3x.xml | 2 +- src/mapi/glapi/gen/gl_API.xml | 4 +- src/mesa/main/tests/dispatch_sanity.cpp | 95 ++++++++++++++++++++++ src/mesa/vbo/vbo_exec_array.c | 5 +- 12 files changed, 164 insertions(+), 66 deletions(-) (limited to 'src/mesa/main/tests') diff --git a/src/mapi/glapi/gen/ARB_compute_shader.xml b/src/mapi/glapi/gen/ARB_compute_shader.xml index 78d352f1f37..c2ec842efe1 100644 --- a/src/mapi/glapi/gen/ARB_compute_shader.xml +++ b/src/mapi/glapi/gen/ARB_compute_shader.xml @@ -26,13 +26,13 @@ - + - + diff --git a/src/mapi/glapi/gen/ARB_draw_indirect.xml b/src/mapi/glapi/gen/ARB_draw_indirect.xml index 2001eb00b59..3b29d6b8674 100644 --- a/src/mapi/glapi/gen/ARB_draw_indirect.xml +++ b/src/mapi/glapi/gen/ARB_draw_indirect.xml @@ -8,12 +8,12 @@ - + - + diff --git a/src/mapi/glapi/gen/ARB_program_interface_query.xml b/src/mapi/glapi/gen/ARB_program_interface_query.xml index 5b6d5cc59bd..c3162f5ed16 100644 --- a/src/mapi/glapi/gen/ARB_program_interface_query.xml +++ b/src/mapi/glapi/gen/ARB_program_interface_query.xml @@ -56,21 +56,21 @@ - + - + - + @@ -79,7 +79,7 @@ - + @@ -90,7 +90,7 @@ - + diff --git a/src/mapi/glapi/gen/ARB_separate_shader_objects.xml b/src/mapi/glapi/gen/ARB_separate_shader_objects.xml index c20ee4b50ff..c9f481d8b6b 100644 --- a/src/mapi/glapi/gen/ARB_separate_shader_objects.xml +++ b/src/mapi/glapi/gen/ARB_separate_shader_objects.xml @@ -15,33 +15,33 @@ - + - + - + - + - + - + - + @@ -54,30 +54,30 @@ --> - + - + - + - + - + @@ -85,25 +85,25 @@ - + - + - + - + @@ -111,25 +111,25 @@ - + - + - + - + @@ -137,145 +137,145 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/mapi/glapi/gen/ARB_shader_image_load_store.xml b/src/mapi/glapi/gen/ARB_shader_image_load_store.xml index c6a97bf1878..178e930f1d5 100644 --- a/src/mapi/glapi/gen/ARB_shader_image_load_store.xml +++ b/src/mapi/glapi/gen/ARB_shader_image_load_store.xml @@ -70,7 +70,7 @@ - + @@ -80,7 +80,7 @@ - + diff --git a/src/mapi/glapi/gen/ARB_texture_multisample.xml b/src/mapi/glapi/gen/ARB_texture_multisample.xml index d7cf2a30aa2..595e1c7eae6 100644 --- a/src/mapi/glapi/gen/ARB_texture_multisample.xml +++ b/src/mapi/glapi/gen/ARB_texture_multisample.xml @@ -53,13 +53,13 @@ - + - + diff --git a/src/mapi/glapi/gen/ARB_texture_storage_multisample.xml b/src/mapi/glapi/gen/ARB_texture_storage_multisample.xml index 0d39fa235da..6ed8f1a01d8 100644 --- a/src/mapi/glapi/gen/ARB_texture_storage_multisample.xml +++ b/src/mapi/glapi/gen/ARB_texture_storage_multisample.xml @@ -7,7 +7,7 @@ - + diff --git a/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml b/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml index 0f000639f1f..ba9ca57bb54 100644 --- a/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml +++ b/src/mapi/glapi/gen/ARB_vertex_attrib_binding.xml @@ -7,14 +7,14 @@ - + - + @@ -22,7 +22,7 @@ - + @@ -36,12 +36,12 @@ - + - + diff --git a/src/mapi/glapi/gen/GL3x.xml b/src/mapi/glapi/gen/GL3x.xml index 348d5221fb5..7919d657774 100644 --- a/src/mapi/glapi/gen/GL3x.xml +++ b/src/mapi/glapi/gen/GL3x.xml @@ -166,7 +166,7 @@ - + diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 3090b9f7e02..bd8db62033e 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -2824,7 +2824,7 @@ - + @@ -2832,7 +2832,7 @@ - + diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index c6f3c395733..ab66f884673 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -72,6 +72,7 @@ extern const struct function gl_core_functions_possible[]; extern const struct function gles11_functions_possible[]; extern const struct function gles2_functions_possible[]; extern const struct function gles3_functions_possible[]; +extern const struct function gles31_functions_possible[]; class DispatchSanity_test : public ::testing::Test { public: @@ -201,6 +202,15 @@ TEST_F(DispatchSanity_test, GLES3) validate_nops(&ctx, nop_table); } +TEST_F(DispatchSanity_test, GLES31) +{ + SetUpCtx(API_OPENGLES2, 31); + validate_functions(&ctx, gles2_functions_possible, nop_table); + validate_functions(&ctx, gles3_functions_possible, nop_table); + validate_functions(&ctx, gles31_functions_possible, nop_table); + validate_nops(&ctx, nop_table); +} + const struct function gl_core_functions_possible[] = { { "glCullFace", 10, -1 }, { "glFrontFace", 10, -1 }, @@ -1611,3 +1621,88 @@ const struct function gles3_functions_possible[] = { { NULL, 0, -1 } }; + +const struct function gles31_functions_possible[] = { + { "glDispatchCompute", 31, -1 }, + { "glDispatchComputeIndirect", 31, -1 }, + { "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 }, + + { "glGetProgramInterfaceiv", 31, -1 }, + { "glGetProgramResourceIndex", 31, -1 }, + { "glGetProgramResourceName", 31, -1 }, + { "glGetProgramResourceiv", 31, -1 }, + { "glGetProgramResourceLocation", 31, -1 }, + + // We check for the aliased EXT versions in GLES 2 + // { "glUseProgramStages", 31, -1 }, + // { "glActiveShaderProgram", 31, -1 }, + // { "glCreateShaderProgramv", 31, -1 }, + // { "glBindProgramPipeline", 31, -1 }, + // { "glDeleteProgramPipelines", 31, -1 }, + // { "glGenProgramPipelines", 31, -1 }, + // { "glIsProgramPipeline", 31, -1 }, + // { "glGetProgramPipelineiv", 31, -1 }, + // { "glProgramUniform1i", 31, -1 }, + // { "glProgramUniform2i", 31, -1 }, + // { "glProgramUniform3i", 31, -1 }, + // { "glProgramUniform4i", 31, -1 }, + // { "glProgramUniform1f", 31, -1 }, + // { "glProgramUniform2f", 31, -1 }, + // { "glProgramUniform3f", 31, -1 }, + // { "glProgramUniform4f", 31, -1 }, + // { "glProgramUniform1iv", 31, -1 }, + // { "glProgramUniform2iv", 31, -1 }, + // { "glProgramUniform3iv", 31, -1 }, + // { "glProgramUniform4iv", 31, -1 }, + // { "glProgramUniform1fv", 31, -1 }, + // { "glProgramUniform2fv", 31, -1 }, + // { "glProgramUniform3fv", 31, -1 }, + // { "glProgramUniform4fv", 31, -1 }, + // { "glProgramUniformMatrix2fv", 31, -1 }, + // { "glProgramUniformMatrix3fv", 31, -1 }, + // { "glProgramUniformMatrix4fv", 31, -1 }, + // { "glProgramUniformMatrix2x3fv", 31, -1 }, + // { "glProgramUniformMatrix3x2fv", 31, -1 }, + // { "glProgramUniformMatrix2x4fv", 31, -1 }, + // { "glProgramUniformMatrix4x2fv", 31, -1 }, + // { "glProgramUniformMatrix3x4fv", 31, -1 }, + // { "glProgramUniformMatrix4x3fv", 31, -1 }, + // { "glValidateProgramPipeline", 31, -1 }, + // { "glGetProgramPipelineInfoLog", 31, -1 }, + + // We check for the aliased EXT versions in GLES 3 + // { "glProgramUniform1ui", 31, -1 }, + // { "glProgramUniform2ui", 31, -1 }, + // { "glProgramUniform3ui", 31, -1 }, + // { "glProgramUniform4ui", 31, -1 }, + // { "glProgramUniform1uiv", 31, -1 }, + // { "glProgramUniform2uiv", 31, -1 }, + // { "glProgramUniform3uiv", 31, -1 }, + // { "glProgramUniform4uiv", 31, -1 }, + + { "glBindImageTexture", 31, -1 }, + { "glGetBooleani_v", 31, -1 }, + { "glMemoryBarrier", 31, -1 }, + + // FINISHME: This function has not been implemented yet. + // { "glMemoryBarrierByRegion", 31, -1 }, + + { "glTexStorage2DMultisample", 31, -1 }, + { "glGetMultisamplefv", 31, -1 }, + { "glSampleMaski", 31, -1 }, + { "glGetTexLevelParameteriv", 31, -1 }, + { "glGetTexLevelParameterfv", 31, -1 }, + { "glBindVertexBuffer", 31, -1 }, + { "glVertexAttribFormat", 31, -1 }, + { "glVertexAttribIFormat", 31, -1 }, + { "glVertexAttribBinding", 31, -1 }, + { "glVertexBindingDivisor", 31, -1 }, + + { NULL, 0, -1 }, + }; diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 3ea775c0e4a..72b8206ec23 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -1817,9 +1817,12 @@ vbo_initialize_exec_dispatch(const struct gl_context *ctx, SET_DrawElementsInstancedBaseVertexBaseInstance(exec, vbo_exec_DrawElementsInstancedBaseVertexBaseInstance); } - if (ctx->API == API_OPENGL_CORE) { + if (ctx->API == API_OPENGL_CORE || _mesa_is_gles31(ctx)) { SET_DrawArraysIndirect(exec, vbo_exec_DrawArraysIndirect); SET_DrawElementsIndirect(exec, vbo_exec_DrawElementsIndirect); + } + + if (ctx->API == API_OPENGL_CORE) { SET_MultiDrawArraysIndirect(exec, vbo_exec_MultiDrawArraysIndirect); SET_MultiDrawElementsIndirect(exec, vbo_exec_MultiDrawElementsIndirect); } -- cgit v1.2.3 From 49ab670f52947dda04585cc5156e55b89f0c1c4a Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 20 May 2015 20:17:19 -0700 Subject: dispatch_sanity: Split list of GL 3.1 functions in to core and common The next patch will add a test for compatibility profile dispatch, and it seems to make more sense to share the lists. Signed-off-by: Ian Romanick Cc: Ilia Mirkin Cc: "10.6" --- src/mesa/main/tests/dispatch_sanity.cpp | 413 ++++++++++++++++++++++++++------ 1 file changed, 342 insertions(+), 71 deletions(-) (limited to 'src/mesa/main/tests') diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index ab66f884673..3d9539b474d 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -68,6 +68,7 @@ struct function { int offset; }; +extern const struct function common_desktop_functions_possible[]; extern const struct function gl_core_functions_possible[]; extern const struct function gles11_functions_possible[]; extern const struct function gles2_functions_possible[]; @@ -176,6 +177,7 @@ validate_nops(struct gl_context *ctx, const _glapi_proc *nop_table) TEST_F(DispatchSanity_test, GL31_CORE) { SetUpCtx(API_OPENGL_CORE, 31); + validate_functions(&ctx, common_desktop_functions_possible, nop_table); validate_functions(&ctx, gl_core_functions_possible, nop_table); validate_nops(&ctx, nop_table); } @@ -211,7 +213,7 @@ TEST_F(DispatchSanity_test, GLES31) validate_nops(&ctx, nop_table); } -const struct function gl_core_functions_possible[] = { +const struct function common_desktop_functions_possible[] = { { "glCullFace", 10, -1 }, { "glFrontFace", 10, -1 }, { "glHint", 10, -1 }, @@ -223,8 +225,8 @@ const struct function gl_core_functions_possible[] = { { "glTexParameterfv", 10, -1 }, { "glTexParameteri", 10, -1 }, { "glTexParameteriv", 10, -1 }, - { "glTexImage1D", 10, -1 }, - { "glTexImage2D", 10, -1 }, + { "glTexImage1D", 10, _gloffset_TexImage1D }, + { "glTexImage2D", 10, _gloffset_TexImage2D }, { "glDrawBuffer", 10, -1 }, { "glClear", 10, -1 }, { "glClearColor", 10, -1 }, @@ -492,7 +494,6 @@ const struct function gl_core_functions_possible[] = { /* GL 3.1 */ { "glDrawArraysInstanced", 31, -1 }, { "glDrawElementsInstanced", 31, -1 }, - { "glTexBuffer", 31, -1 }, { "glPrimitiveRestartIndex", 31, -1 }, /* GL_ARB_shader_objects */ @@ -546,7 +547,6 @@ const struct function gl_core_functions_possible[] = { { "glGetBufferParameteri64v", 32, -1 }, { "glFramebufferTexture", 32, -1 }, { "glProgramParameteri", 32, -1 }, - { "glFramebufferTexture", 32, -1 }, { "glFramebufferTextureLayer", 32, -1 }, /* GL 3.3 */ @@ -680,34 +680,6 @@ const struct function gl_core_functions_possible[] = { { "glVertexAttribP4uiv", 43, -1 }, { "glDrawArraysIndirect", 43, -1 }, { "glDrawElementsIndirect", 43, -1 }, - { "glUniform1d", 40, -1 }, - { "glUniform2d", 40, -1 }, - { "glUniform3d", 40, -1 }, - { "glUniform4d", 40, -1 }, - { "glUniform1dv", 40, -1 }, - { "glUniform2dv", 40, -1 }, - { "glUniform3dv", 40, -1 }, - { "glUniform4dv", 40, -1 }, - { "glUniformMatrix2dv", 40, -1 }, - { "glUniformMatrix3dv", 40, -1 }, - { "glUniformMatrix4dv", 40, -1 }, - { "glUniformMatrix2x3dv", 40, -1 }, - { "glUniformMatrix2x4dv", 40, -1 }, - { "glUniformMatrix3x2dv", 40, -1 }, - { "glUniformMatrix3x4dv", 40, -1 }, - { "glUniformMatrix4x2dv", 40, -1 }, - { "glUniformMatrix4x3dv", 40, -1 }, - { "glGetUniformdv", 43, -1 }, -// { "glGetSubroutineUniformLocation", 43, -1 }, // XXX: Add to xml -// { "glGetSubroutineIndex", 43, -1 }, // XXX: Add to xml -// { "glGetActiveSubroutineUniformiv", 43, -1 }, // XXX: Add to xml -// { "glGetActiveSubroutineUniformName", 43, -1 }, // XXX: Add to xml -// { "glGetActiveSubroutineName", 43, -1 }, // XXX: Add to xml -// { "glUniformSubroutinesuiv", 43, -1 }, // XXX: Add to xml -// { "glGetUniformSubroutineuiv", 43, -1 }, // XXX: Add to xml -// { "glGetProgramStageiv", 43, -1 }, // XXX: Add to xml -// { "glPatchParameteri", 43, -1 }, // XXX: Add to xml -// { "glPatchParameterfv", 43, -1 }, // XXX: Add to xml { "glBindTransformFeedback", 43, -1 }, { "glDeleteTransformFeedbacks", 43, -1 }, { "glGenTransformFeedbacks", 43, -1 }, @@ -735,12 +707,12 @@ const struct function gl_core_functions_possible[] = { { "glGenProgramPipelines", 43, -1 }, { "glIsProgramPipeline", 43, -1 }, { "glGetProgramPipelineiv", 43, -1 }, + { "glProgramUniform1d", 43, -1 }, + { "glProgramUniform1dv", 43, -1 }, { "glProgramUniform1i", 43, -1 }, { "glProgramUniform1iv", 43, -1 }, { "glProgramUniform1f", 43, -1 }, { "glProgramUniform1fv", 43, -1 }, - { "glProgramUniform1d", 40, -1 }, - { "glProgramUniform1dv", 40, -1 }, { "glProgramUniform1ui", 43, -1 }, { "glProgramUniform1uiv", 43, -1 }, { "glProgramUniform2i", 43, -1 }, @@ -761,50 +733,32 @@ const struct function gl_core_functions_possible[] = { { "glProgramUniform3uiv", 43, -1 }, { "glProgramUniform4i", 43, -1 }, { "glProgramUniform4iv", 43, -1 }, + { "glProgramUniform4d", 43, -1 }, + { "glProgramUniform4dv", 43, -1 }, { "glProgramUniform4f", 43, -1 }, { "glProgramUniform4fv", 43, -1 }, - { "glProgramUniform4d", 40, -1 }, - { "glProgramUniform4dv", 40, -1 }, { "glProgramUniform4ui", 43, -1 }, { "glProgramUniform4uiv", 43, -1 }, + { "glProgramUniformMatrix2dv", 43, -1 }, { "glProgramUniformMatrix2fv", 43, -1 }, + { "glProgramUniformMatrix3dv", 43, -1 }, { "glProgramUniformMatrix3fv", 43, -1 }, + { "glProgramUniformMatrix4dv", 43, -1 }, { "glProgramUniformMatrix4fv", 43, -1 }, - { "glProgramUniformMatrix2dv", 40, -1 }, - { "glProgramUniformMatrix3dv", 40, -1 }, - { "glProgramUniformMatrix4dv", 40, -1 }, + { "glProgramUniformMatrix2x3dv", 43, -1 }, { "glProgramUniformMatrix2x3fv", 43, -1 }, + { "glProgramUniformMatrix3x2dv", 43, -1 }, { "glProgramUniformMatrix3x2fv", 43, -1 }, + { "glProgramUniformMatrix2x4dv", 43, -1 }, { "glProgramUniformMatrix2x4fv", 43, -1 }, + { "glProgramUniformMatrix4x2dv", 43, -1 }, { "glProgramUniformMatrix4x2fv", 43, -1 }, + { "glProgramUniformMatrix3x4dv", 43, -1 }, { "glProgramUniformMatrix3x4fv", 43, -1 }, + { "glProgramUniformMatrix4x3dv", 43, -1 }, { "glProgramUniformMatrix4x3fv", 43, -1 }, - { "glProgramUniformMatrix2x3dv", 40, -1 }, - { "glProgramUniformMatrix3x2dv", 40, -1 }, - { "glProgramUniformMatrix2x4dv", 40, -1 }, - { "glProgramUniformMatrix4x2dv", 40, -1 }, - { "glProgramUniformMatrix3x4dv", 40, -1 }, - { "glProgramUniformMatrix4x3dv", 40, -1 }, { "glValidateProgramPipeline", 43, -1 }, { "glGetProgramPipelineInfoLog", 43, -1 }, - { "glVertexAttribL1d", 41, -1 }, - { "glVertexAttribL2d", 41, -1 }, - { "glVertexAttribL3d", 41, -1 }, - { "glVertexAttribL4d", 41, -1 }, - { "glVertexAttribL1dv", 41, -1 }, - { "glVertexAttribL2dv", 41, -1 }, - { "glVertexAttribL3dv", 41, -1 }, - { "glVertexAttribL4dv", 41, -1 }, - { "glVertexAttribLPointer", 41, -1 }, - { "glGetVertexAttribLdv", 41, -1 }, - { "glViewportArrayv", 43, -1 }, - { "glViewportIndexedf", 43, -1 }, - { "glViewportIndexedfv", 43, -1 }, - { "glScissorArrayv", 43, -1 }, - { "glScissorIndexed", 43, -1 }, - { "glScissorIndexedv", 43, -1 }, - { "glDepthRangeArrayv", 43, -1 }, - { "glDepthRangeIndexed", 43, -1 }, { "glGetFloati_v", 43, -1 }, { "glGetDoublei_v", 43, -1 }, // { "glCreateSyncFromCLeventARB", 43, -1 }, // XXX: Add to xml @@ -847,8 +801,6 @@ const struct function gl_core_functions_possible[] = { { "glClearBufferSubData", 43, -1 }, // { "glClearNamedBufferDataEXT", 43, -1 }, // XXX: Add to xml // { "glClearNamedBufferSubDataEXT", 43, -1 }, // XXX: Add to xml - { "glDispatchCompute", 43, -1 }, - { "glDispatchComputeIndirect", 43, -1 }, { "glCopyImageSubData", 43, -1 }, { "glTextureView", 43, -1 }, { "glBindVertexBuffer", 43, -1 }, @@ -860,7 +812,6 @@ const struct function gl_core_functions_possible[] = { // { "glVertexArrayBindVertexBufferEXT", 43, -1 }, // XXX: Add to xml // { "glVertexArrayVertexAttribFormatEXT", 43, -1 }, // XXX: Add to xml // { "glVertexArrayVertexAttribIFormatEXT", 43, -1 }, // XXX: Add to xml -// { "glVertexArrayVertexAttribLFormatEXT", 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 @@ -883,7 +834,6 @@ const struct function gl_core_functions_possible[] = { { "glGetProgramResourceLocation", 43, -1 }, { "glGetProgramResourceLocationIndex", 43, -1 }, // { "glShaderStorageBlockBinding", 43, -1 }, // XXX: Add to xml - { "glTexBufferRange", 43, -1 }, // { "glTextureBufferRangeEXT", 43, -1 }, // XXX: Add to xml { "glTexStorage2DMultisample", 43, -1 }, { "glTexStorage3DMultisample", 43, -1 }, @@ -965,6 +915,330 @@ const struct function gl_core_functions_possible[] = { /* GL_ARB_clip_control */ { "glClipControl", 45, -1 }, + /* GL_ARB_compute_shader */ + { "glDispatchCompute", 43, -1 }, + { "glDispatchComputeIndirect", 43, -1 }, + + /* GL_EXT_polygon_offset_clamp */ + { "glPolygonOffsetClampEXT", 11, -1 }, + { NULL, 0, -1 } +}; + +const struct function gl_core_functions_possible[] = { + /* GL 3.1 */ + { "glTexBuffer", 31, -1 }, + + /* GL 3.2 */ + { "glFramebufferTexture", 32, -1 }, + + /* GL 4.3 */ + { "glIsRenderbuffer", 43, -1 }, + { "glBindRenderbuffer", 43, -1 }, + { "glDeleteRenderbuffers", 43, -1 }, + { "glGenRenderbuffers", 43, -1 }, + { "glRenderbufferStorage", 43, -1 }, + { "glGetRenderbufferParameteriv", 43, -1 }, + { "glIsFramebuffer", 43, -1 }, + { "glBindFramebuffer", 43, -1 }, + { "glDeleteFramebuffers", 43, -1 }, + { "glGenFramebuffers", 43, -1 }, + { "glCheckFramebufferStatus", 43, -1 }, + { "glFramebufferTexture1D", 43, -1 }, + { "glFramebufferTexture2D", 43, -1 }, + { "glFramebufferTexture3D", 43, -1 }, + { "glFramebufferRenderbuffer", 43, -1 }, + { "glGetFramebufferAttachmentParameteriv", 43, -1 }, + { "glGenerateMipmap", 43, -1 }, + { "glBlitFramebuffer", 43, -1 }, + { "glRenderbufferStorageMultisample", 43, -1 }, + { "glFramebufferTextureLayer", 43, -1 }, + { "glMapBufferRange", 43, -1 }, + { "glFlushMappedBufferRange", 43, -1 }, + { "glBindVertexArray", 43, -1 }, + { "glDeleteVertexArrays", 43, -1 }, + { "glGenVertexArrays", 43, -1 }, + { "glIsVertexArray", 43, -1 }, + { "glGetUniformIndices", 43, -1 }, + { "glGetActiveUniformsiv", 43, -1 }, + { "glGetActiveUniformName", 43, -1 }, + { "glGetUniformBlockIndex", 43, -1 }, + { "glGetActiveUniformBlockiv", 43, -1 }, + { "glGetActiveUniformBlockName", 43, -1 }, + { "glUniformBlockBinding", 43, -1 }, + { "glCopyBufferSubData", 43, -1 }, + { "glDrawElementsBaseVertex", 43, -1 }, + { "glDrawRangeElementsBaseVertex", 43, -1 }, + { "glDrawElementsInstancedBaseVertex", 43, -1 }, + { "glMultiDrawElementsBaseVertex", 43, -1 }, + { "glProvokingVertex", 43, -1 }, + { "glFenceSync", 43, -1 }, + { "glIsSync", 43, -1 }, + { "glDeleteSync", 43, -1 }, + { "glClientWaitSync", 43, -1 }, + { "glWaitSync", 43, -1 }, + { "glGetInteger64v", 43, -1 }, + { "glGetSynciv", 43, -1 }, + { "glTexImage2DMultisample", 43, -1 }, + { "glTexImage3DMultisample", 43, -1 }, + { "glGetMultisamplefv", 43, -1 }, + { "glSampleMaski", 43, -1 }, + { "glBlendEquationiARB", 43, -1 }, + { "glBlendEquationSeparateiARB", 43, -1 }, + { "glBlendFunciARB", 43, -1 }, + { "glBlendFuncSeparateiARB", 43, -1 }, + { "glMinSampleShadingARB", 43, -1 }, // XXX: Add to xml +// { "glNamedStringARB", 43, -1 }, // XXX: Add to xml +// { "glDeleteNamedStringARB", 43, -1 }, // XXX: Add to xml +// { "glCompileShaderIncludeARB", 43, -1 }, // XXX: Add to xml +// { "glIsNamedStringARB", 43, -1 }, // XXX: Add to xml +// { "glGetNamedStringARB", 43, -1 }, // XXX: Add to xml +// { "glGetNamedStringivARB", 43, -1 }, // XXX: Add to xml + { "glBindFragDataLocationIndexed", 43, -1 }, + { "glGetFragDataIndex", 43, -1 }, + { "glGenSamplers", 43, -1 }, + { "glDeleteSamplers", 43, -1 }, + { "glIsSampler", 43, -1 }, + { "glBindSampler", 43, -1 }, + { "glSamplerParameteri", 43, -1 }, + { "glSamplerParameteriv", 43, -1 }, + { "glSamplerParameterf", 43, -1 }, + { "glSamplerParameterfv", 43, -1 }, + { "glSamplerParameterIiv", 43, -1 }, + { "glSamplerParameterIuiv", 43, -1 }, + { "glGetSamplerParameteriv", 43, -1 }, + { "glGetSamplerParameterIiv", 43, -1 }, + { "glGetSamplerParameterfv", 43, -1 }, + { "glGetSamplerParameterIuiv", 43, -1 }, + { "glQueryCounter", 43, -1 }, + { "glGetQueryObjecti64v", 43, -1 }, + { "glGetQueryObjectui64v", 43, -1 }, + { "glVertexP2ui", 43, -1 }, + { "glVertexP2uiv", 43, -1 }, + { "glVertexP3ui", 43, -1 }, + { "glVertexP3uiv", 43, -1 }, + { "glVertexP4ui", 43, -1 }, + { "glVertexP4uiv", 43, -1 }, + { "glTexCoordP1ui", 43, -1 }, + { "glTexCoordP1uiv", 43, -1 }, + { "glTexCoordP2ui", 43, -1 }, + { "glTexCoordP2uiv", 43, -1 }, + { "glTexCoordP3ui", 43, -1 }, + { "glTexCoordP3uiv", 43, -1 }, + { "glTexCoordP4ui", 43, -1 }, + { "glTexCoordP4uiv", 43, -1 }, + { "glMultiTexCoordP1ui", 43, -1 }, + { "glMultiTexCoordP1uiv", 43, -1 }, + { "glMultiTexCoordP2ui", 43, -1 }, + { "glMultiTexCoordP2uiv", 43, -1 }, + { "glMultiTexCoordP3ui", 43, -1 }, + { "glMultiTexCoordP3uiv", 43, -1 }, + { "glMultiTexCoordP4ui", 43, -1 }, + { "glMultiTexCoordP4uiv", 43, -1 }, + { "glNormalP3ui", 43, -1 }, + { "glNormalP3uiv", 43, -1 }, + { "glColorP3ui", 43, -1 }, + { "glColorP3uiv", 43, -1 }, + { "glColorP4ui", 43, -1 }, + { "glColorP4uiv", 43, -1 }, + { "glVertexAttribP1ui", 43, -1 }, + { "glVertexAttribP1uiv", 43, -1 }, + { "glVertexAttribP2ui", 43, -1 }, + { "glVertexAttribP2uiv", 43, -1 }, + { "glVertexAttribP3ui", 43, -1 }, + { "glVertexAttribP3uiv", 43, -1 }, + { "glVertexAttribP4ui", 43, -1 }, + { "glVertexAttribP4uiv", 43, -1 }, + { "glDrawArraysIndirect", 43, -1 }, + { "glDrawElementsIndirect", 43, -1 }, + + { "glUniform1d", 40, -1 }, + { "glUniform2d", 40, -1 }, + { "glUniform3d", 40, -1 }, + { "glUniform4d", 40, -1 }, + { "glUniform1dv", 40, -1 }, + { "glUniform2dv", 40, -1 }, + { "glUniform3dv", 40, -1 }, + { "glUniform4dv", 40, -1 }, + { "glUniformMatrix2dv", 40, -1 }, + { "glUniformMatrix3dv", 40, -1 }, + { "glUniformMatrix4dv", 40, -1 }, + { "glUniformMatrix2x3dv", 40, -1 }, + { "glUniformMatrix2x4dv", 40, -1 }, + { "glUniformMatrix3x2dv", 40, -1 }, + { "glUniformMatrix3x4dv", 40, -1 }, + { "glUniformMatrix4x2dv", 40, -1 }, + { "glUniformMatrix4x3dv", 40, -1 }, + { "glGetUniformdv", 43, -1 }, +// { "glGetSubroutineUniformLocation", 43, -1 }, // XXX: Add to xml +// { "glGetSubroutineIndex", 43, -1 }, // XXX: Add to xml +// { "glGetActiveSubroutineUniformiv", 43, -1 }, // XXX: Add to xml +// { "glGetActiveSubroutineUniformName", 43, -1 }, // XXX: Add to xml +// { "glGetActiveSubroutineName", 43, -1 }, // XXX: Add to xml +// { "glUniformSubroutinesuiv", 43, -1 }, // XXX: Add to xml +// { "glGetUniformSubroutineuiv", 43, -1 }, // XXX: Add to xml +// { "glGetProgramStageiv", 43, -1 }, // XXX: Add to xml +// { "glPatchParameteri", 43, -1 }, // XXX: Add to xml +// { "glPatchParameterfv", 43, -1 }, // XXX: Add to xml + + { "glBindTransformFeedback", 43, -1 }, + { "glDeleteTransformFeedbacks", 43, -1 }, + { "glGenTransformFeedbacks", 43, -1 }, + { "glIsTransformFeedback", 43, -1 }, + { "glPauseTransformFeedback", 43, -1 }, + { "glResumeTransformFeedback", 43, -1 }, + { "glDrawTransformFeedback", 43, -1 }, + { "glDrawTransformFeedbackStream", 43, -1 }, + { "glBeginQueryIndexed", 43, -1 }, + { "glEndQueryIndexed", 43, -1 }, + { "glGetQueryIndexediv", 43, -1 }, + { "glReleaseShaderCompiler", 43, -1 }, + { "glShaderBinary", 43, -1 }, + { "glGetShaderPrecisionFormat", 43, -1 }, + { "glDepthRangef", 43, -1 }, + { "glClearDepthf", 43, -1 }, + { "glGetProgramBinary", 43, -1 }, + { "glProgramBinary", 43, -1 }, + { "glProgramParameteri", 43, -1 }, + { "glUseProgramStages", 43, -1 }, + { "glActiveShaderProgram", 43, -1 }, + { "glCreateShaderProgramv", 43, -1 }, + { "glBindProgramPipeline", 43, -1 }, + { "glDeleteProgramPipelines", 43, -1 }, + { "glGenProgramPipelines", 43, -1 }, + { "glIsProgramPipeline", 43, -1 }, + { "glGetProgramPipelineiv", 43, -1 }, + { "glProgramUniform1i", 43, -1 }, + { "glProgramUniform1iv", 43, -1 }, + { "glProgramUniform1f", 43, -1 }, + { "glProgramUniform1fv", 43, -1 }, + { "glProgramUniform1d", 40, -1 }, + { "glProgramUniform1dv", 40, -1 }, + { "glProgramUniform1ui", 43, -1 }, + { "glProgramUniform1uiv", 43, -1 }, + { "glProgramUniform2i", 43, -1 }, + { "glProgramUniform2iv", 43, -1 }, + { "glProgramUniform2f", 43, -1 }, + { "glProgramUniform2fv", 43, -1 }, + { "glProgramUniform2d", 40, -1 }, + { "glProgramUniform2dv", 40, -1 }, + { "glProgramUniform2ui", 43, -1 }, + { "glProgramUniform2uiv", 43, -1 }, + { "glProgramUniform3i", 43, -1 }, + { "glProgramUniform3iv", 43, -1 }, + { "glProgramUniform3f", 43, -1 }, + { "glProgramUniform3fv", 43, -1 }, + { "glProgramUniform3d", 40, -1 }, + { "glProgramUniform3dv", 40, -1 }, + { "glProgramUniform3ui", 43, -1 }, + { "glProgramUniform3uiv", 43, -1 }, + { "glProgramUniform4i", 43, -1 }, + { "glProgramUniform4iv", 43, -1 }, + { "glProgramUniform4f", 43, -1 }, + { "glProgramUniform4fv", 43, -1 }, + { "glProgramUniform4d", 40, -1 }, + { "glProgramUniform4dv", 40, -1 }, + { "glProgramUniform4ui", 43, -1 }, + { "glProgramUniform4uiv", 43, -1 }, + { "glProgramUniformMatrix2fv", 43, -1 }, + { "glProgramUniformMatrix3fv", 43, -1 }, + { "glProgramUniformMatrix4fv", 43, -1 }, + { "glProgramUniformMatrix2dv", 40, -1 }, + { "glProgramUniformMatrix3dv", 40, -1 }, + { "glProgramUniformMatrix4dv", 40, -1 }, + { "glProgramUniformMatrix2x3fv", 43, -1 }, + { "glProgramUniformMatrix3x2fv", 43, -1 }, + { "glProgramUniformMatrix2x4fv", 43, -1 }, + { "glProgramUniformMatrix4x2fv", 43, -1 }, + { "glProgramUniformMatrix3x4fv", 43, -1 }, + { "glProgramUniformMatrix4x3fv", 43, -1 }, + { "glProgramUniformMatrix2x3dv", 40, -1 }, + { "glProgramUniformMatrix3x2dv", 40, -1 }, + { "glProgramUniformMatrix2x4dv", 40, -1 }, + { "glProgramUniformMatrix4x2dv", 40, -1 }, + { "glProgramUniformMatrix3x4dv", 40, -1 }, + { "glProgramUniformMatrix4x3dv", 40, -1 }, + { "glValidateProgramPipeline", 43, -1 }, + { "glGetProgramPipelineInfoLog", 43, -1 }, + + { "glVertexAttribL1d", 41, -1 }, + { "glVertexAttribL2d", 41, -1 }, + { "glVertexAttribL3d", 41, -1 }, + { "glVertexAttribL4d", 41, -1 }, + { "glVertexAttribL1dv", 41, -1 }, + { "glVertexAttribL2dv", 41, -1 }, + { "glVertexAttribL3dv", 41, -1 }, + { "glVertexAttribL4dv", 41, -1 }, + { "glVertexAttribLPointer", 41, -1 }, + { "glGetVertexAttribLdv", 41, -1 }, + { "glViewportArrayv", 43, -1 }, + { "glViewportIndexedf", 43, -1 }, + { "glViewportIndexedfv", 43, -1 }, + { "glScissorArrayv", 43, -1 }, + { "glScissorIndexed", 43, -1 }, + { "glScissorIndexedv", 43, -1 }, + { "glDepthRangeArrayv", 43, -1 }, + { "glDepthRangeIndexed", 43, -1 }, + +// { "glCreateSyncFromCLeventARB", 43, -1 }, // XXX: Add to xml + + { "glDrawArraysInstancedBaseInstance", 43, -1 }, + { "glDrawElementsInstancedBaseInstance", 43, -1 }, + { "glDrawElementsInstancedBaseVertexBaseInstance", 43, -1 }, + { "glDrawTransformFeedbackInstanced", 43, -1 }, + { "glDrawTransformFeedbackStreamInstanced", 43, -1 }, + { "glGetActiveAtomicCounterBufferiv", 43, -1 }, + { "glBindImageTexture", 43, -1 }, + { "glMemoryBarrier", 43, -1 }, + { "glTexStorage1D", 43, -1 }, + { "glTexStorage2D", 43, -1 }, + { "glTexStorage3D", 43, -1 }, + { "glTextureStorage1DEXT", 43, -1 }, + { "glTextureStorage2DEXT", 43, -1 }, + { "glTextureStorage3DEXT", 43, -1 }, + { "glClearBufferData", 43, -1 }, + { "glClearBufferSubData", 43, -1 }, +// { "glClearNamedBufferDataEXT", 43, -1 }, // XXX: Add to xml +// { "glClearNamedBufferSubDataEXT", 43, -1 }, // XXX: Add to xml + { "glCopyImageSubData", 43, -1 }, + { "glTextureView", 43, -1 }, + { "glBindVertexBuffer", 43, -1 }, + { "glVertexAttribFormat", 43, -1 }, + { "glVertexAttribIFormat", 43, -1 }, + { "glVertexAttribBinding", 43, -1 }, + { "glVertexBindingDivisor", 43, -1 }, +// { "glVertexArrayBindVertexBufferEXT", 43, -1 }, // XXX: Add to xml +// { "glVertexArrayVertexAttribFormatEXT", 43, -1 }, // XXX: Add to xml +// { "glVertexArrayVertexAttribIFormatEXT", 43, -1 }, // XXX: Add to xml +// { "glVertexArrayVertexAttribLFormatEXT", 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 +// { "glNamedFramebufferParameteriEXT", 43, -1 }, // XXX: Add to xml +// { "glGetNamedFramebufferParameterivEXT", 43, -1 }, // XXX: Add to xml +// { "glGetInternalformati64v", 43, -1 }, // XXX: Add to xml + { "glInvalidateTexSubImage", 43, -1 }, + { "glInvalidateTexImage", 43, -1 }, + { "glInvalidateBufferSubData", 43, -1 }, + { "glInvalidateBufferData", 43, -1 }, + { "glInvalidateFramebuffer", 43, -1 }, + { "glInvalidateSubFramebuffer", 43, -1 }, + { "glMultiDrawArraysIndirect", 43, -1 }, + { "glMultiDrawElementsIndirect", 43, -1 }, + { "glGetProgramInterfaceiv", 43, -1 }, + { "glGetProgramResourceIndex", 43, -1 }, + { "glGetProgramResourceName", 43, -1 }, + { "glGetProgramResourceiv", 43, -1 }, + { "glGetProgramResourceLocation", 43, -1 }, + { "glGetProgramResourceLocationIndex", 43, -1 }, +// { "glShaderStorageBlockBinding", 43, -1 }, // XXX: Add to xml + { "glTexBufferRange", 43, -1 }, +// { "glTextureBufferRangeEXT", 43, -1 }, // XXX: Add to xml + { "glTexStorage2DMultisample", 43, -1 }, + { "glTexStorage3DMultisample", 43, -1 }, +// { "glTextureStorage2DMultisampleEXT", 43, -1 }, // XXX: Add to xml +// { "glTextureStorage3DMultisampleEXT", 43, -1 }, // XXX: Add to xml + /* GL_ARB_direct_state_access */ { "glCreateTransformFeedbacks", 45, -1 }, { "glTransformFeedbackBufferBase", 45, -1 }, @@ -1064,9 +1338,6 @@ const struct function gl_core_functions_possible[] = { { "glGetQueryBufferObjecti64v", 45, -1 }, { "glGetQueryBufferObjectui64v", 45, -1 }, - /* GL_EXT_polygon_offset_clamp */ - { "glPolygonOffsetClampEXT", 11, -1 }, - { NULL, 0, -1 } }; -- cgit v1.2.3 From ef4dd0fc3e6b5ffbad6bd286ef9c6c25d0b25bae Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 20 May 2015 20:19:07 -0700 Subject: dispatch_sanity: Validate the compatibility profile dispatch table too Signed-off-by: Ian Romanick Suggested-by: Ilia Mirkin Cc: Ilia Mirkin Cc: "10.6" --- src/mesa/main/tests/dispatch_sanity.cpp | 493 ++++++++++++++++++++++++++++++++ 1 file changed, 493 insertions(+) (limited to 'src/mesa/main/tests') diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 3d9539b474d..0b7262a21e7 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -69,6 +69,7 @@ struct function { }; extern const struct function common_desktop_functions_possible[]; +extern const struct function gl_compatibility_functions_possible[]; extern const struct function gl_core_functions_possible[]; extern const struct function gles11_functions_possible[]; extern const struct function gles2_functions_possible[]; @@ -182,6 +183,14 @@ TEST_F(DispatchSanity_test, GL31_CORE) validate_nops(&ctx, nop_table); } +TEST_F(DispatchSanity_test, GL30) +{ + SetUpCtx(API_OPENGL_COMPAT, 30); + validate_functions(&ctx, common_desktop_functions_possible, nop_table); + validate_functions(&ctx, gl_compatibility_functions_possible, nop_table); + validate_nops(&ctx, nop_table); +} + TEST_F(DispatchSanity_test, GLES11) { SetUpCtx(API_OPENGLES, 11); @@ -924,6 +933,490 @@ const struct function common_desktop_functions_possible[] = { { NULL, 0, -1 } }; +const struct function gl_compatibility_functions_possible[] = { + { "glBindVertexArrayAPPLE", 10, -1 }, + { "glGenVertexArraysAPPLE", 10, -1 }, + { "glBindRenderbufferEXT", 10, -1 }, + { "glBindFramebufferEXT", 10, -1 }, + { "glNewList", 10, _gloffset_NewList }, + { "glEndList", 10, _gloffset_EndList }, + { "glCallList", 10, _gloffset_CallList }, + { "glCallLists", 10, _gloffset_CallLists }, + { "glDeleteLists", 10, _gloffset_DeleteLists }, + { "glGenLists", 10, _gloffset_GenLists }, + { "glListBase", 10, _gloffset_ListBase }, + { "glBegin", 10, _gloffset_Begin }, + { "glBitmap", 10, _gloffset_Bitmap }, + { "glColor3b", 10, _gloffset_Color3b }, + { "glColor3bv", 10, _gloffset_Color3bv }, + { "glColor3d", 10, _gloffset_Color3d }, + { "glColor3dv", 10, _gloffset_Color3dv }, + { "glColor3f", 10, _gloffset_Color3f }, + { "glColor3fv", 10, _gloffset_Color3fv }, + { "glColor3i", 10, _gloffset_Color3i }, + { "glColor3iv", 10, _gloffset_Color3iv }, + { "glColor3s", 10, _gloffset_Color3s }, + { "glColor3sv", 10, _gloffset_Color3sv }, + { "glColor3ub", 10, _gloffset_Color3ub }, + { "glColor3ubv", 10, _gloffset_Color3ubv }, + { "glColor3ui", 10, _gloffset_Color3ui }, + { "glColor3uiv", 10, _gloffset_Color3uiv }, + { "glColor3us", 10, _gloffset_Color3us }, + { "glColor3usv", 10, _gloffset_Color3usv }, + { "glColor4b", 10, _gloffset_Color4b }, + { "glColor4bv", 10, _gloffset_Color4bv }, + { "glColor4d", 10, _gloffset_Color4d }, + { "glColor4dv", 10, _gloffset_Color4dv }, + { "glColor4f", 10, _gloffset_Color4f }, + { "glColor4fv", 10, _gloffset_Color4fv }, + { "glColor4i", 10, _gloffset_Color4i }, + { "glColor4iv", 10, _gloffset_Color4iv }, + { "glColor4s", 10, _gloffset_Color4s }, + { "glColor4sv", 10, _gloffset_Color4sv }, + { "glColor4ub", 10, _gloffset_Color4ub }, + { "glColor4ubv", 10, _gloffset_Color4ubv }, + { "glColor4ui", 10, _gloffset_Color4ui }, + { "glColor4uiv", 10, _gloffset_Color4uiv }, + { "glColor4us", 10, _gloffset_Color4us }, + { "glColor4usv", 10, _gloffset_Color4usv }, + { "glEdgeFlag", 10, _gloffset_EdgeFlag }, + { "glEdgeFlagv", 10, _gloffset_EdgeFlagv }, + { "glEnd", 10, _gloffset_End }, + { "glIndexd", 10, _gloffset_Indexd }, + { "glIndexdv", 10, _gloffset_Indexdv }, + { "glIndexf", 10, _gloffset_Indexf }, + { "glIndexfv", 10, _gloffset_Indexfv }, + { "glIndexi", 10, _gloffset_Indexi }, + { "glIndexiv", 10, _gloffset_Indexiv }, + { "glIndexs", 10, _gloffset_Indexs }, + { "glIndexsv", 10, _gloffset_Indexsv }, + { "glNormal3b", 10, _gloffset_Normal3b }, + { "glNormal3bv", 10, _gloffset_Normal3bv }, + { "glNormal3d", 10, _gloffset_Normal3d }, + { "glNormal3dv", 10, _gloffset_Normal3dv }, + { "glNormal3f", 10, _gloffset_Normal3f }, + { "glNormal3fv", 10, _gloffset_Normal3fv }, + { "glNormal3i", 10, _gloffset_Normal3i }, + { "glNormal3iv", 10, _gloffset_Normal3iv }, + { "glNormal3s", 10, _gloffset_Normal3s }, + { "glNormal3sv", 10, _gloffset_Normal3sv }, + { "glRasterPos2d", 10, _gloffset_RasterPos2d }, + { "glRasterPos2dv", 10, _gloffset_RasterPos2dv }, + { "glRasterPos2f", 10, _gloffset_RasterPos2f }, + { "glRasterPos2fv", 10, _gloffset_RasterPos2fv }, + { "glRasterPos2i", 10, _gloffset_RasterPos2i }, + { "glRasterPos2iv", 10, _gloffset_RasterPos2iv }, + { "glRasterPos2s", 10, _gloffset_RasterPos2s }, + { "glRasterPos2sv", 10, _gloffset_RasterPos2sv }, + { "glRasterPos3d", 10, _gloffset_RasterPos3d }, + { "glRasterPos3dv", 10, _gloffset_RasterPos3dv }, + { "glRasterPos3f", 10, _gloffset_RasterPos3f }, + { "glRasterPos3fv", 10, _gloffset_RasterPos3fv }, + { "glRasterPos3i", 10, _gloffset_RasterPos3i }, + { "glRasterPos3iv", 10, _gloffset_RasterPos3iv }, + { "glRasterPos3s", 10, _gloffset_RasterPos3s }, + { "glRasterPos3sv", 10, _gloffset_RasterPos3sv }, + { "glRasterPos4d", 10, _gloffset_RasterPos4d }, + { "glRasterPos4dv", 10, _gloffset_RasterPos4dv }, + { "glRasterPos4f", 10, _gloffset_RasterPos4f }, + { "glRasterPos4fv", 10, _gloffset_RasterPos4fv }, + { "glRasterPos4i", 10, _gloffset_RasterPos4i }, + { "glRasterPos4iv", 10, _gloffset_RasterPos4iv }, + { "glRasterPos4s", 10, _gloffset_RasterPos4s }, + { "glRasterPos4sv", 10, _gloffset_RasterPos4sv }, + { "glRectd", 10, _gloffset_Rectd }, + { "glRectdv", 10, _gloffset_Rectdv }, + { "glRectf", 10, _gloffset_Rectf }, + { "glRectfv", 10, _gloffset_Rectfv }, + { "glRecti", 10, _gloffset_Recti }, + { "glRectiv", 10, _gloffset_Rectiv }, + { "glRects", 10, _gloffset_Rects }, + { "glRectsv", 10, _gloffset_Rectsv }, + { "glTexCoord1d", 10, _gloffset_TexCoord1d }, + { "glTexCoord1dv", 10, _gloffset_TexCoord1dv }, + { "glTexCoord1f", 10, _gloffset_TexCoord1f }, + { "glTexCoord1fv", 10, _gloffset_TexCoord1fv }, + { "glTexCoord1i", 10, _gloffset_TexCoord1i }, + { "glTexCoord1iv", 10, _gloffset_TexCoord1iv }, + { "glTexCoord1s", 10, _gloffset_TexCoord1s }, + { "glTexCoord1sv", 10, _gloffset_TexCoord1sv }, + { "glTexCoord2d", 10, _gloffset_TexCoord2d }, + { "glTexCoord2dv", 10, _gloffset_TexCoord2dv }, + { "glTexCoord2f", 10, _gloffset_TexCoord2f }, + { "glTexCoord2fv", 10, _gloffset_TexCoord2fv }, + { "glTexCoord2i", 10, _gloffset_TexCoord2i }, + { "glTexCoord2iv", 10, _gloffset_TexCoord2iv }, + { "glTexCoord2s", 10, _gloffset_TexCoord2s }, + { "glTexCoord2sv", 10, _gloffset_TexCoord2sv }, + { "glTexCoord3d", 10, _gloffset_TexCoord3d }, + { "glTexCoord3dv", 10, _gloffset_TexCoord3dv }, + { "glTexCoord3f", 10, _gloffset_TexCoord3f }, + { "glTexCoord3fv", 10, _gloffset_TexCoord3fv }, + { "glTexCoord3i", 10, _gloffset_TexCoord3i }, + { "glTexCoord3iv", 10, _gloffset_TexCoord3iv }, + { "glTexCoord3s", 10, _gloffset_TexCoord3s }, + { "glTexCoord3sv", 10, _gloffset_TexCoord3sv }, + { "glTexCoord4d", 10, _gloffset_TexCoord4d }, + { "glTexCoord4dv", 10, _gloffset_TexCoord4dv }, + { "glTexCoord4f", 10, _gloffset_TexCoord4f }, + { "glTexCoord4fv", 10, _gloffset_TexCoord4fv }, + { "glTexCoord4i", 10, _gloffset_TexCoord4i }, + { "glTexCoord4iv", 10, _gloffset_TexCoord4iv }, + { "glTexCoord4s", 10, _gloffset_TexCoord4s }, + { "glTexCoord4sv", 10, _gloffset_TexCoord4sv }, + { "glVertex2d", 10, _gloffset_Vertex2d }, + { "glVertex2dv", 10, _gloffset_Vertex2dv }, + { "glVertex2f", 10, _gloffset_Vertex2f }, + { "glVertex2fv", 10, _gloffset_Vertex2fv }, + { "glVertex2i", 10, _gloffset_Vertex2i }, + { "glVertex2iv", 10, _gloffset_Vertex2iv }, + { "glVertex2s", 10, _gloffset_Vertex2s }, + { "glVertex2sv", 10, _gloffset_Vertex2sv }, + { "glVertex3d", 10, _gloffset_Vertex3d }, + { "glVertex3dv", 10, _gloffset_Vertex3dv }, + { "glVertex3f", 10, _gloffset_Vertex3f }, + { "glVertex3fv", 10, _gloffset_Vertex3fv }, + { "glVertex3i", 10, _gloffset_Vertex3i }, + { "glVertex3iv", 10, _gloffset_Vertex3iv }, + { "glVertex3s", 10, _gloffset_Vertex3s }, + { "glVertex3sv", 10, _gloffset_Vertex3sv }, + { "glVertex4d", 10, _gloffset_Vertex4d }, + { "glVertex4dv", 10, _gloffset_Vertex4dv }, + { "glVertex4f", 10, _gloffset_Vertex4f }, + { "glVertex4fv", 10, _gloffset_Vertex4fv }, + { "glVertex4i", 10, _gloffset_Vertex4i }, + { "glVertex4iv", 10, _gloffset_Vertex4iv }, + { "glVertex4s", 10, _gloffset_Vertex4s }, + { "glVertex4sv", 10, _gloffset_Vertex4sv }, + { "glClipPlane", 10, _gloffset_ClipPlane }, + { "glColorMaterial", 10, _gloffset_ColorMaterial }, + { "glFogf", 10, _gloffset_Fogf }, + { "glFogfv", 10, _gloffset_Fogfv }, + { "glFogi", 10, _gloffset_Fogi }, + { "glFogiv", 10, _gloffset_Fogiv }, + { "glLightf", 10, _gloffset_Lightf }, + { "glLightfv", 10, _gloffset_Lightfv }, + { "glLighti", 10, _gloffset_Lighti }, + { "glLightiv", 10, _gloffset_Lightiv }, + { "glLightModelf", 10, _gloffset_LightModelf }, + { "glLightModelfv", 10, _gloffset_LightModelfv }, + { "glLightModeli", 10, _gloffset_LightModeli }, + { "glLightModeliv", 10, _gloffset_LightModeliv }, + { "glLineStipple", 10, _gloffset_LineStipple }, + { "glMaterialf", 10, _gloffset_Materialf }, + { "glMaterialfv", 10, _gloffset_Materialfv }, + { "glMateriali", 10, _gloffset_Materiali }, + { "glMaterialiv", 10, _gloffset_Materialiv }, + { "glPolygonStipple", 10, _gloffset_PolygonStipple }, + { "glShadeModel", 10, _gloffset_ShadeModel }, + { "glTexEnvf", 10, _gloffset_TexEnvf }, + { "glTexEnvfv", 10, _gloffset_TexEnvfv }, + { "glTexEnvi", 10, _gloffset_TexEnvi }, + { "glTexEnviv", 10, _gloffset_TexEnviv }, + { "glTexGend", 10, _gloffset_TexGend }, + { "glTexGendv", 10, _gloffset_TexGendv }, + { "glTexGenf", 10, _gloffset_TexGenf }, + { "glTexGenfv", 10, _gloffset_TexGenfv }, + { "glTexGeni", 10, _gloffset_TexGeni }, + { "glTexGeniv", 10, _gloffset_TexGeniv }, + { "glFeedbackBuffer", 10, _gloffset_FeedbackBuffer }, + { "glSelectBuffer", 10, _gloffset_SelectBuffer }, + { "glRenderMode", 10, _gloffset_RenderMode }, + { "glInitNames", 10, _gloffset_InitNames }, + { "glLoadName", 10, _gloffset_LoadName }, + { "glPassThrough", 10, _gloffset_PassThrough }, + { "glPopName", 10, _gloffset_PopName }, + { "glPushName", 10, _gloffset_PushName }, + { "glClearAccum", 10, _gloffset_ClearAccum }, + { "glClearIndex", 10, _gloffset_ClearIndex }, + { "glIndexMask", 10, _gloffset_IndexMask }, + { "glAccum", 10, _gloffset_Accum }, + { "glPopAttrib", 10, _gloffset_PopAttrib }, + { "glPushAttrib", 10, _gloffset_PushAttrib }, + { "glMap1d", 10, _gloffset_Map1d }, + { "glMap1f", 10, _gloffset_Map1f }, + { "glMap2d", 10, _gloffset_Map2d }, + { "glMap2f", 10, _gloffset_Map2f }, + { "glMapGrid1d", 10, _gloffset_MapGrid1d }, + { "glMapGrid1f", 10, _gloffset_MapGrid1f }, + { "glMapGrid2d", 10, _gloffset_MapGrid2d }, + { "glMapGrid2f", 10, _gloffset_MapGrid2f }, + { "glEvalCoord1d", 10, _gloffset_EvalCoord1d }, + { "glEvalCoord1dv", 10, _gloffset_EvalCoord1dv }, + { "glEvalCoord1f", 10, _gloffset_EvalCoord1f }, + { "glEvalCoord1fv", 10, _gloffset_EvalCoord1fv }, + { "glEvalCoord2d", 10, _gloffset_EvalCoord2d }, + { "glEvalCoord2dv", 10, _gloffset_EvalCoord2dv }, + { "glEvalCoord2f", 10, _gloffset_EvalCoord2f }, + { "glEvalCoord2fv", 10, _gloffset_EvalCoord2fv }, + { "glEvalMesh1", 10, _gloffset_EvalMesh1 }, + { "glEvalPoint1", 10, _gloffset_EvalPoint1 }, + { "glEvalMesh2", 10, _gloffset_EvalMesh2 }, + { "glEvalPoint2", 10, _gloffset_EvalPoint2 }, + { "glAlphaFunc", 10, _gloffset_AlphaFunc }, + { "glPixelZoom", 10, _gloffset_PixelZoom }, + { "glPixelTransferf", 10, _gloffset_PixelTransferf }, + { "glPixelTransferi", 10, _gloffset_PixelTransferi }, + { "glPixelMapfv", 10, _gloffset_PixelMapfv }, + { "glPixelMapuiv", 10, _gloffset_PixelMapuiv }, + { "glPixelMapusv", 10, _gloffset_PixelMapusv }, + { "glCopyPixels", 10, _gloffset_CopyPixels }, + { "glDrawPixels", 10, _gloffset_DrawPixels }, + { "glGetClipPlane", 10, _gloffset_GetClipPlane }, + { "glGetLightfv", 10, _gloffset_GetLightfv }, + { "glGetLightiv", 10, _gloffset_GetLightiv }, + { "glGetMapdv", 10, _gloffset_GetMapdv }, + { "glGetMapfv", 10, _gloffset_GetMapfv }, + { "glGetMapiv", 10, _gloffset_GetMapiv }, + { "glGetMaterialfv", 10, _gloffset_GetMaterialfv }, + { "glGetMaterialiv", 10, _gloffset_GetMaterialiv }, + { "glGetPixelMapfv", 10, _gloffset_GetPixelMapfv }, + { "glGetPixelMapuiv", 10, _gloffset_GetPixelMapuiv }, + { "glGetPixelMapusv", 10, _gloffset_GetPixelMapusv }, + { "glGetPolygonStipple", 10, _gloffset_GetPolygonStipple }, + { "glGetTexEnvfv", 10, _gloffset_GetTexEnvfv }, + { "glGetTexEnviv", 10, _gloffset_GetTexEnviv }, + { "glGetTexGendv", 10, _gloffset_GetTexGendv }, + { "glGetTexGenfv", 10, _gloffset_GetTexGenfv }, + { "glGetTexGeniv", 10, _gloffset_GetTexGeniv }, + { "glIsList", 10, _gloffset_IsList }, + { "glFrustum", 10, _gloffset_Frustum }, + { "glLoadIdentity", 10, _gloffset_LoadIdentity }, + { "glLoadMatrixf", 10, _gloffset_LoadMatrixf }, + { "glLoadMatrixd", 10, _gloffset_LoadMatrixd }, + { "glMatrixMode", 10, _gloffset_MatrixMode }, + { "glMultMatrixf", 10, _gloffset_MultMatrixf }, + { "glMultMatrixd", 10, _gloffset_MultMatrixd }, + { "glOrtho", 10, _gloffset_Ortho }, + { "glPopMatrix", 10, _gloffset_PopMatrix }, + { "glPushMatrix", 10, _gloffset_PushMatrix }, + { "glRotated", 10, _gloffset_Rotated }, + { "glRotatef", 10, _gloffset_Rotatef }, + { "glScaled", 10, _gloffset_Scaled }, + { "glScalef", 10, _gloffset_Scalef }, + { "glTranslated", 10, _gloffset_Translated }, + { "glTranslatef", 10, _gloffset_Translatef }, + { "glArrayElement", 10, _gloffset_ArrayElement }, + { "glColorPointer", 10, _gloffset_ColorPointer }, + { "glDisableClientState", 10, _gloffset_DisableClientState }, + { "glEdgeFlagPointer", 10, _gloffset_EdgeFlagPointer }, + { "glEnableClientState", 10, _gloffset_EnableClientState }, + { "glIndexPointer", 10, _gloffset_IndexPointer }, + { "glInterleavedArrays", 10, _gloffset_InterleavedArrays }, + { "glNormalPointer", 10, _gloffset_NormalPointer }, + { "glTexCoordPointer", 10, _gloffset_TexCoordPointer }, + { "glVertexPointer", 10, _gloffset_VertexPointer }, + { "glAreTexturesResident", 10, _gloffset_AreTexturesResident }, + { "glPrioritizeTextures", 10, _gloffset_PrioritizeTextures }, + { "glIndexub", 10, _gloffset_Indexub }, + { "glIndexubv", 10, _gloffset_Indexubv }, + { "glPopClientAttrib", 10, _gloffset_PopClientAttrib }, + { "glPushClientAttrib", 10, _gloffset_PushClientAttrib }, + { "glColorTable", 10, _gloffset_ColorTable }, + { "glColorTableParameterfv", 10, _gloffset_ColorTableParameterfv }, + { "glColorTableParameteriv", 10, _gloffset_ColorTableParameteriv }, + { "glCopyColorTable", 10, _gloffset_CopyColorTable }, + { "glGetColorTable", 10, _gloffset_GetColorTable }, + { "glGetColorTableParameterfv", 10, _gloffset_GetColorTableParameterfv }, + { "glGetColorTableParameteriv", 10, _gloffset_GetColorTableParameteriv }, + { "glColorSubTable", 10, _gloffset_ColorSubTable }, + { "glCopyColorSubTable", 10, _gloffset_CopyColorSubTable }, + { "glConvolutionFilter1D", 10, _gloffset_ConvolutionFilter1D }, + { "glConvolutionFilter2D", 10, _gloffset_ConvolutionFilter2D }, + { "glConvolutionParameterf", 10, _gloffset_ConvolutionParameterf }, + { "glConvolutionParameterfv", 10, _gloffset_ConvolutionParameterfv }, + { "glConvolutionParameteri", 10, _gloffset_ConvolutionParameteri }, + { "glConvolutionParameteriv", 10, _gloffset_ConvolutionParameteriv }, + { "glCopyConvolutionFilter1D", 10, _gloffset_CopyConvolutionFilter1D }, + { "glCopyConvolutionFilter2D", 10, _gloffset_CopyConvolutionFilter2D }, + { "glGetConvolutionFilter", 10, _gloffset_GetConvolutionFilter }, + { "glGetConvolutionParameterfv", 10, _gloffset_GetConvolutionParameterfv }, + { "glGetConvolutionParameteriv", 10, _gloffset_GetConvolutionParameteriv }, + { "glGetSeparableFilter", 10, _gloffset_GetSeparableFilter }, + { "glSeparableFilter2D", 10, _gloffset_SeparableFilter2D }, + { "glGetHistogram", 10, _gloffset_GetHistogram }, + { "glGetHistogramParameterfv", 10, _gloffset_GetHistogramParameterfv }, + { "glGetHistogramParameteriv", 10, _gloffset_GetHistogramParameteriv }, + { "glGetMinmax", 10, _gloffset_GetMinmax }, + { "glGetMinmaxParameterfv", 10, _gloffset_GetMinmaxParameterfv }, + { "glGetMinmaxParameteriv", 10, _gloffset_GetMinmaxParameteriv }, + { "glHistogram", 10, _gloffset_Histogram }, + { "glMinmax", 10, _gloffset_Minmax }, + { "glResetHistogram", 10, _gloffset_ResetHistogram }, + { "glResetMinmax", 10, _gloffset_ResetMinmax }, + { "glClientActiveTexture", 10, _gloffset_ClientActiveTexture }, + { "glMultiTexCoord1d", 10, _gloffset_MultiTexCoord1d }, + { "glMultiTexCoord1dv", 10, _gloffset_MultiTexCoord1dv }, + { "glMultiTexCoord1f", 10, _gloffset_MultiTexCoord1fARB }, + { "glMultiTexCoord1fv", 10, _gloffset_MultiTexCoord1fvARB }, + { "glMultiTexCoord1i", 10, _gloffset_MultiTexCoord1i }, + { "glMultiTexCoord1iv", 10, _gloffset_MultiTexCoord1iv }, + { "glMultiTexCoord1s", 10, _gloffset_MultiTexCoord1s }, + { "glMultiTexCoord1sv", 10, _gloffset_MultiTexCoord1sv }, + { "glMultiTexCoord2d", 10, _gloffset_MultiTexCoord2d }, + { "glMultiTexCoord2dv", 10, _gloffset_MultiTexCoord2dv }, + { "glMultiTexCoord2f", 10, _gloffset_MultiTexCoord2fARB }, + { "glMultiTexCoord2fv", 10, _gloffset_MultiTexCoord2fvARB }, + { "glMultiTexCoord2i", 10, _gloffset_MultiTexCoord2i }, + { "glMultiTexCoord2iv", 10, _gloffset_MultiTexCoord2iv }, + { "glMultiTexCoord2s", 10, _gloffset_MultiTexCoord2s }, + { "glMultiTexCoord2sv", 10, _gloffset_MultiTexCoord2sv }, + { "glMultiTexCoord3d", 10, _gloffset_MultiTexCoord3d }, + { "glMultiTexCoord3dv", 10, _gloffset_MultiTexCoord3dv }, + { "glMultiTexCoord3f", 10, _gloffset_MultiTexCoord3fARB }, + { "glMultiTexCoord3fv", 10, _gloffset_MultiTexCoord3fvARB }, + { "glMultiTexCoord3i", 10, _gloffset_MultiTexCoord3i }, + { "glMultiTexCoord3iv", 10, _gloffset_MultiTexCoord3iv }, + { "glMultiTexCoord3s", 10, _gloffset_MultiTexCoord3s }, + { "glMultiTexCoord3sv", 10, _gloffset_MultiTexCoord3sv }, + { "glMultiTexCoord4d", 10, _gloffset_MultiTexCoord4d }, + { "glMultiTexCoord4dv", 10, _gloffset_MultiTexCoord4dv }, + { "glMultiTexCoord4f", 10, _gloffset_MultiTexCoord4fARB }, + { "glMultiTexCoord4fv", 10, _gloffset_MultiTexCoord4fvARB }, + { "glMultiTexCoord4i", 10, _gloffset_MultiTexCoord4i }, + { "glMultiTexCoord4iv", 10, _gloffset_MultiTexCoord4iv }, + { "glMultiTexCoord4s", 10, _gloffset_MultiTexCoord4s }, + { "glMultiTexCoord4sv", 10, _gloffset_MultiTexCoord4sv }, + { "glLoadTransposeMatrixf", 10, -1 }, + { "glLoadTransposeMatrixd", 10, -1 }, + { "glMultTransposeMatrixf", 10, -1 }, + { "glMultTransposeMatrixd", 10, -1 }, + { "glFogCoordf", 10, -1 }, + { "glFogCoordfv", 10, -1 }, + { "glFogCoordd", 10, -1 }, + { "glFogCoorddv", 10, -1 }, + { "glFogCoordPointer", 10, -1 }, + { "glSecondaryColor3b", 10, -1 }, + { "glSecondaryColor3bv", 10, -1 }, + { "glSecondaryColor3d", 10, -1 }, + { "glSecondaryColor3dv", 10, -1 }, + { "glSecondaryColor3f", 10, -1 }, + { "glSecondaryColor3fv", 10, -1 }, + { "glSecondaryColor3i", 10, -1 }, + { "glSecondaryColor3iv", 10, -1 }, + { "glSecondaryColor3s", 10, -1 }, + { "glSecondaryColor3sv", 10, -1 }, + { "glSecondaryColor3ub", 10, -1 }, + { "glSecondaryColor3ubv", 10, -1 }, + { "glSecondaryColor3ui", 10, -1 }, + { "glSecondaryColor3uiv", 10, -1 }, + { "glSecondaryColor3us", 10, -1 }, + { "glSecondaryColor3usv", 10, -1 }, + { "glSecondaryColorPointer", 10, -1 }, + { "glWindowPos2d", 10, -1 }, + { "glWindowPos2dv", 10, -1 }, + { "glWindowPos2f", 10, -1 }, + { "glWindowPos2fv", 10, -1 }, + { "glWindowPos2i", 10, -1 }, + { "glWindowPos2iv", 10, -1 }, + { "glWindowPos2s", 10, -1 }, + { "glWindowPos2sv", 10, -1 }, + { "glWindowPos3d", 10, -1 }, + { "glWindowPos3dv", 10, -1 }, + { "glWindowPos3f", 10, -1 }, + { "glWindowPos3fv", 10, -1 }, + { "glWindowPos3i", 10, -1 }, + { "glWindowPos3iv", 10, -1 }, + { "glWindowPos3s", 10, -1 }, + { "glWindowPos3sv", 10, -1 }, + { "glProgramStringARB", 10, -1 }, + { "glProgramEnvParameter4dARB", 10, -1 }, + { "glProgramEnvParameter4dvARB", 10, -1 }, + { "glProgramEnvParameter4fARB", 10, -1 }, + { "glProgramEnvParameter4fvARB", 10, -1 }, + { "glProgramLocalParameter4dARB", 10, -1 }, + { "glProgramLocalParameter4dvARB", 10, -1 }, + { "glProgramLocalParameter4fARB", 10, -1 }, + { "glProgramLocalParameter4fvARB", 10, -1 }, + { "glGetProgramEnvParameterdvARB", 10, -1 }, + { "glGetProgramEnvParameterfvARB", 10, -1 }, + { "glGetProgramLocalParameterdvARB", 10, -1 }, + { "glGetProgramLocalParameterfvARB", 10, -1 }, + { "glGetProgramivARB", 10, -1 }, + { "glGetProgramStringARB", 10, -1 }, + { "glPolygonOffsetEXT", 10, -1 }, + { "glColorPointerEXT", 10, -1 }, + { "glEdgeFlagPointerEXT", 10, -1 }, + { "glIndexPointerEXT", 10, -1 }, + { "glNormalPointerEXT", 10, -1 }, + { "glTexCoordPointerEXT", 10, -1 }, + { "glVertexPointerEXT", 10, -1 }, + { "glLockArraysEXT", 10, -1 }, + { "glUnlockArraysEXT", 10, -1 }, + { "glWindowPos4dMESA", 10, -1 }, + { "glWindowPos4dvMESA", 10, -1 }, + { "glWindowPos4fMESA", 10, -1 }, + { "glWindowPos4fvMESA", 10, -1 }, + { "glWindowPos4iMESA", 10, -1 }, + { "glWindowPos4ivMESA", 10, -1 }, + { "glWindowPos4sMESA", 10, -1 }, + { "glWindowPos4svMESA", 10, -1 }, + { "glBindProgramNV", 10, -1 }, + { "glDeleteProgramsNV", 10, -1 }, + { "glGenProgramsNV", 10, -1 }, + { "glIsProgramNV", 10, -1 }, + { "glVertexAttrib1sNV", 10, -1 }, + { "glVertexAttrib1svNV", 10, -1 }, + { "glVertexAttrib2sNV", 10, -1 }, + { "glVertexAttrib2svNV", 10, -1 }, + { "glVertexAttrib3sNV", 10, -1 }, + { "glVertexAttrib3svNV", 10, -1 }, + { "glVertexAttrib4sNV", 10, -1 }, + { "glVertexAttrib4svNV", 10, -1 }, + { "glVertexAttrib1fNV", 10, -1 }, + { "glVertexAttrib1fvNV", 10, -1 }, + { "glVertexAttrib2fNV", 10, -1 }, + { "glVertexAttrib2fvNV", 10, -1 }, + { "glVertexAttrib3fNV", 10, -1 }, + { "glVertexAttrib3fvNV", 10, -1 }, + { "glVertexAttrib4fNV", 10, -1 }, + { "glVertexAttrib4fvNV", 10, -1 }, + { "glVertexAttrib1dNV", 10, -1 }, + { "glVertexAttrib1dvNV", 10, -1 }, + { "glVertexAttrib2dNV", 10, -1 }, + { "glVertexAttrib2dvNV", 10, -1 }, + { "glVertexAttrib3dNV", 10, -1 }, + { "glVertexAttrib3dvNV", 10, -1 }, + { "glVertexAttrib4dNV", 10, -1 }, + { "glVertexAttrib4dvNV", 10, -1 }, + { "glVertexAttrib4ubNV", 10, -1 }, + { "glVertexAttrib4ubvNV", 10, -1 }, + { "glVertexAttribs1svNV", 10, -1 }, + { "glVertexAttribs2svNV", 10, -1 }, + { "glVertexAttribs3svNV", 10, -1 }, + { "glVertexAttribs4svNV", 10, -1 }, + { "glVertexAttribs1fvNV", 10, -1 }, + { "glVertexAttribs2fvNV", 10, -1 }, + { "glVertexAttribs3fvNV", 10, -1 }, + { "glVertexAttribs4fvNV", 10, -1 }, + { "glVertexAttribs1dvNV", 10, -1 }, + { "glVertexAttribs2dvNV", 10, -1 }, + { "glVertexAttribs3dvNV", 10, -1 }, + { "glVertexAttribs4dvNV", 10, -1 }, + { "glVertexAttribs4ubvNV", 10, -1 }, + { "glGenFragmentShadersATI", 10, -1 }, + { "glBindFragmentShaderATI", 10, -1 }, + { "glDeleteFragmentShaderATI", 10, -1 }, + { "glBeginFragmentShaderATI", 10, -1 }, + { "glEndFragmentShaderATI", 10, -1 }, + { "glPassTexCoordATI", 10, -1 }, + { "glSampleMapATI", 10, -1 }, + { "glColorFragmentOp1ATI", 10, -1 }, + { "glColorFragmentOp2ATI", 10, -1 }, + { "glColorFragmentOp3ATI", 10, -1 }, + { "glAlphaFragmentOp1ATI", 10, -1 }, + { "glAlphaFragmentOp2ATI", 10, -1 }, + { "glAlphaFragmentOp3ATI", 10, -1 }, + { "glSetFragmentShaderConstantATI", 10, -1 }, + { "glActiveStencilFaceEXT", 10, -1 }, + { "glStencilFuncSeparateATI", 10, -1 }, + { "glProgramEnvParameters4fvEXT", 10, -1 }, + { "glProgramLocalParameters4fvEXT", 10, -1 }, + { "glPrimitiveRestartNV", 10, -1 }, + + { NULL, 0, -1 } +}; + const struct function gl_core_functions_possible[] = { /* GL 3.1 */ { "glTexBuffer", 31, -1 }, -- cgit v1.2.3 From c9d26f201aca58c72629d1ba1bb13c32c158d9dd Mon Sep 17 00:00:00 2001 From: Kevin Rogovin Date: Wed, 17 Jun 2015 13:29:51 +0300 Subject: mesa: Constants and functions for ARB_framebuffer_no_attachments Define the enumeration constants, function entry points and glGet for the GL_ARB_framebuffer_no_attachments. Reviewed-by: Ian Romanick Signed-off-by: Kevin Rogovin --- .../glapi/gen/ARB_framebuffer_no_attachments.xml | 32 ++++++++++++++++++++++ src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/apiexec.py | 5 ++++ src/mapi/glapi/gen/gl_API.xml | 4 ++- src/mesa/main/fbobject.c | 28 +++++++++++++++++++ src/mesa/main/fbobject.h | 6 ++++ src/mesa/main/get.c | 1 + src/mesa/main/get_hash_params.py | 6 ++++ src/mesa/main/tests/dispatch_sanity.cpp | 4 +-- 9 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml (limited to 'src/mesa/main/tests') 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 00000000000..59839a044be --- /dev/null +++ b/src/mapi/glapi/gen/ARB_framebuffer_no_attachments.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am index 34602579c8a..5b163b02e00 100644 --- a/src/mapi/glapi/gen/Makefile.am +++ b/src/mapi/glapi/gen/Makefile.am @@ -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 \ diff --git a/src/mapi/glapi/gen/apiexec.py b/src/mapi/glapi/gen/apiexec.py index 535de8a434b..b623b44beeb 100644 --- a/src/mapi/glapi/gen/apiexec.py +++ b/src/mapi/glapi/gen/apiexec.py @@ -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), diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index bd8db62033e..2f330756f22 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -8188,7 +8188,9 @@ - + + + diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 498edfb564c..6d75209c6a5 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); } +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 diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 9f570db3a26..8dad0ff34e7 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -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 */ diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 1bc9b5d82cf..3d6d63916b3 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -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[] = { diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 513d5d21b3f..84c5aa31a68 100644 --- a/src/mesa/main/get_hash_params.py +++ b/src/mesa/main/get_hash_params.py @@ -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 diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 0b7262a21e7..800720b798e 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -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 -- cgit v1.2.3