From 2f175bfe5d8ca59a8a68b6d6d072cd7bf2f8baa9 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 1 Apr 2018 11:26:01 -0400 Subject: [PATCH] freedreno/a5xx: don't align height for PIPE_BUFFER Buffers can be large, so we probably don't want to make them all 32x bigger. But they can't be rendered to (at least in GL) so we don't need this workaround to prevent page faults on mem<->gmem. Cc: "18.0" Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a5xx/fd5_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_resource.c b/src/gallium/drivers/freedreno/a5xx/fd5_resource.c index 84fa64cec84..71bcc381528 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_resource.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_resource.c @@ -81,7 +81,7 @@ setup_slices(struct fd_resource *rsc, uint32_t alignment, enum pipe_format forma * The pitch is already sufficiently aligned, but height * may not be: */ - if (level == prsc->last_level) + if ((level == prsc->last_level) && (prsc->target != PIPE_BUFFER)) aligned_height = align(aligned_height, 32); } -- 2.30.2