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/nir/nir_split_vars.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/nir/nir_split_vars.c')
-rw-r--r-- | src/compiler/nir/nir_split_vars.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/nir/nir_split_vars.c b/src/compiler/nir/nir_split_vars.c index df059276411..394021e608e 100644 --- a/src/compiler/nir/nir_split_vars.c +++ b/src/compiler/nir/nir_split_vars.c @@ -616,11 +616,10 @@ emit_split_copies(nir_builder *b, glsl_get_length(src_path->path[src_level]->type)); unsigned len = glsl_get_length(dst_path->path[dst_level]->type); for (unsigned i = 0; i < len; i++) { - nir_ssa_def *idx = nir_imm_int(b, i); emit_split_copies(b, dst_info, dst_path, dst_level + 1, - nir_build_deref_array(b, dst, idx), + nir_build_deref_array_imm(b, dst, i), src_info, src_path, src_level + 1, - nir_build_deref_array(b, src, idx)); + nir_build_deref_array_imm(b, src, i)); } } else { /* Neither side is being split so we just keep going */ |