summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_clear.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-03-13 14:57:19 -0600
committerBrian <brian.paul@tungstengraphics.com>2008-03-13 15:08:18 -0600
commit69c39b9ae28764194a6d310d58aa36b7ac596aa9 (patch)
treec5bfa6e40116c5f30cdedf224f962995185c352c /src/gallium/drivers/softpipe/sp_clear.c
parenta889928d85ac8ba7e1a7fe15393858a9422cf750 (diff)
gallium: set surface status to CLEAR or DEFINED in clearing/drawing code.
Otherwise, we were never setting these flags. This confused the state tracker. Fixes progs/demos/texenv.c, probably others.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_clear.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_clear.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c
index 8d295a30ca..39aed151c7 100644
--- a/src/gallium/drivers/softpipe/sp_clear.c
+++ b/src/gallium/drivers/softpipe/sp_clear.c
@@ -55,6 +55,7 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps,
if (ps == sp_tile_cache_get_surface(softpipe->zsbuf_cache)) {
sp_tile_cache_clear(softpipe->zsbuf_cache, clearValue);
+ softpipe->framebuffer.zsbuf->status = PIPE_SURFACE_STATUS_CLEAR;
#if TILE_CLEAR_OPTIMIZATION
return;
#endif
@@ -63,6 +64,7 @@ softpipe_clear(struct pipe_context *pipe, struct pipe_surface *ps,
for (i = 0; i < softpipe->framebuffer.num_cbufs; i++) {
if (ps == sp_tile_cache_get_surface(softpipe->cbuf_cache[i])) {
sp_tile_cache_clear(softpipe->cbuf_cache[i], clearValue);
+ softpipe->framebuffer.cbufs[i]->status = PIPE_SURFACE_STATUS_CLEAR;
}
}