diff options
author | Jason Ekstrand <[email protected]> | 2016-07-15 17:17:40 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-12-05 15:40:09 -0800 |
commit | 50e0b0bee3fb97089cf9913af7a0c980dfce6dce (patch) | |
tree | 943f3e970522698601dfc8871797d06cc50c8551 /src/compiler/nir/nir.h | |
parent | 2f19c19b5de66c4966fc5f5926efe5d435e505db (diff) |
nir: Delete most of the constant_initializer support
Constant initializers have been a constant (ha!) pain for quite some time.
While they're useful from a language perspective, people writing passes or
backends really don't want deal with them most of the time. This commit
removes most of the constant initializer support from NIR. It is expected
that you call nir_lower_constant_initializers VERY EARLY to ensure that
they're gone before you do anything interesting.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index fd6d48e8aa3..1ab57379120 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -340,6 +340,10 @@ typedef struct nir_variable { /** * Constant expression assigned in the initializer of the variable + * + * This field should only be used temporarily by creators of NIR shaders + * and then lower_constant_initializers can be used to get rid of them. + * Most of the rest of NIR ignores this field or asserts that it's NULL. */ nir_constant *constant_initializer; |