diff options
author | Jason Ekstrand <[email protected]> | 2018-12-14 10:56:16 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-12-16 15:07:28 -0600 |
commit | db197fdb6c2de62ca84270cffea6a7e09b457f2b (patch) | |
tree | 44ef8a378b32e736e1860827eaded99e5cb2b81e /src/mesa/state_tracker | |
parent | 47e1e0692c00bfbf03958a5c1c32a8ee933a6783 (diff) |
st/nir: Use nir_src_as_uint for tokens
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_nir_lower_builtin.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_nir_lower_builtin.c b/src/mesa/state_tracker/st_nir_lower_builtin.c index 195dc40b2ef..ab74d3183dc 100644 --- a/src/mesa/state_tracker/st_nir_lower_builtin.c +++ b/src/mesa/state_tracker/st_nir_lower_builtin.c @@ -107,10 +107,6 @@ get_variable(lower_builtin_state *state, nir_deref_path *path, memcpy(tokens, element->tokens, sizeof(tokens)); if (path->path[idx]->deref_type == nir_deref_type_array) { - nir_const_value *c = nir_src_as_const_value(path->path[idx]->arr.index); - - assert(c); - /* we need to fixup the array index slot: */ switch (tokens[0]) { case STATE_MODELVIEW_MATRIX: @@ -123,7 +119,7 @@ get_variable(lower_builtin_state *state, nir_deref_path *path, case STATE_TEXGEN: case STATE_TEXENV_COLOR: case STATE_CLIPPLANE: - tokens[1] = c->u32[0]; + tokens[1] = nir_src_as_uint(path->path[idx]->arr.index); break; } } |