summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/sw
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2019-07-04 14:41:00 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2019-07-22 22:13:51 -0400
commitaffb2da0f862e0a604a9a075f2b45d57038797d5 (patch)
treec4c731eefe87d800f79ab05e3907daa90aab1fd6 /src/gallium/winsys/sw
parent0e30c6b8a7e84211bb417362ec73f24ef134ae34 (diff)
gallium: remove boolean from state tracker APIs
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Diffstat (limited to 'src/gallium/winsys/sw')
-rw-r--r--src/gallium/winsys/sw/dri/dri_sw_winsys.c12
-rw-r--r--src/gallium/winsys/sw/gdi/gdi_sw_winsys.c10
-rw-r--r--src/gallium/winsys/sw/hgl/hgl_sw_winsys.c8
-rw-r--r--src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c12
-rw-r--r--src/gallium/winsys/sw/null/null_sw_winsys.c8
-rw-r--r--src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c10
-rw-r--r--src/gallium/winsys/sw/xlib/xlib_sw_winsys.c14
7 files changed, 37 insertions, 37 deletions
diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/src/gallium/winsys/sw/dri/dri_sw_winsys.c
index eacee295ee1..761f5d19f54 100644
--- a/src/gallium/winsys/sw/dri/dri_sw_winsys.c
+++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.c
@@ -77,13 +77,13 @@ dri_sw_winsys( struct sw_winsys *ws )
}
-static boolean
+static bool
dri_sw_is_displaytarget_format_supported( struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format )
{
/* TODO: check visuals or other sensible thing here */
- return TRUE;
+ return true;
}
#ifdef HAVE_SYS_SHM_H
@@ -214,7 +214,7 @@ dri_sw_displaytarget_from_handle(struct sw_winsys *winsys,
return NULL;
}
-static boolean
+static bool
dri_sw_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
@@ -223,12 +223,12 @@ dri_sw_displaytarget_get_handle(struct sw_winsys *winsys,
if (whandle->type == WINSYS_HANDLE_TYPE_SHMID) {
if (dri_sw_dt->shmid < 0)
- return FALSE;
+ return false;
whandle->handle = dri_sw_dt->shmid;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static void
diff --git a/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c b/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
index 16f641833c6..675da401329 100644
--- a/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
+++ b/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
@@ -69,7 +69,7 @@ gdi_sw_displaytarget( struct sw_displaytarget *buf )
}
-static boolean
+static bool
gdi_sw_is_displaytarget_format_supported( struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format )
@@ -77,13 +77,13 @@ gdi_sw_is_displaytarget_format_supported( struct sw_winsys *ws,
switch(format) {
case PIPE_FORMAT_B8G8R8X8_UNORM:
case PIPE_FORMAT_B8G8R8A8_UNORM:
- return TRUE;
+ return true;
/* TODO: Support other formats possible with BMPs, as described in
* http://msdn.microsoft.com/en-us/library/dd183376(VS.85).aspx */
default:
- return FALSE;
+ return false;
}
}
@@ -182,13 +182,13 @@ gdi_sw_displaytarget_from_handle(struct sw_winsys *winsys,
}
-static boolean
+static bool
gdi_sw_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
{
assert(0);
- return FALSE;
+ return false;
}
diff --git a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
index f7bc907ea5c..9d37c5aacae 100644
--- a/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
+++ b/src/gallium/winsys/sw/hgl/hgl_sw_winsys.c
@@ -81,12 +81,12 @@ hgl_winsys_destroy(struct sw_winsys* winsys)
}
-static boolean
+static bool
hgl_winsys_is_displaytarget_format_supported(struct sw_winsys* winsys,
unsigned textureUsage, enum pipe_format format)
{
// TODO STUB
- return TRUE;
+ return true;
}
static color_space
@@ -164,11 +164,11 @@ hgl_winsys_displaytarget_from_handle(struct sw_winsys* winsys,
}
-static boolean
+static bool
hgl_winsys_displaytarget_get_handle(struct sw_winsys* winsys,
struct sw_displaytarget* displayTarget, struct winsys_handle* whandle)
{
- return FALSE;
+ return false;
}
diff --git a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
index d9b417dc4da..e3108367ec9 100644
--- a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
+++ b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
@@ -114,13 +114,13 @@ kms_sw_winsys( struct sw_winsys *ws )
}
-static boolean
+static bool
kms_sw_is_displaytarget_format_supported( struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format )
{
/* TODO: check visuals or other sensible thing here */
- return TRUE;
+ return true;
}
static struct kms_sw_plane *get_plane(struct kms_sw_displaytarget *kms_sw_dt,
@@ -429,7 +429,7 @@ kms_sw_displaytarget_from_handle(struct sw_winsys *ws,
return NULL;
}
-static boolean
+static bool
kms_sw_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
@@ -443,20 +443,20 @@ kms_sw_displaytarget_get_handle(struct sw_winsys *winsys,
whandle->handle = kms_sw_dt->handle;
whandle->stride = plane->stride;
whandle->offset = plane->offset;
- return TRUE;
+ return true;
case WINSYS_HANDLE_TYPE_FD:
if (!drmPrimeHandleToFD(kms_sw->fd, kms_sw_dt->handle,
DRM_CLOEXEC, (int*)&whandle->handle)) {
whandle->stride = plane->stride;
whandle->offset = plane->offset;
- return TRUE;
+ return true;
}
/* fallthrough */
default:
whandle->handle = 0;
whandle->stride = 0;
whandle->offset = 0;
- return FALSE;
+ return false;
}
}
diff --git a/src/gallium/winsys/sw/null/null_sw_winsys.c b/src/gallium/winsys/sw/null/null_sw_winsys.c
index 10ce2508507..e897f246d26 100644
--- a/src/gallium/winsys/sw/null/null_sw_winsys.c
+++ b/src/gallium/winsys/sw/null/null_sw_winsys.c
@@ -43,12 +43,12 @@
#include "null_sw_winsys.h"
-static boolean
+static bool
null_sw_is_displaytarget_format_supported(struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format )
{
- return FALSE;
+ return false;
}
@@ -102,13 +102,13 @@ null_sw_displaytarget_from_handle(struct sw_winsys *winsys,
}
-static boolean
+static bool
null_sw_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
{
assert(0);
- return FALSE;
+ return false;
}
diff --git a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
index 31b00e87321..37c499b9485 100644
--- a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
+++ b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c
@@ -84,7 +84,7 @@ wrapper_sw_displaytarget(struct sw_displaytarget *dt)
*/
-static boolean
+static bool
wsw_is_dt_format_supported(struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format)
@@ -97,7 +97,7 @@ wsw_is_dt_format_supported(struct sw_winsys *ws,
PIPE_BIND_DISPLAY_TARGET);
}
-static boolean
+static bool
wsw_dt_get_stride(struct wrapper_sw_displaytarget *wdt, unsigned *stride)
{
struct pipe_context *pipe = wdt->winsys->pipe;
@@ -109,14 +109,14 @@ wsw_dt_get_stride(struct wrapper_sw_displaytarget *wdt, unsigned *stride)
PIPE_TRANSFER_READ_WRITE,
0, 0, wdt->tex->width0, wdt->tex->height0, &tr);
if (!map)
- return FALSE;
+ return false;
*stride = tr->stride;
wdt->stride = tr->stride;
pipe->transfer_unmap(pipe, tr);
- return TRUE;
+ return true;
}
static struct sw_displaytarget *
@@ -193,7 +193,7 @@ wsw_dt_from_handle(struct sw_winsys *ws,
return wsw_dt_wrap_texture(wsw, tex, stride);
}
-static boolean
+static bool
wsw_dt_get_handle(struct sw_winsys *ws,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
diff --git a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
index a4c1d50453b..c14c9de4350 100644
--- a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
+++ b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
@@ -49,7 +49,7 @@
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
-DEBUG_GET_ONCE_BOOL_OPTION(xlib_no_shm, "XLIB_NO_SHM", FALSE)
+DEBUG_GET_ONCE_BOOL_OPTION(xlib_no_shm, "XLIB_NO_SHM", false)
/**
* Display target for Xlib winsys.
@@ -219,13 +219,13 @@ alloc_ximage(struct xlib_displaytarget *xlib_dt,
8, 0);
}
-static boolean
+static bool
xlib_is_displaytarget_format_supported(struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format)
{
/* TODO: check visuals or other sensible thing here */
- return TRUE;
+ return true;
}
@@ -296,8 +296,8 @@ static void
xlib_sw_display(struct xlib_drawable *xlib_drawable,
struct sw_displaytarget *dt)
{
- static boolean no_swap = 0;
- static boolean firsttime = 1;
+ static bool no_swap = false;
+ static bool firsttime = true;
struct xlib_displaytarget *xlib_dt = xlib_displaytarget(dt);
Display *display = xlib_dt->display;
XImage *ximage;
@@ -446,13 +446,13 @@ xlib_displaytarget_from_handle(struct sw_winsys *winsys,
}
-static boolean
+static bool
xlib_displaytarget_get_handle(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
struct winsys_handle *whandle)
{
assert(0);
- return FALSE;
+ return false;
}