nir/algebraic: Lower CS derivatives to zero when no group defined
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 27 Mar 2019 22:07:20 +0000 (15:07 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 9 Apr 2019 02:29:32 +0000 (19:29 -0700)
commitd08a74d2bf12721f450098cfac300b4f5bcc5dfc
tree9de234d328b46a90bdfdaa12bed8073f4fa82b75
parent3c5ddaeacd2c52bc11f9cda451fe640cff629bdd
nir/algebraic: Lower CS derivatives to zero when no group defined

In compute shaders if no derivative group is defined, the derivatives
will always be zero.  Specified in NV_compute_shader_derivatives.

To make the check more convenient, add a "info" local variable to the
generated code so we can refer to it in the Python rules.  (Jason)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_algebraic.py
src/compiler/nir/nir_opt_algebraic.py