nir: Add is_null_constant to nir_constant
authorJesse Natalie <jenatali@microsoft.com>
Thu, 18 May 2023 17:31:50 +0000 (10:31 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 13 Jun 2023 00:43:36 +0000 (00:43 +0000)
commit4edfb67fd4911fea127a3ee070dfd1eb8898a76b
tree8ad5c5ea6a9bf68a6d079f91a81d6878b5267ff1
parent009d2de88f7f4327b19aaa4d514c805b124db2f6
nir: Add is_null_constant to nir_constant

Indicates that the values contained within are 0s, regardless of
type. Enables some optimizations.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23173>
src/compiler/nir/nir.h
src/compiler/nir/nir_clone.c
src/compiler/nir/nir_lower_io.c
src/compiler/nir/nir_opt_constant_folding.c
src/compiler/nir/nir_print.c
src/compiler/nir/nir_serialize.c
src/compiler/nir/nir_validate.c