summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/softpipe/sp_clear.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_prim_setup.c11
2 files changed, 13 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;
}
}
diff --git a/src/gallium/drivers/softpipe/sp_prim_setup.c b/src/gallium/drivers/softpipe/sp_prim_setup.c
index 2feee5c485..7aa9cf8e85 100644
--- a/src/gallium/drivers/softpipe/sp_prim_setup.c
+++ b/src/gallium/drivers/softpipe/sp_prim_setup.c
@@ -1164,11 +1164,22 @@ static void setup_begin( struct draw_stage *stage )
struct setup_stage *setup = setup_stage(stage);
struct softpipe_context *sp = setup->softpipe;
const struct sp_fragment_shader *fs = setup->softpipe->fs;
+ uint i;
if (sp->dirty) {
softpipe_update_derived(sp);
}
+ /* Mark surfaces as defined now */
+ for (i = 0; i < sp->framebuffer.num_cbufs; i++){
+ if (sp->framebuffer.cbufs[i]) {
+ sp->framebuffer.cbufs[i]->status = PIPE_SURFACE_STATUS_DEFINED;
+ }
+ }
+ if (sp->framebuffer.zsbuf) {
+ sp->framebuffer.zsbuf->status = PIPE_SURFACE_STATUS_DEFINED;
+ }
+
setup->quad.nr_attrs = fs->info.num_inputs;
sp->quad.first->begin(sp->quad.first);