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>
This commit is contained in:
committed by
Eric Anholt
parent
5751d0cb2d
commit
e062a4187d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user