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..46b75d6 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -500,9 +500,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);
 
@@ -667,6 +664,9 @@ r200MakeCurrent( __DRIcontextPrivate *driContextPriv,
       if (R200_DEBUG & DEBUG_DRI)
 	 fprintf(stderr, "%s ctx %p\n", __FUNCTION__, (void *)newCtx->glCtx);
 
+      dPriv->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