Mesa (main): asahi: switch to NIR loop unrolling

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 17 02:41:46 UTC 2022


Module: Mesa
Branch: main
Commit: c4295816afe6ae35e8fc093b3bb28e47a71ec663
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c4295816afe6ae35e8fc093b3bb28e47a71ec663

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Fri May  6 11:26:25 2022 +1000

asahi: switch to NIR loop unrolling

Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16543>

---

 src/asahi/compiler/agx_compile.h     | 1 +
 src/gallium/drivers/asahi/agx_pipe.c | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/asahi/compiler/agx_compile.h b/src/asahi/compiler/agx_compile.h
index 27ecbf129e5..0ad0ff0dc74 100644
--- a/src/asahi/compiler/agx_compile.h
+++ b/src/asahi/compiler/agx_compile.h
@@ -223,6 +223,7 @@ static const nir_shader_compiler_options agx_nir_options = {
    .lower_rotate = true,
    .has_fsub = true,
    .has_isub = true,
+   .max_unroll_iterations = 32,
    .lower_uniforms_to_ubo = true,
    .force_indirect_unrolling_sampler = true,
    .force_indirect_unrolling = (nir_var_shader_in | nir_var_shader_out | nir_var_function_temp),
diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c
index a77a01f8846..59b51259c04 100644
--- a/src/gallium/drivers/asahi/agx_pipe.c
+++ b/src/gallium/drivers/asahi/agx_pipe.c
@@ -964,8 +964,6 @@ agx_get_shader_param(struct pipe_screen* pscreen,
       return (1 << PIPE_SHADER_IR_NIR) | (1 << PIPE_SHADER_IR_NIR_SERIALIZED);
 
    case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
-      return 32;
-
    case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
    case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
    case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS:



More information about the mesa-commit mailing list