[PATCH] dri2: Fix stride to pitch conversion

2015-12-21 Thread Daniel Vetter
On Mon, Dec 21, 2015 at 10:12:54AM -0500, Nicolas Dufresne wrote: > Le samedi 19 décembre 2015 à 11:02 -0500, Nicolas Dufresne a écrit : > > Not all color formats have a pixel stride of 4 bytes. This > > fixes importation of RGB565 images. > > > I just notice there is generic method to get th

[PATCH] dri2: Fix stride to pitch conversion

2015-12-21 Thread Nicolas Dufresne
Le samedi 19 décembre 2015 à 11:02 -0500, Nicolas Dufresne a écrit : > Not all color formats have a pixel stride of 4 bytes. This > fixes importation of RGB565 images. I just notice there is generic method to get the pixel stride (called block something size iirc). But worst then that, the un

[PATCH] dri2: Fix stride to pitch conversion

2015-12-19 Thread Nicolas Dufresne
Not all color formats have a pixel stride of 4 bytes. This fixes importation of RGB565 images. Signed-off-by: Nicolas Dufresne --- src/gallium/state_trackers/dri/dri2.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/gallium/state_trackers/d