#include "cell_winsys.h"
#include "cell/common.h"
#include "rtasm/rtasm_ppc_spe.h"
-
+#include "tgsi/util/tgsi_scan.h"
struct cell_vbuf_render;
struct cell_vertex_shader_state
{
struct pipe_shader_state shader;
+ struct tgsi_shader_info info;
void *draw_data;
};
struct cell_fragment_shader_state
{
struct pipe_shader_state shader;
+ struct tgsi_shader_info info;
void *data;
};
+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];
- const struct pipe_depth_stencil_alpha_state *depth_stencil;
+ uint num_samplers;
+ 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;
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissor;
struct cell_texture *texture[PIPE_MAX_SAMPLERS];
+ uint num_textures;
struct pipe_viewport_state viewport;
struct pipe_vertex_buffer vertex_buffer[PIPE_ATTRIB_MAX];
struct pipe_vertex_element vertex_element[PIPE_ATTRIB_MAX];
extern struct pipe_context *
-cell_create_context(struct pipe_winsys *ws, struct cell_winsys *cws);
+cell_create_context(struct pipe_screen *screen, struct cell_winsys *cws);
extern void
cell_vertex_shader_queue_flush(struct draw_context *draw);
+/* XXX find a better home for this */
+extern void cell_update_vertex_fetch(struct draw_context *draw);
#endif /* CELL_CONTEXT_H */