remove intel->pipe field
authorBrian <brian.paul@tungstengraphics.com>
Fri, 2 Nov 2007 18:44:42 +0000 (12:44 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Mon, 5 Nov 2007 15:04:47 +0000 (08:04 -0700)
src/mesa/drivers/dri/intel_winsys/intel_context.c
src/mesa/drivers/dri/intel_winsys/intel_context.h
src/mesa/drivers/dri/intel_winsys/intel_screen.c

index 0d33ee2..5433ae4 100644 (file)
@@ -175,6 +175,7 @@ intelCreateContext(const __GLcontextModes * mesaVis,
    drmI830Sarea *saPriv = intelScreen->sarea;
    int fthrottle_mode;
    GLboolean havePools;
+   struct pipe_context *pipe;
 
 #if 0
    intelInitDriverFunctions(&functions);
@@ -245,7 +246,7 @@ intelCreateContext(const __GLcontextModes * mesaVis,
     * Pipe-related setup
     */
    if (!getenv("INTEL_HW")) {
-      intel->pipe = intel_create_softpipe( intel );
+      pipe = intel_create_softpipe( intel );
    }
    else {
       switch (intel->intelScreen->deviceID) {
@@ -257,21 +258,21 @@ intelCreateContext(const __GLcontextModes * mesaVis,
       case PCI_CHIP_Q35_G:
       case PCI_CHIP_I915_G:
       case PCI_CHIP_I915_GM:
-        intel->pipe = intel_create_i915simple( intel );
+        pipe = intel_create_i915simple( intel );
         break;
       default:
         _mesa_printf("Unknown PCIID %x in %s, using software driver\n", 
                      intel->intelScreen->deviceID, __FUNCTION__);
 
-        intel->pipe = intel_create_softpipe( intel );
+        pipe = intel_create_softpipe( intel );
         break;
       }
    }
 
 #if 0
-   st_create_context( &intel->ctx, intel->pipe ); 
+   st_create_context( &intel->ctx, pipe ); 
 #else
-   intel->st = st_create_context2(intel->pipe,  mesaVis, NULL);
+   intel->st = st_create_context2(pipe,  mesaVis, NULL);
    intel->st->ctx->DriverCtx = intel;
 #endif
 
index 788d444..78d5491 100644 (file)
@@ -50,8 +50,6 @@ struct intel_context
 {
    struct st_context *st;
 
-   struct pipe_context *pipe;  /**< a softpipe or i915simple context */
-
    GLint refcount;
 
    struct _DriFenceObject *last_swap_fence;
index 5dd4f94..16e3a22 100644 (file)
@@ -383,7 +383,7 @@ intelSetTexOffset(__DRIcontext *pDRICtx, GLint texname,
       return;
 
    if (stObj->mt)
-      st_miptree_release(intel->pipe, &stObj->mt);
+      st_miptree_release(intel->st->pipe, &stObj->mt);
 
    stObj->imageOverride = GL_TRUE;
    stObj->depthOverride = depth;