summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/radeonsi_pipe.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-08-26 17:19:39 +0200
committerMarek Olšák <[email protected]>2013-08-31 01:34:30 +0200
commita77ee8b548d83614b11bbfb654b031b7d464c3e3 (patch)
tree08509657f61e58f5563c45b43f264018190e2c2c /src/gallium/drivers/radeonsi/radeonsi_pipe.h
parentaa5c40f97cf5d0609dfb8c0792eca5f6d5108579 (diff)
radeonsi: simplify and improve flushing
This mimics r600g. The R600_CONTEXT_xxx flags are added to rctx->b.flags and si_emit_cache_flush emits the packets. That's it. The shared radeon code tells us when the streamout cache should be flushed, so we have to check the flags anyway. There is a new atom "cache_flush", because caches must be flushed *after* resource descriptors are changed in memory. Functional changes: * Write caches are flushed at the end of CS and read caches are flushed at its beginning. * Sampler view states are removed from si_state, they only held the flush flags. * Everytime a shader is changed, the I cache is flushed. Is this needed? Due to a hw bug, this also flushes the K cache. * The WRITE_DATA packet is changed to use TC, which fixes a rendering issue in openarena. I'm not sure how TC interacts with CP DMA, but for now it seems to work better than any other solution I tried. (BTW CIK allows us to use TC for CP DMA.) * Flush the K cache instead of the texture cache when updating resource descriptors (due to a hw bug, this also flushes the I cache). I think the K cache flush is correct here, but I'm not sure if the texture cache should be flushed too (probably not considering we use TC for WRITE_DATA, but we don't use TC for CP DMA). * The number of resource contexts is decreased to 16. With all of these cache changes, 4 doesn't work, but 8 works, which suggests I'm actually doing the right thing here and the pipeline isn't drained during flushes. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_pipe.h')
-rw-r--r--src/gallium/drivers/radeonsi/radeonsi_pipe.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.h b/src/gallium/drivers/radeonsi/radeonsi_pipe.h
index 9d84e613e51..61fdfe2a3dd 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_pipe.h
+++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.h
@@ -131,8 +131,12 @@ struct r600_context {
union {
struct {
+ /* The order matters. */
struct r600_atom *const_buffers[SI_NUM_SHADERS];
struct r600_atom *sampler_views[SI_NUM_SHADERS];
+ /* Caches must be flushed after resource descriptors are
+ * updated in memory. */
+ struct r600_atom *cache_flush;
};
struct r600_atom *array[0];
} atoms;
@@ -179,7 +183,6 @@ struct r600_context {
unsigned backend_mask;
unsigned max_db; /* for OQ */
- unsigned flags;
boolean predicate_drawing;
unsigned num_so_targets;
@@ -198,12 +201,11 @@ struct r600_context {
/* With rasterizer discard, there doesn't have to be a pixel shader.
* In that case, we bind this one: */
struct si_pipe_shader *dummy_pixel_shader;
+ struct r600_atom cache_flush;
/* SI state handling */
union si_state queued;
union si_state emitted;
-
- bool flush_and_inv_cb_meta;
};
/* r600_blit.c */