summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner@tuebingen.mpg.de>2010-11-08 04:09:33 +0100
committerAlex Deucher <alexdeucher@gmail.com>2010-11-08 13:53:23 -0500
commitd8eef5196fcd6f51e443d4dfa0fda8aadc668f9f (patch)
tree2ee36e830c0cc04d0b742a65e063d39d6f2bdd17 /src/mesa/drivers/dri/r300
parent46c19700676e17bfaa0a88346d512449fbeede79 (diff)
mesa/r300classic: Fix dri2Invalidate/radeon_prepare_render for page flipping.
A call to radeon_prepare_render() at the beginning of draw operations was placed too deep in the call chain, inside r300RunRenderPrimitive(), instead of r300DrawPrims() where it belongs. This leads to emission of stale target color renderbuffer into the cs if bufferswaps via page-flipping are used, and thereby causes massive rendering corruption due to unsynchronized rendering into the active frontbuffer. This patch fixes such problems for use with the upcoming radeon page-flipping patches. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_draw.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c
index 81769e1ee5..0c4d8537c6 100644
--- a/src/mesa/drivers/dri/r300/r300_draw.c
+++ b/src/mesa/drivers/dri/r300/r300_draw.c
@@ -717,6 +717,10 @@ static void r300DrawPrims(struct gl_context *ctx,
GLuint max_index)
{
GLboolean retval;
+ struct r300_context *r300 = R300_CONTEXT(ctx);
+ radeonContextPtr radeon = &r300->radeon;
+
+ radeon_prepare_render(radeon);
/* This check should get folded into just the places that
* min/max index are really needed.
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 821318e7a5..44090ec289 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -327,8 +327,6 @@ void r300RunRenderPrimitive(struct gl_context * ctx, int start, int end, int pri
BATCH_LOCALS(&rmesa->radeon);
int type, num_verts;
- radeon_prepare_render(&rmesa->radeon);
-
type = r300PrimitiveType(rmesa, prim);
num_verts = r300NumVerts(rmesa, end - start, prim);