mesa: Add missing format specifiers in error strings.

This commit is contained in:
Vinson Lee
2010-04-15 17:17:29 -07:00
parent 80d89aa0d2
commit 8978e45e50

View File

@@ -1358,7 +1358,7 @@ texture_error_check( GLcontext *ctx, GLenum target,
if (border != 0) { if (border != 0) {
if (!isProxy) { if (!isProxy) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION,
"glTexImage%D(border!=0)", dimensions); "glTexImage%dD(border!=0)", dimensions);
} }
return GL_TRUE; return GL_TRUE;
} }
@@ -1536,7 +1536,7 @@ subtexture_error_check2( GLcontext *ctx, GLuint dimensions,
if (!target_can_be_compressed(ctx, target)) { if (!target_can_be_compressed(ctx, target)) {
_mesa_error(ctx, GL_INVALID_ENUM, _mesa_error(ctx, GL_INVALID_ENUM,
"glTexSubImage%D(target=%s)", dimensions, "glTexSubImage%dD(target=%s)", dimensions,
_mesa_lookup_enum_by_nr(target)); _mesa_lookup_enum_by_nr(target));
return GL_TRUE; return GL_TRUE;
} }
@@ -1547,19 +1547,19 @@ subtexture_error_check2( GLcontext *ctx, GLuint dimensions,
/* offset must be multiple of block size */ /* offset must be multiple of block size */
if ((xoffset % bw != 0) || (yoffset % bh != 0)) { if ((xoffset % bw != 0) || (yoffset % bh != 0)) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION,
"glTexSubImage%D(xoffset = %d, yoffset = %d)", "glTexSubImage%dD(xoffset = %d, yoffset = %d)",
dimensions, xoffset, yoffset); dimensions, xoffset, yoffset);
return GL_TRUE; return GL_TRUE;
} }
/* size must be multiple of bw by bh or equal to whole texture size */ /* size must be multiple of bw by bh or equal to whole texture size */
if ((width % bw != 0) && (GLuint) width != destTex->Width) { if ((width % bw != 0) && (GLuint) width != destTex->Width) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION,
"glTexSubImage%D(width = %d)", dimensions, width); "glTexSubImage%dD(width = %d)", dimensions, width);
return GL_TRUE; return GL_TRUE;
} }
if ((height % bh != 0) && (GLuint) height != destTex->Height) { if ((height % bh != 0) && (GLuint) height != destTex->Height) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION,
"glTexSubImage%D(height = %d)", dimensions, height); "glTexSubImage%dD(height = %d)", dimensions, height);
return GL_TRUE; return GL_TRUE;
} }
} }
@@ -1723,7 +1723,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
} }
if (border != 0) { if (border != 0) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexImage%D(border!=0)", dimensions); "glCopyTexImage%dD(border!=0)", dimensions);
return GL_TRUE; return GL_TRUE;
} }
} }
@@ -1731,7 +1731,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
/* make sure we have depth/stencil buffers */ /* make sure we have depth/stencil buffers */
if (!ctx->ReadBuffer->_DepthBuffer) { if (!ctx->ReadBuffer->_DepthBuffer) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexImage%D(no depth)", dimensions); "glCopyTexImage%dD(no depth)", dimensions);
return GL_TRUE; return GL_TRUE;
} }
} }
@@ -1739,7 +1739,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
/* make sure we have depth/stencil buffers */ /* make sure we have depth/stencil buffers */
if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) { if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexImage%D(no depth/stencil buffer)", dimensions); "glCopyTexImage%dD(no depth/stencil buffer)", dimensions);
return GL_TRUE; return GL_TRUE;
} }
} }
@@ -1910,18 +1910,18 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
/* offset must be multiple of 4 */ /* offset must be multiple of 4 */
if ((xoffset & 3) || (yoffset & 3)) { if ((xoffset & 3) || (yoffset & 3)) {
_mesa_error(ctx, GL_INVALID_VALUE, _mesa_error(ctx, GL_INVALID_VALUE,
"glCopyTexSubImage%D(xoffset or yoffset)", dimensions); "glCopyTexSubImage%dD(xoffset or yoffset)", dimensions);
return GL_TRUE; return GL_TRUE;
} }
/* size must be multiple of 4 */ /* size must be multiple of 4 */
if ((width & 3) != 0 && (GLuint) width != teximage->Width) { if ((width & 3) != 0 && (GLuint) width != teximage->Width) {
_mesa_error(ctx, GL_INVALID_VALUE, _mesa_error(ctx, GL_INVALID_VALUE,
"glCopyTexSubImage%D(width)", dimensions); "glCopyTexSubImage%dD(width)", dimensions);
return GL_TRUE; return GL_TRUE;
} }
if ((height & 3) != 0 && (GLuint) height != teximage->Height) { if ((height & 3) != 0 && (GLuint) height != teximage->Height) {
_mesa_error(ctx, GL_INVALID_VALUE, _mesa_error(ctx, GL_INVALID_VALUE,
"glCopyTexSubImage%D(height)", dimensions); "glCopyTexSubImage%dD(height)", dimensions);
return GL_TRUE; return GL_TRUE;
} }
} }
@@ -1941,7 +1941,7 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
if (teximage->_BaseFormat == GL_DEPTH_COMPONENT) { if (teximage->_BaseFormat == GL_DEPTH_COMPONENT) {
if (!ctx->ReadBuffer->_DepthBuffer) { if (!ctx->ReadBuffer->_DepthBuffer) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexSubImage%D(no depth buffer)", "glCopyTexSubImage%dD(no depth buffer)",
dimensions); dimensions);
return GL_TRUE; return GL_TRUE;
} }
@@ -1949,7 +1949,7 @@ copytexsubimage_error_check2( GLcontext *ctx, GLuint dimensions,
else if (teximage->_BaseFormat == GL_DEPTH_STENCIL_EXT) { else if (teximage->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) { if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) {
_mesa_error(ctx, GL_INVALID_OPERATION, _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexSubImage%D(no depth/stencil buffer)", "glCopyTexSubImage%dD(no depth/stencil buffer)",
dimensions); dimensions);
return GL_TRUE; return GL_TRUE;
} }