softpipe: Hardcode TILE_CLEAR_OPTIMIZATION to 1.
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 25 Apr 2010 14:05:41 +0000 (15:05 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sun, 25 Apr 2010 14:54:32 +0000 (15:54 +0100)
The un-optimized path relies on surface_fill which can only handle formats
with depth <= 32, so it is pointless to keep it around.

src/gallium/drivers/softpipe/sp_clear.c
src/gallium/drivers/softpipe/sp_tile_cache.c
src/gallium/drivers/softpipe/sp_tile_cache.h

index 5f130453c3968da6d2dc106325bd06208fc22799..ae3f00f33874e5c5ab29c79836f53e9072d88389 100644 (file)
@@ -69,11 +69,6 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba,
 
          util_pack_color(rgba, ps->format, &uc);
          sp_tile_cache_clear(softpipe->cbuf_cache[i], rgba, uc.ui);
-
-#if !TILE_CLEAR_OPTIMIZATION
-         /* non-cached surface */
-         pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, uc.ui);
-#endif
       }
    }
 
@@ -83,11 +78,6 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba,
 
       cv = util_pack_z_stencil(ps->format, depth, stencil);
       sp_tile_cache_clear(softpipe->zsbuf_cache, zero, cv);
-
-#if !TILE_CLEAR_OPTIMIZATION
-      /* non-cached surface */
-      pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, cv);
-#endif
    }
 
    softpipe->dirty_render_cache = TRUE;
index d996c2a3427f65b2dcf4f7492ccb89046c8ed6fa..4e5a13ba0516e79d9c3be18913b88ec95aa7d149 100644 (file)
@@ -103,7 +103,7 @@ sp_create_tile_cache( struct pipe_context *pipe )
        * However, it breaks clearing in other situations (such as in
        * progs/tests/drawbuffers, see bug 24402).
        */
-#if 0 && TILE_CLEAR_OPTIMIZATION
+#if 0
       /* set flags to indicate all the tiles are cleared */
       memset(tc->clear_flags, 255, sizeof(tc->clear_flags));
 #endif
@@ -344,9 +344,7 @@ sp_flush_tile_cache(struct softpipe_tile_cache *tc)
          }
       }
 
-#if TILE_CLEAR_OPTIMIZATION
       sp_tile_cache_flush_clear(tc);
-#endif
    }
 
 #if 0
@@ -448,13 +446,8 @@ sp_tile_cache_clear(struct softpipe_tile_cache *tc, const float *rgba,
 
    tc->clear_val = clearValue;
 
-#if TILE_CLEAR_OPTIMIZATION
    /* set flags to indicate all the tiles are cleared */
    memset(tc->clear_flags, 255, sizeof(tc->clear_flags));
-#else
-   /* disable the optimization */
-   memset(tc->clear_flags, 0, sizeof(tc->clear_flags));
-#endif
 
    for (pos = 0; pos < NUM_ENTRIES; pos++) {
       struct softpipe_cached_tile *tile = tc->entries + pos;
index 753d8c0daac89fce8278d142df7b5d0ec9ad9327..e03d53eb24e51dd55d11350e351dfbcd15552cd8 100644 (file)
@@ -28,8 +28,6 @@
 #ifndef SP_TILE_CACHE_H
 #define SP_TILE_CACHE_H
 
-#define TILE_CLEAR_OPTIMIZATION 1
-
 
 #include "pipe/p_compiler.h"