<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 13, 2018, 6:00 PM Rob Clark <<a href="mailto:robdclark@gmail.com">robdclark@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Nov 13, 2018 at 5:25 PM Eric Anholt <<a href="mailto:eric@anholt.net" target="_blank" rel="noreferrer">eric@anholt.net</a>> wrote:<br>
><br>
> Rob Clark <<a href="mailto:robdclark@gmail.com" target="_blank" rel="noreferrer">robdclark@gmail.com</a>> writes:<br>
><br>
> > If we can't clear all the buffers with pctx->clear() (say, for example,<br>
> > because of ColorMask), push the buffers we *can* clear with pctx->clear()<br>
> > first.  Tilers want to see clears coming before draws to enable fast-<br>
> > paths, and clearing one of the attachments with a quad-draw first<br>
> > confuses that logic.<br>
><br>
> Oh, nice!<br>
><br>
> Reviewed-by: Eric Anholt <<a href="mailto:eric@anholt.net" target="_blank" rel="noreferrer">eric@anholt.net</a>><br>
><br>
> Though it feels pretty silly that the ->clear() caller needs a<br>
> clear_with_quad implementation when the ->clear() implementation in the<br>
> driver also needs a clear_with_quad implementation for non-fast-cleared<br>
> buffers.  :/<br>
<br>
hmm, so perhaps one easy option is to change pctx->clear() to return a<br>
boolean, so driver can return false to ask the state tracker to do a<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Ideally all pipe context functions should always return void to allow gallium multithreading.</div><div dir="auto"><br></div><div dir="auto">A pipe cap for colormasked and scissored clears would be better.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
clear_with_quad()..  maybe that would be a first step towards allowing<br>
driver to handle clears w/ colormask and possibly scissor (although<br>
for the later, plus<br>
glInvalidateFramebuffer()/glInvalidateSubFramebuffer(), I was thinking<br>
of pctx->invalidate_surface()/pctx->invalidate_sub_surface())</blockquote></div></div><div dir="auto"><br></div><div dir="auto">Pipe context already contains an invalidate function.</div><div dir="auto"><br></div><div dir="auto">Marek</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
But either way, I guess this patch is a simple stop-gap solution.<br>
<br>
BR,<br>
-R<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank" rel="noreferrer">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div></div>