<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Gen6+] piglit's arb_shader_image_load_store-host-mem-barrier fails with a glGetTexSubImage fallback path"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105351#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Gen6+] piglit's arb_shader_image_load_store-host-mem-barrier fails with a glGetTexSubImage fallback path"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105351">bug 105351</a>
              from <span class="vcard"><a class="email" href="mailto:currojerez@riseup.net" title="Francisco Jerez <currojerez@riseup.net>"> <span class="fn">Francisco Jerez</span></a>
</span></b>
        <pre>(In reply to Andriy Khulap from <a href="show_bug.cgi?id=105351#c4">comment #4</a>)
<span class="quote">> Actually intel_get_tex_sub_image() is called 3 times: 2 times during test
> initialization (source datas are float 0 1 0 1 and all floats 66) and once
> when checking the results (source data is half red - half green).
> Destination addresses for these 3 calls all different.
> </span >
Yeah, but the textures downloaded by those are temporaries which aren't
accessed by image load/store either.

<span class="quote">> Modifying test to do Write-Read-Write (instead of Write-Write) solving the
> issue.
> Write-Write-Write still fails.

> P.S. these results are for "fallback" path with intel_gettexsubimage_blorp
> returning false.</span >

>From playing around with the test a bit I believe the corruption is caused by
glBufferSubData() unexpectedly taking the unsynchronized path when
intel_gettexsubimage_blorp() hasn't been used earlier -- Other than that the
glGetTexSubImage path taken doesn't seem to have any influence on the result. 
The reason why glBufferSubData() is taking the unsynchronized path as a side
effect even though the BO is busy is because image surface setup isn't using
the intel_bufferobj_buffer() wrapper to get the BO pointer, which updates
intel_buffer_object::gpu_active_start/end used by glBufferSubData() to decide
whether to take the unsynchronized path.  The attached patch should address
that (along with a few more issues I found while looking into this).</pre>
        </div>
      </p>


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

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