summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/cell
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2007-12-17 16:14:29 +0000
committerKeith Whitwell <[email protected]>2007-12-17 16:14:29 +0000
commitbfe79babf99e6b9435195178d1ea64687c60d161 (patch)
tree2d526bbee445fce7db6cd2bba7207cfcebe74f0e /src/mesa/pipe/cell
parent556e247cee905f84d639b4a292e891c24b36bea1 (diff)
gallium: incorporate alpha state into depth_stencil state object.
Diffstat (limited to 'src/mesa/pipe/cell')
-rw-r--r--src/mesa/pipe/cell/ppu/cell_context.c4
-rw-r--r--src/mesa/pipe/cell/ppu/cell_context.h3
-rw-r--r--src/mesa/pipe/cell/ppu/cell_state.h9
-rw-r--r--src/mesa/pipe/cell/ppu/cell_state_blend.c40
4 files changed, 7 insertions, 49 deletions
diff --git a/src/mesa/pipe/cell/ppu/cell_context.c b/src/mesa/pipe/cell/ppu/cell_context.c
index eff33da969f..b448a8aa8cd 100644
--- a/src/mesa/pipe/cell/ppu/cell_context.c
+++ b/src/mesa/pipe/cell/ppu/cell_context.c
@@ -176,10 +176,6 @@ cell_create_context(struct pipe_winsys *winsys, struct cell_winsys *cws)
/* state setters */
- cell->pipe.create_alpha_test_state = cell_create_alpha_test_state;
- cell->pipe.bind_alpha_test_state = cell_bind_alpha_test_state;
- cell->pipe.delete_alpha_test_state = cell_delete_alpha_test_state;
-
cell->pipe.create_blend_state = cell_create_blend_state;
cell->pipe.bind_blend_state = cell_bind_blend_state;
cell->pipe.delete_blend_state = cell_delete_blend_state;
diff --git a/src/mesa/pipe/cell/ppu/cell_context.h b/src/mesa/pipe/cell/ppu/cell_context.h
index 96f000eef4b..f8d6cc5d323 100644
--- a/src/mesa/pipe/cell/ppu/cell_context.h
+++ b/src/mesa/pipe/cell/ppu/cell_context.h
@@ -40,10 +40,9 @@ struct cell_context
struct cell_winsys *winsys;
- const struct pipe_alpha_test_state *alpha_test;
const struct pipe_blend_state *blend;
const struct pipe_sampler_state *sampler[PIPE_MAX_SAMPLERS];
- const struct pipe_depth_stencil_state *depth_stencil;
+ const struct pipe_depth_stencil_alpha_state *depth_stencil;
const struct pipe_rasterizer_state *rasterizer;
struct pipe_blend_color blend_color;
diff --git a/src/mesa/pipe/cell/ppu/cell_state.h b/src/mesa/pipe/cell/ppu/cell_state.h
index 4bad45950ba..b01814202d9 100644
--- a/src/mesa/pipe/cell/ppu/cell_state.h
+++ b/src/mesa/pipe/cell/ppu/cell_state.h
@@ -27,13 +27,6 @@ cell_set_framebuffer_state( struct pipe_context *,
const struct pipe_framebuffer_state * );
-extern void *
-cell_create_alpha_test_state(struct pipe_context *,
- const struct pipe_alpha_test_state *);
-extern void
-cell_bind_alpha_test_state(struct pipe_context *, void *);
-extern void
-cell_delete_alpha_test_state(struct pipe_context *, void *);
extern void *
cell_create_blend_state(struct pipe_context *, const struct pipe_blend_state *);
@@ -57,7 +50,7 @@ cell_delete_sampler_state(struct pipe_context *, void *);
extern void *
cell_create_depth_stencil_state(struct pipe_context *,
- const struct pipe_depth_stencil_state *);
+ const struct pipe_depth_stencil_alpha_state *);
extern void
cell_bind_depth_stencil_state(struct pipe_context *, void *);
diff --git a/src/mesa/pipe/cell/ppu/cell_state_blend.c b/src/mesa/pipe/cell/ppu/cell_state_blend.c
index e807463d902..efcb9e38a4c 100644
--- a/src/mesa/pipe/cell/ppu/cell_state_blend.c
+++ b/src/mesa/pipe/cell/ppu/cell_state_blend.c
@@ -69,44 +69,14 @@ void cell_set_blend_color( struct pipe_context *pipe,
}
-/** XXX move someday? Or consolidate all these simple state setters
- * into one file.
- */
-
-void *
-cell_create_alpha_test_state(struct pipe_context *pipe,
- const struct pipe_alpha_test_state *alpha)
-{
- struct pipe_alpha_test_state *state = MALLOC( sizeof(struct pipe_alpha_test_state) );
- memcpy(state, alpha, sizeof(struct pipe_alpha_test_state));
- return state;
-}
-
-void
-cell_bind_alpha_test_state(struct pipe_context *pipe,
- void *alpha)
-{
- struct cell_context *cell = cell_context(pipe);
-
- cell->alpha_test = (const struct pipe_alpha_test_state *)alpha;
-
- cell->dirty |= CELL_NEW_ALPHA_TEST;
-}
-
-void
-cell_delete_alpha_test_state(struct pipe_context *pipe,
- void *alpha)
-{
- FREE( alpha );
-}
void *
cell_create_depth_stencil_state(struct pipe_context *pipe,
- const struct pipe_depth_stencil_state *depth_stencil)
+ const struct pipe_depth_stencil_alpha_state *depth_stencil)
{
- struct pipe_depth_stencil_state *state =
- MALLOC( sizeof(struct pipe_depth_stencil_state) );
- memcpy(state, depth_stencil, sizeof(struct pipe_depth_stencil_state));
+ struct pipe_depth_stencil_alpha_state *state =
+ MALLOC( sizeof(struct pipe_depth_stencil_alpha_state) );
+ memcpy(state, depth_stencil, sizeof(struct pipe_depth_stencil_alpha_state));
return state;
}
@@ -116,7 +86,7 @@ cell_bind_depth_stencil_state(struct pipe_context *pipe,
{
struct cell_context *cell = cell_context(pipe);
- cell->depth_stencil = (const struct pipe_depth_stencil_state *)depth_stencil;
+ cell->depth_stencil = (const struct pipe_depth_stencil_alpha_state *)depth_stencil;
cell->dirty |= CELL_NEW_DEPTH_STENCIL;
}