Fix copy'n'paste errors.
authorVladimir Dergachev <volodya@freedesktop.org>
Thu, 10 Feb 2005 07:39:11 +0000 (07:39 +0000)
committerVladimir Dergachev <volodya@freedesktop.org>
Thu, 10 Feb 2005 07:39:11 +0000 (07:39 +0000)
Print command buffer sizes during startup (TODO: remove 1 || when the driver is more mature).

src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_state.c

index 04a47bb8bf758f1b5332068ba577d48f3052ceb8..ae0f9fb6b4e5f22f7f52b54628d684b84226dabd 100644 (file)
@@ -554,13 +554,19 @@ void r300InitCmdBuf(r300ContextPtr r300)
 
        /* Initialize command buffer */
        size = 256 * driQueryOptioni(&r300->radeon.optionCache, "command_buffer_size");
-       if (size < 2*r300->hw.max_state_size)
-               size = 2*r300->hw.max_state_size;
+       if (size < 2*r300->hw.max_state_size){
+               size = 2*r300->hw.max_state_size+65535;
+               }
 
-       if (RADEON_DEBUG & DEBUG_IOCTL)
+       if (1 || RADEON_DEBUG & DEBUG_IOCTL){
+               fprintf(stderr, "sizeof(drm_r300_cmd_header_t)=%d\n",
+                       sizeof(drm_r300_cmd_header_t));
+               fprintf(stderr, "sizeof(drm_radeon_cmd_buffer_t)=%d\n",
+                       sizeof(drm_radeon_cmd_buffer_t));
                fprintf(stderr,
                        "Allocating %d bytes command buffer (max state is %d bytes)\n",
                        size*4, r300->hw.max_state_size*4);
+               }
 
        r300->cmdbuf.size = size;
        r300->cmdbuf.cmd_buf = (uint32_t*)CALLOC(size*4);
index af0e0d72a841c2d97416e5b94f5c4865af5f6a11..985d0522d60f0fae3e7ac6814ea31edc8f1b7131 100644 (file)
@@ -740,7 +740,7 @@ static void r300StencilFunc(GLcontext * ctx, GLenum func,
                           ValueMask[0] << R300_RB3D_ZS2_STENCIL_MASK_SHIFT));
        GLuint flag;
 
-       R200_STATECHANGE(rmesa, zs);
+       R300_STATECHANGE(rmesa, zs);
 
        rmesa->hw.zs.cmd[R300_ZS_CNTL_1] &= ~(
                (R300_ZS_MASK << R300_RB3D_ZS1_FRONT_FUNC_SHIFT)
@@ -759,7 +759,7 @@ static void r300StencilMask(GLcontext * ctx, GLuint mask)
 {
        r300ContextPtr rmesa = R300_CONTEXT(ctx);
 
-       R200_STATECHANGE(rmesa, zs);
+       R300_STATECHANGE(rmesa, zs);
        rmesa->hw.zs.cmd[R300_ZS_CNTL_2]  &= ~(R300_ZS_MASK << R300_RB3D_ZS2_STENCIL_WRITE_MASK_SHIFT);
        rmesa->hw.zs.cmd[R300_ZS_CNTL_2] |= ctx->Stencil.WriteMask[0] << R300_RB3D_ZS2_STENCIL_WRITE_MASK_SHIFT;
 }
@@ -770,7 +770,7 @@ static void r300StencilOp(GLcontext * ctx, GLenum fail,
 {
        r300ContextPtr rmesa = R300_CONTEXT(ctx);
 
-       R200_STATECHANGE(rmesa, zs);
+       R300_STATECHANGE(rmesa, zs);
                /* It is easier to mask what's left.. */
        rmesa->hw.zs.cmd[R300_ZS_CNTL_1] &= (R300_ZS_MASK << R300_RB3D_ZS1_DEPTH_FUNC_SHIFT);
 
@@ -789,7 +789,7 @@ static void r300ClearStencil(GLcontext * ctx, GLint s)
        r300ContextPtr rmesa = R300_CONTEXT(ctx);
 
        /* Not sure whether this is correct.. */
-       R200_STATECHANGE(rmesa, zs);
+       R300_STATECHANGE(rmesa, zs);
        rmesa->hw.zs.cmd[R300_ZS_CNTL_2] =
            ((GLuint) ctx->Stencil.Clear |
             (0xff << R200_STENCIL_MASK_SHIFT) |
@@ -839,7 +839,7 @@ static void r300Viewport(GLcontext * ctx, GLint x, GLint y,
         * setting below.  Could apply deltas to rescue pipelined viewport
         * values, or keep the originals hanging around.
         */
-       R200_FIREVERTICES(R200_CONTEXT(ctx));
+       R300_FIREVERTICES(R300_CONTEXT(ctx));
        r300UpdateWindow(ctx);
 }