From 94cadef31f9d4ee9fce1bfa66fabb0a403a6f049 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 11 Dec 2007 13:19:33 +0000 Subject: gallium: remove redundant clear_color state. --- src/mesa/pipe/failover/fo_context.h | 1 - src/mesa/pipe/failover/fo_state.c | 11 ----------- src/mesa/pipe/failover/fo_state_emit.c | 3 --- src/mesa/pipe/i915simple/i915_context.h | 1 - src/mesa/pipe/i915simple/i915_state.c | 11 ----------- src/mesa/pipe/i965simple/brw_context.h | 1 - src/mesa/pipe/i965simple/brw_state.c | 9 --------- src/mesa/pipe/p_context.h | 3 --- src/mesa/pipe/p_state.h | 5 ----- src/mesa/pipe/softpipe/sp_context.c | 1 - src/mesa/pipe/softpipe/sp_context.h | 1 - src/mesa/pipe/softpipe/sp_state.h | 3 --- src/mesa/pipe/softpipe/sp_state_surface.c | 8 -------- 13 files changed, 58 deletions(-) (limited to 'src/mesa/pipe') diff --git a/src/mesa/pipe/failover/fo_context.h b/src/mesa/pipe/failover/fo_context.h index 7cf18c9ec1..2423eb4556 100644 --- a/src/mesa/pipe/failover/fo_context.h +++ b/src/mesa/pipe/failover/fo_context.h @@ -79,7 +79,6 @@ struct failover_context { const struct fo_state *vertex_shader; struct pipe_blend_color blend_color; - struct pipe_clear_color_state clear_color; struct pipe_clip_state clip; struct pipe_framebuffer_state framebuffer; struct pipe_poly_stipple poly_stipple; diff --git a/src/mesa/pipe/failover/fo_state.c b/src/mesa/pipe/failover/fo_state.c index fd6137ba66..689d2fa3c7 100644 --- a/src/mesa/pipe/failover/fo_state.c +++ b/src/mesa/pipe/failover/fo_state.c @@ -146,16 +146,6 @@ failover_set_clip_state( struct pipe_context *pipe, failover->hw->set_clip_state( failover->hw, clip ); } -static void -failover_set_clear_color_state( struct pipe_context *pipe, - const struct pipe_clear_color_state *clear_color ) -{ - struct failover_context *failover = failover_context(pipe); - - failover->clear_color = *clear_color; - failover->dirty |= FO_NEW_CLEAR_COLOR; - failover->hw->set_clear_color_state( failover->hw, clear_color ); -} static void * failover_create_depth_stencil_state(struct pipe_context *pipe, @@ -480,7 +470,6 @@ failover_init_state_functions( struct failover_context *failover ) failover->pipe.set_blend_color = failover_set_blend_color; failover->pipe.set_clip_state = failover_set_clip_state; - failover->pipe.set_clear_color_state = failover_set_clear_color_state; failover->pipe.set_framebuffer_state = failover_set_framebuffer_state; failover->pipe.set_polygon_stipple = failover_set_polygon_stipple; failover->pipe.set_sampler_units = failover_set_sampler_units; diff --git a/src/mesa/pipe/failover/fo_state_emit.c b/src/mesa/pipe/failover/fo_state_emit.c index a3aff8abd2..612b0a6ca3 100644 --- a/src/mesa/pipe/failover/fo_state_emit.c +++ b/src/mesa/pipe/failover/fo_state_emit.c @@ -69,9 +69,6 @@ failover_state_emit( struct failover_context *failover ) if (failover->dirty & FO_NEW_CLIP) failover->sw->set_clip_state( failover->sw, &failover->clip ); - if (failover->dirty & FO_NEW_CLEAR_COLOR) - failover->sw->set_clear_color_state( failover->sw, &failover->clear_color ); - if (failover->dirty & FO_NEW_DEPTH_STENCIL) failover->sw->bind_depth_stencil_state( failover->sw, failover->depth_stencil->sw_state ); diff --git a/src/mesa/pipe/i915simple/i915_context.h b/src/mesa/pipe/i915simple/i915_context.h index b9b67c4fcf..a239c8f72e 100644 --- a/src/mesa/pipe/i915simple/i915_context.h +++ b/src/mesa/pipe/i915simple/i915_context.h @@ -194,7 +194,6 @@ struct i915_context const struct pipe_shader_state *fs; struct pipe_blend_color blend_color; - struct pipe_clear_color_state clear_color; struct pipe_clip_state clip; struct pipe_constant_buffer constants[PIPE_SHADER_TYPES]; struct pipe_framebuffer_state framebuffer; diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c index b9f257a007..a8c6565a54 100644 --- a/src/mesa/pipe/i915simple/i915_state.c +++ b/src/mesa/pipe/i915simple/i915_state.c @@ -548,16 +548,6 @@ static void i915_set_framebuffer_state(struct pipe_context *pipe, -static void i915_set_clear_color_state(struct pipe_context *pipe, - const struct pipe_clear_color_state *clear) -{ - struct i915_context *i915 = i915_context(pipe); - - i915->clear_color = *clear; /* struct copy */ -} - - - static void i915_set_clip_state( struct pipe_context *pipe, const struct pipe_clip_state *clip ) { @@ -720,7 +710,6 @@ i915_init_state_functions( struct i915_context *i915 ) i915->pipe.set_blend_color = i915_set_blend_color; i915->pipe.set_clip_state = i915_set_clip_state; - i915->pipe.set_clear_color_state = i915_set_clear_color_state; i915->pipe.set_constant_buffer = i915_set_constant_buffer; i915->pipe.set_framebuffer_state = i915_set_framebuffer_state; diff --git a/src/mesa/pipe/i965simple/brw_context.h b/src/mesa/pipe/i965simple/brw_context.h index 00df46e704..53f66cd6a9 100644 --- a/src/mesa/pipe/i965simple/brw_context.h +++ b/src/mesa/pipe/i965simple/brw_context.h @@ -475,7 +475,6 @@ struct brw_context struct pipe_scissor_state Scissor; struct pipe_viewport_state Viewport; struct pipe_framebuffer_state FrameBuffer; - struct pipe_clear_color_state ClearColor; const struct pipe_constant_buffer *Constants[2]; const struct brw_texture *Texture[PIPE_MAX_SAMPLERS]; diff --git a/src/mesa/pipe/i965simple/brw_state.c b/src/mesa/pipe/i965simple/brw_state.c index b50f23c1a2..7731c2e01f 100644 --- a/src/mesa/pipe/i965simple/brw_state.c +++ b/src/mesa/pipe/i965simple/brw_state.c @@ -377,14 +377,6 @@ static void brw_set_framebuffer_state(struct pipe_context *pipe, -static void brw_set_clear_color_state(struct pipe_context *pipe, - const struct pipe_clear_color_state *clear) -{ - struct brw_context *brw = brw_context(pipe); - - brw->attribs.ClearColor = *clear; /* struct copy */ -} - /************************************************************************ * Rasterizer state */ @@ -449,7 +441,6 @@ brw_init_state_functions( struct brw_context *brw ) brw->pipe.set_blend_color = brw_set_blend_color; brw->pipe.set_clip_state = brw_set_clip_state; - brw->pipe.set_clear_color_state = brw_set_clear_color_state; brw->pipe.set_constant_buffer = brw_set_constant_buffer; brw->pipe.set_framebuffer_state = brw_set_framebuffer_state; diff --git a/src/mesa/pipe/p_context.h b/src/mesa/pipe/p_context.h index 7da4992841..6b97844445 100644 --- a/src/mesa/pipe/p_context.h +++ b/src/mesa/pipe/p_context.h @@ -132,9 +132,6 @@ struct pipe_context { void (*set_clip_state)( struct pipe_context *, const struct pipe_clip_state * ); - void (*set_clear_color_state)( struct pipe_context *, - const struct pipe_clear_color_state * ); - void (*set_constant_buffer)( struct pipe_context *, uint shader, uint index, const struct pipe_constant_buffer *buf ); diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h index 50344bea78..56d4f96ed7 100644 --- a/src/mesa/pipe/p_state.h +++ b/src/mesa/pipe/p_state.h @@ -200,11 +200,6 @@ struct pipe_blend_color { float color[4]; }; -struct pipe_clear_color_state -{ - float color[4]; -}; - struct pipe_framebuffer_state { /** multiple colorbuffers for multiple render targets */ diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c index 2eab3aaabb..43f23dc1e8 100644 --- a/src/mesa/pipe/softpipe/sp_context.c +++ b/src/mesa/pipe/softpipe/sp_context.c @@ -304,7 +304,6 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys, softpipe->pipe.set_blend_color = softpipe_set_blend_color; softpipe->pipe.set_clip_state = softpipe_set_clip_state; - softpipe->pipe.set_clear_color_state = softpipe_set_clear_color_state; softpipe->pipe.set_constant_buffer = softpipe_set_constant_buffer; softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state; softpipe->pipe.set_polygon_stipple = softpipe_set_polygon_stipple; diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h index 1c391dcd4d..45d15c720e 100644 --- a/src/mesa/pipe/softpipe/sp_context.h +++ b/src/mesa/pipe/softpipe/sp_context.h @@ -82,7 +82,6 @@ struct softpipe_context { const struct sp_vertex_shader_state *vs; struct pipe_blend_color blend_color; - struct pipe_clear_color_state clear_color; struct pipe_clip_state clip; struct pipe_constant_buffer constants[2]; struct pipe_framebuffer_state framebuffer; diff --git a/src/mesa/pipe/softpipe/sp_state.h b/src/mesa/pipe/softpipe/sp_state.h index f434567da5..80a1cba25a 100644 --- a/src/mesa/pipe/softpipe/sp_state.h +++ b/src/mesa/pipe/softpipe/sp_state.h @@ -92,9 +92,6 @@ void softpipe_set_framebuffer_state( struct pipe_context *, void softpipe_set_blend_color( struct pipe_context *pipe, const struct pipe_blend_color *blend_color ); -void softpipe_set_clear_color_state( struct pipe_context *, - const struct pipe_clear_color_state * ); - void softpipe_set_clip_state( struct pipe_context *, const struct pipe_clip_state * ); diff --git a/src/mesa/pipe/softpipe/sp_state_surface.c b/src/mesa/pipe/softpipe/sp_state_surface.c index 30bedc74bc..ee72aaf4c5 100644 --- a/src/mesa/pipe/softpipe/sp_state_surface.c +++ b/src/mesa/pipe/softpipe/sp_state_surface.c @@ -131,11 +131,3 @@ softpipe_set_framebuffer_state(struct pipe_context *pipe, -void -softpipe_set_clear_color_state(struct pipe_context *pipe, - const struct pipe_clear_color_state *clear) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - softpipe->clear_color = *clear; /* struct copy */ -} -- cgit v1.2.3