diff options
author | Marek Olšák <[email protected]> | 2013-08-26 17:19:39 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-08-31 01:34:30 +0200 |
commit | a77ee8b548d83614b11bbfb654b031b7d464c3e3 (patch) | |
tree | 08509657f61e58f5563c45b43f264018190e2c2c /src/gallium/drivers/radeonsi/si_commands.c | |
parent | aa5c40f97cf5d0609dfb8c0792eca5f6d5108579 (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/si_commands.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_commands.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeonsi/si_commands.c b/src/gallium/drivers/radeonsi/si_commands.c index e498bd2d12e..bf9592493c3 100644 --- a/src/gallium/drivers/radeonsi/si_commands.c +++ b/src/gallium/drivers/radeonsi/si_commands.c @@ -78,12 +78,3 @@ void si_cmd_surface_sync(struct si_pm4_state *pm4, uint32_t cp_coher_cntl) si_pm4_cmd_end(pm4, false); } } - -void si_cmd_flush_and_inv_cb_meta(struct si_pm4_state *pm4) -{ - si_pm4_cmd_begin(pm4, PKT3_EVENT_WRITE); - si_pm4_cmd_add(pm4, - EVENT_TYPE(V_028A90_FLUSH_AND_INV_CB_META) | - EVENT_INDEX(0)); - si_pm4_cmd_end(pm4, false); -} |