diff options
author | Marek Olšák <[email protected]> | 2010-05-16 03:36:50 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-05-16 04:10:00 +0200 |
commit | dca9624201319950aa4c78ad5cc7dd7121e2b347 (patch) | |
tree | d8d9f3466f17c59b521984d72ad592a1e84fc2de | |
parent | 7672305da56ca81d272b0588dc7f2931898cf19e (diff) |
r300g/swtcl: call update_derived_state only once per draw-call
-rw-r--r-- | src/gallium/drivers/r300/r300_render.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 079cf260394..667f813fad5 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -735,6 +735,8 @@ void r300_swtcl_draw_arrays(struct pipe_context* pipe, return; } + r300_update_derived_state(r300); + for (i = 0; i < r300->vertex_buffer_count; i++) { void* buf = pipe_buffer_map(pipe, r300->vertex_buffer[i].buffer, @@ -779,6 +781,8 @@ void r300_swtcl_draw_range_elements(struct pipe_context* pipe, return; } + r300_update_derived_state(r300); + for (i = 0; i < r300->vertex_buffer_count; i++) { void* buf = pipe_buffer_map(pipe, r300->vertex_buffer[i].buffer, @@ -827,7 +831,7 @@ struct r300_render { size_t vbo_max_used; void * vbo_ptr; - struct pipe_transfer *vbo_transfer; + struct pipe_transfer *vbo_transfer; }; static INLINE struct r300_render* @@ -842,8 +846,6 @@ r300_render_get_vertex_info(struct vbuf_render* render) struct r300_render* r300render = r300_render(render); struct r300_context* r300 = r300render->r300; - r300_update_derived_state(r300); - return &r300->vertex_info; } |