Mesa (master): nir/system_values: Use the bit size from the load_deref
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Oct 26 16:46:00 UTC 2018
Module: Mesa
Branch: master
Commit: 5bfce5fcc24de1ccc9606d6b2ad295fbdcdaa44e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5bfce5fcc24de1ccc9606d6b2ad295fbdcdaa44e
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Fri Oct 19 10:51:47 2018 -0500
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 <ian.d.romanick at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
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 2820dcd1b3..bde7eb1180 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));
More information about the mesa-commit
mailing list