[Mesa-dev] [PATCH 08/31] nir/system_values: Use the bit size from the load_deref
Jason Ekstrand
jason at jlekstrand.net
Mon Oct 22 22:13:39 UTC 2018
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.
---
src/compiler/nir/nir_lower_system_values.c | 1 +
1 file changed, 1 insertion(+)
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));
--
2.19.1
More information about the mesa-dev
mailing list