From 2f8453eea3b5ff8d2818517753d3990490f699b8 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 23 Sep 2010 13:34:36 +1000 Subject: r600g: use blitter to do db->cb flushing. use the blitter + custom stage to avoid doing a whole lot of state setup by hand. This makes life a lot easier for doing this on evergreen it also keeps all the state setup in one place. We setup a custom context state at the start with a flag to denote its for the flush, when it gets generated we generate the correct state for the flush and no longer have to do it all by hand. this should also make adding texture *to* depth easier. --- src/gallium/drivers/r600/r600_context.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/gallium/drivers/r600/r600_context.h') diff --git a/src/gallium/drivers/r600/r600_context.h b/src/gallium/drivers/r600/r600_context.h index 3107f189c78..8778f23a819 100644 --- a/src/gallium/drivers/r600/r600_context.h +++ b/src/gallium/drivers/r600/r600_context.h @@ -98,6 +98,7 @@ enum pipe_state_type { }; #define R600_MAX_RSTATE 16 +#define R600_STATE_FLAG_DSA_FLUSH 1 struct r600_context_state { union pipe_states state; @@ -107,6 +108,7 @@ struct r600_context_state { struct r600_shader shader; struct radeon_ws_bo *bo; unsigned nrstate; + unsigned flags; }; struct r600_vertex_element @@ -189,21 +191,6 @@ struct r600_context_hw_state_vtbl { int (*vs_shader)(struct r600_context *rctx, struct r600_context_state *rpshader, struct radeon_state *state); void (*init_config)(struct r600_context *rctx); - - - void (*texture_state_viewport)(struct r600_screen *rscreen, - struct r600_resource_texture *rtexture, - unsigned level); - void (*texture_state_cb)(struct r600_screen *rscreen, - struct r600_resource_texture *rtexture, - unsigned cb, - unsigned level); - void (*texture_state_db)(struct r600_screen *rscreen, - struct r600_resource_texture *rtexture, - unsigned level); - void (*texture_state_scissor)(struct r600_screen *rscreen, - struct r600_resource_texture *rtexture, - unsigned level); }; extern struct r600_context_hw_state_vtbl r600_hw_state_vtbl; extern struct r600_context_hw_state_vtbl eg_hw_state_vtbl; @@ -257,6 +244,7 @@ struct r600_context { struct u_upload_mgr *upload_ib; bool any_user_vbs; + void *custom_dsa_flush; }; /* Convenience cast wrapper. */ -- cgit v1.2.3