mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
Fix copy'n'paste errors.
Print command buffer sizes during startup (TODO: remove 1 || when the driver is more mature).
This commit is contained in:
parent
4afa1d7abb
commit
d190734875
2 changed files with 14 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue