[Mesa-dev] [PATCH] android: fix stride to be bytes instead of pixels

Tapani Pälli tapani.palli at intel.com
Wed Jan 23 23:42:11 PST 2013


commit 60894edeef973e86a73067276f658b72f84271b6 changed the way dri2
buffer pitch is interpreted in intel driver createImageFromName
implementation, caller must set pitch in bytes, not pixels.

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 src/egl/drivers/dri2/platform_android.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 7ede48d..b006f83 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -399,7 +399,7 @@ dri2_create_image_android_native_buffer(_EGLDisplay *disp,
 					   buf->height,
 					   format,
 					   name,
-					   buf->stride,
+					   buf->stride * get_format_bpp(buf->format),
 					   dri2_img);
    if (!dri2_img->dri_image) {
       free(dri2_img);
-- 
1.7.11.7



More information about the mesa-dev mailing list