From 320e96baced8093c6af11d86a216d83cee1eeb30 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 19 Mar 2019 11:39:58 -0700 Subject: v3d: Move constant offsets to UBO addresses into the main uniform stream. We'd end up with the constant offset in the uniform stream anyway, since they're bigger than small immediates. Avoids the extra uniforms and adds in the shader in favor of just adding once on the CPU. shader-db: total instructions in shared programs: 6496865 -> 6494851 (-0.03%) total uniforms in shared programs: 2119511 -> 2117243 (-0.11%) --- src/gallium/drivers/v3d/v3d_screen.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/drivers/v3d/v3d_screen.c') diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index c810fbc98b4..073bdf51449 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -279,6 +279,9 @@ v3d_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_MAX_TEMPS: return 256; /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE: + /* Note: Limited by the offset size in + * v3d_unit_data_create(). + */ return 16 * 1024 * sizeof(float); case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: return 16; -- cgit v1.2.3