From 1f649ff10764b2f47fd69013f390e9286547cc3b Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 7 Apr 2020 11:28:32 +1000 Subject: [PATCH] radeonsi: don't lower constant arrays to uniforms in GLSL IR MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This re-enables the change made in 2f5783bc2b82 which was incorrectly disabled by 3e1dd99adca5. For radeonsi, we will prefer the NIR pass as it'll generate better code (some index calculation and a single load vs. a load, then index calculation, then another load) and oftentimes NIR optimization can kick in and make all the access indices constant. Fixes: 3e1dd99adca5 ("radeonsi: Remove a bunch of default handling of pipe caps.") Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_get.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index 2a4a23cec13..4089b944559 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -218,6 +218,7 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return sscreen->info.has_sparse_vm_mappings ? RADEON_SPARSE_PAGE_SIZE : 0; case PIPE_CAP_UMA: + case PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF: return 0; case PIPE_CAP_FENCE_SIGNAL: -- 2.30.2