From: Roland Scheidegger Date: Fri, 27 Nov 2009 16:15:47 +0000 (+0100) Subject: Merge branch 'width0' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c95cbd45c657ac47e908a4d99d118737034bde43;p=mesa.git Merge branch 'width0' Conflicts: src/gallium/drivers/r300/r300_texture.c src/gallium/state_trackers/xorg/xorg_exa.c src/mesa/state_tracker/st_cb_texture.c --- c95cbd45c657ac47e908a4d99d118737034bde43 diff --cc src/gallium/drivers/r300/r300_texture.c index d13aa8f036b,f4d148cdc5a..093a21ebe24 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@@ -43,7 -43,8 +43,7 @@@ static void r300_setup_texture_state(st state->format2 = (tex->pitch[0] - 1) & 0x1fff; } else { /* power of two textures (3D, mipmaps, and no pitch) */ - state->format0 |= R300_TX_DEPTH(util_logbase2(pt->depth[0]) & 0xf); - state->format0 |= R300_TX_DEPTH(util_logbase2(pt->depth0) & 0xf) | - R300_TX_NUM_LEVELS(pt->last_level & 0xf); ++ state->format0 |= R300_TX_DEPTH(util_logbase2(pt->depth0) & 0xf); } state->format1 = r300_translate_texformat(pt->format); diff --cc src/gallium/state_trackers/xorg/xorg_exa.c index 3d83b5700d5,534d4da13f7..a68a626fa48 --- a/src/gallium/state_trackers/xorg/xorg_exa.c +++ b/src/gallium/state_trackers/xorg/xorg_exa.c @@@ -750,11 -751,10 +750,11 @@@ ExaModifyPixmapHeader(PixmapPtr pPixmap bitsPerPixel, devKind, NULL); /* Deal with screen resize */ - if (!priv->tex || - (priv->tex->width0 != width || - priv->tex->height0 != height || - priv->tex_flags != priv->flags)) { + if ((exa->accel || priv->flags) && + (!priv->tex || - (priv->tex->width[0] != width || - priv->tex->height[0] != height || ++ (priv->tex->width0 != width || ++ priv->tex->height0 != height || + priv->tex_flags != priv->flags))) { struct pipe_texture *texture = NULL; struct pipe_texture template; diff --cc src/mesa/state_tracker/st_cb_texture.c index d4630a514f8,72892b7c8c2..3a2337802fa --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@@ -1761,10 -1813,11 +1761,10 @@@ st_finalize_texture(GLcontext *ctx if (stObj->pt->target != gl_target_to_pipe(stObj->base.Target) || stObj->pt->format != fmt || stObj->pt->last_level < stObj->lastLevel || - stObj->pt->width[0] != firstImage->base.Width2 || - stObj->pt->height[0] != firstImage->base.Height2 || - stObj->pt->depth[0] != firstImage->base.Depth2 || + stObj->pt->width0 != firstImage->base.Width2 || + stObj->pt->height0 != firstImage->base.Height2 || + stObj->pt->depth0 != firstImage->base.Depth2 || - /* Nominal bytes per pixel: */ - stObj->pt->block.size / stObj->pt->block.width != cpp) + stObj->pt->block.size != blockSize) { pipe_texture_reference(&stObj->pt, NULL); ctx->st->dirty.st |= ST_NEW_FRAMEBUFFER;