mesa: whitespace, formatting fixes in teximage.c
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
33c55e8a9d
commit
832990c0ce
|
@ -2444,7 +2444,8 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
|
|||
_mesa_is_enum_format_unsigned_int(internalFormat) !=
|
||||
_mesa_is_enum_format_unsigned_int(rb_internal_format)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCopyTexImage%dD(signed vs unsigned integer)", dimensions);
|
||||
"glCopyTexImage%dD(signed vs unsigned integer)",
|
||||
dimensions);
|
||||
return GL_TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -3071,6 +3072,7 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* This is a wrapper around teximage() so that we can force the KHR_no_error
|
||||
* logic to be inlined without inlining the function into all the callers.
|
||||
*/
|
||||
|
@ -3694,6 +3696,7 @@ get_copy_tex_image_source(struct gl_context *ctx, mesa_format texFormat)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
copytexsubimage_by_slice(struct gl_context *ctx,
|
||||
struct gl_texture_image *texImage,
|
||||
|
@ -3724,6 +3727,7 @@ copytexsubimage_by_slice(struct gl_context *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static GLboolean
|
||||
formats_differ_in_component_sizes(mesa_format f1, mesa_format f2)
|
||||
{
|
||||
|
@ -4041,6 +4045,7 @@ copyteximage_err(struct gl_context *ctx, GLuint dims, GLenum target,
|
|||
border, false);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
copyteximage_no_error(struct gl_context *ctx, GLuint dims, GLenum target,
|
||||
GLint level, GLenum internalFormat, GLint x, GLint y,
|
||||
|
@ -4063,7 +4068,6 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
|
|||
}
|
||||
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
|
||||
GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
|
@ -4121,6 +4125,7 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
|
|||
x, y, width, 1, self);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTexSubImage2D(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
|
@ -4148,7 +4153,6 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
|
|||
}
|
||||
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTexSubImage3D(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
|
@ -4175,6 +4179,7 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
|
|||
zoffset, x, y, width, height, self);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTextureSubImage1D(GLuint texture, GLint level,
|
||||
GLint xoffset, GLint x, GLint y, GLsizei width)
|
||||
|
@ -4198,6 +4203,7 @@ _mesa_CopyTextureSubImage1D(GLuint texture, GLint level,
|
|||
0, x, y, width, 1, self);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTextureSubImage2D(GLuint texture, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
|
@ -4223,7 +4229,6 @@ _mesa_CopyTextureSubImage2D(GLuint texture, GLint level,
|
|||
}
|
||||
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTextureSubImage3D(GLuint texture, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
|
@ -4268,6 +4273,7 @@ _mesa_CopyTexSubImage1D_no_error(GLenum target, GLint level, GLint xoffset,
|
|||
x, y, width, 1);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTexSubImage2D_no_error(GLenum target, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint x, GLint y, GLsizei width,
|
||||
|
@ -4280,6 +4286,7 @@ _mesa_CopyTexSubImage2D_no_error(GLenum target, GLint level, GLint xoffset,
|
|||
yoffset, 0, x, y, width, height);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTexSubImage3D_no_error(GLenum target, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint zoffset, GLint x, GLint y,
|
||||
|
@ -4292,6 +4299,7 @@ _mesa_CopyTexSubImage3D_no_error(GLenum target, GLint level, GLint xoffset,
|
|||
yoffset, zoffset, x, y, width, height);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTextureSubImage1D_no_error(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint x, GLint y, GLsizei width)
|
||||
|
@ -4303,6 +4311,7 @@ _mesa_CopyTextureSubImage1D_no_error(GLuint texture, GLint level, GLint xoffset,
|
|||
xoffset, 0, 0, x, y, width, 1);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTextureSubImage2D_no_error(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint x, GLint y,
|
||||
|
@ -4315,6 +4324,7 @@ _mesa_CopyTextureSubImage2D_no_error(GLuint texture, GLint level, GLint xoffset,
|
|||
xoffset, yoffset, 0, x, y, width, height);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_CopyTextureSubImage3D_no_error(GLuint texture, GLint level, GLint xoffset,
|
||||
GLint yoffset, GLint zoffset, GLint x,
|
||||
|
@ -4410,6 +4420,7 @@ check_clear_tex_image(struct gl_context *ctx,
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
static struct gl_texture_object *
|
||||
get_tex_obj_for_clear(struct gl_context *ctx,
|
||||
const char *function,
|
||||
|
@ -4473,6 +4484,7 @@ get_tex_images_for_clear(struct gl_context *ctx,
|
|||
return numFaces;
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_ClearTexSubImage(GLuint texture, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
|
@ -4522,8 +4534,7 @@ _mesa_ClearTexSubImage( GLuint texture, GLint level,
|
|||
}
|
||||
|
||||
if (numImages == 1) {
|
||||
if (check_clear_tex_image(ctx, "glClearTexSubImage",
|
||||
texImages[0],
|
||||
if (check_clear_tex_image(ctx, "glClearTexSubImage", texImages[0],
|
||||
format, type, data, clearValue[0])) {
|
||||
ctx->Driver.ClearTexSubImage(ctx,
|
||||
texImages[0],
|
||||
|
@ -4535,8 +4546,7 @@ _mesa_ClearTexSubImage( GLuint texture, GLint level,
|
|||
/* loop over cube face images */
|
||||
for (i = zoffset; i < zoffset + depth; i++) {
|
||||
assert(i < MAX_FACES);
|
||||
if (!check_clear_tex_image(ctx, "glClearTexSubImage",
|
||||
texImages[i],
|
||||
if (!check_clear_tex_image(ctx, "glClearTexSubImage", texImages[i],
|
||||
format, type, data, clearValue[i]))
|
||||
goto out;
|
||||
}
|
||||
|
@ -4553,6 +4563,7 @@ _mesa_ClearTexSubImage( GLuint texture, GLint level,
|
|||
_mesa_unlock_texture(ctx, texObj);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_ClearTexImage( GLuint texture, GLint level,
|
||||
GLenum format, GLenum type, const void *data )
|
||||
|
@ -4574,10 +4585,8 @@ _mesa_ClearTexImage( GLuint texture, GLint level,
|
|||
texObj, level, texImages);
|
||||
|
||||
for (i = 0; i < numImages; i++) {
|
||||
if (!check_clear_tex_image(ctx, "glClearTexImage",
|
||||
texImages[i],
|
||||
format, type, data,
|
||||
clearValue[i]))
|
||||
if (!check_clear_tex_image(ctx, "glClearTexImage", texImages[i], format,
|
||||
type, data, clearValue[i]))
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -4733,15 +4742,12 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims,
|
|||
|
||||
/* this will catch any invalid compressed format token */
|
||||
if (!_mesa_is_compressed_format(ctx, format)) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM,
|
||||
"%s(format)", callerName);
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "%s(format)", callerName);
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
if (level < 0 || level >= _mesa_max_texture_levels(ctx, target)) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"%s(level=%d)",
|
||||
callerName, level);
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "%s(level=%d)", callerName, level);
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
@ -4759,9 +4765,7 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims,
|
|||
|
||||
expectedSize = compressed_tex_size(width, height, depth, format);
|
||||
if (expectedSize != imageSize) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"%s(size=%d)",
|
||||
callerName, imageSize);
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "%s(size=%d)", callerName, imageSize);
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
@ -4773,28 +4777,24 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims,
|
|||
}
|
||||
|
||||
if ((GLint) format != texImage->InternalFormat) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(format=%s)",
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(format=%s)",
|
||||
callerName, _mesa_enum_to_string(format));
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
if (compressedteximage_only_format(ctx, format)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"%s(format=%s cannot be updated)",
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(format=%s cannot be updated)",
|
||||
callerName, _mesa_enum_to_string(format));
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
if (error_check_subtexture_negative_dimensions(ctx, dims,
|
||||
width, height, depth,
|
||||
callerName)) {
|
||||
if (error_check_subtexture_negative_dimensions(ctx, dims, width, height,
|
||||
depth, callerName)) {
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
if (error_check_subtexture_dimensions(ctx, dims,
|
||||
texImage, xoffset, yoffset, zoffset,
|
||||
width, height, depth,
|
||||
if (error_check_subtexture_dimensions(ctx, dims, texImage, xoffset, yoffset,
|
||||
zoffset, width, height, depth,
|
||||
callerName)) {
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue