summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-07-19 15:36:01 +0200
committerSamuel Pitoiset <[email protected]>2017-07-31 13:53:40 +0200
commit80a845538ad725ce6fec7798de4f42dcdf580a86 (patch)
tree95ce9a81c35599a6ff8ebaecf41e8d43317a0703 /src/mesa/main/teximage.c
parentde0b1e5a81fddd95070952ce1a9a3dc7e7d820c5 (diff)
mesa: add KHR_no_error support to glTextureSubImage*D()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 3839c9fede4..7523b9fc981 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3494,6 +3494,20 @@ texturesubimage_error(struct gl_context *ctx, GLuint dims,
}
+static void
+texturesubimage_no_error(struct gl_context *ctx, GLuint dims,
+ GLuint texture, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *pixels,
+ const char *callerName)
+{
+ texturesubimage(ctx, dims, texture, level, xoffset, yoffset, zoffset,
+ width, height, depth, format, type, pixels, callerName,
+ true);
+}
+
+
void GLAPIENTRY
_mesa_TexSubImage1D_no_error(GLenum target, GLint level,
GLint xoffset, GLsizei width,
@@ -3581,6 +3595,18 @@ _mesa_TexSubImage3D( GLenum target, GLint level,
format, type, pixels, "glTexSubImage3D");
}
+
+void GLAPIENTRY
+_mesa_TextureSubImage1D_no_error(GLuint texture, GLint level, GLint xoffset,
+ GLsizei width, GLenum format, GLenum type,
+ const GLvoid *pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ texturesubimage_no_error(ctx, 1, texture, level, xoffset, 0, 0, width, 1, 1,
+ format, type, pixels, "glTextureSubImage1D");
+}
+
+
void GLAPIENTRY
_mesa_TextureSubImage1D(GLuint texture, GLint level,
GLint xoffset, GLsizei width,
@@ -3594,6 +3620,19 @@ _mesa_TextureSubImage1D(GLuint texture, GLint level,
void GLAPIENTRY
+_mesa_TextureSubImage2D_no_error(GLuint texture, GLint level, GLint xoffset,
+ GLint yoffset, GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ const GLvoid *pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ texturesubimage_no_error(ctx, 2, texture, level, xoffset, yoffset, 0, width,
+ height, 1, format, type, pixels,
+ "glTextureSubImage2D");
+}
+
+
+void GLAPIENTRY
_mesa_TextureSubImage2D(GLuint texture, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
@@ -3608,6 +3647,19 @@ _mesa_TextureSubImage2D(GLuint texture, GLint level,
void GLAPIENTRY
+_mesa_TextureSubImage3D_no_error(GLuint texture, GLint level, GLint xoffset,
+ GLint yoffset, GLint zoffset, GLsizei width,
+ GLsizei height, GLsizei depth, GLenum format,
+ GLenum type, const GLvoid *pixels)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ texturesubimage_no_error(ctx, 3, texture, level, xoffset, yoffset, zoffset,
+ width, height, depth, format, type, pixels,
+ "glTextureSubImage3D");
+}
+
+
+void GLAPIENTRY
_mesa_TextureSubImage3D(GLuint texture, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLsizei height, GLsizei depth,