Merge commit 'origin/gallium-0.1' into gallium-tex-surfaces
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 6 May 2008 06:45:28 +0000 (07:45 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 6 May 2008 06:45:28 +0000 (07:45 +0100)
Conflicts:

src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_cb_texture.c

1  2 
src/gallium/auxiliary/util/u_gen_mipmap.c
src/gallium/drivers/softpipe/sp_tile_cache.c
src/gallium/include/pipe/p_defines.h
src/gallium/winsys/xlib/xm_winsys.c
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_texture.h

Simple merge
Simple merge
index 21c0141ac3c1f6b35c50c2a5974871f04b6c7cf4,02ef961e4d3bbe345e6e3492754de49608d60ec4..c877e4382d865d0f550834a285fe3c07209a1e6a
@@@ -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,
Simple merge