freedreno/a5xx: don't align height for PIPE_BUFFER
authorRob Clark <robdclark@gmail.com>
Sun, 1 Apr 2018 15:26:01 +0000 (11:26 -0400)
committerRob Clark <robdclark@gmail.com>
Sun, 1 Apr 2018 15:26:01 +0000 (11:26 -0400)
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" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a5xx/fd5_resource.c

index 84fa64c..71bcc38 100644 (file)
@@ -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);
                }