<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:t_arceri@yahoo.com.au" title="Timothy Arceri <t_arceri@yahoo.com.au>"> <span class="fn">Timothy Arceri</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Assertion hit in opt_array_splitting with recursive array indexing"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89607">bug 89607</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>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Assertion hit in opt_array_splitting with recursive array indexing"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89607#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Assertion hit in opt_array_splitting with recursive array indexing"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89607">bug 89607</a>
              from <span class="vcard"><a class="email" href="mailto:t_arceri@yahoo.com.au" title="Timothy Arceri <t_arceri@yahoo.com.au>"> <span class="fn">Timothy Arceri</span></a>
</span></b>
        <pre>Fixed by:

commit    4a600024242be2b8684ab2cc215171f31db594b0

glsl/opt_array_splitting: Fix crash when doing array indexing into other arrays

When we find indirect indexing into an array, the current implementation
of the array spliiting optimization pass does not look further into the
expression tree. However, if the variable expression involves variable
indexing into other arrays, we can miss that these other arrays also have
variable indexing. If that happens, the pass will crash later on after
hitting an assertion put there to ensure that split arrays are in fact
always indexed via constants:

shader_runner: opt_array_splitting.cpp:296:
void ir_array_splitting_visitor::split_deref(ir_dereference**): Assertion
`constant' failed.

This patch fixes the problem by letting the pass step into the variable
index expression to identify these cases properly.

Bugzilla: <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Assertion hit in opt_array_splitting with recursive array indexing"
   href="show_bug.cgi?id=89607">https://bugs.freedesktop.org/show_bug.cgi?id=89607</a>
Reviewed-by: Timothy Arceri <<a href="mailto:timothy.arceri@collabora.com">timothy.arceri@collabora.com</a>></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>