r200: fixup some CS emission sizes
authorDave Airlie <airlied@redhat.com>
Thu, 12 Feb 2009 15:27:21 +0000 (01:27 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 12 Feb 2009 15:27:21 +0000 (01:27 +1000)
src/mesa/drivers/dri/r200/r200_cmdbuf.c
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/r200/r200_state_init.c

index 6317decf6418986d1863f88e57559c476fddab1a..55507be2515cdfcf1b71b1fcfde6643f85b09e7b 100644 (file)
@@ -259,7 +259,7 @@ void r200EmitAOS(r200ContextPtr rmesa, GLuint nr, GLuint offset)
       fprintf(stderr, "%s: nr=%d, ofs=0x%08x\n", __FUNCTION__, nr,
              offset);
 
-   BEGIN_BATCH(sz+2);
+   BEGIN_BATCH(sz+2+ (nr*2));
    OUT_BATCH_PACKET3(R200_CP_CMD_3D_LOAD_VBPNTR, sz - 1);
    OUT_BATCH(nr);
 
index 431bf8235c344056bc967db0da2ad5d001851e79..d567bb77df9a77537f286cda61d5d5a26f088cba 100644 (file)
@@ -555,6 +555,7 @@ void r200DestroyContext( __DRIcontextPrivate *driContextPriv )
       r200ReleaseArrays( rmesa->radeon.glCtx, ~0 );
 
       if (rmesa->radeon.dma.current) {
+        radeonReleaseDmaRegion( &rmesa->radeon );
         rcommonFlushCmdBuf( &rmesa->radeon, __FUNCTION__ );
       }
 
index 3cd2dc77512410fa38412ac8fb820199acdf6234..1a13c9ec13db7b8fc85e3f7c2618e9e67a63b437 100644 (file)
@@ -417,7 +417,7 @@ static void ctx_emit(GLcontext *ctx, struct radeon_state_atom *atom)
    GLframebuffer *fb = r200->radeon.dri.drawable->driverPrivate;
 
    /* output the first 7 bytes of context */
-   BEGIN_BATCH_NO_AUTOSTATE(dwords);
+   BEGIN_BATCH_NO_AUTOSTATE(dwords+2+2);
    OUT_BATCH_TABLE(atom->cmd, 5);
 
    rrb = r200->radeon.state.depth.rrb;