From 988db641195819c948249a1bb2d59f13577a482f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 10 Sep 2009 14:11:36 -0600 Subject: softpipe: set dirty_render_cache in softpipe_clear() This fixes a bug seen when doing a glDrawPixels(GL_STENCIL_INDEX) right after a glClear(). The check-for-flush test was failing because we didn't set the dirty_render_cache flag in softpipe_clear(). So we saw stale data when we mapped the stencil buffer. --- src/gallium/drivers/softpipe/sp_clear.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c index fa59277438..bc8f919695 100644 --- a/src/gallium/drivers/softpipe/sp_clear.c +++ b/src/gallium/drivers/softpipe/sp_clear.c @@ -86,4 +86,6 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba, pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, cv); #endif } + + softpipe->dirty_render_cache = TRUE; } -- cgit v1.2.3 From 3f4d776199562f94edb99045e0dad3e26dfddac0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 10 Sep 2009 14:14:18 -0600 Subject: softpipe: minor indentation fix --- src/gallium/drivers/softpipe/sp_clear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c index bc8f919695..d3af18e162 100644 --- a/src/gallium/drivers/softpipe/sp_clear.c +++ b/src/gallium/drivers/softpipe/sp_clear.c @@ -85,7 +85,7 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba, /* non-cached surface */ pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, cv); #endif - } + } softpipe->dirty_render_cache = TRUE; } -- cgit v1.2.3