From e062a4187d8ea518a39c913ae7562cf1d8ac3205 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tapani=20P=C3=A4lli?= Date: Mon, 28 Jan 2013 08:53:56 +0200 Subject: [PATCH] intel: Fix regression in intel_create_image_from_name stride handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Strangely, the DRIimage interface we have passes the pitch in pixels instead of bytes, which anholt missed in the change to using bytes for region pitch. Signed-off-by: Tapani Pälli Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/intel/intel_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index defcd731999..d223a0b7a10 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -377,7 +377,7 @@ intel_create_image_from_name(__DRIscreen *screen, cpp = _mesa_get_format_bytes(image->format); image->region = intel_region_alloc_for_handle(intelScreen, cpp, width, height, - pitch, name, "image"); + pitch * cpp, name, "image"); if (image->region == NULL) { free(image); return NULL; -- 2.30.2