<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 19, 2017 at 12:40 PM, Francisco Jerez <span dir="ltr"><<a href="mailto:currojerez@riseup.net" target="_blank">currojerez@riseup.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">"Pohjolainen, Topi" <<a href="mailto:topi.pohjolainen@gmail.com">topi.pohjolainen@gmail.com</a>> writes:<br>
<br>
> On Thu, Jan 19, 2017 at 12:10:02PM -0800, Francisco Jerez wrote:<br>
>> Topi Pohjolainen <<a href="mailto:topi.pohjolainen@gmail.com">topi.pohjolainen@gmail.com</a>> writes:<br>
>><br>
>> > CC: Francisco Jerez <<a href="mailto:currojerez@riseup.net">currojerez@riseup.net</a>><br>
>> > CC: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
>> > CC: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
>> > Signed-off-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
>> > ---<br>
>> > src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c | 3 +++<br>
>> > 1 file changed, 3 insertions(+)<br>
>> ><br>
>> > diff --git a/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c b/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c<br>
>> > index 647a362..594bd5a 100644<br>
>> > --- a/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c<br>
>> > +++ b/src/mesa/drivers/dri/i965/<wbr>genX_blorp_exec.c<br>
>> > @@ -261,4 +261,7 @@ retry:<br>
>> ><br>
>> > if (params->dst.enabled)<br>
>> > brw_render_cache_set_add_bo(<wbr>brw, params->dst.addr.buffer);<br>
>> > +<br>
>> > + if (params->depth.enabled)<br>
>> > + brw_render_cache_set_add_bo(<wbr>brw, params->depth.addr.buffer);<br>
>><br>
>> What about the stencil buffer? Stencil texturing is likely to be<br>
>> unhappy unless you mark it as pending flush as well...<br>
><br>
> As far as I know i965 only clears depth and color using blorp, stencil gets<br>
> cleared using meta. Blits in turn have it as destination.<br>
><br>
<br>
</span>That doesn't sound like a safe assumption to rely on looking forward if<br>
the blorp api already exposes support for stencil writes -- Tracking<br>
down the ultimate cause of a memory coherency bugs can be really hard,<br>
why make our future lives more intentionally difficult by introducing<br>
buggy corner cases like this? The extra check is not going to hurt<br>
performance or cause any other harmful side effects unless stencil<br>
writes are used...<br></blockquote><div><br></div><div>Agreed. Let's stick it in there for stencil too. I've got patches to switch i965 over to blorp for depth/stencil blits. I never landed them because of what was most likely flushing bugs. I'm hoping that you've fixed those and I'll revive the patches.<br><br></div><div>Also, please make sure these fixes hit stable.<br><br></div><div>--Jason <br></div></div><br></div></div>