From: Keith Whitwell Date: Tue, 6 May 2008 06:45:28 +0000 (+0100) Subject: Merge commit 'origin/gallium-0.1' into gallium-tex-surfaces X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09e6be9b5782870f1f225653687e0d3e7be2a5a9;p=mesa.git Merge commit 'origin/gallium-0.1' into gallium-tex-surfaces Conflicts: src/mesa/state_tracker/st_atom_sampler.c src/mesa/state_tracker/st_cb_texture.c --- 09e6be9b5782870f1f225653687e0d3e7be2a5a9 diff --cc src/mesa/state_tracker/st_cb_texture.c index 21c0141ac3c,02ef961e4d3..c877e4382d8 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@@ -1479,24 -1471,25 +1470,23 @@@ st_finalize_texture(GLcontext *ctx cpp = firstImage->base.TexFormat->TexelBytes; } - /* Check texture can hold all active levels. Check texture matches - * target, imageFormat, etc. + /* If we already have a gallium texture, check that it matches the texture + * object's format, target, size, num_levels, etc. */ - if (stObj->pt) { - const enum pipe_format fmt = - st_mesa_format_to_pipe_format(firstImage->base.TexFormat->MesaFormat); - 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->cpp != cpp || - stObj->pt->compressed != firstImage->base.IsCompressed) { - pipe_texture_release(&stObj->pt); - } + if (stObj->pt && + (stObj->pt->target != gl_target_to_pipe(stObj->base.Target) || + stObj->pt->format != + st_mesa_format_to_pipe_format(firstImage->base.TexFormat->MesaFormat) || + stObj->pt->last_level < stObj->lastLevel || + stObj->pt->cpp != cpp || + stObj->pt->width[0] != firstImage->base.Width2 || + stObj->pt->height[0] != firstImage->base.Height2 || + stObj->pt->depth[0] != firstImage->base.Depth2 || + stObj->pt->compressed != firstImage->base.IsCompressed)) { + pipe_texture_release(&stObj->pt); } - - /* May need to create a new texture: + /* May need to create a new gallium texture: */ if (!stObj->pt) { stObj->pt = st_texture_create(ctx->st,