summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_algebraic.py
diff options
context:
space:
mode:
authorCaio Marcelo de Oliveira Filho <[email protected]>2019-03-27 15:07:20 -0700
committerCaio Marcelo de Oliveira Filho <[email protected]>2019-04-08 19:29:32 -0700
commitd08a74d2bf12721f450098cfac300b4f5bcc5dfc (patch)
tree9de234d328b46a90bdfdaa12bed8073f4fa82b75 /src/compiler/nir/nir_algebraic.py
parent3c5ddaeacd2c52bc11f9cda451fe640cff629bdd (diff)
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 <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_algebraic.py')
-rw-r--r--src/compiler/nir/nir_algebraic.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py
index d4b3bb5957f..4772d4d123d 100644
--- a/src/compiler/nir/nir_algebraic.py
+++ b/src/compiler/nir/nir_algebraic.py
@@ -770,7 +770,9 @@ ${pass_name}(nir_shader *shader)
bool progress = false;
bool condition_flags[${len(condition_list)}];
const nir_shader_compiler_options *options = shader->options;
+ const shader_info *info = &shader->info;
(void) options;
+ (void) info;
% for index, condition in enumerate(condition_list):
condition_flags[${index}] = ${condition};