Module: Mesa
Branch: master
Commit: e062a4187d8ea518a39c913ae7562cf1d8ac3205
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e062a4187d8ea518a39c913ae7562cf1d8ac3205

Author: Tapani Pälli <[email protected]>
Date:   Mon Jan 28 08:53:56 2013 +0200

intel: Fix regression in intel_create_image_from_name stride handling

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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>

---

 src/mesa/drivers/dri/intel/intel_screen.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_screen.c 
b/src/mesa/drivers/dri/intel/intel_screen.c
index defcd73..d223a0b 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;

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to