<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>></div><div><br></div><div>Marek<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 14, 2018 at 12:20 PM Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">---<br>
 src/mesa/state_tracker/st_nir_lower_builtin.c | 6 +-----<br>
 1 file changed, 1 insertion(+), 5 deletions(-)<br>
<br>
diff --git a/src/mesa/state_tracker/st_nir_lower_builtin.c b/src/mesa/state_tracker/st_nir_lower_builtin.c<br>
index 195dc40b2ef..ab74d3183dc 100644<br>
--- a/src/mesa/state_tracker/st_nir_lower_builtin.c<br>
+++ b/src/mesa/state_tracker/st_nir_lower_builtin.c<br>
@@ -107,10 +107,6 @@ get_variable(lower_builtin_state *state, nir_deref_path *path,<br>
    memcpy(tokens, element->tokens, sizeof(tokens));<br>
<br>
    if (path->path[idx]->deref_type == nir_deref_type_array) {<br>
-      nir_const_value *c = nir_src_as_const_value(path->path[idx]->arr.index);<br>
-<br>
-      assert(c);<br>
-<br>
       /* we need to fixup the array index slot: */<br>
       switch (tokens[0]) {<br>
       case STATE_MODELVIEW_MATRIX:<br>
@@ -123,7 +119,7 @@ get_variable(lower_builtin_state *state, nir_deref_path *path,<br>
       case STATE_TEXGEN:<br>
       case STATE_TEXENV_COLOR:<br>
       case STATE_CLIPPLANE:<br>
-         tokens[1] = c->u32[0];<br>
+         tokens[1] = nir_src_as_uint(path->path[idx]->arr.index);<br>
          break;<br>
       }<br>
    }<br>
-- <br>
2.19.2<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>