summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/ppu/cell_context.h
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2008-03-17 15:45:52 -0700
committerIan Romanick <idr@us.ibm.com>2008-03-17 15:47:45 -0700
commit1936e4bdfd776f78f9fe44f77ce66066fd166360 (patch)
treec72c00d624d332733d2b643e3dffd5114b18cc34 /src/gallium/drivers/cell/ppu/cell_context.h
parent0c715de39fa8337a2753dacd77ed280000416c1a (diff)
cell: Initial code-gen for alpha / stencil / depth testing
Alpha test is currently broken because all per-fragment testing occurs before alpha is calculated. Stencil test is currently broken because the Z-clear code asserts if there is a stencil buffer.
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_context.h')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_context.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_context.h b/src/gallium/drivers/cell/ppu/cell_context.h
index b221424323..9e79db0ace 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.h
+++ b/src/gallium/drivers/cell/ppu/cell_context.h
@@ -57,16 +57,37 @@ struct cell_fragment_shader_state
};
+struct cell_blend_state {
+ struct pipe_blend_state base;
+
+ /**
+ * Generated code to perform alpha blending
+ */
+ struct spe_function code;
+};
+
+
+struct cell_depth_stencil_alpha_state {
+ struct pipe_depth_stencil_alpha_state base;
+
+ /**
+ * Generated code to perform alpha, stencil, and depth testing on the SPE
+ */
+ struct spe_function code;
+
+};
+
+
struct cell_context
{
struct pipe_context pipe;
struct cell_winsys *winsys;
- const struct pipe_blend_state *blend;
+ const struct cell_blend_state *blend;
const struct pipe_sampler_state *sampler[PIPE_MAX_SAMPLERS];
uint num_samplers;
- const struct pipe_depth_stencil_alpha_state *depth_stencil;
+ const struct cell_depth_stencil_alpha_state *depth_stencil;
const struct pipe_rasterizer_state *rasterizer;
const struct cell_vertex_shader_state *vs;
const struct cell_fragment_shader_state *fs;