[Mesa-dev] [PATCH] r600g: Include SH and SMX when invalidating read caches
Martin Andersson
g02maran at gmail.com
Sat Jun 22 08:53:53 PDT 2013
On Sat, Jun 22, 2013 at 12:22 PM, Marek Olšák <maraeo at gmail.com> wrote:
> Reviewed-by: Marek Olšák <maraeo at gmail.com>
>
> BTW, SMX is a write cache, to maybe it shouldn't be part of this patch.
I made a little experiment where i ran
"ext_framebuffer_multisample-unaligned-blit 4 color downsample -auto"
10000 times and found that without SMX the test failed 177 times and
with SMX it didn't fail at all. So I do think the SMX cache should be
invalidated somewhere.
Before http://cgit.freedesktop.org/mesa/mesa/commit/?id=4539f8e20af286d1f521eb016c89c6d9af0b801c
it was under R600_CONTEXT_FLUSH_AND_INV, is that a better place?
If that is the proper place for SMX should SH also be there, since it
was also there before the patch, or do you have any other suggestions?
> Marek
>
> On Sun, Jun 16, 2013 at 1:27 PM, Martin Andersson <g02maran at gmail.com> wrote:
>> Not including the SH and SMX caches when invalidating read caches causes
>> random failures on some piglit tests when VA is enabled.
>>
>> Since the failures are random, and there other problems also causing random
>> failures, it's hard to know exactly what tests were effected, but these
>> tests now consistently pass:
>>
>> fast_color_clear/all-colors
>> fast_color_clear/redundant-clear
>> spec/!OpenGL 1.1/draw-pixels samples={2,4,6,8}
>> spec/!OpenGL 1.1/drawbuffer-modes
>> ---
>> src/gallium/drivers/r600/r600_hw_context.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
>> index 944b666..df20e56 100644
>> --- a/src/gallium/drivers/r600/r600_hw_context.c
>> +++ b/src/gallium/drivers/r600/r600_hw_context.c
>> @@ -231,6 +231,8 @@ void r600_flush_emit(struct r600_context *rctx)
>> if (rctx->flags & R600_CONTEXT_INVAL_READ_CACHES) {
>> cp_coher_cntl |= S_0085F0_VC_ACTION_ENA(1) |
>> S_0085F0_TC_ACTION_ENA(1) |
>> + S_0085F0_SH_ACTION_ENA(1) |
>> + S_0085F0_SMX_ACTION_ENA(1) |
>> S_0085F0_FULL_CACHE_ENA(1);
>> emit_flush = 1;
>> }
>> --
>> 1.8.3
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list