[Mesa-dev] [PATCH 1/3] i965: Flush the RC and TC before doing a fast clear resolve

Kristian Høgsberg krh at bitplanet.net
Mon Aug 18 21:38:47 PDT 2014


On Mon, Aug 18, 2014 at 5:23 PM, Chris Forbes <chrisf at ijw.co.nz> wrote:
> Also fixes gears! ;)

... and how could I break glxgears.  For the record, though, I had no
piglit regressions with this series and I didn't see the glxgears
artifacts on mv IVB laptop or BDW machine.  Thanks for verifying.

Kristian

> Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>
>
> On Tue, Aug 19, 2014 at 12:20 PM, Kristian Høgsberg <krh at bitplanet.net> wrote:
>> The docs say "When performing a render target resolve, PIPE_CONTROL with end
>> of pipe sync must be delivered.", which doesn't actually tell us whether we
>> need to do it before or after.  Blorp did it before and after, and doing it
>> before certainly makes sense.  The resolve operation needs to read from the
>> MCS and if we don't flush the render cache it won't get up-to-date data.
>>
>> On the other hand, doing it after should not be necessary, since we call
>> brw_render_cache_set_check_flush() after the resolve.
>>
>> Fixes rendering corruption in kwin's cover switch effect and various steam
>> games.
>>
>> Missing flush spotted by Ken.
>>
>> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
>> Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>
>> ---
>>  src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
>> index 5f3817b..4fb20d7 100644
>> --- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
>> +++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
>> @@ -661,6 +661,8 @@ brw_meta_resolve_color(struct brw_context *brw,
>>     GLuint fbo, rbo;
>>     struct rect rect;
>>
>> +   intel_batchbuffer_emit_mi_flush(brw);
>> +
>>     _mesa_meta_begin(ctx, MESA_META_ALL);
>>
>>     _mesa_GenFramebuffers(1, &fbo);
>> @@ -693,8 +695,6 @@ brw_meta_resolve_color(struct brw_context *brw,
>>
>>     _mesa_meta_end(ctx);
>>
>> -   intel_batchbuffer_emit_mi_flush(brw);
>> -
>>     /* We're typically called from intel_update_state() and we're supposed to
>>      * return with the state all updated to what it was before
>>      * brw_meta_resolve_color() was called.  The meta rendering will have
>> --
>> 2.0.0
>>
>> _______________________________________________
>> 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