GLenum format, GLenum type, GLsizei clientMemSize,
GLvoid *pixels, bool dsa)
{
- assert(texImage);
-
const GLint maxLevels = _mesa_max_texture_levels(ctx, target);
const GLuint dimensions = (target == GL_TEXTURE_3D) ? 3 : 2;
GLenum baseFormat;
const char *suffix = dsa ? "ture" : "";
+ assert(texImage);
assert(maxLevels != 0);
if (level < 0 || level >= maxLevels) {
_mesa_error(ctx, GL_INVALID_VALUE,
image_stride = _mesa_image_image_stride(&ctx->Pack, texImage->Width,
texImage->Height, format,
type);
- pixels += image_stride;
+ pixels = (GLubyte *) pixels + image_stride;
bufSize -= image_stride;
}
}
GLint level, GLsizei clientMemSize,
GLvoid *img, bool dsa)
{
- assert(texImage);
const GLint maxLevels = _mesa_max_texture_levels(ctx, target);
GLuint compressedSize, dimensions;
const char *suffix = dsa ? "ture" : "";
+ assert(texImage);
+
if (!legal_getteximage_target(ctx, target, dsa)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetCompressedTex%sImage(target=%s)", suffix,
texImage->Width,
texImage->Height, 1);
- pixels += image_stride;
+ pixels = (GLubyte *) pixels + image_stride;
bufSize -= image_stride;
}
}