On Sun, Jun 23, 2013 at 7:41 PM, Alex Deucher <alexdeuc...@gmail.com> wrote: > On Sat, Jun 22, 2013 at 11:53 AM, Martin Andersson <g02ma...@gmail.com> wrote: >> On Sat, Jun 22, 2013 at 12:22 PM, Marek Olšák <mar...@gmail.com> wrote: >>> Reviewed-by: Marek Olšák <mar...@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? > > Does something like this help? You might play with some variants of > this patch. This might break compute however as Tom had some problems > with CB flushes on cayman class hw in the past.
I tested this patch as it is and I found that it helped alot. Here is a comparison of three piglit runs. Take these numbers with a grain of salt, since the failures are random and I only did one run on each experiment. master: 11055/11781 my patch: 11216/11781 your patch: 11319/11781 The random failures are all but gone. I did three runs with you patch and only found three tests that still fail randomly: spec/!OpenGL 3.0/gl-3.0-texture-integer spec/glsl-1.40/uniform_buffer/fs-struct-pad spec/glsl-1.40/uniform_buffer/vs-struct-pad //Martin > Alex > > >> >>> Marek >>> >>> On Sun, Jun 16, 2013 at 1:27 PM, Martin Andersson <g02ma...@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@lists.freedesktop.org >>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev