summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/teximage.c101
1 files changed, 65 insertions, 36 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 8464b3491ae..1de40b04bf4 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -4928,6 +4928,31 @@ compressed_tex_sub_image(unsigned dim, GLenum target, GLuint texture,
}
}
+static void
+compressed_tex_sub_image_error(unsigned dim, GLenum target, GLuint texture,
+ GLint level, GLint xoffset, GLint yoffset,
+ GLint zoffset, GLsizei width, GLsizei height,
+ GLsizei depth, GLenum format, GLsizei imageSize,
+ const GLvoid *data, bool dsa,
+ const char *caller)
+{
+ compressed_tex_sub_image(dim, target, texture, level, xoffset, yoffset,
+ zoffset, width, height, depth, format, imageSize,
+ data, dsa, false, caller);
+}
+
+static void
+compressed_tex_sub_image_no_error(unsigned dim, GLenum target, GLuint texture,
+ GLint level, GLint xoffset, GLint yoffset,
+ GLint zoffset, GLsizei width, GLsizei height,
+ GLsizei depth, GLenum format, GLsizei imageSize,
+ const GLvoid *data, bool dsa,
+ const char *caller)
+{
+ compressed_tex_sub_image(dim, target, texture, level, xoffset, yoffset,
+ zoffset, width, height, depth, format, imageSize,
+ data, dsa, true, caller);
+}
void GLAPIENTRY
_mesa_CompressedTexSubImage1D_no_error(GLenum target, GLint level,
@@ -4935,9 +4960,9 @@ _mesa_CompressedTexSubImage1D_no_error(GLenum target, GLint level,
GLenum format, GLsizei imageSize,
const GLvoid *data)
{
- compressed_tex_sub_image(1, target, 0, level, xoffset, 0, 0, width,
- 1, 1, format, imageSize, data, false, true,
- "glCompressedTexSubImage1D");
+ compressed_tex_sub_image_no_error(1, target, 0, level, xoffset, 0, 0, width,
+ 1, 1, format, imageSize, data, false,
+ "glCompressedTexSubImage1D");
}
@@ -4946,9 +4971,9 @@ _mesa_CompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset,
GLsizei width, GLenum format,
GLsizei imageSize, const GLvoid *data)
{
- compressed_tex_sub_image(1, target, 0, level, xoffset, 0, 0, width, 1, 1,
- format, imageSize, data, false, false,
- "glCompressedTexSubImage1D");
+ compressed_tex_sub_image_error(1, target, 0, level, xoffset, 0, 0, width, 1,
+ 1, format, imageSize, data, false,
+ "glCompressedTexSubImage1D");
}
@@ -4958,9 +4983,9 @@ _mesa_CompressedTextureSubImage1D_no_error(GLuint texture, GLint level,
GLenum format, GLsizei imageSize,
const GLvoid *data)
{
- compressed_tex_sub_image(1, 0, texture, level, xoffset, 0, 0, width, 1, 1,
- format, imageSize, data, true, true,
- "glCompressedTextureSubImage1D");
+ compressed_tex_sub_image_no_error(1, 0, texture, level, xoffset, 0, 0, width,
+ 1, 1, format, imageSize, data, true,
+ "glCompressedTextureSubImage1D");
}
@@ -4969,9 +4994,9 @@ _mesa_CompressedTextureSubImage1D(GLuint texture, GLint level, GLint xoffset,
GLsizei width, GLenum format,
GLsizei imageSize, const GLvoid *data)
{
- compressed_tex_sub_image(1, 0, texture, level, xoffset, 0, 0, width, 1, 1,
- format, imageSize, data, true, false,
- "glCompressedTextureSubImage1D");
+ compressed_tex_sub_image_error(1, 0, texture, level, xoffset, 0, 0, width,
+ 1, 1, format, imageSize, data, true,
+ "glCompressedTextureSubImage1D");
}
void GLAPIENTRY
@@ -4981,9 +5006,9 @@ _mesa_CompressedTexSubImage2D_no_error(GLenum target, GLint level,
GLenum format, GLsizei imageSize,
const GLvoid *data)
{
- compressed_tex_sub_image(2, target, 0, level, xoffset, yoffset, 0, width,
- height, 1, format, imageSize, data, false, true,
- "glCompressedTexSubImage2D");
+ compressed_tex_sub_image_no_error(2, target, 0, level, xoffset, yoffset, 0,
+ width, height, 1, format, imageSize, data,
+ false, "glCompressedTexSubImage2D");
}
@@ -4993,9 +5018,9 @@ _mesa_CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset,
GLenum format, GLsizei imageSize,
const GLvoid *data)
{
- compressed_tex_sub_image(2, target, 0, level, xoffset, yoffset, 0, width,
- height, 1, format, imageSize, data, false, false,
- "glCompressedTexSubImage2D");
+ compressed_tex_sub_image_error(2, target, 0, level, xoffset, yoffset, 0,
+ width, height, 1, format, imageSize, data,
+ false, "glCompressedTexSubImage2D");
}
@@ -5006,9 +5031,9 @@ _mesa_CompressedTextureSubImage2D_no_error(GLuint texture, GLint level,
GLenum format, GLsizei imageSize,
const GLvoid *data)
{
- compressed_tex_sub_image(2, 0, texture, level, xoffset, yoffset, 0, width,
- height, 1, format, imageSize, data, true, true,
- "glCompressedTextureSubImage2D");
+ compressed_tex_sub_image_no_error(2, 0, texture, level, xoffset, yoffset, 0,
+ width, height, 1, format, imageSize, data,
+ true, "glCompressedTextureSubImage2D");
}
@@ -5019,9 +5044,9 @@ _mesa_CompressedTextureSubImage2D(GLuint texture, GLint level, GLint xoffset,
GLenum format, GLsizei imageSize,
const GLvoid *data)
{
- compressed_tex_sub_image(2, 0, texture, level, xoffset, yoffset, 0, width,
- height, 1, format, imageSize, data, true, false,
- "glCompressedTextureSubImage2D");
+ compressed_tex_sub_image_error(2, 0, texture, level, xoffset, yoffset, 0,
+ width, height, 1, format, imageSize, data,
+ true, "glCompressedTextureSubImage2D");
}
void GLAPIENTRY
@@ -5032,9 +5057,10 @@ _mesa_CompressedTexSubImage3D_no_error(GLenum target, GLint level,
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");
+ compressed_tex_sub_image_no_error(3, target, 0, level, xoffset, yoffset,
+ zoffset, width, height, depth, format,
+ imageSize, data, false,
+ "glCompressedTexSubImage3D");
}
void GLAPIENTRY
@@ -5043,9 +5069,10 @@ _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset,
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, false, "glCompressedTexSubImage3D");
+ compressed_tex_sub_image_error(3, target, 0, level, xoffset, yoffset,
+ zoffset, width, height, depth, format,
+ imageSize, data, false,
+ "glCompressedTexSubImage3D");
}
void GLAPIENTRY
@@ -5056,9 +5083,10 @@ _mesa_CompressedTextureSubImage3D_no_error(GLuint texture, GLint level,
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");
+ compressed_tex_sub_image_no_error(3, 0, texture, level, xoffset, yoffset,
+ zoffset, width, height, depth, format,
+ imageSize, data, true,
+ "glCompressedTextureSubImage3D");
}
void GLAPIENTRY
@@ -5068,9 +5096,10 @@ _mesa_CompressedTextureSubImage3D(GLuint texture, GLint level, GLint xoffset,
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, false, "glCompressedTextureSubImage3D");
+ compressed_tex_sub_image_error(3, 0, texture, level, xoffset, yoffset,
+ zoffset, width, height, depth, format,
+ imageSize, data, true,
+ "glCompressedTextureSubImage3D");
}
static mesa_format