radeon: emit scissor when using cs path
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_context.c
index ac945ecc4d37d0ab5b7c130c32f944faa847ed40..2600c78df3992a5bc5067b944ed1e476ba4c9a28 100644 (file)
@@ -188,6 +188,11 @@ static void r100_vtbl_pre_emit_state(radeonContextPtr radeon)
    radeon->hw.is_dirty = 1;
 }
 
+static void r100_vtbl_free_context(GLcontext *ctx)
+{
+   r100ContextPtr rmesa = R100_CONTEXT(ctx);
+   _mesa_vector4f_free( &rmesa->tcl.ObjClean );
+}
 
 static void r100_init_vtbl(radeonContextPtr radeon)
 {
@@ -202,7 +207,7 @@ static void r100_init_vtbl(radeonContextPtr radeon)
 /* Create the device specific context.
  */
 GLboolean
-radeonCreateContext( const __GLcontextModes *glVisual,
+r100CreateContext( const __GLcontextModes *glVisual,
                      __DRIcontextPrivate *driContextPriv,
                      void *sharedContextPrivate)
 {
@@ -261,12 +266,6 @@ radeonCreateContext( const __GLcontextModes *glVisual,
      return GL_FALSE;
    }
 
-   rmesa->radeon.texture_depth = driQueryOptioni (&rmesa->radeon.optionCache,
-                                          "texture_depth");
-   if (rmesa->radeon.texture_depth == DRI_CONF_TEXTURE_DEPTH_FB)
-      rmesa->radeon.texture_depth = ( screen->cpp == 4 ) ?
-        DRI_CONF_TEXTURE_DEPTH_32 : DRI_CONF_TEXTURE_DEPTH_16;
-
    rmesa->radeon.swtcl.RenderIndex = ~0;
    rmesa->radeon.hw.all_dirty = GL_TRUE;
 
@@ -403,50 +402,3 @@ radeonCreateContext( const __GLcontextModes *glVisual,
    }
    return GL_TRUE;
 }
-
-
-/* Destroy the device specific context.
- */
-/* Destroy the Mesa and driver specific context data.
- */
-void radeonDestroyContext( __DRIcontextPrivate *driContextPriv )
-{
-   GET_CURRENT_CONTEXT(ctx);
-   r100ContextPtr rmesa = (r100ContextPtr) driContextPriv->driverPrivate;
-   r100ContextPtr current = ctx ? R100_CONTEXT(ctx) : NULL;
-
-   /* check if we're deleting the currently bound context */
-   if (rmesa == current) {
-      radeon_firevertices(&rmesa->radeon);
-      _mesa_make_current(NULL, NULL, NULL);
-   }
-
-   /* Free radeon context resources */
-   assert(rmesa); /* should never be null */
-   if ( rmesa ) {
-
-      _swsetup_DestroyContext( rmesa->radeon.glCtx );
-      _tnl_DestroyContext( rmesa->radeon.glCtx );
-      _vbo_DestroyContext( rmesa->radeon.glCtx );
-      _swrast_DestroyContext( rmesa->radeon.glCtx );
-
-      radeonDestroySwtcl( rmesa->radeon.glCtx );
-      radeonReleaseArrays( rmesa->radeon.glCtx, ~0 );
-      if (rmesa->radeon.dma.current) {
-        radeonReleaseDmaRegion( &rmesa->radeon );
-        rcommonFlushCmdBuf( &rmesa->radeon, __FUNCTION__ );
-      }
-
-      _mesa_vector4f_free( &rmesa->tcl.ObjClean );
-
-      if (rmesa->radeon.state.scissor.pClipRects) {
-        FREE(rmesa->radeon.state.scissor.pClipRects);
-        rmesa->radeon.state.scissor.pClipRects = NULL;
-      }
-
-      radeonCleanupContext(&rmesa->radeon);
-
-      FREE( rmesa );
-   }
-}
-