summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/failover
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/failover')
-rw-r--r--src/mesa/pipe/failover/fo_context.h1
-rw-r--r--src/mesa/pipe/failover/fo_state.c60
-rw-r--r--src/mesa/pipe/failover/fo_state_emit.c8
3 files changed, 11 insertions, 58 deletions
diff --git a/src/mesa/pipe/failover/fo_context.h b/src/mesa/pipe/failover/fo_context.h
index f5eaa0b5fa8..1dc87291c9f 100644
--- a/src/mesa/pipe/failover/fo_context.h
+++ b/src/mesa/pipe/failover/fo_context.h
@@ -70,7 +70,6 @@ struct failover_context {
/* The most recent drawing state as set by the driver:
*/
- const struct fo_state *alpha_test;
const struct fo_state *blend;
const struct fo_state *sampler[PIPE_MAX_SAMPLERS];
const struct fo_state *depth_stencil;
diff --git a/src/mesa/pipe/failover/fo_state.c b/src/mesa/pipe/failover/fo_state.c
index 6b4f1517ace..fa700b9674f 100644
--- a/src/mesa/pipe/failover/fo_state.c
+++ b/src/mesa/pipe/failover/fo_state.c
@@ -45,45 +45,6 @@
* lower overheads.
*/
-static void *
-failover_create_alpha_test_state(struct pipe_context *pipe,
- const struct pipe_alpha_test_state *templ)
-{
- struct fo_state *state = malloc(sizeof(struct fo_state));
- struct failover_context *failover = failover_context(pipe);
-
- state->sw_state = failover->sw->create_alpha_test_state(pipe, templ);
- state->hw_state = failover->hw->create_alpha_test_state(pipe, templ);
-
- return state;
-}
-
-static void
-failover_bind_alpha_test_state(struct pipe_context *pipe,
- void *alpha)
-{
- struct failover_context *failover = failover_context(pipe);
- struct fo_state *state = (struct fo_state *)alpha;
-
- failover->alpha_test = state;
- failover->dirty |= FO_NEW_ALPHA_TEST;
- failover->hw->bind_alpha_test_state(failover->hw,
- state->hw_state);
-}
-
-static void
-failover_delete_alpha_test_state(struct pipe_context *pipe,
- void *alpha)
-{
- struct fo_state *state = (struct fo_state*)alpha;
- struct failover_context *failover = failover_context(pipe);
-
- failover->sw->delete_alpha_test_state(pipe, state->sw_state);
- failover->hw->delete_alpha_test_state(pipe, state->hw_state);
- state->sw_state = 0;
- state->hw_state = 0;
- free(state);
-}
static void *
@@ -149,13 +110,13 @@ failover_set_clip_state( struct pipe_context *pipe,
static void *
failover_create_depth_stencil_state(struct pipe_context *pipe,
- const struct pipe_depth_stencil_state *templ)
+ const struct pipe_depth_stencil_alpha_state *templ)
{
struct fo_state *state = malloc(sizeof(struct fo_state));
struct failover_context *failover = failover_context(pipe);
- state->sw_state = failover->sw->create_depth_stencil_state(pipe, templ);
- state->hw_state = failover->hw->create_depth_stencil_state(pipe, templ);
+ state->sw_state = failover->sw->create_depth_stencil_alpha_state(pipe, templ);
+ state->hw_state = failover->hw->create_depth_stencil_alpha_state(pipe, templ);
return state;
}
@@ -168,7 +129,7 @@ failover_bind_depth_stencil_state(struct pipe_context *pipe,
struct fo_state *state = (struct fo_state *)depth_stencil;
failover->depth_stencil = state;
failover->dirty |= FO_NEW_DEPTH_STENCIL;
- failover->hw->bind_depth_stencil_state(failover->hw, state->hw_state);
+ failover->hw->bind_depth_stencil_alpha_state(failover->hw, state->hw_state);
}
static void
@@ -178,8 +139,8 @@ failover_delete_depth_stencil_state(struct pipe_context *pipe,
struct fo_state *state = (struct fo_state*)ds;
struct failover_context *failover = failover_context(pipe);
- failover->sw->delete_depth_stencil_state(pipe, state->sw_state);
- failover->hw->delete_depth_stencil_state(pipe, state->hw_state);
+ failover->sw->delete_depth_stencil_alpha_state(pipe, state->sw_state);
+ failover->hw->delete_depth_stencil_alpha_state(pipe, state->hw_state);
state->sw_state = 0;
state->hw_state = 0;
free(state);
@@ -434,18 +395,15 @@ failover_set_vertex_element(struct pipe_context *pipe,
void
failover_init_state_functions( struct failover_context *failover )
{
- failover->pipe.create_alpha_test_state = failover_create_alpha_test_state;
- failover->pipe.bind_alpha_test_state = failover_bind_alpha_test_state;
- failover->pipe.delete_alpha_test_state = failover_delete_alpha_test_state;
failover->pipe.create_blend_state = failover_create_blend_state;
failover->pipe.bind_blend_state = failover_bind_blend_state;
failover->pipe.delete_blend_state = failover_delete_blend_state;
failover->pipe.create_sampler_state = failover_create_sampler_state;
failover->pipe.bind_sampler_state = failover_bind_sampler_state;
failover->pipe.delete_sampler_state = failover_delete_sampler_state;
- failover->pipe.create_depth_stencil_state = failover_create_depth_stencil_state;
- failover->pipe.bind_depth_stencil_state = failover_bind_depth_stencil_state;
- failover->pipe.delete_depth_stencil_state = failover_delete_depth_stencil_state;
+ failover->pipe.create_depth_stencil_alpha_state = failover_create_depth_stencil_state;
+ failover->pipe.bind_depth_stencil_alpha_state = failover_bind_depth_stencil_state;
+ failover->pipe.delete_depth_stencil_alpha_state = failover_delete_depth_stencil_state;
failover->pipe.create_rasterizer_state = failover_create_rasterizer_state;
failover->pipe.bind_rasterizer_state = failover_bind_rasterizer_state;
failover->pipe.delete_rasterizer_state = failover_delete_rasterizer_state;
diff --git a/src/mesa/pipe/failover/fo_state_emit.c b/src/mesa/pipe/failover/fo_state_emit.c
index c99ecd4f8df..c663dd49476 100644
--- a/src/mesa/pipe/failover/fo_state_emit.c
+++ b/src/mesa/pipe/failover/fo_state_emit.c
@@ -55,10 +55,6 @@ failover_state_emit( struct failover_context *failover )
{
unsigned i;
- if (failover->dirty & FO_NEW_ALPHA_TEST)
- failover->sw->bind_alpha_test_state( failover->sw,
- failover->alpha_test->sw_state );
-
if (failover->dirty & FO_NEW_BLEND)
failover->sw->bind_blend_state( failover->sw,
failover->blend->sw_state );
@@ -70,8 +66,8 @@ failover_state_emit( struct failover_context *failover )
failover->sw->set_clip_state( failover->sw, &failover->clip );
if (failover->dirty & FO_NEW_DEPTH_STENCIL)
- failover->sw->bind_depth_stencil_state( failover->sw,
- failover->depth_stencil->sw_state );
+ failover->sw->bind_depth_stencil_alpha_state( failover->sw,
+ failover->depth_stencil->sw_state );
if (failover->dirty & FO_NEW_FRAMEBUFFER)
failover->sw->set_framebuffer_state( failover->sw, &failover->framebuffer );