intel: Fix regression in intel_create_image_from_name stride handling
authorTapani Pälli <tapani.palli@intel.com>
Mon, 28 Jan 2013 06:53:56 +0000 (08:53 +0200)
committerEric Anholt <eric@anholt.net>
Mon, 4 Feb 2013 21:59:02 +0000 (13:59 -0800)
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 <tapani.palli@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/intel/intel_screen.c

index defcd7319991f1d6626c34a967d1296931b1df7a..d223a0b7a10a9fb6ce55de0b61492e863827a91a 100644 (file)
@@ -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;