st/dri: Fix RGB565 EGLImage creation
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Sun, 17 Apr 2016 00:49:44 +0000 (20:49 -0400)
committerMichel Dänzer <michel@daenzer.net>
Wed, 20 Apr 2016 08:55:30 +0000 (17:55 +0900)
commit8093990ef4a65c4ba69c79263a508df0ddbecae6
tree74491224c1362d417c4ec6d8c04f711cc8bf86eb
parent4463f38766061bd058dc668e0ac2820a4cba79e7
st/dri: Fix RGB565 EGLImage creation

When creating egl images we do a bytes to pixel conversion by deviding
by 4 regardless of the pixel format. This does not work for RGB565. In
this patch, we avoid useless conversion and use proper API when the
conversion cannot be avoided.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/state_trackers/dri/dri2.c