summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-10-10 17:04:42 +0200
committerAlex Deucher <alexdeucher@gmail.com>2010-10-11 15:16:44 -0400
commit603741a86df0e43c0b52e8c202a35c7fe2fc1d9c (patch)
tree5727dc7661b01534ceeac198b62c89562ead7081 /src/mesa/drivers/dri/radeon
parentc6dbf253d284f68b0d0e4a3c145583880855324b (diff)
r200: revalidate after radeon_update_renderbuffers
By calling radeon_draw_buffers (which sets the necessary flags in radeon->NewGLState) and revalidating if NewGLState is non-zero in r200TclPrimitive. This fixes an assert in libdrm (the color-/ depthbuffer was changed but not yet validated) and and stops the kernel cs checker from complaining about them (when they're too small). Thanks to Mario Kleiner for the hint to call radeon_draw_buffer (instead of my half-broken hack). v2: Also fix the swtcl r200 path. Cc: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index 85e4988c53..8804b9ce0f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -521,6 +521,7 @@ void radeon_prepare_render(radeonContextPtr radeon)
__DRIcontext *driContext = radeon->dri.context;
__DRIdrawable *drawable;
__DRIscreen *screen;
+ struct radeon_framebuffer *draw;
screen = driContext->driScreenPriv;
if (!screen->dri2.loader)
@@ -531,9 +532,10 @@ void radeon_prepare_render(radeonContextPtr radeon)
if (drawable->lastStamp != drawable->dri2.stamp)
radeon_update_renderbuffers(driContext, drawable, GL_FALSE);
- /* Intel driver does the equivalent of this, no clue if it is needed:
- * radeon_draw_buffer(radeon->glCtx, &(drawable->driverPrivate)->base);
- */
+ /* Intel driver does the equivalent of this, no clue if it is needed:*/
+ draw = drawable->driverPrivate;
+ radeon_draw_buffer(radeon->glCtx, &draw->base);
+
driContext->dri2.draw_stamp = drawable->dri2.stamp;
}