<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - [SKL bisected] texsubimage pbo intermittent failures"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91926#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - [SKL bisected] texsubimage pbo intermittent failures"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91926">bug 91926</a>
              from <span class="vcard"><a class="email" href="mailto:topi.pohjolainen@intel.com" title="Topi Pohjolainen <topi.pohjolainen@intel.com>"> <span class="fn">Topi Pohjolainen</span></a>
</span></b>
        <pre>I've been hopefully narrowing this down some more. What seems to make a
difference between a flush just after upload and a flush just after clear is
that in the latter case it is preceded by a _mesa_update_state() call.

I made brw_clear() to skip the entire clear but to just issue
brw_emit_mi_flush() (note that _mesa_clear() calls _mesa_update_state() before
it calls driver to do its thing). In the test there is specifically a glClear()
call between the data upload and the draw call sampling the loaded data.
This prevents the error from happening. If in turn I remove this specific
glClear() call in the test (that now doesn't no anything else than state update
and flush) than the error will re-appear. Recall that simple
brw_emit_mi_flush() after the upload BUT before _mesa_update_state() didn't
help.

I'll now start slicing _mesa_update_state().</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>