summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.h')
-rw-r--r--src/gallium/drivers/r300/r300_context.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 0e5e471d116..fec2bad5461 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -169,10 +169,7 @@ struct r300_fragment_shader {
int indirections;
/* Indirection node offsets */
- int offset0;
- int offset1;
- int offset2;
- int offset3;
+ int alu_offset[4];
/* Machine instructions */
struct {
@@ -234,6 +231,29 @@ struct r300_vertex_format {
int tab[16];
};
+struct r300_vertex_shader {
+ /* Parent class */
+ struct pipe_shader_state state;
+ struct tgsi_shader_info info;
+
+ /* Fallback shader, because Draw has issues */
+ struct draw_vertex_shader* draw;
+
+ /* Has this shader been translated yet? */
+ boolean translated;
+
+ /* Number of used instructions */
+ int instruction_count;
+
+ /* Machine instructions */
+ struct {
+ uint32_t inst0;
+ uint32_t inst1;
+ uint32_t inst2;
+ uint32_t inst3;
+ } instructions[128]; /*< XXX magic number */
+};
+
struct r300_context {
/* Parent class */
struct pipe_context context;
@@ -273,6 +293,8 @@ struct r300_context {
int vertex_buffer_count;
/* Vertex information. */
struct r300_vertex_format vertex_info;
+ /* Vertex shader. */
+ struct r300_vertex_shader* vs;
/* Viewport state. */
struct r300_viewport_state* viewport_state;
/* Bitmask of dirty state objects. */
@@ -287,7 +309,7 @@ static struct r300_context* r300_context(struct pipe_context* context) {
}
/* Context initialization. */
-struct draw_stage* r300_draw_swtcl_stage(struct r300_context* r300);
+struct draw_stage* r300_draw_stage(struct r300_context* r300);
void r300_init_state_functions(struct r300_context* r300);
void r300_init_surface_functions(struct r300_context* r300);