summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c12
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c10
2 files changed, 14 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 04a47bb8bf7..ae0f9fb6b4e 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -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);
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index af0e0d72a84..985d0522d60 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -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);
}