diff options
author | Eric Anholt <[email protected]> | 2016-12-27 12:29:09 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-12-29 14:41:09 -0800 |
commit | 63e7671c7e65f9df1678d3d79c92f358ae0bdc82 (patch) | |
tree | 418b643880826eaa37879b55597c3444ec6d5e4a /src/gallium/drivers | |
parent | 5f323198ea598b97f3a0d7bc0a11eb92a118c87a (diff) |
vc4: Enable NIR-based loop unrolling.
This successfully unrolls a new shader in GLB2.7, which also gets that
shader to successfully compile in multithreaded mode.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 611c90d7bc3..54692bc73f9 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -1540,6 +1540,10 @@ vc4_optimize_nir(struct nir_shader *s) NIR_PASS(progress, s, nir_opt_algebraic); NIR_PASS(progress, s, nir_opt_constant_folding); NIR_PASS(progress, s, nir_opt_undef); + NIR_PASS(progress, s, nir_opt_loop_unroll, + nir_var_shader_in | + nir_var_shader_out | + nir_var_local); } while (progress); } @@ -2155,6 +2159,7 @@ static const nir_shader_compiler_options nir_options = { .lower_fsqrt = true, .lower_negate = true, .native_integers = true, + .max_unroll_iterations = 32, }; const void * |