r200: fix polygon stipple
authorAlex Deucher <alexdeucher@gmail.com>
Thu, 3 Dec 2009 16:20:40 +0000 (11:20 -0500)
committerAlex Deucher <alexdeucher@gmail.com>
Thu, 3 Dec 2009 16:20:40 +0000 (11:20 -0500)
fixes fdo bug 25354

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/r200/r200_state.h
src/mesa/drivers/dri/r200/r200_state_init.c

index 3ddb5bf7d60c4635d158900e6663fa8a5f96c08b..4e34e0986d00c69090465c14f2b3128d9bf1e3d3 100644 (file)
@@ -325,9 +325,9 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
    _mesa_init_driver_functions(&functions);
    r200InitDriverFuncs(&functions);
    r200InitIoctlFuncs(&functions);
-   r200InitStateFuncs(&functions, screen->kernel_mm);
+   r200InitStateFuncs(&functions);
    r200InitTextureFuncs(&functions);
-   r200InitShaderFuncs(&functions); 
+   r200InitShaderFuncs(&functions);
    radeonInitQueryObjFunctions(&functions);
 
    if (!radeonInitContext(&rmesa->radeon, &functions,
index d28e96d9d9818223860f3a274217c695c6bdbd31..6d99c039dedbd713e6fc114f1e6638d8701a3a9a 100644 (file)
@@ -2476,7 +2476,7 @@ static void r200PolygonStipple( GLcontext *ctx, const GLubyte *mask )
 }
 /* Initialize the driver's state functions.
  */
-void r200InitStateFuncs( struct dd_function_table *functions, GLboolean dri2 )
+void r200InitStateFuncs( struct dd_function_table *functions )
 {
    functions->UpdateState              = r200InvalidateState;
    functions->LightingSpaceChange      = r200LightingSpaceChange;
@@ -2510,10 +2510,7 @@ void r200InitStateFuncs( struct dd_function_table *functions, GLboolean dri2 )
    functions->LogicOpcode              = r200LogicOpCode;
    functions->PolygonMode              = r200PolygonMode;
    functions->PolygonOffset            = r200PolygonOffset;
-   if (dri2)
-      functions->PolygonStipple                = r200PolygonStipple;
-   else
-      functions->PolygonStipple                = radeonPolygonStipplePreKMS;
+   functions->PolygonStipple           = r200PolygonStipple;
    functions->PointParameterfv         = r200PointParameter;
    functions->PointSize                        = r200PointSize;
    functions->RenderMode               = r200RenderMode;
index 9c62f0a644682d9281b966eed276aed9dc326605..7b9b0c106aa10876d0574bc82fc9a9b928186c0f 100644 (file)
@@ -38,7 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r200_context.h"
 
 extern void r200InitState( r200ContextPtr rmesa );
-extern void r200InitStateFuncs( struct dd_function_table *functions, GLboolean dri2 );
+extern void r200InitStateFuncs( struct dd_function_table *functions );
 extern void r200InitTnlFuncs( GLcontext *ctx );
 
 extern void r200UpdateMaterial( GLcontext *ctx );
index 7697306d889717f4b2fce053a4fb7bcfb1700cb0..8553be01976d8b067590ef5cba2b0cb881d6f92d 100644 (file)
@@ -885,10 +885,8 @@ void r200InitState( r200ContextPtr rmesa )
          }
       }
    }
-   /* polygon stipple is done with irq for non-kms */
-   if (rmesa->radeon.radeonScreen->kernel_mm) {
-       ALLOC_STATE( stp, always, STP_STATE_SIZE, "STP/stp", 0 );
-   }
+
+   ALLOC_STATE( stp, always, STP_STATE_SIZE, "STP/stp", 0 );
 
    for (i = 0; i < 6; i++)
       if (rmesa->radeon.radeonScreen->kernel_mm)
@@ -1120,12 +1118,11 @@ void r200InitState( r200ContextPtr rmesa )
    rmesa->hw.sci.cmd[SCI_CMD_1] = CP_PACKET0(R200_RE_TOP_LEFT, 0);
    rmesa->hw.sci.cmd[SCI_CMD_2] = CP_PACKET0(R200_RE_WIDTH_HEIGHT, 0);
 
-   if (rmesa->radeon.radeonScreen->kernel_mm) {
-
-       rmesa->hw.stp.cmd[STP_CMD_0] = CP_PACKET0(RADEON_RE_STIPPLE_ADDR, 0);
-       rmesa->hw.stp.cmd[STP_DATA_0] = 0;
-       rmesa->hw.stp.cmd[STP_CMD_1] = CP_PACKET0_ONE(RADEON_RE_STIPPLE_DATA, 31);
+   rmesa->hw.stp.cmd[STP_CMD_0] = CP_PACKET0(RADEON_RE_STIPPLE_ADDR, 0);
+   rmesa->hw.stp.cmd[STP_DATA_0] = 0;
+   rmesa->hw.stp.cmd[STP_CMD_1] = CP_PACKET0_ONE(RADEON_RE_STIPPLE_DATA, 31);
 
+   if (rmesa->radeon.radeonScreen->kernel_mm) {
         rmesa->hw.mtl[0].emit = mtl_emit;
         rmesa->hw.mtl[1].emit = mtl_emit;