aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_system_values.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-10-19 10:51:47 -0500
committerJason Ekstrand <[email protected]>2018-10-26 11:45:29 -0500
commit5bfce5fcc24de1ccc9606d6b2ad295fbdcdaa44e (patch)
tree97a711a98cabe08c8bc4dfa0d027510515701d8c /src/compiler/nir/nir_lower_system_values.c
parenta3b4cb34589e2f1a6898e88c8d9686cc3e133de3 (diff)
nir/system_values: Use the bit size from the load_deref
This isn't a great solution for bit-sizes but we don't have a particularly convenient way to get a bit size from the system value enum and this keeps the lowering pass from changing it. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_lower_system_values.c')
-rw-r--r--src/compiler/nir/nir_lower_system_values.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c
index 2820dcd1b3c..bde7eb11801 100644
--- a/src/compiler/nir/nir_lower_system_values.c
+++ b/src/compiler/nir/nir_lower_system_values.c
@@ -203,6 +203,7 @@ convert_block(nir_block *block, nir_builder *b)
nir_intrinsic_op sysval_op =
nir_intrinsic_from_system_value(var->data.location);
sysval = nir_load_system_value(b, sysval_op, 0);
+ sysval->bit_size = load_deref->dest.ssa.bit_size;
}
nir_ssa_def_rewrite_uses(&load_deref->dest.ssa, nir_src_for_ssa(sysval));