On Oct 8, 2010, at 10:35 PM, Daniel Vetter wrote:

This seems to mitigate a crash in glxgears when I resize the window
like crazy. libdrm complains that the depthbuffer is not validated
(frontbuffer rendering, so the frontbuffer doesn't change). Problem
not fully solved, though: After a while of constantly resizing the
window the kernel cs checker complains:

[drm:r100_cs_track_check] *ERROR* [drm] Buffer too small for z buffer (need 1302400 have 1257472) !
[drm:r100_cs_track_check] *ERROR* [drm] zbuffer (592 4 0 550)
[drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

So this is probably just a gross hack. Comments from people with
more clue than me higly welcome ;)


This is a pure hunch, but can you check if this helps:

Edit radeon_prepare_render() in radeon_common_context.c to uncomment the commented out statement...

radeon_draw_buffer(radeon->glCtx, &(drawable->driverPrivate)->base);

in this comment:

/* Intel driver does the equivalent of this, no clue if it is needed: * radeon_draw_buffer(radeon->glCtx, &(drawable- >driverPrivate)->base);
         */

I was the guy who wrote that patch and had no clue if it is needed. Maybe this bug provides an answer?

thanks,
-mario

Patch not tested on anything else than my rv270. Oh, and this is
on a Mac Mini G4 ppc machine.

Yours, Daniel

Signed-off-by: Daniel Vetter <[email protected]>
---
 src/mesa/drivers/dri/r200/r200_tcl.c               |    2 ++
 .../drivers/dri/radeon/radeon_common_context.c     |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/ drivers/dri/r200/r200_tcl.c
index 4ae0f30..b1fd9d1 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -265,6 +265,8 @@ void r200TclPrimitive( GLcontext *ctx,
    GLuint newprim = hw_prim | R200_VF_TCL_OUTPUT_VTX_ENABLE;

    radeon_prepare_render(&rmesa->radeon);
+   if (rmesa->radeon.NewGLState)
+      if (!r200ValidateState( ctx ))

    if (newprim != rmesa->tcl.hw_primitive ||
        !discrete_prim[hw_prim&0xf]) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/ src/mesa/drivers/dri/radeon/radeon_common_context.c
index 85e4988..e6cbfc2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -780,6 +780,8 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
                }
        }

+       radeon->NewGLState |= _NEW_BUFFERS;
+
        driUpdateFramebufferSize(radeon->glCtx, drawable);
 }

--
1.7.1

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

*********************************************************************
Mario Kleiner
Max Planck Institute for Biological Cybernetics
Spemannstr. 38
72076 Tuebingen
Germany

e-mail: [email protected]
office: +49 (0)7071/601-1623
fax:    +49 (0)7071/601-616
www:    http://www.kyb.tuebingen.mpg.de/~kleinerm
*********************************************************************
"For a successful technology, reality must take precedence
over public relations, for Nature cannot be fooled."
(Richard Feynman)

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to