<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dark_sylinc@yahoo.com.ar" title="Matias N. Goldberg <dark_sylinc@yahoo.com.ar>"> <span class="fn">Matias N. Goldberg</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - GL_ARB_buffer_storage crippled extension on r600, radeonsi and amdgpu Mesa drivers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102204">bug 102204</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>dark_sylinc@yahoo.com.ar
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - GL_ARB_buffer_storage crippled extension on r600, radeonsi and amdgpu Mesa drivers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102204#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - GL_ARB_buffer_storage crippled extension on r600, radeonsi and amdgpu Mesa drivers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=102204">bug 102204</a>
              from <span class="vcard"><a class="email" href="mailto:dark_sylinc@yahoo.com.ar" title="Matias N. Goldberg <dark_sylinc@yahoo.com.ar>"> <span class="fn">Matias N. Goldberg</span></a>
</span></b>
        <pre>OK this left me wondering.

I looked further into what happens when you call glBufferStorage, and it seems
that buffer_usage in st_cb_bufferobjects.c
<a href="https://github.com/anholt/mesa/blob/master/src/mesa/state_tracker/st_cb_bufferobjects.c#L226">https://github.com/anholt/mesa/blob/master/src/mesa/state_tracker/st_cb_bufferobjects.c#L226</a>
stores all buffers in VRAM unless GL_CLIENT_STORAGE_BIT is used because it
always returns PIPE_USAGE_DEFAULT.

The chosen pipe_resource_usage will end up in si_init_resource_fields
(<a href="https://github.com/anholt/mesa/blob/master/src/gallium/drivers/radeonsi/si_buffer.c#L103">https://github.com/anholt/mesa/blob/master/src/gallium/drivers/radeonsi/si_buffer.c#L103</a>)
which ends up putting the buffers all buffers in VRAM with Write Combining
(unless GL_CLIENT_STORAGE_BIT is set)

That is... an odd choice. This is specially bad for buffers requested with
GL_MAP_READ_BIT flags, which clearly should not be stored in VRAM with WC bits
set.

This indeed looks like a bug to me. Unfortunately, these hint flags don't map
really well to HW.</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>