Commit f9bfc558 authored by Ilia Mirkin's avatar Ilia Mirkin Committed by Andres Gomez

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's avatarIlia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
[Emil Velikov: squash the vmwgfx hunk]
Reviewed-by: Emil Velikov's avatarEmil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>

(cherry picked from commit 6af14778)
parent 64501423
......@@ -64,13 +64,13 @@ static const struct pipe_loader_ops pipe_loader_drm_ops;
#ifdef GALLIUM_STATIC_TARGETS
static const struct drm_conf_ret throttle_ret = {
DRM_CONF_INT,
{2},
.type = DRM_CONF_INT,
.val.val_int = 2,
};
static const struct drm_conf_ret share_fd_ret = {
DRM_CONF_BOOL,
{true},
.type = DRM_CONF_BOOL,
.val.val_bool = true,
};
static inline const struct drm_conf_ret *
......
......@@ -30,7 +30,7 @@ static const struct drm_conf_ret throttle_ret = {
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_int = true,
.val.val_bool = true,
};
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
......
......@@ -24,7 +24,7 @@ static const struct drm_conf_ret throttle_ret = {
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_int = true,
.val.val_bool = true,
};
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
......
......@@ -24,7 +24,7 @@ static const struct drm_conf_ret throttle_ret = {
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_int = true,
.val.val_bool = true,
};
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
......
......@@ -20,7 +20,7 @@ static const struct drm_conf_ret throttle_ret = {
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_int = true,
.val.val_bool = true,
};
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
......
......@@ -20,7 +20,7 @@ static const struct drm_conf_ret throttle_ret = {
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_int = true,
.val.val_bool = true,
};
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
......
......@@ -26,7 +26,7 @@ static const struct drm_conf_ret throttle_ret = {
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_int = true,
.val.val_bool = true,
};
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
......
......@@ -30,7 +30,7 @@ static const struct drm_conf_ret throttle_ret = {
static const struct drm_conf_ret share_fd_ret = {
.type = DRM_CONF_BOOL,
.val.val_int = true,
.val.val_bool = true,
};
static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment