st/egl image: multiply drm buf-stride with blocksize

[olv: formatted for 80-column wrapping]
This commit is contained in:
Benjamin Franzke 2010-10-31 16:01:52 +01:00 committed by Chia-I Wu
parent 52ef148923
commit 6102683b19
1 changed files with 2 additions and 1 deletions

View File

@ -178,7 +178,8 @@ egl_g3d_reference_drm_buffer(_EGLDisplay *dpy, EGLint name,
memset(&wsh, 0, sizeof(wsh));
wsh.handle = (unsigned) name;
wsh.stride = attrs.DRMBufferStrideMESA;
wsh.stride =
attrs.DRMBufferStrideMESA * util_format_get_blocksize(templ.format);
return screen->resource_from_handle(screen, &templ, &wsh);
}