diff options
author | Marek Olšák <[email protected]> | 2012-03-30 23:52:45 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-04-04 13:09:47 +0200 |
commit | c76462b45f1e3a0aa2ee7971191e30e8a5f52015 (patch) | |
tree | 889c38d40f20a2d89712e5d70e8ca6260f6227d1 /src/gallium/drivers/r600/r600_pipe.h | |
parent | 5c03d1fa0fbe130153a2e4c937f684c680ca20b2 (diff) |
r600g: rework state emission of vertex buffers
This reduces a little of CPU overhead.
The idea is to translate pipe vertex buffers directly into the CS
and not using any intermediate representations.
Framerate in Torcs:
before: 32.2
after: 34.6
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 96df79b9bf3..6de33cb2a34 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -237,7 +237,6 @@ struct r600_context { struct radeon_winsys *ws; struct r600_pipe_state *states[R600_PIPE_NSTATES]; struct r600_vertex_element *vertex_elements; - struct r600_pipe_resource_state fs_resource[PIPE_MAX_ATTRIBS]; struct pipe_framebuffer_state framebuffer; unsigned cb_target_mask; unsigned cb_color_control; @@ -282,6 +281,7 @@ struct r600_context { struct r600_surface_sync_cmd surface_sync_cmd; struct r600_atom r6xx_flush_and_inv_cmd; struct r600_db_misc_state db_misc_state; + struct r600_atom vertex_buffer_state; /* Below are variables from the old r600_context. */ @@ -318,8 +318,7 @@ struct r600_context { boolean predicate_drawing; struct r600_range ps_resources; struct r600_range vs_resources; - struct r600_range fs_resources; - int num_ps_resources, num_vs_resources, num_fs_resources; + int num_ps_resources, num_vs_resources; unsigned num_so_targets; struct r600_so_target *so_targets[PIPE_MAX_SO_BUFFERS]; @@ -334,6 +333,8 @@ struct r600_context { /* With rasterizer discard, there doesn't have to be a pixel shader. * In that case, we bind this one: */ void *dummy_pixel_shader; + + bool vertex_buffers_dirty; }; static INLINE void r600_emit_atom(struct r600_context *rctx, struct r600_atom *atom) |