diff options
author | Jason Ekstrand <[email protected]> | 2016-12-19 13:11:43 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-12-22 16:27:19 -0800 |
commit | 6d9f576b56e53e26315aa589c72f399dc29e9672 (patch) | |
tree | 6df8f9dd89f4e254cc0aef4070ddb5eb6a1a44c9 /src/compiler/Makefile.sources | |
parent | 1111a05f90e27e9820dd187be16ae41335db6838 (diff) |
nir: Add a pass for moving SPIR-V continue blocks to the ends of loops
When shaders come in from SPIR-V, we handle continue blocks by placing
the contents of the continue inside of a "if (!first_iteration)". We do
this so that we can properly handle the fact that continues in SPIR-V
jump to the continue block at the end of the loop rather than jumping
directly to the top of the loop like they do in NIR. In particular, the
increment step of a simple for loop ends up in the continue block. This
pass looks for this case in loops that don't actually have any continues
and moves the continue contents to the end of the loop instead. We need
this because loop unrolling doesn't work if the increment is inside of a
condition.
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/Makefile.sources')
-rw-r--r-- | src/compiler/Makefile.sources | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/Makefile.sources b/src/compiler/Makefile.sources index 6a740fce392..be2215cc10a 100644 --- a/src/compiler/Makefile.sources +++ b/src/compiler/Makefile.sources @@ -241,6 +241,7 @@ NIR_FILES = \ nir/nir_opt_dead_cf.c \ nir/nir_opt_gcm.c \ nir/nir_opt_global_to_local.c \ + nir/nir_opt_if.c \ nir/nir_opt_loop_unroll.c \ nir/nir_opt_peephole_select.c \ nir/nir_opt_remove_phis.c \ |