radeon/r200: remove ClearColor driver functions
authorBrian Paul <brianp@vmware.com>
Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 12 Mar 2012 17:40:43 +0000 (11:40 -0600)
The state.color.clear value was never used anywhere.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/mesa/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/r200/r200_state_init.c
src/mesa/drivers/dri/radeon/radeon_common_context.h
src/mesa/drivers/dri/radeon/radeon_state.c
src/mesa/drivers/dri/radeon/radeon_state_init.c

index 1c32571cbc18d63915e9bb3094e9507d0d7325de..3131007517b0cfba6667ec9a6e2e2cc437ac28b3 100644 (file)
@@ -1676,23 +1676,6 @@ void r200UpdateViewportOffset( struct gl_context *ctx )
  * Miscellaneous
  */
 
-static void r200ClearColor( struct gl_context *ctx,
-                            const union gl_color_union c )
-{
-   r200ContextPtr rmesa = R200_CONTEXT(ctx);
-   GLubyte color[4];
-   struct radeon_renderbuffer *rrb;
-
-   rrb = radeon_get_colorbuffer(&rmesa->radeon);
-   if (!rrb)
-     return;
-   _mesa_unclamped_float_rgba_to_ubyte(color, c.f);
-   rmesa->radeon.state.color.clear = radeonPackColor( rrb->cpp,
-                                             color[0], color[1],
-                                             color[2], color[3] );
-}
-
-
 static void r200RenderMode( struct gl_context *ctx, GLenum mode )
 {
    r200ContextPtr rmesa = R200_CONTEXT(ctx);
@@ -2452,7 +2435,6 @@ void r200InitStateFuncs( radeonContextPtr radeon, struct dd_function_table *func
    functions->BlendColor               = r200BlendColor;
    functions->BlendEquationSeparate    = r200BlendEquationSeparate;
    functions->BlendFuncSeparate                = r200BlendFuncSeparate;
-   functions->ClearColor               = r200ClearColor;
    functions->ClipPlane                        = r200ClipPlane;
    functions->ColorMask                        = r200ColorMask;
    functions->CullFace                 = r200CullFace;
index 138100926cf59fdbb529cd11627aa154cdb4438f..2fe3f94f69065f7c77e41ea67cc5adc71cc980f1 100644 (file)
@@ -620,8 +620,6 @@ void r200InitState( r200ContextPtr rmesa )
    struct gl_context *ctx = rmesa->radeon.glCtx;
    GLuint i;
 
-   rmesa->radeon.state.color.clear = 0x00000000;
-
    rmesa->radeon.Fallback = 0;
 
    rmesa->radeon.hw.max_state_size = 0;
index fdffb1ec04e3f3152a5579bf37ad69c85d54f612..11275f8bc5c0c6108deb6269aa4e6bdf324f5db3 100644 (file)
@@ -110,7 +110,6 @@ struct radeon_framebuffer
 
 
 struct radeon_colorbuffer_state {
-       GLuint clear;
        int roundEnable;
        struct gl_renderbuffer *rb;
        uint32_t draw_offset; /* offset into color renderbuffer - FBOs */
index dcec8138594c7346d361b82c04cb0076fdedd640..a3b4e54edc46421302fb5f1f2272be5691df1abc 100644 (file)
@@ -1458,23 +1458,6 @@ void radeonUpdateViewportOffset( struct gl_context *ctx )
  * Miscellaneous
  */
 
-static void radeonClearColor( struct gl_context *ctx,
-                              const union gl_color_union color )
-{
-   r100ContextPtr rmesa = R100_CONTEXT(ctx);
-   GLubyte c[4];
-   struct radeon_renderbuffer *rrb;
-
-   rrb = radeon_get_colorbuffer(&rmesa->radeon);
-   if (!rrb)
-     return;
-     
-   _mesa_unclamped_float_rgba_to_ubyte(c, color.f);
-   rmesa->radeon.state.color.clear = radeonPackColor( rrb->cpp,
-                                              c[0], c[1], c[2], c[3] );
-}
-
-
 static void radeonRenderMode( struct gl_context *ctx, GLenum mode )
 {
    r100ContextPtr rmesa = R100_CONTEXT(ctx);
@@ -2208,7 +2191,6 @@ void radeonInitStateFuncs( struct gl_context *ctx )
    ctx->Driver.AlphaFunc               = radeonAlphaFunc;
    ctx->Driver.BlendEquationSeparate   = radeonBlendEquationSeparate;
    ctx->Driver.BlendFuncSeparate       = radeonBlendFuncSeparate;
-   ctx->Driver.ClearColor              = radeonClearColor;
    ctx->Driver.ClipPlane               = radeonClipPlane;
    ctx->Driver.ColorMask               = radeonColorMask;
    ctx->Driver.CullFace                        = radeonCullFace;
index 1f445b27e3b6d029a19d8161e6a0540a78f27115..1a7d2626aef3433c546e44fe315b37cd11705868 100644 (file)
@@ -506,8 +506,6 @@ void radeonInitState( r100ContextPtr rmesa )
    struct gl_context *ctx = rmesa->radeon.glCtx;
    GLuint i;
 
-   rmesa->radeon.state.color.clear = 0x00000000;
-
    rmesa->radeon.Fallback = 0;