summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opt_algebraic.py
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-04-25 12:23:38 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-04-27 11:21:06 -0700
commitfcc1c8a43728ac9c9d3cd144d034e4925ec5bbcc (patch)
tree74f9d5473ce470332ebcbfaa627de26646a4f386 /src/compiler/nir/nir_opt_algebraic.py
parentcafb885e4594f20359cbc88fa08002147470935e (diff)
downloadexternal_mesa3d-fcc1c8a43728ac9c9d3cd144d034e4925ec5bbcc.zip
external_mesa3d-fcc1c8a43728ac9c9d3cd144d034e4925ec5bbcc.tar.gz
external_mesa3d-fcc1c8a43728ac9c9d3cd144d034e4925ec5bbcc.tar.bz2
nir/algebraic: Add a mechanism for specifying the bit size of a value
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Diffstat (limited to 'src/compiler/nir/nir_opt_algebraic.py')
-rw-r--r--src/compiler/nir/nir_opt_algebraic.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index 8f08e6b..fa7d7c7 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -53,6 +53,10 @@ d = 'd'
# For constants, you have to be careful to make sure that it is the right
# type because python is unaware of the source and destination types of the
# opcodes.
+#
+# All expression types can have a bit-size specified. For opcodes, this
+# looks like "op@32", for variables it is "a@32" or "a@uint32" to specify a
+# type and size, and for literals, you can write "2.0@32".
optimizations = [
(('fneg', ('fneg', a)), a),