<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - piglit test for render reordering"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99293#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - piglit test for render reordering"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99293">bug 99293</a>
              from <span class="vcard"><a class="email" href="mailto:robclark@freedesktop.org" title="Rob Clark <robclark@freedesktop.org>"> <span class="fn">Rob Clark</span></a>
</span></b>
        <pre>hmm, I meant to write some test but never got around to it.

I was in particular thinking of something really simple that toggled between
two fbo's rendering to current fbo and sampling from previous fbo.  The driver
should detect the read after write dependency and split up the batches so that
order is preserved (vs reordering things so draw #1, #3, #5 that write the FBO
all happen before #2, #4, #6 that read the FBO).

That said, I guess there are plenty of other ways that issues could crop up
(TF/ssbo/images are probably good candidates)..

TF is possibly an interesting case, since if binning pass is enabled (which is
default), then for each tile the driver renders, it will only run the VS for
the subset of vertices which touch the current tile.  I'm a bit curious what
will happen in this sort of case.  I guess it could be a similar issue for
ssbo/image written by VS (although for other reasons I have only exposed
ssbo/image in FS and CS).

In freedreno, I just track which resources are read and/or written by a given
draw (without really caring that it is VBO/TFBO/SSBO/texture/etc), which has
worked pretty well.  The occasional small bug that I introduced, for example
when adding ssbo/image support, simply amounting to forgeting to add
appropriate resource_read()/resource_written() call.

(That said, because of binning pass, I probably need to revisit TF case..
things written by draw #1 in VS and read in draw #2, probably shouldn't cause
the batch to be split, but might need special handling to disable using
visibility stream from binning pass to skip VS invocations)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>