From 0ec27d02e1dfb453ff2714e8f637deb20f0f8934 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 9 Apr 2021 15:53:22 -0400 Subject: [PATCH] panfrost: Don't unroll loops in GLSL GLSL loop analysis is trouble. Just use NIR. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_screen.c | 6 +----- src/panfrost/bifrost/bifrost_compile.h | 1 + src/panfrost/midgard/midgard_compile.h | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 014de6fbda7..ebe6a17c019 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -404,19 +404,15 @@ panfrost_get_shader_param(struct pipe_screen *screen, case PIPE_SHADER_CAP_SUPPORTED_IRS: 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: return is_deqp ? 16 : 0; case PIPE_SHADER_CAP_MAX_SHADER_IMAGES: return (pan_is_bifrost(dev) && !is_deqp) ? 0 : PIPE_MAX_SHADER_IMAGES; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS: case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_BUFFERS: - return 0; - case PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS: case PIPE_SHADER_CAP_LOWER_IF_THRESHOLD: return 0; diff --git a/src/panfrost/bifrost/bifrost_compile.h b/src/panfrost/bifrost/bifrost_compile.h index 020ca55aa29..0c69e696b70 100644 --- a/src/panfrost/bifrost/bifrost_compile.h +++ b/src/panfrost/bifrost/bifrost_compile.h @@ -90,6 +90,7 @@ static const nir_shader_compiler_options bifrost_nir_options = { .has_cs_global_id = true, .lower_cs_local_index_from_id = true, + .max_unroll_iterations = 32, }; #endif diff --git a/src/panfrost/midgard/midgard_compile.h b/src/panfrost/midgard/midgard_compile.h index f049fbabb6b..5d22b4128eb 100644 --- a/src/panfrost/midgard/midgard_compile.h +++ b/src/panfrost/midgard/midgard_compile.h @@ -92,6 +92,7 @@ static const nir_shader_compiler_options midgard_nir_options = { .has_cs_global_id = true, .lower_cs_local_index_from_id = true, + .max_unroll_iterations = 32, }; #endif