st: Silence compiler warnings.
authorMichal Krol <michal@vmware.com>
Sat, 21 Mar 2009 10:46:54 +0000 (11:46 +0100)
committerMichal Krol <michal@vmware.com>
Sat, 21 Mar 2009 10:46:54 +0000 (11:46 +0100)
src/mesa/state_tracker/st_cb_texture.c

index edfa885..311d812 100644 (file)
@@ -467,7 +467,7 @@ st_TexImage(GLcontext * ctx,
     */
    if (stObj->pt) {
       if (stObj->teximage_realloc ||
-          level > stObj->pt->last_level ||
+          level > (GLint) stObj->pt->last_level ||
           (stObj->pt->last_level == level &&
            stObj->pt->target != PIPE_TEXTURE_CUBE &&
            !st_texture_match_image(stObj->pt, &stImage->base,
@@ -803,7 +803,6 @@ st_TexSubimage(GLcontext * ctx,
                                             PIPE_TRANSFER_WRITE,
                                             xoffset, yoffset,
                                             width, height);
-      dstRowStride = stImage->transfer->stride;
    }
 
    if (!texImage->Data) {
@@ -812,6 +811,7 @@ st_TexSubimage(GLcontext * ctx,
    }
 
    src = (const GLubyte *) pixels;
+   dstRowStride = stImage->transfer->stride;
 
    for (i = 0; i++ < depth;) {
       if (!texImage->TexFormat->StoreImage(ctx, dims, texImage->_BaseFormat,