From: Timothy Arceri Date: Tue, 7 Apr 2020 01:28:32 +0000 (+1000) Subject: radeonsi: don't lower constant arrays to uniforms in GLSL IR X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1f649ff10764b2f47fd69013f390e9286547cc3b;p=mesa.git radeonsi: don't lower constant arrays to uniforms in GLSL IR 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: --- 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: