summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2019-07-04 14:41:00 -0400
committerIlia Mirkin <[email protected]>2019-07-22 22:13:51 -0400
commitaffb2da0f862e0a604a9a075f2b45d57038797d5 (patch)
treec4c731eefe87d800f79ab05e3907daa90aab1fd6 /src/mesa
parent0e30c6b8a7e84211bb417362ec73f24ef134ae34 (diff)
gallium: remove boolean from state tracker APIs
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_manager.c50
-rw-r--r--src/mesa/state_tracker/st_manager.h2
2 files changed, 26 insertions, 26 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index ff0bec8f569..4ef5429c58b 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -208,7 +208,7 @@ st_framebuffer_validate(struct st_framebuffer *stfb,
struct pipe_resource *textures[ST_ATTACHMENT_COUNT];
uint width, height;
unsigned i;
- boolean changed = FALSE;
+ bool changed = false;
int32_t new_stamp;
new_stamp = p_atomic_read(&stfb->iface->stamp);
@@ -257,7 +257,7 @@ st_framebuffer_validate(struct st_framebuffer *stfb,
st_set_ws_renderbuffer_surface(strb, ps);
pipe_surface_reference(&ps, NULL);
- changed = TRUE;
+ changed = true;
width = strb->Base.Width;
height = strb->Base.Height;
@@ -303,13 +303,13 @@ st_framebuffer_update_attachments(struct st_framebuffer *stfb)
* Add a renderbuffer to the framebuffer. The framebuffer is one that
* corresponds to a window and is not a user-created FBO.
*/
-static boolean
+static bool
st_framebuffer_add_renderbuffer(struct st_framebuffer *stfb,
gl_buffer_index idx, bool prefer_srgb)
{
struct gl_renderbuffer *rb;
enum pipe_format format;
- boolean sw;
+ bool sw;
assert(_mesa_is_winsys_fbo(&stfb->Base));
@@ -320,30 +320,30 @@ st_framebuffer_add_renderbuffer(struct st_framebuffer *stfb,
switch (idx) {
case BUFFER_DEPTH:
format = stfb->iface->visual->depth_stencil_format;
- sw = FALSE;
+ sw = false;
break;
case BUFFER_ACCUM:
format = stfb->iface->visual->accum_format;
- sw = TRUE;
+ sw = true;
break;
default:
format = stfb->iface->visual->color_format;
if (prefer_srgb)
format = util_format_srgb(format);
- sw = FALSE;
+ sw = false;
break;
}
if (format == PIPE_FORMAT_NONE)
- return FALSE;
+ return false;
rb = st_new_renderbuffer_fb(format, stfb->iface->visual->samples, sw);
if (!rb)
- return FALSE;
+ return false;
if (idx != BUFFER_DEPTH) {
_mesa_attach_and_own_rb(&stfb->Base, idx, rb);
- return TRUE;
+ return true;
}
bool rb_ownership_taken = false;
@@ -359,7 +359,7 @@ st_framebuffer_add_renderbuffer(struct st_framebuffer *stfb,
_mesa_attach_and_own_rb(&stfb->Base, BUFFER_STENCIL, rb);
}
- return TRUE;
+ return true;
}
@@ -546,7 +546,7 @@ st_framebuffer_iface_equal(const void *a, const void *b)
}
-static boolean
+static bool
st_framebuffer_iface_lookup(struct st_manager *smapi,
const struct st_framebuffer_iface *stfbi)
{
@@ -565,7 +565,7 @@ st_framebuffer_iface_lookup(struct st_manager *smapi,
}
-static boolean
+static bool
st_framebuffer_iface_insert(struct st_manager *smapi,
struct st_framebuffer_iface *stfbi)
{
@@ -690,11 +690,11 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
st->gfx_shaders_may_be_dirty = true;
}
-static boolean
+static bool
st_context_teximage(struct st_context_iface *stctxi,
enum st_texture_type tex_type,
int level, enum pipe_format pipe_format,
- struct pipe_resource *tex, boolean mipmap)
+ struct pipe_resource *tex, bool mipmap)
{
struct st_context *st = (struct st_context *) stctxi;
struct gl_context *ctx = st->ctx;
@@ -778,7 +778,7 @@ st_context_teximage(struct st_context_iface *stctxi,
_mesa_dirty_texobj(ctx, texObj);
_mesa_unlock_texture(ctx, texObj);
- return TRUE;
+ return true;
}
@@ -793,7 +793,7 @@ st_context_copy(struct st_context_iface *stctxi,
}
-static boolean
+static bool
st_context_share(struct st_context_iface *stctxi,
struct st_context_iface *stsrci)
{
@@ -1053,14 +1053,14 @@ st_framebuffer_reuse_or_create(struct st_context *st,
}
-static boolean
+static bool
st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi,
struct st_framebuffer_iface *stdrawi,
struct st_framebuffer_iface *streadi)
{
struct st_context *st = (struct st_context *) stctxi;
struct st_framebuffer *stdraw, *stread;
- boolean ret;
+ bool ret;
if (st) {
/* reuse or create the draw fb */
@@ -1208,7 +1208,7 @@ st_manager_flush_swapbuffers(void)
* Add a color renderbuffer on demand. The FBO must correspond to a window,
* not a user-created FBO.
*/
-boolean
+bool
st_manager_add_color_renderbuffer(struct st_context *st,
struct gl_framebuffer *fb,
gl_buffer_index idx)
@@ -1217,12 +1217,12 @@ st_manager_add_color_renderbuffer(struct st_context *st,
/* FBO */
if (!stfb)
- return FALSE;
+ return false;
assert(_mesa_is_winsys_fbo(fb));
if (stfb->Base.Attachment[idx].Renderbuffer)
- return TRUE;
+ return true;
switch (idx) {
case BUFFER_FRONT_LEFT:
@@ -1231,12 +1231,12 @@ st_manager_add_color_renderbuffer(struct st_context *st,
case BUFFER_BACK_RIGHT:
break;
default:
- return FALSE;
+ return false;
}
if (!st_framebuffer_add_renderbuffer(stfb, idx,
stfb->Base.Visual.sRGBCapable))
- return FALSE;
+ return false;
st_framebuffer_update_attachments(stfb);
@@ -1250,7 +1250,7 @@ st_manager_add_color_renderbuffer(struct st_context *st,
st_invalidate_buffers(st);
- return TRUE;
+ return true;
}
diff --git a/src/mesa/state_tracker/st_manager.h b/src/mesa/state_tracker/st_manager.h
index 581e858229b..0a98d506bbe 100644
--- a/src/mesa/state_tracker/st_manager.h
+++ b/src/mesa/state_tracker/st_manager.h
@@ -44,7 +44,7 @@ st_manager_flush_frontbuffer(struct st_context *st);
void
st_manager_validate_framebuffers(struct st_context *st);
-boolean
+bool
st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *fb,
gl_buffer_index idx);