summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_opt_algebraic.py
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-01-28 16:42:20 -0800
committerJason Ekstrand <[email protected]>2015-01-29 17:07:45 -0800
commit70273c5cd56aa109c2870de0843f75aeeb687394 (patch)
tree5ee77cbdd3bdc15aa3f65efd8aca53ece44c12e3 /src/glsl/nir/nir_opt_algebraic.py
parent81f77e4f3a070ef9041c50495fd010e56c08cc6a (diff)
nir/algebraic: Support specifying variable as constant or by type
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_opt_algebraic.py')
-rw-r--r--src/glsl/nir/nir_opt_algebraic.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py
index 122555bb4f6..210c40dd158 100644
--- a/src/glsl/nir/nir_opt_algebraic.py
+++ b/src/glsl/nir/nir_opt_algebraic.py
@@ -36,9 +36,15 @@ d = 'd'
# and <replace> is either an expression or a value. An expression is
# defined as a tuple of the form (<op>, <src0>, <src1>, <src2>, <src3>)
# where each source is either an expression or a value. A value can be
-# either a numeric constant or a string representing a variable name. 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
+# either a numeric constant or a string representing a variable name.
+#
+# Variable names are specified as "[#]name[@type]" where "#" inicates that
+# the given variable will only match constants and the type indicates that
+# the given variable will only match values from ALU instructions with the
+# given output type.
+#
+# 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.
optimizations = [