[Mesa-dev] [PATCH 16/18] gallium/u_blitter: don't use boolean, TRUE, FALSE

Marek Olšák maraeo at gmail.com
Thu Aug 17 18:31:37 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/auxiliary/util/u_blitter.c | 102 ++++++++++++++++-----------------
 src/gallium/auxiliary/util/u_blitter.h |  22 +++----
 2 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 786b232..aef19dc 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -119,31 +119,31 @@ struct blitter_context_priv
 
    /* Sampler state. */
    void *sampler_state;
    void *sampler_state_linear;
    void *sampler_state_rect;
    void *sampler_state_rect_linear;
 
    /* Rasterizer state. */
    void *rs_state, *rs_state_scissor, *rs_discard_state;
 
-   boolean has_geometry_shader;
-   boolean has_tessellation;
-   boolean has_layered;
-   boolean has_stream_out;
-   boolean has_stencil_export;
-   boolean has_texture_multisample;
-   boolean has_tex_lz;
-   boolean has_txf;
-   boolean has_vertex_id;
-   boolean cube_as_2darray;
-   boolean cached_all_shaders;
+   bool has_geometry_shader;
+   bool has_tessellation;
+   bool has_layered;
+   bool has_stream_out;
+   bool has_stencil_export;
+   bool has_texture_multisample;
+   bool has_tex_lz;
+   bool has_txf;
+   bool has_vertex_id;
+   bool cube_as_2darray;
+   bool cached_all_shaders;
 
    /* The Draw module overrides these functions.
     * Always create the blitter before Draw. */
    void   (*bind_fs_state)(struct pipe_context *, void *);
    void   (*delete_fs_state)(struct pipe_context *, void *);
 };
 
 struct blitter_context *util_blitter_create(struct pipe_context *pipe)
 {
    struct blitter_context_priv *ctx;
@@ -338,58 +338,58 @@ static void bind_vs_pos_only(struct blitter_context_priv *ctx,
       const uint semantic_names[] = { TGSI_SEMANTIC_POSITION };
       const uint semantic_indices[] = { 0 };
 
       memset(&so, 0, sizeof(so));
       so.num_outputs = 1;
       so.output[0].num_components = num_so_channels;
       so.stride[0] = num_so_channels;
 
       ctx->vs_pos_only[index] =
          util_make_vertex_passthrough_shader_with_so(pipe, 1, semantic_names,
-                                                     semantic_indices, FALSE,
+                                                     semantic_indices, false,
                                                      false, &so);
    }
 
    pipe->bind_vs_state(pipe, ctx->vs_pos_only[index]);
 }
 
 static void bind_vs_passthrough_pos_generic(struct blitter_context_priv *ctx)
 {
    struct pipe_context *pipe = ctx->base.pipe;
 
    if (!ctx->vs) {
       const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
                                       TGSI_SEMANTIC_GENERIC };
       const uint semantic_indices[] = { 0, 0 };
       unsigned offset = ctx->has_vertex_id ? 1 : 0;
 
       ctx->vs =
          util_make_vertex_passthrough_shader(pipe, 2 - offset,
                                              semantic_names + offset,
-                                             semantic_indices + offset, FALSE);
+                                             semantic_indices + offset, false);
    }
 
    pipe->bind_vs_state(pipe, ctx->vs);
 }
 
 static void bind_vs_passthrough_pos(struct blitter_context_priv *ctx)
 {
    struct pipe_context *pipe = ctx->base.pipe;
 
    if (!ctx->vs_nogeneric) {
       const uint semantic_names[] = { TGSI_SEMANTIC_POSITION };
       const uint semantic_indices[] = { 0 };
 
       ctx->vs_nogeneric =
          util_make_vertex_passthrough_shader(pipe, !ctx->has_vertex_id,
                                              semantic_names,
-                                             semantic_indices, FALSE);
+                                             semantic_indices, false);
    }
 
    pipe->bind_vs_state(pipe, ctx->vs_nogeneric);
 }
 
 static void bind_vs_layered(struct blitter_context_priv *ctx)
 {
    struct pipe_context *pipe = ctx->base.pipe;
 
    if (!ctx->vs_layered) {
@@ -413,35 +413,35 @@ static void bind_fs_empty(struct blitter_context_priv *ctx)
 }
 
 static void bind_fs_write_one_cbuf(struct blitter_context_priv *ctx)
 {
    struct pipe_context *pipe = ctx->base.pipe;
 
    if (!ctx->fs_write_one_cbuf) {
       assert(!ctx->cached_all_shaders);
       ctx->fs_write_one_cbuf =
          util_make_fragment_passthrough_shader(pipe, TGSI_SEMANTIC_GENERIC,
-                                               TGSI_INTERPOLATE_CONSTANT, FALSE);
+                                               TGSI_INTERPOLATE_CONSTANT, false);
    }
 
    ctx->bind_fs_state(pipe, ctx->fs_write_one_cbuf);
 }
 
 static void bind_fs_write_all_cbufs(struct blitter_context_priv *ctx)
 {
    struct pipe_context *pipe = ctx->base.pipe;
 
    if (!ctx->fs_write_all_cbufs) {
       assert(!ctx->cached_all_shaders);
       ctx->fs_write_all_cbufs =
          util_make_fragment_passthrough_shader(pipe, TGSI_SEMANTIC_GENERIC,
-                                               TGSI_INTERPOLATE_CONSTANT, TRUE);
+                                               TGSI_INTERPOLATE_CONSTANT, true);
    }
 
    ctx->bind_fs_state(pipe, ctx->fs_write_all_cbufs);
 }
 
 void util_blitter_destroy(struct blitter_context *blitter)
 {
    struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
    struct pipe_context *pipe = blitter->pipe;
    unsigned i, j, f;
@@ -520,45 +520,45 @@ void util_blitter_destroy(struct blitter_context *blitter)
       ctx->delete_fs_state(pipe, ctx->fs_write_all_cbufs);
 
    pipe->delete_sampler_state(pipe, ctx->sampler_state_rect_linear);
    pipe->delete_sampler_state(pipe, ctx->sampler_state_rect);
    pipe->delete_sampler_state(pipe, ctx->sampler_state_linear);
    pipe->delete_sampler_state(pipe, ctx->sampler_state);
    FREE(ctx);
 }
 
 void util_blitter_set_texture_multisample(struct blitter_context *blitter,
-                                          boolean supported)
+                                          bool supported)
 {
    struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
 
    ctx->has_texture_multisample = supported;
 }
 
 void util_blitter_set_running_flag(struct blitter_context *blitter)
 {
    if (blitter->running) {
       _debug_printf("u_blitter:%i: Caught recursion. This is a driver bug.\n",
                     __LINE__);
    }
-   blitter->running = TRUE;
+   blitter->running = true;
 
    blitter->pipe->set_active_query_state(blitter->pipe, false);
 }
 
 void util_blitter_unset_running_flag(struct blitter_context *blitter)
 {
    if (!blitter->running) {
       _debug_printf("u_blitter:%i: Caught recursion. This is a driver bug.\n",
                     __LINE__);
    }
-   blitter->running = FALSE;
+   blitter->running = false;
 
    blitter->pipe->set_active_query_state(blitter->pipe, true);
 }
 
 static void blitter_check_saved_vertex_states(struct blitter_context_priv *ctx)
 {
    assert(ctx->base.saved_velem_state != INVALID_PTR);
    assert(ctx->base.saved_vs != INVALID_PTR);
    assert(!ctx->has_geometry_shader || ctx->base.saved_gs != INVALID_PTR);
    assert(!ctx->has_tessellation || ctx->base.saved_tcs != INVALID_PTR);
@@ -639,41 +639,41 @@ void util_blitter_restore_fragment_states(struct blitter_context *blitter)
    pipe->bind_depth_stencil_alpha_state(pipe, ctx->base.saved_dsa_state);
    ctx->base.saved_dsa_state = INVALID_PTR;
 
    /* Blend state. */
    pipe->bind_blend_state(pipe, ctx->base.saved_blend_state);
    ctx->base.saved_blend_state = INVALID_PTR;
 
    /* Sample mask. */
    if (ctx->base.is_sample_mask_saved) {
       pipe->set_sample_mask(pipe, ctx->base.saved_sample_mask);
-      ctx->base.is_sample_mask_saved = FALSE;
+      ctx->base.is_sample_mask_saved = false;
    }
 
    /* Miscellaneous states. */
    /* XXX check whether these are saved and whether they need to be restored
     * (depending on the operation) */
    pipe->set_stencil_ref(pipe, &ctx->base.saved_stencil_ref);
    pipe->set_viewport_states(pipe, 0, 1, &ctx->base.saved_viewport);
 }
 
 static void blitter_check_saved_fb_state(struct blitter_context_priv *ctx)
 {
    assert(ctx->base.saved_fb_state.nr_cbufs != ~0u);
 }
 
 static void blitter_disable_render_cond(struct blitter_context_priv *ctx)
 {
    struct pipe_context *pipe = ctx->base.pipe;
 
    if (ctx->base.saved_render_cond_query) {
-      pipe->render_condition(pipe, NULL, FALSE, 0);
+      pipe->render_condition(pipe, NULL, false, 0);
    }
 }
 
 void util_blitter_restore_render_cond(struct blitter_context *blitter)
 {
    struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
    struct pipe_context *pipe = ctx->base.pipe;
 
    if (ctx->base.saved_render_cond_query) {
       pipe->render_condition(pipe, ctx->base.saved_render_cond_query,
@@ -788,21 +788,21 @@ static void blitter_set_clear_color(struct blitter_context_priv *ctx,
    }
 }
 
 static void get_texcoords(struct pipe_sampler_view *src,
                           unsigned src_width0, unsigned src_height0,
                           int x1, int y1, int x2, int y2,
                           float layer, unsigned sample,
                           bool uses_txf, union blitter_attrib *out)
 {
    unsigned level = src->u.tex.first_level;
-   boolean normalized = !uses_txf &&
+   bool normalized = !uses_txf &&
                         src->target != PIPE_TEXTURE_RECT &&
                         src->texture->nr_samples <= 1;
 
    if (normalized) {
       out->texcoord.x1 = x1 / (float)u_minify(src_width0,  level);
       out->texcoord.y1 = y1 / (float)u_minify(src_height0, level);
       out->texcoord.x2 = x2 / (float)u_minify(src_width0,  level);
       out->texcoord.y2 = y2 / (float)u_minify(src_height0, level);
    } else {
       out->texcoord.x1 = x1;
@@ -1116,21 +1116,21 @@ void *blitter_get_fs_texfetch_stencil(struct blitter_context_priv *ctx,
  * blitting.  Drivers which use the 'draw' fallbacks will typically use
  * this to make sure we generate/use shaders that don't go through the
  * draw module's wrapper functions.
  */
 void util_blitter_cache_all_shaders(struct blitter_context *blitter)
 {
    struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
    struct pipe_context *pipe = blitter->pipe;
    struct pipe_screen *screen = pipe->screen;
    unsigned samples, j, f, target, max_samples, use_txf;
-   boolean has_arraytex, has_cubearraytex;
+   bool has_arraytex, has_cubearraytex;
 
    max_samples = ctx->has_texture_multisample ? 2 : 1;
    has_arraytex = screen->get_param(screen,
                                     PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS) != 0;
    has_cubearraytex = screen->get_param(screen,
                                     PIPE_CAP_CUBE_MAP_ARRAY) != 0;
 
    /* It only matters if i <= 1 or > 1. */
    for (samples = 1; samples <= max_samples; samples++) {
       for (target = PIPE_TEXTURE_1D; target < PIPE_MAX_TEXTURE_TYPES; target++) {
@@ -1203,27 +1203,27 @@ void util_blitter_cache_all_shaders(struct blitter_context *blitter)
                }
             }
          }
       }
    }
 
    ctx->fs_empty = util_make_empty_fragment_shader(pipe);
 
    ctx->fs_write_one_cbuf =
       util_make_fragment_passthrough_shader(pipe, TGSI_SEMANTIC_GENERIC,
-                                            TGSI_INTERPOLATE_CONSTANT, FALSE);
+                                            TGSI_INTERPOLATE_CONSTANT, false);
 
    ctx->fs_write_all_cbufs =
       util_make_fragment_passthrough_shader(pipe, TGSI_SEMANTIC_GENERIC,
-                                            TGSI_INTERPOLATE_CONSTANT, TRUE);
+                                            TGSI_INTERPOLATE_CONSTANT, true);
 
-   ctx->cached_all_shaders = TRUE;
+   ctx->cached_all_shaders = true;
 }
 
 static void blitter_set_common_draw_rect_state(struct blitter_context_priv *ctx,
                                                bool scissor,
                                                bool vs_layered,
                                                bool vs_pass_generic)
 {
    struct pipe_context *pipe = ctx->base.pipe;
 
    pipe->bind_rasterizer_state(pipe, scissor ? ctx->rs_state_scissor
@@ -1502,93 +1502,93 @@ void util_blitter_default_src_texture(struct blitter_context *blitter,
    src_templ->u.tex.first_layer = 0;
    src_templ->u.tex.last_layer =
       src->target == PIPE_TEXTURE_3D ? u_minify(src->depth0, srclevel) - 1
                                      : src->array_size - 1;
    src_templ->swizzle_r = PIPE_SWIZZLE_X;
    src_templ->swizzle_g = PIPE_SWIZZLE_Y;
    src_templ->swizzle_b = PIPE_SWIZZLE_Z;
    src_templ->swizzle_a = PIPE_SWIZZLE_W;
 }
 
-static boolean is_blit_generic_supported(struct blitter_context *blitter,
-                                         const struct pipe_resource *dst,
-                                         enum pipe_format dst_format,
-                                         const struct pipe_resource *src,
-                                         enum pipe_format src_format,
-                                         unsigned mask)
+static bool is_blit_generic_supported(struct blitter_context *blitter,
+                                      const struct pipe_resource *dst,
+                                      enum pipe_format dst_format,
+                                      const struct pipe_resource *src,
+                                      enum pipe_format src_format,
+                                      unsigned mask)
 {
    struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
    struct pipe_screen *screen = ctx->base.pipe->screen;
 
    if (dst) {
       unsigned bind;
       const struct util_format_description *desc =
             util_format_description(dst_format);
-      boolean dst_has_stencil = util_format_has_stencil(desc);
+      bool dst_has_stencil = util_format_has_stencil(desc);
 
       /* Stencil export must be supported for stencil copy. */
       if ((mask & PIPE_MASK_S) && dst_has_stencil &&
           !ctx->has_stencil_export) {
-         return FALSE;
+         return false;
       }
 
       if (dst_has_stencil || util_format_has_depth(desc))
          bind = PIPE_BIND_DEPTH_STENCIL;
       else
          bind = PIPE_BIND_RENDER_TARGET;
 
       if (!screen->is_format_supported(screen, dst_format, dst->target,
                                        dst->nr_samples, bind)) {
-         return FALSE;
+         return false;
       }
    }
 
    if (src) {
       if (src->nr_samples > 1 && !ctx->has_texture_multisample) {
-         return FALSE;
+         return false;
       }
 
       if (!screen->is_format_supported(screen, src_format, src->target,
                                  src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) {
-         return FALSE;
+         return false;
       }
 
       /* Check stencil sampler support for stencil copy. */
       if (mask & PIPE_MASK_S) {
          if (util_format_has_stencil(util_format_description(src_format))) {
             enum pipe_format stencil_format =
                util_format_stencil_only(src_format);
             assert(stencil_format != PIPE_FORMAT_NONE);
 
             if (stencil_format != src_format &&
                 !screen->is_format_supported(screen, stencil_format,
                                              src->target, src->nr_samples,
                                              PIPE_BIND_SAMPLER_VIEW)) {
-               return FALSE;
+               return false;
             }
          }
       }
    }
 
-   return TRUE;
+   return true;
 }
 
-boolean util_blitter_is_copy_supported(struct blitter_context *blitter,
-                                       const struct pipe_resource *dst,
-                                       const struct pipe_resource *src)
+bool util_blitter_is_copy_supported(struct blitter_context *blitter,
+                                    const struct pipe_resource *dst,
+                                    const struct pipe_resource *src)
 {
    return is_blit_generic_supported(blitter, dst, dst->format,
                                     src, src->format, PIPE_MASK_RGBAZS);
 }
 
-boolean util_blitter_is_blit_supported(struct blitter_context *blitter,
-				       const struct pipe_blit_info *info)
+bool util_blitter_is_blit_supported(struct blitter_context *blitter,
+				    const struct pipe_blit_info *info)
 {
    return is_blit_generic_supported(blitter,
                                     info->dst.resource, info->dst.format,
                                     info->src.resource, info->src.format,
                                     info->mask);
 }
 
 void util_blitter_copy_texture(struct blitter_context *blitter,
                                struct pipe_resource *dst,
                                unsigned dst_level,
@@ -1614,21 +1614,21 @@ void util_blitter_copy_texture(struct blitter_context *blitter,
    dst_view = pipe->create_surface(pipe, dst, &dst_templ);
 
    /* Initialize the sampler view. */
    util_blitter_default_src_texture(blitter, &src_templ, src, src_level);
    src_view = pipe->create_sampler_view(pipe, src, &src_templ);
 
    /* Copy. */
    util_blitter_blit_generic(blitter, dst_view, &dstbox,
                              src_view, srcbox, src->width0, src->height0,
                              PIPE_MASK_RGBAZS, PIPE_TEX_FILTER_NEAREST, NULL,
-                             FALSE);
+                             false);
 
    pipe_surface_reference(&dst_view, NULL);
    pipe_sampler_view_reference(&src_view, NULL);
 }
 
 static void
 blitter_draw_tex(struct blitter_context_priv *ctx,
                  int dst_x1, int dst_y1, int dst_x2, int dst_y2,
                  struct pipe_sampler_view *src,
                  unsigned src_width0, unsigned src_height0,
@@ -1646,29 +1646,29 @@ blitter_draw_tex(struct blitter_context_priv *ctx,
        src->target == PIPE_TEXTURE_CUBE_ARRAY) {
       float face_coord[4][2];
 
       set_texcoords_in_vertices(&coord, &face_coord[0][0], 2);
 
       if (ctx->has_vertex_id) {
          util_map_texcoords2d_onto_cubemap((unsigned)layer % 6,
                                            /* pointer, stride in floats */
                                            &face_coord[0][0], 2,
                                            &ctx->vertices_nopos[0][0], 4,
-                                           FALSE);
+                                           false);
          for (unsigned i = 0; i < 4; i++)
             ctx->vertices_nopos[i][3] = coord.texcoord.w;
       } else {
          util_map_texcoords2d_onto_cubemap((unsigned)layer % 6,
                                            /* pointer, stride in floats */
                                            &face_coord[0][0], 2,
                                            &ctx->vertices[0][1][0], 8,
-                                           FALSE);
+                                           false);
          for (unsigned i = 0; i < 4; i++)
             ctx->vertices[i][1][3] = coord.texcoord.w;
       }
 
       /* Cubemaps don't use draw_rectangle. */
       blitter_draw(ctx, dst_x1, dst_y1, dst_x2, dst_y2, 0, 1);
    } else {
       ctx->base.draw_rectangle(&ctx->base, dst_x1, dst_y1, dst_x2, dst_y2, 0,
                                1, type, &coord);
    }
@@ -1796,29 +1796,29 @@ static void do_blits(struct blitter_context_priv *ctx,
 }
 
 void util_blitter_blit_generic(struct blitter_context *blitter,
                                struct pipe_surface *dst,
                                const struct pipe_box *dstbox,
                                struct pipe_sampler_view *src,
                                const struct pipe_box *srcbox,
                                unsigned src_width0, unsigned src_height0,
                                unsigned mask, unsigned filter,
                                const struct pipe_scissor_state *scissor,
-                               boolean alpha_blend)
+                               bool alpha_blend)
 {
    struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
    struct pipe_context *pipe = ctx->base.pipe;
    enum pipe_texture_target src_target = src->target;
    unsigned src_samples = src->texture->nr_samples;
    unsigned dst_samples = dst->texture->nr_samples;
-   boolean has_depth, has_stencil, has_color;
-   boolean blit_stencil, blit_depth, blit_color;
+   bool has_depth, has_stencil, has_color;
+   bool blit_stencil, blit_depth, blit_color;
    void *sampler_state;
    const struct util_format_description *src_desc =
          util_format_description(src->format);
    const struct util_format_description *dst_desc =
          util_format_description(dst->format);
 
    has_color = src_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS &&
                dst_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS;
    has_depth = util_format_has_depth(src_desc) &&
                util_format_has_depth(dst_desc);
@@ -2031,21 +2031,21 @@ util_blitter_blit(struct blitter_context *blitter,
 void util_blitter_generate_mipmap(struct blitter_context *blitter,
 				  struct pipe_resource *tex,
                                   enum pipe_format format,
                                   unsigned base_level, unsigned last_level,
                                   unsigned first_layer, unsigned last_layer)
 {
    struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
    struct pipe_context *pipe = ctx->base.pipe;
    struct pipe_surface dst_templ, *dst_view;
    struct pipe_sampler_view src_templ, *src_view;
-   boolean is_depth;
+   bool is_depth;
    void *sampler_state;
    const struct util_format_description *desc =
          util_format_description(format);
    unsigned src_level;
    unsigned target = tex->target;
 
    if (ctx->cube_as_2darray &&
        (target == PIPE_TEXTURE_CUBE || target == PIPE_TEXTURE_CUBE_ARRAY))
       target = PIPE_TEXTURE_2D_ARRAY;
 
diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h
index 3d1f285..0fd7b8a 100644
--- a/src/gallium/auxiliary/util/u_blitter.h
+++ b/src/gallium/auxiliary/util/u_blitter.h
@@ -80,56 +80,56 @@ struct blitter_context
     *       a specialized hardware path for drawing a rectangle, e.g. using
     *       a rectangular point sprite.
     */
    void (*draw_rectangle)(struct blitter_context *blitter,
                           int x1, int y1, int x2, int y2,
                           float depth, unsigned num_instances,
                           enum blitter_attrib_type type,
                           const union blitter_attrib *attrib);
 
    /* Whether the blitter is running. */
-   boolean running;
+   bool running;
 
    /* Private members, really. */
    struct pipe_context *pipe; /**< pipe context */
 
    void *saved_blend_state;   /**< blend state */
    void *saved_dsa_state;     /**< depth stencil alpha state */
    void *saved_velem_state;   /**< vertex elements state */
    void *saved_rs_state;      /**< rasterizer state */
    void *saved_fs, *saved_vs, *saved_gs, *saved_tcs, *saved_tes; /**< shaders */
 
    struct pipe_framebuffer_state saved_fb_state;  /**< framebuffer state */
    struct pipe_stencil_ref saved_stencil_ref;     /**< stencil ref */
    struct pipe_viewport_state saved_viewport;
    struct pipe_scissor_state saved_scissor;
-   boolean is_sample_mask_saved;
+   bool is_sample_mask_saved;
    unsigned saved_sample_mask;
 
    unsigned saved_num_sampler_states;
    void *saved_sampler_states[PIPE_MAX_SAMPLERS];
 
    unsigned saved_num_sampler_views;
    struct pipe_sampler_view *saved_sampler_views[PIPE_MAX_SAMPLERS];
 
    unsigned cb_slot;
    struct pipe_constant_buffer saved_fs_constant_buffer;
 
    unsigned vb_slot;
    struct pipe_vertex_buffer saved_vertex_buffer;
 
    unsigned saved_num_so_targets;
    struct pipe_stream_output_target *saved_so_targets[PIPE_MAX_SO_BUFFERS];
 
    struct pipe_query *saved_render_cond_query;
    uint saved_render_cond_mode;
-   boolean saved_render_cond_cond;
+   bool saved_render_cond_cond;
 };
 
 /**
  * Create a blitter context.
  */
 struct blitter_context *util_blitter_create(struct pipe_context *pipe);
 
 /**
  * Destroy a blitter context.
  */
@@ -143,21 +143,21 @@ void util_blitter_cache_all_shaders(struct blitter_context *blitter);
 static inline
 struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter)
 {
    return blitter->pipe;
 }
 
 /**
  * Override PIPE_CAP_TEXTURE_MULTISAMPLE as reported by the driver.
  */
 void util_blitter_set_texture_multisample(struct blitter_context *blitter,
-                                          boolean supported);
+                                          bool supported);
 
 /* The default function to draw a rectangle. This can only be used
  * inside of the draw_rectangle callback if the driver overrides it. */
 void util_blitter_draw_rectangle(struct blitter_context *blitter,
                                  int x1, int y1, int x2, int y2,
                                  float depth, unsigned num_instances,
                                  enum blitter_attrib_type type,
                                  const union blitter_attrib *attrib);
 
 
@@ -183,26 +183,26 @@ void util_blitter_draw_rectangle(struct blitter_context *blitter,
 void util_blitter_clear(struct blitter_context *blitter,
                         unsigned width, unsigned height, unsigned num_layers,
                         unsigned clear_buffers,
                         const union pipe_color_union *color,
                         double depth, unsigned stencil);
 
 /**
  * Check if the blitter (with the help of the driver) can blit between
  * the two resources.
  */
-boolean util_blitter_is_copy_supported(struct blitter_context *blitter,
-                                       const struct pipe_resource *dst,
-                                       const struct pipe_resource *src);
+bool util_blitter_is_copy_supported(struct blitter_context *blitter,
+                                    const struct pipe_resource *dst,
+                                    const struct pipe_resource *src);
 
-boolean util_blitter_is_blit_supported(struct blitter_context *blitter,
-				       const struct pipe_blit_info *info);
+bool util_blitter_is_blit_supported(struct blitter_context *blitter,
+				    const struct pipe_blit_info *info);
 
 /**
  * Copy a block of pixels from one surface to another.
  *
  * These states must be saved in the blitter in addition to the state objects
  * already required to be saved:
  * - fragment shader
  * - depth stencil alpha state
  * - blend state
  * - fragment sampler states
@@ -238,21 +238,21 @@ void util_blitter_copy_texture(struct blitter_context *blitter,
  * Set to PIPE_MASK_RGBAZS if unsure.
  */
 void util_blitter_blit_generic(struct blitter_context *blitter,
                                struct pipe_surface *dst,
                                const struct pipe_box *dstbox,
                                struct pipe_sampler_view *src,
                                const struct pipe_box *srcbox,
                                unsigned src_width0, unsigned src_height0,
                                unsigned mask, unsigned filter,
                                const struct pipe_scissor_state *scissor,
-                               boolean alpha_blend);
+                               bool alpha_blend);
 
 void util_blitter_blit(struct blitter_context *blitter,
 		       const struct pipe_blit_info *info);
 
 void util_blitter_generate_mipmap(struct blitter_context *blitter,
                                   struct pipe_resource *tex,
                                   enum pipe_format format,
                                   unsigned base_level, unsigned last_level,
                                   unsigned first_layer, unsigned last_layer);
 
@@ -527,21 +527,21 @@ static inline void
 util_blitter_save_sample_mask(struct blitter_context *blitter,
                               unsigned sample_mask)
 {
    blitter->is_sample_mask_saved = TRUE;
    blitter->saved_sample_mask = sample_mask;
 }
 
 static inline void
 util_blitter_save_render_condition(struct blitter_context *blitter,
                                    struct pipe_query *query,
-                                   boolean condition,
+                                   bool condition,
                                    enum pipe_render_cond_flag mode)
 {
    blitter->saved_render_cond_query = query;
    blitter->saved_render_cond_mode = mode;
    blitter->saved_render_cond_cond = condition;
 }
 
 void util_blitter_common_clear_setup(struct blitter_context *blitter,
                                      unsigned clear_buffers,
                                      void *custom_blend, void *custom_dsa);
-- 
2.7.4



More information about the mesa-dev mailing list