diff options
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.h | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_winsys_dri3.c | 2 | ||||
-rw-r--r-- | src/gallium/targets/d3dadapter9/drm.c | 6 | ||||
-rw-r--r-- | src/glx/dri3_priv.h | 2 | ||||
-rw-r--r-- | src/loader/loader.c | 10 | ||||
-rw-r--r-- | src/loader/loader.h | 4 |
6 files changed, 14 insertions, 12 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index bffc63e1e94..3f29e64cdcf 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -222,7 +222,7 @@ struct dri2_egl_display #endif bool is_render_node; - int is_different_gpu; + bool is_different_gpu; }; struct dri2_egl_context diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri3.c b/src/gallium/auxiliary/vl/vl_winsys_dri3.c index c7c615b3958..8251087f3f9 100644 --- a/src/gallium/auxiliary/vl/vl_winsys_dri3.c +++ b/src/gallium/auxiliary/vl/vl_winsys_dri3.c @@ -89,7 +89,7 @@ struct vl_dri3_screen int64_t last_ust, ns_frame, last_msc, next_msc; bool flushed; - int is_different_gpu; + bool is_different_gpu; }; static void diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c index 6163734185a..0434d8e4c17 100644 --- a/src/gallium/targets/d3dadapter9/drm.c +++ b/src/gallium/targets/d3dadapter9/drm.c @@ -204,7 +204,7 @@ drm_create_adapter( int fd, { struct d3dadapter9drm_context *ctx = CALLOC_STRUCT(d3dadapter9drm_context); HRESULT hr; - int different_device; + bool different_device; const struct drm_conf_ret *throttle_ret = NULL; const struct drm_conf_ret *dmabuf_ret = NULL; driOptionCache defaultInitOptions; @@ -220,7 +220,7 @@ drm_create_adapter( int fd, * takes ownership of it. */ fd = loader_get_user_preferred_fd(fd, &different_device); ctx->fd = fd; - ctx->base.linear_framebuffer = !!different_device; + ctx->base.linear_framebuffer = different_device; if (!pipe_loader_drm_probe_fd(&ctx->dev, fd)) { ERR("Failed to probe drm fd %d.\n", fd); @@ -271,7 +271,7 @@ drm_create_adapter( int fd, if (driCheckOption(&userInitOptions, "thread_submit", DRI_BOOL)) ctx->base.thread_submit = driQueryOptionb(&userInitOptions, "thread_submit"); else - ctx->base.thread_submit = !!different_device; + ctx->base.thread_submit = different_device; if (ctx->base.thread_submit && (throttling_value_user == -2 || throttling_value_user == 0)) { ctx->base.throttling_value = 0; diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h index 082237781c8..1d3c03f9997 100644 --- a/src/glx/dri3_priv.h +++ b/src/glx/dri3_priv.h @@ -101,7 +101,7 @@ struct dri3_screen { void *driver; int fd; - int is_different_gpu; + bool is_different_gpu; int show_fps_interval; diff --git a/src/loader/loader.c b/src/loader/loader.c index 5541ccc2a74..c3fc961be59 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -153,7 +153,7 @@ static char *drm_get_id_path_tag_for_fd(int fd) return tag; } -int loader_get_user_preferred_fd(int default_fd, int *different_device) +int loader_get_user_preferred_fd(int default_fd, bool *different_device) { /* Arbitrary "maximum" value of drm devices. */ #define MAX_DRM_DEVICES 32 @@ -171,7 +171,7 @@ int loader_get_user_preferred_fd(int default_fd, int *different_device) #endif if (prime == NULL) { - *different_device = 0; + *different_device = false; return default_fd; } @@ -230,16 +230,16 @@ int loader_get_user_preferred_fd(int default_fd, int *different_device) return fd; err: - *different_device = 0; + *different_device = false; free(default_tag); free(prime); return default_fd; } #else -int loader_get_user_preferred_fd(int default_fd, int *different_device) +int loader_get_user_preferred_fd(int default_fd, bool *different_device) { - *different_device = 0; + *different_device = false; return default_fd; } #endif diff --git a/src/loader/loader.h b/src/loader/loader.h index 84314a4fc04..3859b45dc44 100644 --- a/src/loader/loader.h +++ b/src/loader/loader.h @@ -27,6 +27,8 @@ #ifndef LOADER_H #define LOADER_H +#include <stdbool.h> + #ifdef __cplusplus extern "C" { #endif @@ -51,7 +53,7 @@ loader_get_device_name_for_fd(int fd); */ int -loader_get_user_preferred_fd(int default_fd, int *different_device); +loader_get_user_preferred_fd(int default_fd, bool *different_device); /* for logging.. keep this aligned with egllog.h so we can just use * _eglLog directly. |