This patch shouldn't actually do anything because the libdrm function should already do this alignment. However, it preps us for a future patch where we add in the CCS AUX size, and in the process it serves as a good place to find bisectable issues if libdrm or kernel does something incorrectly.
Signed-off-by: Ben Widawsky <b...@bwidawsk.net> Acked-by: Daniel Stone <dani...@collabora.com> --- src/mesa/drivers/dri/i965/intel_screen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 451c5ccf4e..8ec33ce5df 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -606,14 +606,17 @@ create_image_with_modifier(struct intel_screen *screen, { uint32_t requested_tiling = 0, tiling = I915_TILING_X; unsigned long pitch; + unsigned tiled_height = 0; switch (modifier) { case I915_FORMAT_MOD_Y_TILED: requested_tiling = tiling = I915_TILING_Y; + tiled_height = ALIGN(height, 32); break; case I915_FORMAT_MOD_X_TILED: assert(tiling == I915_TILING_X); requested_tiling = tiling = I915_TILING_X; + tiled_height = height; break; case DRM_FORMAT_MOD_LINEAR: requested_tiling = tiling = I915_TILING_NONE; @@ -626,7 +629,7 @@ create_image_with_modifier(struct intel_screen *screen, } image->bo = drm_intel_bo_alloc_tiled(screen->bufmgr, "image+mod", - width, height, cpp, &tiling, + width, tiled_height, cpp, &tiling, &pitch, 0); if (image->bo == NULL) return false; -- 2.11.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev