summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-03-07 11:45:13 -0600
committerJason Ekstrand <[email protected]>2019-03-07 21:20:30 +0000
commit1664de5924aa6d761be21afdee411654121515d1 (patch)
treeea9484e48251e569e7c06e3541c8c9664158020f /src/intel/vulkan
parentfcf2a0122e9ccf3be8d1fa3bd18b8dedbebd6acf (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/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_nir_lower_multiview.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_nir_lower_multiview.c b/src/intel/vulkan/anv_nir_lower_multiview.c
index c42d9c2dfa2..ffe9e7bb972 100644
--- a/src/intel/vulkan/anv_nir_lower_multiview.c
+++ b/src/intel/vulkan/anv_nir_lower_multiview.c
@@ -136,7 +136,7 @@ build_view_index(struct lower_multiview_state *state)
nir_deref_instr *deref = nir_build_deref_var(b, idx_var);
if (glsl_type_is_array(type))
- deref = nir_build_deref_array(b, deref, nir_imm_int(b, 0));
+ deref = nir_build_deref_array_imm(b, deref, 0);
state->view_index = nir_load_deref(b, deref);
}