From c88649246f85415073cc8fd922ab039a067c89ee Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 18 Jul 2017 18:02:51 +0200 Subject: [PATCH] mesa: add KHR_no_error support to glInvalidate*() These are just no-op because we don't actually do anything useful in the errors path. Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- src/mapi/glapi/gen/ARB_invalidate_subdata.xml | 8 ++++---- src/mesa/main/fbobject.c | 17 +++++++++++++++++ src/mesa/main/fbobject.h | 8 ++++++++ src/mesa/main/texobj.c | 17 +++++++++++++++++ src/mesa/main/texobj.h | 8 ++++++++ 5 files changed, 54 insertions(+), 4 deletions(-) diff --git a/src/mapi/glapi/gen/ARB_invalidate_subdata.xml b/src/mapi/glapi/gen/ARB_invalidate_subdata.xml index 2cbc4f63be7..02dcad73cb7 100644 --- a/src/mapi/glapi/gen/ARB_invalidate_subdata.xml +++ b/src/mapi/glapi/gen/ARB_invalidate_subdata.xml @@ -3,7 +3,7 @@ - + @@ -14,7 +14,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -39,7 +39,7 @@ - + diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 46bc129effc..3ab6b53355b 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -4325,6 +4325,15 @@ invalid_enum: } +void GLAPIENTRY +_mesa_InvalidateSubFramebuffer_no_error(GLenum target, GLsizei numAttachments, + const GLenum *attachments, GLint x, + GLint y, GLsizei width, GLsizei height) +{ + /* no-op */ +} + + void GLAPIENTRY _mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, @@ -4376,6 +4385,14 @@ _mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer, } +void GLAPIENTRY +_mesa_InvalidateFramebuffer_no_error(GLenum target, GLsizei numAttachments, + const GLenum *attachments) +{ + /* no-op */ +} + + void GLAPIENTRY _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments) diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 6e10c187427..c67785a2850 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -306,6 +306,11 @@ extern void GLAPIENTRY _mesa_GetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint *param); +void GLAPIENTRY +_mesa_InvalidateSubFramebuffer_no_error(GLenum target, GLsizei numAttachments, + const GLenum *attachments, GLint x, + GLint y, GLsizei width, GLsizei height); + extern void GLAPIENTRY _mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, @@ -317,6 +322,9 @@ _mesa_InvalidateNamedFramebufferSubData(GLuint framebuffer, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); +void GLAPIENTRY +_mesa_InvalidateFramebuffer_no_error(GLenum target, GLsizei numAttachments, + const GLenum *attachments); extern void GLAPIENTRY _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments, diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index e52ad22645b..95f2b34337d 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -2028,6 +2028,16 @@ _mesa_unlock_context_textures( struct gl_context *ctx ) } +void GLAPIENTRY +_mesa_InvalidateTexSubImage_no_error(GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, + GLsizei depth) +{ + /* no-op */ +} + + void GLAPIENTRY _mesa_InvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, @@ -2175,6 +2185,13 @@ _mesa_InvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, } +void GLAPIENTRY +_mesa_InvalidateTexImage_no_error(GLuint texture, GLint level) +{ + /* no-op */ +} + + void GLAPIENTRY _mesa_InvalidateTexImage(GLuint texture, GLint level) { diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h index f10623899fc..9b9e4185d7b 100644 --- a/src/mesa/main/texobj.h +++ b/src/mesa/main/texobj.h @@ -218,10 +218,18 @@ _mesa_AreTexturesResident( GLsizei n, const GLuint *textures, extern GLboolean GLAPIENTRY _mesa_IsTexture( GLuint texture ); +void GLAPIENTRY +_mesa_InvalidateTexSubImage_no_error(GLuint texture, GLint level, GLint xoffset, + GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, + GLsizei depth); + extern void GLAPIENTRY _mesa_InvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +void GLAPIENTRY +_mesa_InvalidateTexImage_no_error(GLuint texture, GLint level); extern void GLAPIENTRY _mesa_InvalidateTexImage(GLuint texture, GLint level); -- 2.30.2