summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/virgl
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2023-06-22 23:58:38 +0800
committerYonggang Luo <luoyonggang@gmail.com>2023-06-27 18:18:28 +0800
commit05b840521ab3e621d1664cd91d839914ddabd0db (patch)
tree52656050b3e24673b3c994b4791db1afa011d0d8 /src/gallium/drivers/virgl
parent49e84fdad2b453460100ea9253015eec437f5405 (diff)
treewide: Replace the usage of TRUE/FALSE with true/false
this is a separate patch as it's won't affect the code style Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577>
Diffstat (limited to 'src/gallium/drivers/virgl')
-rw-r--r--src/gallium/drivers/virgl/virgl_context.c26
-rw-r--r--src/gallium/drivers/virgl/virgl_encode.c6
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c2
-rw-r--r--src/gallium/drivers/virgl/virgl_streamout.c2
4 files changed, 18 insertions, 18 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c
index 751561ca23f..f40009ad37b 100644
--- a/src/gallium/drivers/virgl/virgl_context.c
+++ b/src/gallium/drivers/virgl/virgl_context.c
@@ -180,7 +180,7 @@ static void virgl_attach_res_framebuffer(struct virgl_context *vctx)
if (surf) {
res = virgl_resource(surf->texture);
if (res) {
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
virgl_resource_dirty(res, surf->u.tex.level);
}
}
@@ -189,7 +189,7 @@ static void virgl_attach_res_framebuffer(struct virgl_context *vctx)
if (surf) {
res = virgl_resource(surf->texture);
if (res) {
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
virgl_resource_dirty(res, surf->u.tex.level);
}
}
@@ -206,7 +206,7 @@ static void virgl_attach_res_sampler_views(struct virgl_context *vctx,
for (int i = 0; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; ++i) {
if (binding->views[i] && binding->views[i]->texture) {
struct virgl_resource *res = virgl_resource(binding->views[i]->texture);
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
}
}
}
@@ -220,7 +220,7 @@ static void virgl_attach_res_vertex_buffers(struct virgl_context *vctx)
for (i = 0; i < vctx->num_vertex_buffers; i++) {
res = virgl_resource(vctx->vertex_buffer[i].buffer.resource);
if (res)
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
}
}
@@ -232,7 +232,7 @@ static void virgl_attach_res_index_buffer(struct virgl_context *vctx,
res = virgl_resource(ib->buffer);
if (res)
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
}
static void virgl_attach_res_so_targets(struct virgl_context *vctx)
@@ -244,7 +244,7 @@ static void virgl_attach_res_so_targets(struct virgl_context *vctx)
for (i = 0; i < vctx->num_so_targets; i++) {
res = virgl_resource(vctx->so_targets[i].base.buffer);
if (res)
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
}
}
@@ -261,7 +261,7 @@ static void virgl_attach_res_uniform_buffers(struct virgl_context *vctx,
int i = u_bit_scan(&remaining_mask);
res = virgl_resource(binding->ubos[i].buffer);
assert(res);
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
}
}
@@ -278,7 +278,7 @@ static void virgl_attach_res_shader_buffers(struct virgl_context *vctx,
int i = u_bit_scan(&remaining_mask);
res = virgl_resource(binding->ssbos[i].buffer);
assert(res);
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
}
}
@@ -295,7 +295,7 @@ static void virgl_attach_res_shader_images(struct virgl_context *vctx,
int i = u_bit_scan(&remaining_mask);
res = virgl_resource(binding->images[i].resource);
assert(res);
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
}
}
@@ -309,7 +309,7 @@ static void virgl_attach_res_atomic_buffers(struct virgl_context *vctx)
int i = u_bit_scan(&remaining_mask);
res = virgl_resource(vctx->atomic_buffers[i].buffer);
assert(res);
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
}
}
@@ -563,7 +563,7 @@ static void virgl_bind_vertex_elements_state(struct pipe_context *ctx,
vctx->vertex_elements = state;
virgl_encode_bind_object(vctx, state ? state->handle : 0,
VIRGL_OBJECT_VERTEX_ELEMENTS);
- vctx->vertex_array_dirty = TRUE;
+ vctx->vertex_array_dirty = true;
}
static void virgl_set_vertex_buffers(struct pipe_context *ctx,
@@ -590,7 +590,7 @@ static void virgl_set_vertex_buffers(struct pipe_context *ctx,
}
}
- vctx->vertex_array_dirty = TRUE;
+ vctx->vertex_array_dirty = true;
}
static void virgl_hw_set_vertex_buffers(struct virgl_context *vctx)
@@ -609,7 +609,7 @@ static void virgl_hw_set_vertex_buffers(struct virgl_context *vctx)
virgl_attach_res_vertex_buffers(vctx);
- vctx->vertex_array_dirty = FALSE;
+ vctx->vertex_array_dirty = false;
}
}
diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c
index 106a3e4a1b9..f0097c0d825 100644
--- a/src/gallium/drivers/virgl/virgl_encode.c
+++ b/src/gallium/drivers/virgl/virgl_encode.c
@@ -352,7 +352,7 @@ static void virgl_encoder_emit_resource(struct virgl_screen *vs,
{
struct virgl_winsys *vws = vs->vws;
if (res && res->hw_res)
- vws->emit_res(vws, buf, res->hw_res, TRUE);
+ vws->emit_res(vws, buf, res->hw_res, true);
else {
virgl_encoder_write_dword(buf, 0);
}
@@ -907,7 +907,7 @@ static void virgl_encoder_transfer3d_common(struct virgl_screen *vs,
* because transfer->resource might have a different virgl_hw_res than what
* this transfer targets, which is saved in xfer->hw_res.
*/
- vs->vws->emit_res(vs->vws, buf, xfer->hw_res, TRUE);
+ vs->vws->emit_res(vs->vws, buf, xfer->hw_res, true);
virgl_encoder_write_dword(buf, transfer->level);
virgl_encoder_write_dword(buf, transfer->usage);
virgl_encoder_write_dword(buf, stride);
@@ -1533,7 +1533,7 @@ void virgl_encode_copy_transfer(struct virgl_context *ctx,
* from the image stride.
*/
virgl_encoder_transfer3d_common(vs, ctx->cbuf, trans, virgl_transfer3d_explicit_stride);
- vs->vws->emit_res(vs->vws, ctx->cbuf, trans->copy_src_hw_res, TRUE);
+ vs->vws->emit_res(vs->vws, ctx->cbuf, trans->copy_src_hw_res, true);
virgl_encoder_write_dword(ctx->cbuf, trans->copy_src_offset);
virgl_encoder_write_dword(ctx->cbuf, direction_and_synchronized);
}
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index 0bd70d2be85..e5c6bbb8131 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -821,7 +821,7 @@ virgl_is_format_supported( struct pipe_screen *screen,
if (bind & PIPE_BIND_RENDER_TARGET) {
/* For ARB_framebuffer_no_attachments. */
if (format == PIPE_FORMAT_NONE)
- return TRUE;
+ return true;
if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS)
return false;
diff --git a/src/gallium/drivers/virgl/virgl_streamout.c b/src/gallium/drivers/virgl/virgl_streamout.c
index c253d561ec1..cd414c63521 100644
--- a/src/gallium/drivers/virgl/virgl_streamout.c
+++ b/src/gallium/drivers/virgl/virgl_streamout.c
@@ -83,7 +83,7 @@ static void virgl_set_so_targets(struct pipe_context *ctx,
pipe_resource_reference(&vctx->so_targets[i].base.buffer, targets[i]->buffer);
- vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, false);
} else {
pipe_resource_reference(&vctx->so_targets[i].base.buffer, NULL);
}