summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_context.h
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-07-16 04:35:58 +0800
committerChia-I Wu <olv@lunarg.com>2010-07-29 13:45:30 +0800
commit6d28bf917fb1d741d90fd3f05c22769376021fca (patch)
tree9b8724b30658d61426297113136c2d23c0c62f14 /src/gallium/drivers/r600/r600_context.h
parentc5e9d3114a80d6d35a2f4e65783cdc75fcc2deac (diff)
gallium: Implement draw_vbo and set_index_buffer for all drivers.
Some drivers define a generic function that is called by all drawing functions. To implement draw_vbo for such drivers, either draw_vbo calls the generic function or the prototype of the generic function is changed to match draw_vbo. Other drivers have no such generic function. draw_vbo is implemented by calling either draw_arrays and draw_elements. For most drivers, set_index_buffer does not mark the state dirty for tracking. Instead, the index buffer state is emitted whenever draw_vbo is called, just like the case with draw_elements. It surely can be improved.
Diffstat (limited to 'src/gallium/drivers/r600/r600_context.h')
-rw-r--r--src/gallium/drivers/r600/r600_context.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_context.h b/src/gallium/drivers/r600/r600_context.h
index 1f03b202ee..9427c19d05 100644
--- a/src/gallium/drivers/r600/r600_context.h
+++ b/src/gallium/drivers/r600/r600_context.h
@@ -157,6 +157,7 @@ struct r600_context {
struct r600_context_state *vs_sampler_view[PIPE_MAX_ATTRIBS];
struct r600_vertex_element *vertex_elements;
struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+ struct pipe_index_buffer index_buffer;
};
#if 0
@@ -201,6 +202,8 @@ void r600_draw_range_elements(struct pipe_context *ctx,
unsigned index_size, int index_bias, unsigned min_index,
unsigned max_index, unsigned mode,
unsigned start, unsigned count);
+void r600_draw_vbo(struct pipe_context *ctx,
+ const struct pipe_draw_info *info);
void r600_init_blit_functions(struct r600_context *rctx);
void r600_init_state_functions(struct r600_context *rctx);