diff options
author | Marek Olšák <[email protected]> | 2012-04-01 22:03:15 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-04-04 13:09:47 +0200 |
commit | 68bbfc1afe210d82acfb14a78b0fd8c436a8f78c (patch) | |
tree | 533df6301c0597c892a933f906009a1c2def191a /src/gallium/drivers/r600/r600_pipe.h | |
parent | c76462b45f1e3a0aa2ee7971191e30e8a5f52015 (diff) |
r600g: rework state emission of constant buffers
Framerate in ipers:
before: 43.6 FPS
after: 46.6 FPS
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 | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 6de33cb2a34..21bb535ca88 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -225,6 +225,21 @@ struct r600_stencil_ref ubyte writemask[2]; }; +struct r600_constant_buffer +{ + struct pipe_resource *buffer; + unsigned buffer_offset; + unsigned buffer_size; +}; + +struct r600_constbuf_state +{ + struct r600_atom atom; + struct r600_constant_buffer cb[PIPE_MAX_CONSTANT_BUFFERS]; + uint32_t enabled_mask; + uint32_t dirty_mask; +}; + struct r600_context { struct pipe_context context; struct blitter_context *blitter; @@ -248,10 +263,6 @@ struct r600_context { struct pipe_clip_state clip; struct r600_pipe_shader *ps_shader; struct r600_pipe_shader *vs_shader; - struct r600_pipe_state vs_const_buffer; - struct r600_pipe_resource_state vs_const_buffer_resource[R600_MAX_CONST_BUFFERS]; - struct r600_pipe_state ps_const_buffer; - struct r600_pipe_resource_state ps_const_buffer_resource[R600_MAX_CONST_BUFFERS]; struct r600_pipe_rasterizer *rasterizer; struct r600_pipe_state vgt; struct r600_pipe_state spi; @@ -282,9 +293,9 @@ struct r600_context { struct r600_atom r6xx_flush_and_inv_cmd; struct r600_db_misc_state db_misc_state; struct r600_atom vertex_buffer_state; + struct r600_constbuf_state vs_constbuf_state; + struct r600_constbuf_state ps_constbuf_state; - /* Below are variables from the old r600_context. - */ struct radeon_winsys_cs *cs; struct r600_range *range; @@ -488,6 +499,7 @@ void r600_bind_ps_shader(struct pipe_context *ctx, void *state); void r600_bind_vs_shader(struct pipe_context *ctx, void *state); void r600_delete_ps_shader(struct pipe_context *ctx, void *state); void r600_delete_vs_shader(struct pipe_context *ctx, void *state); +void r600_constant_buffers_dirty(struct r600_context *rctx, struct r600_constbuf_state *state); void r600_set_constant_buffer(struct pipe_context *ctx, uint shader, uint index, struct pipe_resource *buffer); struct pipe_stream_output_target * |