projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7325f6a
)
nir: fix deref offset builder
author
Dave Airlie
<airlied@redhat.com>
Mon, 18 Nov 2019 22:26:54 +0000
(08:26 +1000)
committer
Dave Airlie
<airlied@redhat.com>
Thu, 21 Nov 2019 18:37:41 +0000
(
04:37
+1000)
Use the correct bit size
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_deref.c
patch
|
blob
|
history
diff --git
a/src/compiler/nir/nir_deref.c
b/src/compiler/nir/nir_deref.c
index 74dd776aed60d6fea4657ad6e58396b7b895d8fe..f8b48946cffa8b4a0c27bb53fe26b337cd6a3635 100644
(file)
--- a/
src/compiler/nir/nir_deref.c
+++ b/
src/compiler/nir/nir_deref.c
@@
-292,7
+292,7
@@
nir_build_deref_offset(nir_builder *b, nir_deref_instr *deref,
assert(path.path[0]->deref_type == nir_deref_type_var);
- nir_ssa_def *offset = nir_imm_int
(b, 0
);
+ nir_ssa_def *offset = nir_imm_int
N_t(b, 0, deref->dest.ssa.bit_size
);
for (nir_deref_instr **p = &path.path[1]; *p; p++) {
if ((*p)->deref_type == nir_deref_type_array) {
nir_ssa_def *index = nir_ssa_for_src(b, (*p)->arr.index, 1);