summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2013-01-28 08:53:56 +0200
committerEric Anholt <eric@anholt.net>2013-02-04 13:59:02 -0800
commite062a4187d8ea518a39c913ae7562cf1d8ac3205 (patch)
tree1e58f09c8a95ffe3093bf41370f0123ce5ec47a3
parent5751d0cb2dd6d1682d2a954e3f008be61b4ab7e2 (diff)
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 <tapani.palli@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c2
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 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;