diff options
author | Jason Ekstrand <[email protected]> | 2019-03-07 11:45:13 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-03-07 21:20:30 +0000 |
commit | 1664de5924aa6d761be21afdee411654121515d1 (patch) | |
tree | ea9484e48251e569e7c06e3541c8c9664158020f /src/compiler/spirv/vtn_variables.c | |
parent | fcf2a0122e9ccf3be8d1fa3bd18b8dedbebd6acf (diff) |
nir/builder: Add a build_deref_array_imm helper
Unlike most of the cases in which we do this by hand, the new helper
properly handles non-32-bit pointers.
Reviewed-by: Karol Herbst <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index c3ce15aaaaf..053d6089e45 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -602,7 +602,7 @@ _vtn_local_load_store(struct vtn_builder *b, bool load, nir_deref_instr *deref, unsigned elems = glsl_get_length(deref->type); for (unsigned i = 0; i < elems; i++) { nir_deref_instr *child = - nir_build_deref_array(&b->nb, deref, nir_imm_int(&b->nb, i)); + nir_build_deref_array_imm(&b->nb, deref, i); _vtn_local_load_store(b, load, child, inout->elems[i]); } } else { |