The computed stencil.clear and depth.clear values aren't used anywhere.
Those fields have been removed too.
Reviewed-by: Dave Airlie <airlied@redhat.com>
}
}
-static void r200ClearDepth( struct gl_context *ctx, GLclampd d )
-{
- r200ContextPtr rmesa = R200_CONTEXT(ctx);
- GLuint format = (rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &
- R200_DEPTH_FORMAT_MASK);
-
- switch ( format ) {
- case R200_DEPTH_FORMAT_16BIT_INT_Z:
- rmesa->radeon.state.depth.clear = d * 0x0000ffff;
- break;
- case R200_DEPTH_FORMAT_24BIT_INT_Z:
- rmesa->radeon.state.depth.clear = d * 0x00ffffff;
- break;
- }
-}
-
static void r200DepthMask( struct gl_context *ctx, GLboolean flag )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
}
}
-static void r200ClearStencil( struct gl_context *ctx, GLint s )
-{
- r200ContextPtr rmesa = R200_CONTEXT(ctx);
-
- rmesa->radeon.state.stencil.clear =
- ((GLuint) (ctx->Stencil.Clear & 0xff) |
- (0xff << R200_STENCIL_MASK_SHIFT) |
- ((ctx->Stencil.WriteMask[0] & 0xff) << R200_STENCIL_WRITEMASK_SHIFT));
-}
-
/* =============================================================
* Window position and viewport transformation
functions->BlendEquationSeparate = r200BlendEquationSeparate;
functions->BlendFuncSeparate = r200BlendFuncSeparate;
functions->ClearColor = r200ClearColor;
- functions->ClearDepth = r200ClearDepth;
- functions->ClearStencil = r200ClearStencil;
functions->ClipPlane = r200ClipPlane;
functions->ColorMask = r200ColorMask;
functions->CullFace = r200CullFace;
rmesa->radeon.state.color.clear = 0x00000000;
- switch ( ctx->Visual.depthBits ) {
- case 16:
- rmesa->radeon.state.depth.clear = 0x0000ffff;
- rmesa->radeon.state.stencil.clear = 0x00000000;
- break;
- case 24:
- default:
- rmesa->radeon.state.depth.clear = 0x00ffffff;
- rmesa->radeon.state.stencil.clear = 0xffff0000;
- break;
- }
-
rmesa->radeon.Fallback = 0;
rmesa->radeon.hw.max_state_size = 0;
};
struct radeon_depthbuffer_state {
- GLuint clear;
struct gl_renderbuffer *rb;
};
drm_clip_rect_t *pClipRects;
};
-struct radeon_stencilbuffer_state {
- GLuint clear; /* rb3d_stencilrefmask value */
-};
-
struct radeon_state_atom {
struct radeon_state_atom *next, *prev;
const char *name; /* for debug */
struct radeon_colorbuffer_state color;
struct radeon_depthbuffer_state depth;
struct radeon_scissor_state scissor;
- struct radeon_stencilbuffer_state stencil;
};
/**
}
}
-static void radeonClearDepth( struct gl_context *ctx, GLclampd d )
-{
- r100ContextPtr rmesa = R100_CONTEXT(ctx);
- GLuint format = (rmesa->hw.ctx.cmd[CTX_RB3D_ZSTENCILCNTL] &
- RADEON_DEPTH_FORMAT_MASK);
-
- switch ( format ) {
- case RADEON_DEPTH_FORMAT_16BIT_INT_Z:
- rmesa->radeon.state.depth.clear = d * 0x0000ffff;
- break;
- case RADEON_DEPTH_FORMAT_24BIT_INT_Z:
- rmesa->radeon.state.depth.clear = d * 0x00ffffff;
- break;
- }
-}
-
/* =============================================================
* Fog
}
}
-static void radeonClearStencil( struct gl_context *ctx, GLint s )
-{
- r100ContextPtr rmesa = R100_CONTEXT(ctx);
-
- rmesa->radeon.state.stencil.clear =
- ((GLuint) (ctx->Stencil.Clear & 0xff) |
- (0xff << RADEON_STENCIL_MASK_SHIFT) |
- ((ctx->Stencil.WriteMask[0] & 0xff) << RADEON_STENCIL_WRITEMASK_SHIFT));
-}
/* =============================================================
ctx->Driver.BlendEquationSeparate = radeonBlendEquationSeparate;
ctx->Driver.BlendFuncSeparate = radeonBlendFuncSeparate;
ctx->Driver.ClearColor = radeonClearColor;
- ctx->Driver.ClearDepth = radeonClearDepth;
- ctx->Driver.ClearStencil = radeonClearStencil;
ctx->Driver.ClipPlane = radeonClipPlane;
ctx->Driver.ColorMask = radeonColorMask;
ctx->Driver.CullFace = radeonCullFace;
rmesa->radeon.state.color.clear = 0x00000000;
- switch ( ctx->Visual.depthBits ) {
- case 16:
- rmesa->radeon.state.depth.clear = 0x0000ffff;
- rmesa->radeon.state.stencil.clear = 0x00000000;
- break;
- case 24:
- rmesa->radeon.state.depth.clear = 0x00ffffff;
- rmesa->radeon.state.stencil.clear = 0xffff0000;
- break;
- default:
- break;
- }
-
rmesa->radeon.Fallback = 0;