From 6c8964bf6343592698021f42ed67b776cdab458b Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 12 May 2017 10:47:14 +1000 Subject: mesa: add KHR_no_error support for glCompressedTex*SubImage3D() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/mesa/main/teximage.c | 28 +++++++++++++++++++++++++++- src/mesa/main/teximage.h | 14 ++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 2f9ff309428..fed1dad2621 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -4583,7 +4583,7 @@ compressed_tex_sub_image(unsigned dim, GLenum target, GLuint texture, * (See texturesubimage in teximage.c for details on why this check is * performed.) */ - if (!_mesa_cube_level_complete(texObj, level)) { + if (!no_error && !_mesa_cube_level_complete(texObj, level)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glCompressedTextureSubImage3D(cube map incomplete)"); return; @@ -4713,6 +4713,19 @@ _mesa_CompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, "glCompressedTextureSubImage2D"); } +void GLAPIENTRY +_mesa_CompressedTexSubImage3D_no_error(GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, + const GLvoid *data) +{ + compressed_tex_sub_image(3, target, 0, level, xoffset, yoffset, zoffset, + width, height, depth, format, imageSize, data, + false, true, "glCompressedTexSubImage3D"); +} + void GLAPIENTRY _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, @@ -4724,6 +4737,19 @@ _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, false, false, "glCompressedTexSubImage3D"); } +void GLAPIENTRY +_mesa_CompressedTextureSubImage3D_no_error(GLuint texture, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, + const GLvoid *data) +{ + compressed_tex_sub_image(3, 0, texture, level, xoffset, yoffset, zoffset, + width, height, depth, format, imageSize, data, + true, true, "glCompressedTextureSubImage3D"); +} + void GLAPIENTRY _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h index 6eda7215457..bc4e235d387 100644 --- a/src/mesa/main/teximage.h +++ b/src/mesa/main/teximage.h @@ -433,12 +433,26 @@ _mesa_CompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset, const GLvoid *data); extern void GLAPIENTRY +_mesa_CompressedTexSubImage3D_no_error(GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, + const GLvoid *data); +extern void GLAPIENTRY _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); extern void GLAPIENTRY +_mesa_CompressedTextureSubImage3D_no_error(GLuint texture, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, GLsizei imageSize, + const GLvoid *data); +extern void GLAPIENTRY _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, -- cgit v1.2.3