summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi/si_get.c
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2019-09-02 12:00:44 +0200
committerConnor Abbott <cwabbott0@gmail.com>2019-09-05 12:39:26 +0200
commit2f5783bc2b82d6d300070d98b88ee6a53d093504 (patch)
tree68b93eb60f7d711b06307af75d7fce97a8937fbd /src/gallium/drivers/radeonsi/si_get.c
parent2af431cf7fe9303bbfbd719e4612f00043583f40 (diff)
radeonsi/nir: Don't lower constant arrays to uniforms
shader-db results: Totals: SGPRS: 3955968 -> 3954960 (-0.03 %) VGPRS: 2220220 -> 2220092 (-0.01 %) Spilled SGPRs: 11387 -> 11325 (-0.54 %) Spilled VGPRs: 97 -> 97 (0.00 %) Private memory VGPRs: 2528 -> 2528 (0.00 %) Scratch size: 2656 -> 2656 (0.00 %) dwords per thread Code Size: 76002204 -> 75994988 (-0.01 %) bytes LDS: 740 -> 740 (0.00 %) blocks Max Waves: 772776 -> 772787 (0.00 %) Wait states: 0 -> 0 (0.00 %) Totals from affected shaders: SGPRS: 16840 -> 15832 (-5.99 %) VGPRS: 16452 -> 16324 (-0.78 %) Spilled SGPRs: 1416 -> 1354 (-4.38 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 2016 -> 2016 (0.00 %) Scratch size: 2040 -> 2040 (0.00 %) dwords per thread Code Size: 953624 -> 946408 (-0.76 %) bytes LDS: 303 -> 303 (0.00 %) blocks Max Waves: 1622 -> 1633 (0.68 %) Wait states: 0 -> 0 (0.00 %) There were a large number of regressions in code size, but they seem to be because NIR unrolls some loop which results in the table being replaced by a bunch of immediates on multiplies etc. -- this bloats code size since the table size is now included, but means that there are less loads so it's still a net positive. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_get.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_get.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
index 912013d6bb3..09dfcebbbb7 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -219,6 +219,11 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return 1;
return 0;
+ case PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF:
+ if (sscreen->options.enable_nir)
+ return 0;
+ return 1;
+
/* Unsupported features. */
case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: