/* 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);
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)
{
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;
}
{
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);
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) |
* 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);
}