OSDN Git Service

gallium/targets: fix bool setting on BE architectures
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 18 Apr 2017 04:00:40 +0000 (00:00 -0400)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sun, 30 Apr 2017 08:46:31 +0000 (09:46 +0100)
commita7209631404438a8a13f44933a84975a9d1889f9
tree1f71516f6e8a8c1c2bd75ea922c05630f066e834
parent3f0740e87c85974e18a2ebbdd095228637d8f865
gallium/targets: fix bool setting on BE architectures

val_bool and val_int are in a union. val_bool gets the first byte, which
happens to work on LE when setting via the int, but breaks on BE. By
setting the value properly, we are able to use DRI3 on BE architectures.
Tested by running glxgears with a NV34 in a G5 PPC.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
[Emil Velikov: squash the vmwgfx hunk]
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit 6af14778a3f68030c4ad6426c75fe25d726235d5)
src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c
src/gallium/targets/pipe-loader/pipe_i915.c
src/gallium/targets/pipe-loader/pipe_msm.c
src/gallium/targets/pipe-loader/pipe_nouveau.c
src/gallium/targets/pipe-loader/pipe_r300.c
src/gallium/targets/pipe-loader/pipe_r600.c
src/gallium/targets/pipe-loader/pipe_radeonsi.c
src/gallium/targets/pipe-loader/pipe_vmwgfx.c