summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-04-11 11:12:01 -0700
committerEric Anholt <[email protected]>2019-04-12 16:16:58 -0700
commitdc402be73e4bbb9b43213a4266b98a46092e3038 (patch)
tree2ceedd9ccee93e28f7e661f0e0155b651e15608f /src/gallium
parent18ed82b084c79bf63666f2da22e5d675fb01aa26 (diff)
v3d: Use the new lower_to_scratch implementation for indirects on temps.
We can use the same register spilling infrastructure for our loads/stores of indirect access of temp variables, instead of doing an if ladder. Cuts 50% of instructions and max-temps from 2 KSP shaders in shader-db. Also causes several other KSP shaders with large bodies and large loop counts to not be force-unrolled. The change was originally motivated by NOLTIS slightly modifying register pressure in piglit temp mat4 array read/write tests, triggering register allocation failures.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/v3d/v3d_screen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c
index 6f91e35521a..0d9184279df 100644
--- a/src/gallium/drivers/v3d/v3d_screen.c
+++ b/src/gallium/drivers/v3d/v3d_screen.c
@@ -310,8 +310,9 @@ v3d_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
return 0;
case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
- case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
return 0;
+ case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
+ return 1;
case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR:
return 1;
case PIPE_SHADER_CAP_SUBROUTINES: