aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-04-25 15:05:41 +0100
committerJosé Fonseca <[email protected]>2010-04-25 15:54:32 +0100
commit89f244931f444056a1ccf544e608b533fa993fa2 (patch)
tree5e142f5ec4ceda8747992e8e76511094cab08522
parent23df86d851dd6cbce1ddd7a45424c7bf14c04a3e (diff)
softpipe: Hardcode TILE_CLEAR_OPTIMIZATION to 1.
The un-optimized path relies on surface_fill which can only handle formats with depth <= 32, so it is pointless to keep it around.
-rw-r--r--src/gallium/drivers/softpipe/sp_clear.c10
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.c9
-rw-r--r--src/gallium/drivers/softpipe/sp_tile_cache.h2
3 files changed, 1 insertions, 20 deletions
diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c
index 5f130453c39..ae3f00f3387 100644
--- a/src/gallium/drivers/softpipe/sp_clear.c
+++ b/src/gallium/drivers/softpipe/sp_clear.c
@@ -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;
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index d996c2a3427..4e5a13ba051 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -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;
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.h b/src/gallium/drivers/softpipe/sp_tile_cache.h
index 753d8c0daac..e03d53eb24e 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.h
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.h
@@ -28,8 +28,6 @@
#ifndef SP_TILE_CACHE_H
#define SP_TILE_CACHE_H
-#define TILE_CLEAR_OPTIMIZATION 1
-
#include "pipe/p_compiler.h"