diff options
author | Jan Vesely <[email protected]> | 2015-01-15 13:41:04 -0500 |
---|---|---|
committer | José Fonseca <[email protected]> | 2015-01-21 14:05:52 +0000 |
commit | 3cb10cce371cb62e0c4a988ab939bf640b75ebab (patch) | |
tree | 40453928615bb6ac1e4e2dfd3e0bdb3933692197 /src/mesa/main/fbobject.c | |
parent | da1f92779d0b65c4a57ea201cca6d370da63a011 (diff) |
mesa: Fix some signed-unsigned comparison warnings
v2: s/unsigned int/unsigned/ in prog_optimize.c
Signed-off-by: Jan Vesely <[email protected]>
Reviewed-by: David Heidelberg <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 80dc35394dd..7d91470ed95 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2347,7 +2347,7 @@ reuse_framebuffer_texture_attachment(struct gl_framebuffer *fb, static void framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, - GLint level, GLint zoffset, GLboolean layered) + GLint level, GLuint zoffset, GLboolean layered) { struct gl_renderbuffer_attachment *att; struct gl_texture_object *texObj = NULL; @@ -2441,8 +2441,8 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target, } if (texObj->Target == GL_TEXTURE_3D) { - const GLint maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1); - if (zoffset < 0 || zoffset >= maxSize) { + const GLuint maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1); + if (zoffset >= maxSize) { _mesa_error(ctx, GL_INVALID_VALUE, "glFramebufferTexture%s(zoffset)", caller); return; @@ -2452,8 +2452,7 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target, (texObj->Target == GL_TEXTURE_2D_ARRAY_EXT) || (texObj->Target == GL_TEXTURE_CUBE_MAP_ARRAY) || (texObj->Target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY)) { - if (zoffset < 0 || - zoffset >= (GLint) ctx->Const.MaxArrayTextureLayers) { + if (zoffset >= ctx->Const.MaxArrayTextureLayers) { _mesa_error(ctx, GL_INVALID_VALUE, "glFramebufferTexture%s(layer)", caller); return; |