<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:idr@freedesktop.org" title="Ian Romanick <idr@freedesktop.org>"> <span class="fn">Ian Romanick</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - [radeonsi] Arma 3 crashes: Too many fragment shader texture samplers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91951">bug 91951</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;">Status</td>
           <td>NEW
           </td>
           <td>NEEDINFO
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - [radeonsi] Arma 3 crashes: Too many fragment shader texture samplers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91951#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - [radeonsi] Arma 3 crashes: Too many fragment shader texture samplers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91951">bug 91951</a>
              from <span class="vcard"><a class="email" href="mailto:idr@freedesktop.org" title="Ian Romanick <idr@freedesktop.org>"> <span class="fn">Ian Romanick</span></a>
</span></b>
        <pre>I believe radeonsi only advertises support for 32 samplers, and this shader
declares 33.

$ grep 'uniform[[:space:]]\+sampler' ~/file_91951.txt  | wc -l
33

Looking at the code, far fewer than 33 are used.

$ grep 'var_ref tex[0-9]' ~/file_91951.txt  | wc -l
21

If there are only 21 references to sampler variables, it is impossible for more
than 21 samplers to be used.

I also notice that this shader has

#ifdef GL_ARB_separate_shader_objects
#extension GL_ARB_separate_shader_objects : enable
#endif

at the top.  GL_ARB_separate_shader_objects changes some of the rules about
what things are allowed to be eliminated from a linked shader.  I didn't think
it had any affect on uniforms, so it's possible there's some bad interaction
there.

Can someone try running this on radeonsi with the environment variable
MESA_EXTENSION_OVERRIDE=-GL_ARB_separate_shader_objects?</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>