Arg, aside from the fact that it won't compile...  here's another try.

Jesse

On Monday, October 29, 2007 3:13 pm Jesse Barnes wrote:
> Yuck.  I thought I had traced that function to make sure dPriv would
> exist at that point, but I guess not.
>
> We still need to initialize those fields correctly though... Can any
> radeon hackers tell me if this one is more correct?
>
> Thanks,
> Jesse
>
> On Monday, October 29, 2007 2:17 pm Chris Rankin wrote:
> > Hi,
> >
> > A NULL pointer is killing OpenGL for my Radeon 9200; here's a quick
> > fix.
> >
> > Cheers,
> > Chris
> >
> > diff --git a/src/mesa/drivers/dri/r200/r200_context.c
> > b/src/mesa/drivers/dri/r200/r200_context.c index 2b18889..6d2392d
> > 100644
> > --- a/src/mesa/drivers/dri/r200/r200_context.c
> > +++ b/src/mesa/drivers/dri/r200/r200_context.c
> > @@ -500,8 +500,9 @@ GLboolean r200CreateContext( const
> > __GLcontextModes *glVisual, fthrottle_mode,
> >               rmesa->r200Screen->irq);
> >
> > -   dPriv->vblFlags = (rmesa->r200Screen->irq != 0)
> > -       ? driGetDefaultVBlankFlags(&rmesa->optionCache) :
> > VBLANK_FLAG_NO_IRQ; +   if (dPriv != NULL)
> > +       dPriv->vblFlags = (rmesa->r200Screen->irq != 0)
> > +           ? driGetDefaultVBlankFlags(&rmesa->optionCache) :
> > VBLANK_FLAG_NO_IRQ;
> >
> >     rmesa->prefer_gart_client_texturing =
> >        (getenv("R200_GART_CLIENT_TEXTURES") != 0);
> >
> >
> >
> >       ___________________________________________________________
> > Want ideas for reducing your carbon footprint? Visit Yahoo! For
> > Good http://uk.promotions.yahoo.com/forgood/environment.html


diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 2b18889..c1bc02d 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -248,7 +248,6 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
 			     void *sharedContextPrivate)
 {
    __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
-   __DRIdrawablePrivate *dPriv = driContextPriv->driDrawablePriv;
    radeonScreenPtr screen = (radeonScreenPtr)(sPriv->private);
    struct dd_function_table functions;
    r200ContextPtr rmesa;
@@ -500,9 +499,6 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
 	      fthrottle_mode,
 	      rmesa->r200Screen->irq);
 
-   dPriv->vblFlags = (rmesa->r200Screen->irq != 0)
-       ? driGetDefaultVBlankFlags(&rmesa->optionCache) : VBLANK_FLAG_NO_IRQ;
-
    rmesa->prefer_gart_client_texturing = 
       (getenv("R200_GART_CLIENT_TEXTURES") != 0);
 
@@ -661,12 +657,16 @@ r200MakeCurrent( __DRIcontextPrivate *driContextPriv,
                    __DRIdrawablePrivate *driReadPriv )
 {
    if ( driContextPriv ) {
+      r200ContextPtr rmesa = driDrawPriv->driContextPriv->driverPrivate;
       r200ContextPtr newCtx = 
 	 (r200ContextPtr) driContextPriv->driverPrivate;
 
       if (R200_DEBUG & DEBUG_DRI)
 	 fprintf(stderr, "%s ctx %p\n", __FUNCTION__, (void *)newCtx->glCtx);
 
+      driDrawPriv->vblFlags = (rmesa->r200Screen->irq != 0)
+	  ? driGetDefaultVBlankFlags(&rmesa->optionCache) : VBLANK_FLAG_NO_IRQ;
+
       if ( newCtx->dri.drawable != driDrawPriv ) {
 	  driDrawableInitVBlank( driDrawPriv );
       }
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to