summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2016-06-22 14:45:25 -0400
committerRob Clark <robdclark@gmail.com>2016-07-02 08:58:50 -0400
commitda39ac9c5126825418c979989ea7e017554a0aaa (patch)
tree46d380a6b2813d832e981b399ab3338c5bedcce5
parent2081c1ecc00682302faa9555cc0551fc14a338f0 (diff)
freedreno/ir3: support non-user_buffer consts
Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r--src/gallium/drivers/freedreno/freedreno_screen.c6
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
index 93b70e0884e5..5255c10411d4 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -156,12 +156,14 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
- case PIPE_CAP_USER_CONSTANT_BUFFERS:
case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT:
case PIPE_CAP_VERTEXID_NOBASE:
case PIPE_CAP_STRING_MARKER:
return 1;
+ case PIPE_CAP_USER_CONSTANT_BUFFERS:
+ return is_ir3(screen) ? 0 : 1;
+
case PIPE_CAP_SHADER_STENCIL_EXPORT:
case PIPE_CAP_TGSI_TEXCOORD:
case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
@@ -214,7 +216,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
return is_a4xx(screen);
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
- return 256;
+ return 64;
case PIPE_CAP_GLSL_FEATURE_LEVEL:
if (glsl120)
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
index 04c99d1db021..5c7ad84c2506 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
@@ -181,7 +181,7 @@ compile_init(struct ir3_compiler *compiler,
nir_print_shader(ctx->s, stdout);
}
- so->first_driver_param = so->first_immediate = ctx->s->num_uniforms;
+ so->first_driver_param = so->first_immediate = align(ctx->s->num_uniforms, 4);
/* Layout of constant registers:
*