mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
treewide: replace usage of boolean to bool
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>
This commit is contained in:
parent
b65e745168
commit
7b45a0bd66
408 changed files with 2166 additions and 2166 deletions
|
|
@ -39,7 +39,7 @@ struct fd6_format {
|
|||
enum a6xx_format tex;
|
||||
enum a6xx_format rb;
|
||||
enum a3xx_color_swap swap;
|
||||
boolean present;
|
||||
bool present;
|
||||
};
|
||||
|
||||
#define FMT(pipe, vtxfmt, texfmt, rbfmt, swapfmt) \
|
||||
|
|
|
|||
|
|
@ -70,11 +70,11 @@ struct cso_context {
|
|||
bool always_use_vbuf;
|
||||
bool sampler_format;
|
||||
|
||||
boolean has_geometry_shader;
|
||||
boolean has_tessellation;
|
||||
boolean has_compute_shader;
|
||||
boolean has_task_mesh_shader;
|
||||
boolean has_streamout;
|
||||
bool has_geometry_shader;
|
||||
bool has_tessellation;
|
||||
bool has_compute_shader;
|
||||
bool has_task_mesh_shader;
|
||||
bool has_streamout;
|
||||
|
||||
uint32_t max_fs_samplerviews : 16;
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ struct cso_context {
|
|||
void *velements, *velements_saved;
|
||||
struct pipe_query *render_condition, *render_condition_saved;
|
||||
enum pipe_render_cond_flag render_condition_mode, render_condition_mode_saved;
|
||||
boolean render_condition_cond, render_condition_cond_saved;
|
||||
bool render_condition_cond, render_condition_cond_saved;
|
||||
bool flatshade_first, flatshade_first_saved;
|
||||
|
||||
struct pipe_framebuffer_state fb, fb_saved;
|
||||
|
|
@ -125,7 +125,7 @@ struct cso_context {
|
|||
};
|
||||
|
||||
|
||||
static inline boolean
|
||||
static inline bool
|
||||
delete_cso(struct cso_context *ctx,
|
||||
void *state, enum cso_cache_type type)
|
||||
{
|
||||
|
|
@ -819,7 +819,7 @@ cso_set_viewport(struct cso_context *ctx,
|
|||
*/
|
||||
void
|
||||
cso_set_viewport_dims(struct cso_context *ctx,
|
||||
float width, float height, boolean invert)
|
||||
float width, float height, bool invert)
|
||||
{
|
||||
struct pipe_viewport_state vp;
|
||||
vp.scale[0] = width * 0.5f;
|
||||
|
|
@ -933,7 +933,7 @@ cso_restore_stencil_ref(struct cso_context *ctx)
|
|||
void
|
||||
cso_set_render_condition(struct cso_context *ctx,
|
||||
struct pipe_query *query,
|
||||
boolean condition,
|
||||
bool condition,
|
||||
enum pipe_render_cond_flag mode)
|
||||
{
|
||||
struct pipe_context *pipe = ctx->base.pipe;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ cso_set_viewport(struct cso_context *cso,
|
|||
|
||||
void
|
||||
cso_set_viewport_dims(struct cso_context *ctx,
|
||||
float width, float height, boolean invert);
|
||||
float width, float height, bool invert);
|
||||
|
||||
void
|
||||
cso_set_sample_mask(struct cso_context *cso, unsigned stencil_mask);
|
||||
|
|
@ -162,7 +162,7 @@ cso_set_stencil_ref(struct cso_context *cso,
|
|||
void
|
||||
cso_set_render_condition(struct cso_context *cso,
|
||||
struct pipe_query *query,
|
||||
boolean condition,
|
||||
bool condition,
|
||||
enum pipe_render_cond_flag mode);
|
||||
|
||||
/* gap */
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "util/u_bitcast.h"
|
||||
#include <math.h>
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
TAG(do_cliptest)(struct pt_post_vs *pvs,
|
||||
struct draw_vertex_info *info,
|
||||
const struct draw_prim_info *prim_info)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_get_option_use_llvm(void)
|
||||
{
|
||||
#ifdef DRAW_LLVM_AVAILABLE
|
||||
|
|
@ -69,7 +69,7 @@ draw_get_option_use_llvm(void)
|
|||
*/
|
||||
static struct draw_context *
|
||||
draw_create_context(struct pipe_context *pipe, void *context,
|
||||
boolean try_llvm)
|
||||
bool try_llvm)
|
||||
{
|
||||
struct draw_context *draw = CALLOC_STRUCT(draw_context);
|
||||
if (!draw)
|
||||
|
|
@ -130,7 +130,7 @@ draw_create_no_llvm(struct pipe_context *pipe)
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_init(struct draw_context *draw)
|
||||
{
|
||||
/*
|
||||
|
|
@ -330,10 +330,10 @@ void draw_set_rasterizer_state(struct draw_context *draw,
|
|||
*/
|
||||
void
|
||||
draw_set_driver_clipping(struct draw_context *draw,
|
||||
boolean bypass_clip_xy,
|
||||
boolean bypass_clip_z,
|
||||
boolean guard_band_xy,
|
||||
boolean bypass_clip_points_lines)
|
||||
bool bypass_clip_xy,
|
||||
bool bypass_clip_z,
|
||||
bool guard_band_xy,
|
||||
bool bypass_clip_points_lines)
|
||||
{
|
||||
draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE);
|
||||
|
||||
|
|
@ -501,7 +501,7 @@ draw_wide_point_threshold(struct draw_context *draw, float threshold)
|
|||
* Should the draw module handle point->quad conversion for drawing sprites?
|
||||
*/
|
||||
void
|
||||
draw_wide_point_sprites(struct draw_context *draw, boolean draw_sprite)
|
||||
draw_wide_point_sprites(struct draw_context *draw, bool draw_sprite)
|
||||
{
|
||||
draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE);
|
||||
draw->pipeline.wide_point_sprites = draw_sprite;
|
||||
|
|
@ -524,7 +524,7 @@ draw_wide_line_threshold(struct draw_context *draw, float threshold)
|
|||
* Tells the draw module whether or not to implement line stipple.
|
||||
*/
|
||||
void
|
||||
draw_enable_line_stipple(struct draw_context *draw, boolean enable)
|
||||
draw_enable_line_stipple(struct draw_context *draw, bool enable)
|
||||
{
|
||||
draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE);
|
||||
draw->pipeline.line_stipple = enable;
|
||||
|
|
@ -535,7 +535,7 @@ draw_enable_line_stipple(struct draw_context *draw, boolean enable)
|
|||
* Tells draw module whether to convert points to quads for sprite mode.
|
||||
*/
|
||||
void
|
||||
draw_enable_point_sprites(struct draw_context *draw, boolean enable)
|
||||
draw_enable_point_sprites(struct draw_context *draw, bool enable)
|
||||
{
|
||||
draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE);
|
||||
draw->pipeline.point_sprite = enable;
|
||||
|
|
@ -920,7 +920,7 @@ draw_current_shader_viewport_index_output(const struct draw_context *draw)
|
|||
* Returns true if there's a geometry shader bound and the geometry
|
||||
* shader writes out a viewport index.
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
draw_current_shader_uses_viewport_index(const struct draw_context *draw)
|
||||
{
|
||||
if (draw->ms.mesh_shader)
|
||||
|
|
@ -1214,7 +1214,7 @@ draw_get_shader_param(enum pipe_shader_type shader, enum pipe_shader_cap param)
|
|||
*/
|
||||
void
|
||||
draw_collect_pipeline_statistics(struct draw_context *draw,
|
||||
boolean enable)
|
||||
bool enable)
|
||||
{
|
||||
draw->collect_statistics = enable;
|
||||
}
|
||||
|
|
@ -1262,7 +1262,7 @@ draw_stats_clipper_primitives(struct draw_context *draw,
|
|||
* outputs. This is done to preserve the front-facing
|
||||
* info when decomposing primitives into wireframes.
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
draw_will_inject_frontface(const struct draw_context *draw)
|
||||
{
|
||||
unsigned reduced_prim = u_reduced_prim(draw->pt.prim);
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ struct draw_vertex_info {
|
|||
};
|
||||
|
||||
struct draw_prim_info {
|
||||
boolean linear;
|
||||
bool linear;
|
||||
unsigned start;
|
||||
|
||||
const ushort *elts;
|
||||
|
|
@ -136,27 +136,27 @@ void draw_set_rasterize_stage(struct draw_context *draw,
|
|||
|
||||
void draw_wide_point_threshold(struct draw_context *draw, float threshold);
|
||||
|
||||
void draw_wide_point_sprites(struct draw_context *draw, boolean draw_sprite);
|
||||
void draw_wide_point_sprites(struct draw_context *draw, bool draw_sprite);
|
||||
|
||||
void draw_wide_line_threshold(struct draw_context *draw, float threshold);
|
||||
|
||||
void draw_enable_line_stipple(struct draw_context *draw, boolean enable);
|
||||
void draw_enable_line_stipple(struct draw_context *draw, bool enable);
|
||||
|
||||
void draw_enable_point_sprites(struct draw_context *draw, boolean enable);
|
||||
void draw_enable_point_sprites(struct draw_context *draw, bool enable);
|
||||
|
||||
void draw_set_zs_format(struct draw_context *draw, enum pipe_format format);
|
||||
|
||||
/* for TGSI constants are 4 * sizeof(float), but for NIR they need to be sizeof(float); */
|
||||
void draw_set_constant_buffer_stride(struct draw_context *draw, unsigned num_bytes);
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe);
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_install_aapoint_stage(struct draw_context *draw, struct pipe_context *pipe,
|
||||
nir_alu_type bool_type);
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_install_pstipple_stage(struct draw_context *draw, struct pipe_context *pipe);
|
||||
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ draw_find_shader_output(const struct draw_context *draw,
|
|||
enum tgsi_semantic semantic_name,
|
||||
unsigned semantic_index);
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_will_inject_frontface(const struct draw_context *draw);
|
||||
|
||||
unsigned
|
||||
|
|
@ -384,17 +384,17 @@ draw_set_render(struct draw_context *draw,
|
|||
|
||||
void
|
||||
draw_set_driver_clipping(struct draw_context *draw,
|
||||
boolean bypass_clip_xy,
|
||||
boolean bypass_clip_z,
|
||||
boolean guard_band_xy,
|
||||
boolean bypass_clip_points_lines);
|
||||
bool bypass_clip_xy,
|
||||
bool bypass_clip_z,
|
||||
bool guard_band_xy,
|
||||
bool bypass_clip_points_lines);
|
||||
|
||||
/*******************************************************************************
|
||||
* Draw statistics
|
||||
*/
|
||||
void
|
||||
draw_collect_pipeline_statistics(struct draw_context *draw,
|
||||
boolean enable);
|
||||
bool enable);
|
||||
|
||||
void
|
||||
draw_collect_primitives_generated(struct draw_context *draw,
|
||||
|
|
@ -403,7 +403,7 @@ draw_collect_primitives_generated(struct draw_context *draw,
|
|||
/*******************************************************************************
|
||||
* Draw pipeline
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
draw_need_pipeline(const struct draw_context *draw,
|
||||
const struct pipe_rasterizer_state *rasterizer,
|
||||
enum mesa_prim prim);
|
||||
|
|
@ -415,7 +415,7 @@ int
|
|||
draw_get_shader_param_no_llvm(enum pipe_shader_type shader,
|
||||
enum pipe_shader_cap param);
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_get_option_use_llvm(void);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ draw_gs_get_input_index(int semantic, int index,
|
|||
* the number of elements in the SOA vector. This ensures that the
|
||||
* throughput is optimized for the given vector instruction set.
|
||||
*/
|
||||
static inline boolean
|
||||
static inline bool
|
||||
draw_gs_should_flush(struct draw_geometry_shader *shader)
|
||||
{
|
||||
return (shader->fetched_prim_count == shader->vector_length || shader->num_invocations > 1);
|
||||
|
|
@ -719,7 +719,7 @@ void
|
|||
draw_geometry_shader_prepare(struct draw_geometry_shader *shader,
|
||||
struct draw_context *draw)
|
||||
{
|
||||
boolean use_llvm = draw->llvm != NULL;
|
||||
bool use_llvm = draw->llvm != NULL;
|
||||
if (!use_llvm &&
|
||||
shader && shader->machine->Tokens != shader->state.tokens) {
|
||||
tgsi_exec_machine_bind_shader(shader->machine,
|
||||
|
|
@ -731,7 +731,7 @@ draw_geometry_shader_prepare(struct draw_geometry_shader *shader,
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_gs_init(struct draw_context *draw)
|
||||
{
|
||||
if (!draw->llvm) {
|
||||
|
|
@ -777,7 +777,7 @@ draw_create_geometry_shader(struct draw_context *draw,
|
|||
const struct pipe_shader_state *state)
|
||||
{
|
||||
#ifdef DRAW_LLVM_AVAILABLE
|
||||
boolean use_llvm = draw->llvm != NULL;
|
||||
bool use_llvm = draw->llvm != NULL;
|
||||
struct llvm_geometry_shader *llvm_gs = NULL;
|
||||
#endif
|
||||
struct draw_geometry_shader *gs;
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
const unsigned prim = input_prims->prim; \
|
||||
const unsigned prim_flags = input_prims->flags; \
|
||||
const unsigned count = input_prims->count; \
|
||||
const boolean quads_flatshade_last = FALSE; \
|
||||
const boolean last_vertex_last = !gs->draw->rasterizer->flatshade_first; \
|
||||
const bool quads_flatshade_last = FALSE; \
|
||||
const bool last_vertex_last = !gs->draw->rasterizer->flatshade_first; \
|
||||
do { \
|
||||
switch (prim) { \
|
||||
case MESA_PRIM_QUADS: \
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ generate_vs(struct draw_llvm_variant *variant,
|
|||
LLVMValueRef resources_ptr,
|
||||
const struct lp_build_sampler_soa *draw_sampler,
|
||||
const struct lp_build_image_soa *draw_image,
|
||||
boolean clamp_vertex_color,
|
||||
bool clamp_vertex_color,
|
||||
struct lp_build_mask_context *bld_mask)
|
||||
{
|
||||
struct draw_llvm *llvm = variant->llvm;
|
||||
|
|
@ -874,7 +874,7 @@ draw_store_aos_array(struct gallivm_state *gallivm,
|
|||
LLVMValueRef* aos,
|
||||
int attrib,
|
||||
LLVMValueRef clipmask,
|
||||
boolean need_edgeflag, bool is_per_prim)
|
||||
bool need_edgeflag, bool is_per_prim)
|
||||
{
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
LLVMValueRef attr_index = lp_build_const_int32(gallivm, attrib);
|
||||
|
|
@ -950,7 +950,7 @@ convert_to_aos(struct gallivm_state *gallivm,
|
|||
int num_outputs,
|
||||
struct lp_type soa_type,
|
||||
int primid_slot,
|
||||
boolean need_edgeflag)
|
||||
bool need_edgeflag)
|
||||
{
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
|
||||
|
|
@ -1141,7 +1141,7 @@ generate_clipmask(struct draw_llvm *llvm,
|
|||
struct draw_llvm_variant_key *key,
|
||||
LLVMTypeRef context_type,
|
||||
LLVMValueRef context_ptr,
|
||||
boolean *have_clipdist)
|
||||
bool *have_clipdist)
|
||||
{
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
LLVMValueRef mask; /* stores the <nxi32> clipmasks */
|
||||
|
|
@ -1155,8 +1155,8 @@ generate_clipmask(struct draw_llvm *llvm,
|
|||
const unsigned pos = llvm->draw->vs.position_output;
|
||||
const unsigned cv = llvm->draw->vs.clipvertex_output;
|
||||
int num_written_clipdistance = llvm->draw->vs.vertex_shader->info.num_written_clipdistance;
|
||||
boolean have_cd = false;
|
||||
boolean clip_user = key->clip_user;
|
||||
bool have_cd = false;
|
||||
bool clip_user = key->clip_user;
|
||||
unsigned ucp_enable = key->ucp_enable;
|
||||
unsigned cd[2];
|
||||
|
||||
|
|
@ -1341,7 +1341,7 @@ clipmask_booli8(struct gallivm_state *gallivm,
|
|||
const struct lp_type vs_type,
|
||||
LLVMTypeRef clipmask_bool_type,
|
||||
LLVMValueRef clipmask_bool_ptr,
|
||||
boolean edgeflag_in_clipmask)
|
||||
bool edgeflag_in_clipmask)
|
||||
{
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
LLVMTypeRef int8_type = LLVMInt8TypeInContext(gallivm->context);
|
||||
|
|
@ -1378,9 +1378,9 @@ clipmask_booli8(struct gallivm_state *gallivm,
|
|||
static LLVMValueRef
|
||||
draw_gs_llvm_fetch_input(const struct lp_build_gs_iface *gs_iface,
|
||||
struct lp_build_context * bld,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
LLVMValueRef swizzle_index)
|
||||
{
|
||||
|
|
@ -1595,16 +1595,16 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
|
|||
* (though this would be fixable here, but couldn't just broadcast
|
||||
* the values).
|
||||
*/
|
||||
const boolean bypass_viewport = key->has_gs_or_tes || key->bypass_viewport ||
|
||||
const bool bypass_viewport = key->has_gs_or_tes || key->bypass_viewport ||
|
||||
vs_info->writes_viewport_index;
|
||||
const boolean enable_cliptest = !key->has_gs_or_tes && (key->clip_xy ||
|
||||
const bool enable_cliptest = !key->has_gs_or_tes && (key->clip_xy ||
|
||||
key->clip_z ||
|
||||
key->clip_user ||
|
||||
key->need_edgeflags);
|
||||
LLVMValueRef variant_func;
|
||||
const unsigned pos = draw->vs.position_output;
|
||||
const unsigned cv = draw->vs.clipvertex_output;
|
||||
boolean have_clipdist = FALSE;
|
||||
bool have_clipdist = FALSE;
|
||||
struct lp_bld_tgsi_system_values system_values;
|
||||
|
||||
memset(&system_values, 0, sizeof(system_values));
|
||||
|
|
@ -2662,11 +2662,11 @@ get_tcs_resources_ptr_type(struct draw_tcs_llvm_variant *variant)
|
|||
static LLVMValueRef
|
||||
draw_tcs_llvm_emit_fetch_input(const struct lp_build_tcs_iface *tes_iface,
|
||||
struct lp_build_context *bld,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
boolean is_sindex_indirect,
|
||||
bool is_sindex_indirect,
|
||||
LLVMValueRef swizzle_index)
|
||||
{
|
||||
const struct draw_tcs_llvm_iface *tcs = draw_tcs_llvm_iface(tes_iface);
|
||||
|
|
@ -2723,11 +2723,11 @@ draw_tcs_llvm_emit_fetch_input(const struct lp_build_tcs_iface *tes_iface,
|
|||
static LLVMValueRef
|
||||
draw_tcs_llvm_emit_fetch_output(const struct lp_build_tcs_iface *tes_iface,
|
||||
struct lp_build_context *bld,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
boolean is_sindex_indirect,
|
||||
bool is_sindex_indirect,
|
||||
LLVMValueRef swizzle_index,
|
||||
uint32_t name)
|
||||
{
|
||||
|
|
@ -2788,11 +2788,11 @@ static void
|
|||
draw_tcs_llvm_emit_store_output(const struct lp_build_tcs_iface *tes_iface,
|
||||
struct lp_build_context *bld,
|
||||
unsigned name,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
boolean is_sindex_indirect,
|
||||
bool is_sindex_indirect,
|
||||
LLVMValueRef swizzle_index,
|
||||
LLVMValueRef value,
|
||||
LLVMValueRef mask_vec)
|
||||
|
|
@ -3335,11 +3335,11 @@ generate_tes_mask_value(struct draw_tes_llvm_variant *variant,
|
|||
static LLVMValueRef
|
||||
draw_tes_llvm_fetch_vertex_input(const struct lp_build_tes_iface *tes_iface,
|
||||
struct lp_build_context *bld,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
boolean is_sindex_indirect,
|
||||
bool is_sindex_indirect,
|
||||
LLVMValueRef swizzle_index)
|
||||
{
|
||||
const struct draw_tes_llvm_iface *tes = draw_tes_llvm_iface(tes_iface);
|
||||
|
|
@ -3397,7 +3397,7 @@ draw_tes_llvm_fetch_vertex_input(const struct lp_build_tes_iface *tes_iface,
|
|||
static LLVMValueRef
|
||||
draw_tes_llvm_fetch_patch_input(const struct lp_build_tes_iface *tes_iface,
|
||||
struct lp_build_context *bld,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
LLVMValueRef swizzle_index)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ enum {
|
|||
lp_build_struct_get2(_variant->gallivm, _variant->context_type, _ptr, DRAW_GS_JIT_CTX_EMITTED_PRIMS, "emitted_prims")
|
||||
|
||||
|
||||
typedef boolean
|
||||
typedef bool
|
||||
(*draw_jit_vert_func)(struct draw_vs_jit_context *context,
|
||||
const struct lp_jit_resources *resources,
|
||||
struct vertex_header *io,
|
||||
|
|
@ -542,7 +542,7 @@ struct draw_llvm {
|
|||
struct draw_context *draw;
|
||||
|
||||
LLVMContextRef context;
|
||||
boolean context_owned;
|
||||
bool context_owned;
|
||||
|
||||
struct draw_vs_jit_context vs_jit_context;
|
||||
struct draw_gs_jit_context gs_jit_context;
|
||||
|
|
@ -687,7 +687,7 @@ draw_store_aos_array(struct gallivm_state *gallivm,
|
|||
LLVMValueRef* aos,
|
||||
int attrib,
|
||||
LLVMValueRef clipmask,
|
||||
boolean need_edgeflag,
|
||||
bool need_edgeflag,
|
||||
bool per_prim);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
/* declare more local vars */ \
|
||||
const enum mesa_prim prim = input_prims->prim; \
|
||||
const unsigned prim_flags = input_prims->flags; \
|
||||
const boolean last_vertex_last = false; \
|
||||
const bool last_vertex_last = false; \
|
||||
switch (prim) { \
|
||||
case MESA_PRIM_POINTS: \
|
||||
case MESA_PRIM_LINES: \
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#include "util/u_math.h"
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_pipeline_init(struct draw_context *draw)
|
||||
{
|
||||
/* create pipeline stages */
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ struct draw_stage *draw_wide_point_stage(struct draw_context *context);
|
|||
struct draw_stage *draw_validate_stage(struct draw_context *context);
|
||||
|
||||
void draw_free_temp_verts(struct draw_stage *stage);
|
||||
boolean draw_alloc_temp_verts(struct draw_stage *stage, unsigned nr);
|
||||
bool draw_alloc_temp_verts(struct draw_stage *stage, unsigned nr);
|
||||
|
||||
void draw_reset_vertex_ids(struct draw_context *draw);
|
||||
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
|
|||
* Generate the frag shader we'll use for drawing AA lines.
|
||||
* This will be the user's shader plus some arithmetic instructions.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
generate_aaline_fs(struct aaline_stage *aaline)
|
||||
{
|
||||
struct pipe_context *pipe = aaline->stage.draw->pipe;
|
||||
|
|
@ -349,7 +349,7 @@ generate_aaline_fs(struct aaline_stage *aaline)
|
|||
return aaline->fs->aaline_fs != NULL;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
generate_aaline_fs_nir(struct aaline_stage *aaline)
|
||||
{
|
||||
struct pipe_context *pipe = aaline->stage.draw->pipe;
|
||||
|
|
@ -373,7 +373,7 @@ generate_aaline_fs_nir(struct aaline_stage *aaline)
|
|||
* When we're about to draw our first AA line in a batch, this function is
|
||||
* called to tell the driver to bind our modified fragment shader.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
bind_aaline_fragment_shader(struct aaline_stage *aaline)
|
||||
{
|
||||
struct draw_context *draw = aaline->stage.draw;
|
||||
|
|
@ -731,7 +731,7 @@ draw_aaline_prepare_outputs(struct draw_context *draw,
|
|||
* into the draw module's pipeline. This will not be used if the
|
||||
* hardware has native support for AA lines.
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe)
|
||||
{
|
||||
struct aaline_stage *aaline;
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
|
|||
* Generate the frag shader we'll use for drawing AA points.
|
||||
* This will be the user's shader plus some texture/modulate instructions.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
generate_aapoint_fs(struct aapoint_stage *aapoint)
|
||||
{
|
||||
const struct pipe_shader_state *orig_fs = &aapoint->fs->state;
|
||||
|
|
@ -409,7 +409,7 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
generate_aapoint_fs_nir(struct aapoint_stage *aapoint)
|
||||
{
|
||||
struct pipe_context *pipe = aapoint->stage.draw->pipe;
|
||||
|
|
@ -437,7 +437,7 @@ fail:
|
|||
* When we're about to draw our first AA point in a batch, this function is
|
||||
* called to tell the driver to bind our modified fragment shader.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
bind_aapoint_fragment_shader(struct aapoint_stage *aapoint)
|
||||
{
|
||||
struct draw_context *draw = aapoint->stage.draw;
|
||||
|
|
@ -795,7 +795,7 @@ aapoint_delete_fs_state(struct pipe_context *pipe, void *fs)
|
|||
* into the draw module's pipeline. This will not be used if the
|
||||
* hardware has native support for AA points.
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
draw_install_aapoint_stage(struct draw_context *draw,
|
||||
struct pipe_context *pipe,
|
||||
nir_alu_type bool_type)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct clip_stage {
|
|||
struct draw_stage stage; /**< base class */
|
||||
|
||||
unsigned pos_attr;
|
||||
boolean have_clipdist;
|
||||
bool have_clipdist;
|
||||
int cv_attr;
|
||||
|
||||
/* List of the attributes to be constant interpolated. */
|
||||
|
|
@ -217,7 +217,7 @@ interp(const struct clip_stage *clip,
|
|||
static void
|
||||
emit_poly(struct draw_stage *stage,
|
||||
struct vertex_header **inlist,
|
||||
const boolean *edgeflags,
|
||||
const bool *edgeflags,
|
||||
unsigned n,
|
||||
const struct prim_header *origPrim)
|
||||
{
|
||||
|
|
@ -353,10 +353,10 @@ do_clip_tri(struct draw_stage *stage,
|
|||
struct vertex_header *prov_vertex;
|
||||
unsigned tmpnr = 0;
|
||||
unsigned n = 3;
|
||||
boolean aEdges[MAX_CLIPPED_VERTICES];
|
||||
boolean bEdges[MAX_CLIPPED_VERTICES];
|
||||
boolean *inEdges = aEdges;
|
||||
boolean *outEdges = bEdges;
|
||||
bool aEdges[MAX_CLIPPED_VERTICES];
|
||||
bool bEdges[MAX_CLIPPED_VERTICES];
|
||||
bool *inEdges = aEdges;
|
||||
bool *outEdges = bEdges;
|
||||
int viewport_index = 0;
|
||||
|
||||
inlist[0] = header->v[0];
|
||||
|
|
@ -410,9 +410,9 @@ do_clip_tri(struct draw_stage *stage,
|
|||
|
||||
while (clipmask && n >= 3) {
|
||||
const unsigned plane_idx = ffs(clipmask)-1;
|
||||
const boolean is_user_clip_plane = plane_idx >= 6;
|
||||
const bool is_user_clip_plane = plane_idx >= 6;
|
||||
struct vertex_header *vert_prev = inlist[0];
|
||||
boolean *edge_prev = &inEdges[0];
|
||||
bool *edge_prev = &inEdges[0];
|
||||
float dp_prev;
|
||||
unsigned outcount = 0;
|
||||
|
||||
|
|
@ -430,8 +430,8 @@ do_clip_tri(struct draw_stage *stage,
|
|||
|
||||
for (unsigned i = 1; i <= n; i++) {
|
||||
struct vertex_header *vert = inlist[i];
|
||||
boolean *edge = &inEdges[i];
|
||||
boolean different_sign;
|
||||
bool *edge = &inEdges[i];
|
||||
bool different_sign;
|
||||
|
||||
float dp = getclipdist(clipper, vert, plane_idx);
|
||||
|
||||
|
|
@ -451,7 +451,7 @@ do_clip_tri(struct draw_stage *stage,
|
|||
|
||||
if (different_sign) {
|
||||
struct vertex_header *new_vert;
|
||||
boolean *new_edge;
|
||||
bool *new_edge;
|
||||
|
||||
assert(tmpnr < MAX_CLIPPED_VERTICES + 1);
|
||||
if (tmpnr >= MAX_CLIPPED_VERTICES + 1)
|
||||
|
|
@ -524,7 +524,7 @@ do_clip_tri(struct draw_stage *stage,
|
|||
n = outcount;
|
||||
}
|
||||
{
|
||||
boolean *tmp = inEdges;
|
||||
bool *tmp = inEdges;
|
||||
inEdges = outEdges;
|
||||
outEdges = tmp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,11 +148,11 @@ offset_first_tri(struct draw_stage *stage,
|
|||
struct offset_stage *offset = offset_stage(stage);
|
||||
const struct pipe_rasterizer_state *rast = stage->draw->rasterizer;
|
||||
unsigned fill_mode = rast->fill_front;
|
||||
boolean do_offset;
|
||||
bool do_offset;
|
||||
|
||||
if (rast->fill_back != rast->fill_front) {
|
||||
/* Need to check for back-facing triangle */
|
||||
boolean ccw = header->det < 0.0f;
|
||||
bool ccw = header->det < 0.0f;
|
||||
if (ccw != rast->front_ccw)
|
||||
fill_mode = rast->fill_back;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ struct pstip_stage
|
|||
* Generate the frag shader we'll use for doing polygon stipple.
|
||||
* This will be the user's shader prefixed with a TEX and KIL instruction.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
generate_pstip_fs(struct pstip_stage *pstip)
|
||||
{
|
||||
struct pipe_context *pipe = pstip->pipe;
|
||||
|
|
@ -168,7 +168,7 @@ generate_pstip_fs(struct pstip_stage *pstip)
|
|||
* When we're about to draw our first stipple polygon in a batch, this function
|
||||
* is called to tell the driver to bind our modified fragment shader.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
bind_pstip_fragment_shader(struct pstip_stage *pstip)
|
||||
{
|
||||
struct draw_context *draw = pstip->stage.draw;
|
||||
|
|
@ -466,7 +466,7 @@ pstip_set_polygon_stipple(struct pipe_context *pipe,
|
|||
* into the draw module's pipeline. This will not be used if the
|
||||
* hardware has native support for polygon stipple.
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
draw_install_pstipple_stage(struct draw_context *draw,
|
||||
struct pipe_context *pipe)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ inject_front_face_info(struct draw_stage *stage,
|
|||
struct prim_header *header)
|
||||
{
|
||||
struct unfilled_stage *unfilled = unfilled_stage(stage);
|
||||
boolean is_front_face = (
|
||||
bool is_front_face = (
|
||||
(stage->draw->rasterizer->front_ccw && header->det < 0.0f) ||
|
||||
(!stage->draw->rasterizer->front_ccw && header->det > 0.0f));
|
||||
int slot = unfilled->face_slot;
|
||||
|
|
@ -265,7 +265,7 @@ draw_unfilled_prepare_outputs(struct draw_context *draw,
|
|||
{
|
||||
struct unfilled_stage *unfilled = unfilled_stage(stage);
|
||||
const struct pipe_rasterizer_state *rast = draw ? draw->rasterizer : NULL;
|
||||
boolean is_unfilled = (rast &&
|
||||
bool is_unfilled = (rast &&
|
||||
(rast->fill_front != PIPE_POLYGON_MODE_FILL ||
|
||||
rast->fill_back != PIPE_POLYGON_MODE_FILL));
|
||||
const struct draw_fragment_shader *fs = draw ? draw->fs.fragment_shader : NULL;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ struct user_cull_stage {
|
|||
};
|
||||
|
||||
|
||||
static inline boolean
|
||||
static inline bool
|
||||
cull_distance_is_out(float dist)
|
||||
{
|
||||
return (dist < 0.0f) || util_is_inf_or_nan(dist);
|
||||
|
|
@ -70,7 +70,7 @@ user_cull_point(struct draw_stage *stage,
|
|||
draw_current_shader_ccdistance_output(stage->draw, cull_idx);
|
||||
unsigned idx = (num_written_clipdistances + i) % 4;
|
||||
float cull1 = header->v[0]->data[out_idx][idx];
|
||||
boolean vert1_out = cull_distance_is_out(cull1);
|
||||
bool vert1_out = cull_distance_is_out(cull1);
|
||||
if (vert1_out)
|
||||
return;
|
||||
}
|
||||
|
|
@ -102,8 +102,8 @@ user_cull_line(struct draw_stage *stage,
|
|||
unsigned idx = (num_written_clipdistances + i) % 4;
|
||||
float cull1 = header->v[0]->data[out_idx][idx];
|
||||
float cull2 = header->v[1]->data[out_idx][idx];
|
||||
boolean vert1_out = cull_distance_is_out(cull1);
|
||||
boolean vert2_out = cull_distance_is_out(cull2);
|
||||
bool vert1_out = cull_distance_is_out(cull1);
|
||||
bool vert2_out = cull_distance_is_out(cull2);
|
||||
if (vert1_out && vert2_out)
|
||||
return;
|
||||
}
|
||||
|
|
@ -137,9 +137,9 @@ user_cull_tri(struct draw_stage *stage,
|
|||
float cull1 = header->v[0]->data[out_idx][idx];
|
||||
float cull2 = header->v[1]->data[out_idx][idx];
|
||||
float cull3 = header->v[2]->data[out_idx][idx];
|
||||
boolean vert1_out = cull_distance_is_out(cull1);
|
||||
boolean vert2_out = cull_distance_is_out(cull2);
|
||||
boolean vert3_out = cull_distance_is_out(cull3);
|
||||
bool vert1_out = cull_distance_is_out(cull1);
|
||||
bool vert2_out = cull_distance_is_out(cull2);
|
||||
bool vert3_out = cull_distance_is_out(cull3);
|
||||
if (vert1_out && vert2_out && vert3_out) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ draw_pipe_passthrough_tri(struct draw_stage *stage, struct prim_header *header)
|
|||
/**
|
||||
* Allocate space for temporary post-transform vertices, such as for clipping.
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
draw_alloc_temp_verts(struct draw_stage *stage, unsigned nr)
|
||||
{
|
||||
assert(!stage->tmp);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
*
|
||||
* This can be overridden by the driver.
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
draw_need_pipeline(const struct draw_context *draw,
|
||||
const struct pipe_rasterizer_state *rasterizer,
|
||||
enum mesa_prim prim)
|
||||
|
|
@ -144,9 +144,9 @@ validate_pipeline(struct draw_stage *stage)
|
|||
{
|
||||
struct draw_context *draw = stage->draw;
|
||||
struct draw_stage *next = draw->pipeline.rasterize;
|
||||
boolean need_det = FALSE;
|
||||
boolean precalc_flat = FALSE;
|
||||
boolean wide_lines, wide_points;
|
||||
bool need_det = FALSE;
|
||||
bool precalc_flat = FALSE;
|
||||
bool wide_lines, wide_points;
|
||||
const struct pipe_rasterizer_state *rast = draw->rasterizer;
|
||||
|
||||
/* Set the validate's next stage to the rasterize stage, so that it
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ wideline_line(struct draw_stage *stage,
|
|||
const float dx = fabsf(pos0[0] - pos2[0]);
|
||||
const float dy = fabsf(pos0[1] - pos2[1]);
|
||||
|
||||
const boolean half_pixel_center =
|
||||
const bool half_pixel_center =
|
||||
stage->draw->rasterizer->half_pixel_center;
|
||||
|
||||
/* small tweak to meet GL specification */
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ widepoint_point(struct draw_stage *stage,
|
|||
{
|
||||
const struct widepoint_stage *wide = widepoint_stage(stage);
|
||||
const unsigned pos = draw_current_shader_position_output(stage->draw);
|
||||
const boolean sprite = (boolean) stage->draw->rasterizer->point_quad_rasterization;
|
||||
const bool sprite = (bool) stage->draw->rasterizer->point_quad_rasterization;
|
||||
float half_size;
|
||||
float left_adj, right_adj, bot_adj, top_adj;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ struct draw_assembler
|
|||
const struct draw_prim_info *input_prims;
|
||||
const struct draw_vertex_info *input_verts;
|
||||
|
||||
boolean needs_primid;
|
||||
bool needs_primid;
|
||||
int primid_slot;
|
||||
unsigned primid;
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ struct draw_assembler
|
|||
};
|
||||
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
needs_primid(const struct draw_context *draw)
|
||||
{
|
||||
const struct draw_fragment_shader *fs = draw->fs.fragment_shader;
|
||||
|
|
@ -73,7 +73,7 @@ needs_primid(const struct draw_context *draw)
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_prim_assembler_is_required(const struct draw_context *draw,
|
||||
const struct draw_prim_info *prim_info,
|
||||
const struct draw_vertex_info *vert_info)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ draw_prim_assembler_create(struct draw_context *draw);
|
|||
void
|
||||
draw_prim_assembler_destroy(struct draw_assembler *ia);
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_prim_assembler_is_required(const struct draw_context *draw,
|
||||
const struct draw_prim_info *prim_info,
|
||||
const struct draw_vertex_info *vert_info);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
/* declare more local vars */ \
|
||||
const enum mesa_prim prim = input_prims->prim; \
|
||||
const unsigned prim_flags = input_prims->flags; \
|
||||
const boolean last_vertex_last = !asmblr->draw->rasterizer->flatshade_first; \
|
||||
const bool last_vertex_last = !asmblr->draw->rasterizer->flatshade_first; \
|
||||
switch (prim) { \
|
||||
case MESA_PRIM_POLYGON: \
|
||||
assert(!"unexpected primitive type in prim assembler"); \
|
||||
|
|
|
|||
|
|
@ -159,9 +159,9 @@ struct draw_context
|
|||
|
||||
float wide_point_threshold; /**< convert pnts to tris if larger than this */
|
||||
float wide_line_threshold; /**< convert lines to tris if wider than this */
|
||||
boolean wide_point_sprites; /**< convert points to tris for sprite mode */
|
||||
boolean line_stipple; /**< do line stipple? */
|
||||
boolean point_sprite; /**< convert points to quads for sprites? */
|
||||
bool wide_point_sprites; /**< convert points to tris for sprite mode */
|
||||
bool line_stipple; /**< do line stipple? */
|
||||
bool point_sprite; /**< convert points to quads for sprites? */
|
||||
|
||||
/* Temporary storage while the pipeline is being run:
|
||||
*/
|
||||
|
|
@ -179,7 +179,7 @@ struct draw_context
|
|||
struct draw_pt_front_end *frontend;
|
||||
enum mesa_prim prim;
|
||||
ubyte vertices_per_patch;
|
||||
boolean rebind_parameters;
|
||||
bool rebind_parameters;
|
||||
|
||||
unsigned opt; /**< bitmask of PT_x flags */
|
||||
unsigned eltSize; /* saved eltSize for flushing */
|
||||
|
|
@ -210,8 +210,8 @@ struct draw_context
|
|||
struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS];
|
||||
unsigned nr_vertex_elements;
|
||||
|
||||
boolean test_fse; /* enable FSE even though its not correct (eg for softpipe) */
|
||||
boolean no_fse; /* disable FSE even when it is correct */
|
||||
bool test_fse; /* enable FSE even though its not correct (eg for softpipe) */
|
||||
bool no_fse; /* disable FSE even when it is correct */
|
||||
|
||||
/* user-space vertex data, buffers */
|
||||
struct {
|
||||
|
|
@ -241,32 +241,32 @@ struct draw_context
|
|||
} pt;
|
||||
|
||||
struct {
|
||||
boolean bypass_clip_xy;
|
||||
boolean bypass_clip_z;
|
||||
boolean guard_band_xy;
|
||||
boolean bypass_clip_points_lines;
|
||||
bool bypass_clip_xy;
|
||||
bool bypass_clip_z;
|
||||
bool guard_band_xy;
|
||||
bool bypass_clip_points_lines;
|
||||
} driver;
|
||||
|
||||
boolean quads_always_flatshade_last;
|
||||
bool quads_always_flatshade_last;
|
||||
|
||||
boolean flushing; /**< debugging/sanity */
|
||||
boolean suspend_flushing; /**< internally set */
|
||||
bool flushing; /**< debugging/sanity */
|
||||
bool suspend_flushing; /**< internally set */
|
||||
|
||||
/* Flags set if API requires clipping in these planes and the
|
||||
* driver doesn't indicate that it can do it for us.
|
||||
*/
|
||||
boolean clip_xy;
|
||||
boolean clip_z;
|
||||
boolean clip_user;
|
||||
boolean guard_band_xy;
|
||||
boolean guard_band_points_lines_xy;
|
||||
bool clip_xy;
|
||||
bool clip_z;
|
||||
bool clip_user;
|
||||
bool guard_band_xy;
|
||||
bool guard_band_points_lines_xy;
|
||||
|
||||
boolean dump_vs;
|
||||
boolean identity_viewport;
|
||||
boolean bypass_viewport;
|
||||
bool dump_vs;
|
||||
bool identity_viewport;
|
||||
bool bypass_viewport;
|
||||
|
||||
/** Depth format and bias related settings. */
|
||||
boolean floating_point_depth;
|
||||
bool floating_point_depth;
|
||||
double mrd; /**< minimum resolvable depth value, for polygon offset */
|
||||
|
||||
/** Current rasterizer state given to us by the driver */
|
||||
|
|
@ -383,7 +383,7 @@ struct draw_context
|
|||
unsigned num_images[DRAW_MAX_SHADER_STAGE];
|
||||
|
||||
struct pipe_query_data_pipeline_statistics statistics;
|
||||
boolean collect_statistics;
|
||||
bool collect_statistics;
|
||||
bool collect_primgen;
|
||||
|
||||
float default_outer_tess_level[4];
|
||||
|
|
@ -404,7 +404,7 @@ struct draw_context
|
|||
|
||||
|
||||
struct draw_fetch_info {
|
||||
boolean linear;
|
||||
bool linear;
|
||||
unsigned start;
|
||||
const unsigned *elts;
|
||||
unsigned count;
|
||||
|
|
@ -418,20 +418,20 @@ struct draw_fetch_info {
|
|||
/*******************************************************************************
|
||||
* Draw common initialization code
|
||||
*/
|
||||
boolean draw_init(struct draw_context *draw);
|
||||
bool draw_init(struct draw_context *draw);
|
||||
void draw_new_instance(struct draw_context *draw);
|
||||
|
||||
/*******************************************************************************
|
||||
* Vertex shader code:
|
||||
*/
|
||||
boolean draw_vs_init(struct draw_context *draw);
|
||||
bool draw_vs_init(struct draw_context *draw);
|
||||
void draw_vs_destroy(struct draw_context *draw);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Geometry shading code:
|
||||
*/
|
||||
boolean draw_gs_init(struct draw_context *draw);
|
||||
bool draw_gs_init(struct draw_context *draw);
|
||||
|
||||
|
||||
void draw_gs_destroy(struct draw_context *draw);
|
||||
|
|
@ -450,14 +450,14 @@ int draw_alloc_extra_vertex_attrib(struct draw_context *draw,
|
|||
enum tgsi_semantic semantic_name,
|
||||
unsigned semantic_index);
|
||||
void draw_remove_extra_vertex_attribs(struct draw_context *draw);
|
||||
boolean draw_current_shader_uses_viewport_index(
|
||||
bool draw_current_shader_uses_viewport_index(
|
||||
const struct draw_context *draw);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Vertex processing (was passthrough) code:
|
||||
*/
|
||||
boolean draw_pt_init(struct draw_context *draw);
|
||||
bool draw_pt_init(struct draw_context *draw);
|
||||
void draw_pt_destroy(struct draw_context *draw);
|
||||
void draw_pt_reset_vertex_ids(struct draw_context *draw);
|
||||
void draw_pt_flush(struct draw_context *draw, unsigned flags);
|
||||
|
|
@ -467,7 +467,7 @@ void draw_pt_flush(struct draw_context *draw, unsigned flags);
|
|||
* Primitive processing (pipeline) code:
|
||||
*/
|
||||
|
||||
boolean draw_pipeline_init(struct draw_context *draw);
|
||||
bool draw_pipeline_init(struct draw_context *draw);
|
||||
void draw_pipeline_destroy(struct draw_context *draw);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", FALSE)
|
|||
* - pipeline -- the prim pipeline: clipping, wide lines, etc
|
||||
* - backend -- the vbuf_render provided by the driver.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
draw_pt_arrays(struct draw_context *draw,
|
||||
enum mesa_prim prim,
|
||||
bool index_bias_varies,
|
||||
|
|
@ -187,7 +187,7 @@ draw_pt_flush(struct draw_context *draw, unsigned flags)
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_pt_init(struct draw_context *draw)
|
||||
{
|
||||
draw->pt.test_fse = debug_get_option_draw_fse();
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ struct draw_pt_middle_end {
|
|||
/* Transform all vertices in a linear range and then draw them with
|
||||
* the supplied element list. May fail and return FALSE.
|
||||
*/
|
||||
boolean (*run_linear_elts)(struct draw_pt_middle_end *,
|
||||
bool (*run_linear_elts)(struct draw_pt_middle_end *,
|
||||
unsigned fetch_start,
|
||||
unsigned fetch_count,
|
||||
const ushort *draw_elts,
|
||||
|
|
@ -187,7 +187,7 @@ draw_pt_emit_create(struct draw_context *draw);
|
|||
struct pt_so_emit;
|
||||
|
||||
void
|
||||
draw_pt_so_emit_prepare(struct pt_so_emit *emit, boolean use_pre_clip_pos);
|
||||
draw_pt_so_emit_prepare(struct pt_so_emit *emit, bool use_pre_clip_pos);
|
||||
|
||||
void
|
||||
draw_pt_so_emit(struct pt_so_emit *emit,
|
||||
|
|
@ -237,20 +237,20 @@ draw_pt_fetch_create(struct draw_context *draw);
|
|||
*/
|
||||
struct pt_post_vs;
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_pt_post_vs_run(struct pt_post_vs *pvs,
|
||||
struct draw_vertex_info *info,
|
||||
const struct draw_prim_info *prim_info);
|
||||
|
||||
void
|
||||
draw_pt_post_vs_prepare(struct pt_post_vs *pvs,
|
||||
boolean clip_xy,
|
||||
boolean clip_z,
|
||||
boolean clip_user,
|
||||
boolean guard_band,
|
||||
boolean bypass_viewport,
|
||||
boolean clip_halfz,
|
||||
boolean need_edgeflags);
|
||||
bool clip_xy,
|
||||
bool clip_z,
|
||||
bool clip_user,
|
||||
bool guard_band,
|
||||
bool bypass_viewport,
|
||||
bool clip_halfz,
|
||||
bool need_edgeflags);
|
||||
|
||||
struct pt_post_vs *
|
||||
draw_pt_post_vs_create(struct draw_context *draw);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#define LOCAL_VARS \
|
||||
char *verts = (char *) vertices; \
|
||||
const boolean quads_flatshade_last = \
|
||||
const bool quads_flatshade_last = \
|
||||
draw->quads_always_flatshade_last; \
|
||||
const boolean last_vertex_last = \
|
||||
const bool last_vertex_last = \
|
||||
!draw->rasterizer->flatshade_first;
|
||||
|
||||
#include "draw_decompose_tmp.h"
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ fail:
|
|||
}
|
||||
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
fse_run_linear_elts(struct draw_pt_middle_end *middle,
|
||||
unsigned start,
|
||||
unsigned count,
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ fetch_pipeline_generic(struct draw_pt_middle_end *middle,
|
|||
struct draw_prim_info ia_prim_info;
|
||||
struct draw_vertex_info ia_vert_info;
|
||||
const struct draw_prim_info *prim_info = in_prim_info;
|
||||
boolean free_prim_info = FALSE;
|
||||
bool free_prim_info = FALSE;
|
||||
unsigned opt = fpme->opt;
|
||||
int num_vertex_streams = 1;
|
||||
|
||||
|
|
@ -432,7 +432,7 @@ fetch_pipeline_linear_run(struct draw_pt_middle_end *middle,
|
|||
}
|
||||
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
fetch_pipeline_linear_run_elts(struct draw_pt_middle_end *middle,
|
||||
unsigned start,
|
||||
unsigned count,
|
||||
|
|
|
|||
|
|
@ -511,9 +511,9 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle,
|
|||
struct draw_prim_info ia_prim_info;
|
||||
struct draw_vertex_info ia_vert_info;
|
||||
const struct draw_prim_info *prim_info = in_prim_info;
|
||||
boolean free_prim_info = FALSE;
|
||||
bool free_prim_info = FALSE;
|
||||
unsigned opt = fpme->opt;
|
||||
boolean clipped = 0;
|
||||
bool clipped = 0;
|
||||
ushort *tes_elts_out = NULL;
|
||||
|
||||
assert(fetch_info->count > 0);
|
||||
|
|
@ -785,7 +785,7 @@ llvm_middle_end_linear_run(struct draw_pt_middle_end *middle,
|
|||
}
|
||||
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
llvm_middle_end_linear_run_elts(struct draw_pt_middle_end *middle,
|
||||
unsigned start,
|
||||
unsigned count,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ struct pt_post_vs {
|
|||
|
||||
unsigned flags;
|
||||
|
||||
boolean (*run)(struct pt_post_vs *pvs,
|
||||
bool (*run)(struct pt_post_vs *pvs,
|
||||
struct draw_vertex_info *info,
|
||||
const struct draw_prim_info *prim_info);
|
||||
};
|
||||
|
|
@ -122,7 +122,7 @@ dot4(const float *a, const float *b)
|
|||
#include "draw_cliptest_tmp.h"
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_pt_post_vs_run(struct pt_post_vs *pvs,
|
||||
struct draw_vertex_info *info,
|
||||
const struct draw_prim_info *prim_info)
|
||||
|
|
@ -133,13 +133,13 @@ draw_pt_post_vs_run(struct pt_post_vs *pvs,
|
|||
|
||||
void
|
||||
draw_pt_post_vs_prepare(struct pt_post_vs *pvs,
|
||||
boolean clip_xy,
|
||||
boolean clip_z,
|
||||
boolean clip_user,
|
||||
boolean guard_band,
|
||||
boolean bypass_viewport,
|
||||
boolean clip_halfz,
|
||||
boolean need_edgeflags)
|
||||
bool clip_xy,
|
||||
bool clip_z,
|
||||
bool clip_user,
|
||||
bool guard_band,
|
||||
bool bypass_viewport,
|
||||
bool clip_halfz,
|
||||
bool need_edgeflags)
|
||||
{
|
||||
pvs->flags = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ struct pt_so_emit {
|
|||
unsigned input_vertex_stride;
|
||||
const float (*inputs)[4];
|
||||
const float *pre_clip_pos;
|
||||
boolean has_so;
|
||||
boolean use_pre_clip_pos;
|
||||
bool has_so;
|
||||
bool use_pre_clip_pos;
|
||||
int pos_idx;
|
||||
unsigned emitted_primitives;
|
||||
unsigned generated_primitives;
|
||||
|
|
@ -74,7 +74,7 @@ draw_so_info(const struct draw_context *draw)
|
|||
return state;
|
||||
}
|
||||
|
||||
static inline boolean
|
||||
static inline bool
|
||||
draw_has_so(const struct draw_context *draw)
|
||||
{
|
||||
const struct pipe_stream_output_info *state = draw_so_info(draw);
|
||||
|
|
@ -86,7 +86,7 @@ draw_has_so(const struct draw_context *draw)
|
|||
}
|
||||
|
||||
void
|
||||
draw_pt_so_emit_prepare(struct pt_so_emit *emit, boolean use_pre_clip_pos)
|
||||
draw_pt_so_emit_prepare(struct pt_so_emit *emit, bool use_pre_clip_pos)
|
||||
{
|
||||
struct draw_context *draw = emit->draw;
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ draw_pt_so_emit_prepare(struct pt_so_emit *emit, boolean use_pre_clip_pos)
|
|||
/* if we have a state with outputs make sure we have
|
||||
* buffers to output to */
|
||||
if (emit->has_so) {
|
||||
boolean has_valid_buffer = FALSE;
|
||||
bool has_valid_buffer = FALSE;
|
||||
for (unsigned i = 0; i < draw->so.num_targets; ++i) {
|
||||
if (draw->so.targets[i]) {
|
||||
has_valid_buffer = TRUE;
|
||||
|
|
@ -128,7 +128,7 @@ so_emit_prim(struct pt_so_emit *so,
|
|||
const float *pcp_ptr = NULL;
|
||||
const struct pipe_stream_output_info *state = draw_so_info(draw);
|
||||
int buffer_total_bytes[PIPE_MAX_SO_BUFFERS];
|
||||
boolean buffer_written[PIPE_MAX_SO_BUFFERS] = {0};
|
||||
bool buffer_written[PIPE_MAX_SO_BUFFERS] = {0};
|
||||
|
||||
input_ptr = so->inputs;
|
||||
if (so->use_pre_clip_pos)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
/* declare more local vars */ \
|
||||
const enum mesa_prim prim = input_prims->prim; \
|
||||
const unsigned prim_flags = input_prims->flags; \
|
||||
const boolean quads_flatshade_last = FALSE; \
|
||||
const boolean last_vertex_last = !so->draw->rasterizer->flatshade_first; \
|
||||
const bool quads_flatshade_last = FALSE; \
|
||||
const bool last_vertex_last = !so->draw->rasterizer->flatshade_first; \
|
||||
do { \
|
||||
switch (prim) { \
|
||||
case MESA_PRIM_LINES_ADJACENCY: \
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ draw_create_tess_ctrl_shader(struct draw_context *draw,
|
|||
const struct pipe_shader_state *state)
|
||||
{
|
||||
#ifdef DRAW_LLVM_AVAILABLE
|
||||
boolean use_llvm = draw->llvm != NULL;
|
||||
bool use_llvm = draw->llvm != NULL;
|
||||
struct llvm_tess_ctrl_shader *llvm_tcs = NULL;
|
||||
#endif
|
||||
struct draw_tess_ctrl_shader *tcs;
|
||||
|
|
@ -517,7 +517,7 @@ draw_create_tess_eval_shader(struct draw_context *draw,
|
|||
const struct pipe_shader_state *state)
|
||||
{
|
||||
#ifdef DRAW_LLVM_AVAILABLE
|
||||
boolean use_llvm = draw->llvm != NULL;
|
||||
bool use_llvm = draw->llvm != NULL;
|
||||
struct llvm_tess_eval_shader *llvm_tes = NULL;
|
||||
#endif
|
||||
struct draw_tess_eval_shader *tes;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ struct vbuf_render {
|
|||
*
|
||||
* Currently optional.
|
||||
*/
|
||||
boolean (*need_pipeline)(const struct vbuf_render *render,
|
||||
bool (*need_pipeline)(const struct vbuf_render *render,
|
||||
const struct pipe_rasterizer_state *rasterizer,
|
||||
unsigned int prim);
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ struct vbuf_render {
|
|||
* Hardware renderers will use ttm memory, others will just malloc
|
||||
* something.
|
||||
*/
|
||||
boolean (*allocate_vertices)(struct vbuf_render *,
|
||||
bool (*allocate_vertices)(struct vbuf_render *,
|
||||
ushort vertex_size,
|
||||
ushort nr_vertices);
|
||||
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ draw_delete_vertex_shader(struct draw_context *draw,
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
draw_vs_init(struct draw_context *draw)
|
||||
{
|
||||
draw->dump_vs = debug_get_option_gallium_dump_vs();
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ vs_exec_run_linear(struct draw_vertex_shader *shader,
|
|||
struct tgsi_exec_machine *machine = evs->machine;
|
||||
unsigned int i, j;
|
||||
unsigned slot;
|
||||
boolean clamp_vertex_color = shader->draw->rasterizer->clamp_vertex_color;
|
||||
bool clamp_vertex_color = shader->draw->rasterizer->clamp_vertex_color;
|
||||
|
||||
assert(!shader->draw->llvm);
|
||||
tgsi_exec_set_constant_buffers(machine, PIPE_MAX_CONSTANT_BUFFERS,
|
||||
|
|
|
|||
|
|
@ -1854,7 +1854,7 @@ lp_build_int_to_float(struct lp_build_context *bld,
|
|||
}
|
||||
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
arch_rounding_available(const struct lp_type type)
|
||||
{
|
||||
if ((util_get_cpu_caps()->has_sse4_1 &&
|
||||
|
|
@ -2760,7 +2760,7 @@ lp_build_rsqrt(struct lp_build_context *bld,
|
|||
* unavailable it would result in sqrt/div/mul so obviously
|
||||
* much better to just call sqrt, skipping both div and mul).
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
lp_build_fast_rsqrt_available(struct lp_type type)
|
||||
{
|
||||
assert(type.floating);
|
||||
|
|
@ -2817,7 +2817,7 @@ lp_build_fast_rsqrt(struct lp_build_context *bld,
|
|||
static LLVMValueRef
|
||||
lp_build_sin_or_cos(struct lp_build_context *bld,
|
||||
LLVMValueRef a,
|
||||
boolean cos)
|
||||
bool cos)
|
||||
{
|
||||
struct gallivm_state *gallivm = bld->gallivm;
|
||||
LLVMBuilderRef b = gallivm->builder;
|
||||
|
|
@ -3408,7 +3408,7 @@ lp_build_log2_approx(struct lp_build_context *bld,
|
|||
LLVMValueRef *p_exp,
|
||||
LLVMValueRef *p_floor_log2,
|
||||
LLVMValueRef *p_log2,
|
||||
boolean handle_edge_cases)
|
||||
bool handle_edge_cases)
|
||||
{
|
||||
LLVMBuilderRef builder = bld->gallivm->builder;
|
||||
const struct lp_type type = bld->type;
|
||||
|
|
@ -3735,7 +3735,7 @@ lp_build_fpstate_get(struct gallivm_state *gallivm)
|
|||
|
||||
void
|
||||
lp_build_fpstate_set_denorms_zero(struct gallivm_state *gallivm,
|
||||
boolean zero)
|
||||
bool zero)
|
||||
{
|
||||
if (util_get_cpu_caps()->has_sse) {
|
||||
/* turn on DAZ (64) | FTZ (32768) = 32832 if available */
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ LLVMValueRef
|
|||
lp_build_rsqrt(struct lp_build_context *bld,
|
||||
LLVMValueRef a);
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_build_fast_rsqrt_available(struct lp_type type);
|
||||
|
||||
LLVMValueRef
|
||||
|
|
@ -376,7 +376,7 @@ lp_build_log2_approx(struct lp_build_context *bld,
|
|||
LLVMValueRef *p_exp,
|
||||
LLVMValueRef *p_floor_log2,
|
||||
LLVMValueRef *p_log2,
|
||||
boolean handle_nans);
|
||||
bool handle_nans);
|
||||
|
||||
LLVMValueRef
|
||||
lp_build_mod(struct lp_build_context *bld,
|
||||
|
|
@ -403,7 +403,7 @@ lp_build_fpstate_get(struct gallivm_state *gallivm);
|
|||
|
||||
void
|
||||
lp_build_fpstate_set_denorms_zero(struct gallivm_state *gallivm,
|
||||
boolean zero);
|
||||
bool zero);
|
||||
void
|
||||
lp_build_fpstate_set(struct gallivm_state *gallivm,
|
||||
LLVMValueRef mxcsr);
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
* and stack variables would often make the check a no op, defeating the
|
||||
* whole purpose of the exercise.
|
||||
*/
|
||||
extern "C" boolean
|
||||
extern "C" bool
|
||||
lp_check_alignment(const void *ptr, unsigned alignment)
|
||||
{
|
||||
assert(util_is_power_of_two_or_zero(alignment));
|
||||
|
|
@ -226,7 +226,7 @@ lp_profile(LLVMValueRef func, const void *code)
|
|||
{
|
||||
#if defined(__linux__) && defined(PROFILE)
|
||||
static std::ofstream perf_asm_file;
|
||||
static boolean first_time = TRUE;
|
||||
static bool first_time = TRUE;
|
||||
static FILE *perf_map_file = NULL;
|
||||
if (first_time) {
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ void
|
|||
lp_debug_dump_value(LLVMValueRef value);
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_check_alignment(const void *ptr, unsigned alignment);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ LLVMValueRef
|
|||
lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
||||
const struct util_format_description *format_desc,
|
||||
struct lp_type type,
|
||||
boolean aligned,
|
||||
bool aligned,
|
||||
LLVMValueRef base_ptr,
|
||||
LLVMValueRef offset,
|
||||
LLVMValueRef i,
|
||||
|
|
@ -148,7 +148,7 @@ void
|
|||
lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
|
||||
const struct util_format_description *format_desc,
|
||||
struct lp_type type,
|
||||
boolean aligned,
|
||||
bool aligned,
|
||||
LLVMValueRef base_ptr,
|
||||
LLVMValueRef offsets,
|
||||
LLVMValueRef i,
|
||||
|
|
@ -219,7 +219,7 @@ lp_build_float_to_smallfloat(struct gallivm_state *gallivm,
|
|||
unsigned mantissa_bits,
|
||||
unsigned exponent_bits,
|
||||
unsigned mantissa_start,
|
||||
boolean has_sign);
|
||||
bool has_sign);
|
||||
|
||||
LLVMValueRef
|
||||
lp_build_smallfloat_to_float(struct gallivm_state *gallivm,
|
||||
|
|
@ -228,7 +228,7 @@ lp_build_smallfloat_to_float(struct gallivm_state *gallivm,
|
|||
unsigned mantissa_bits,
|
||||
unsigned exponent_bits,
|
||||
unsigned mantissa_start,
|
||||
boolean has_sign);
|
||||
bool has_sign);
|
||||
|
||||
LLVMValueRef
|
||||
lp_build_float_to_r11g11b10(struct gallivm_state *gallivm,
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ lp_build_format_swizzle_aos(const struct util_format_description *desc,
|
|||
/**
|
||||
* Whether the format matches the vector type, apart of swizzles.
|
||||
*/
|
||||
static inline boolean
|
||||
static inline bool
|
||||
format_matches_type(const struct util_format_description *desc,
|
||||
struct lp_type type)
|
||||
{
|
||||
|
|
@ -229,8 +229,8 @@ lp_build_unpack_arith_rgba_aos(struct gallivm_state *gallivm,
|
|||
LLVMValueRef scales[4];
|
||||
LLVMTypeRef vec32_type;
|
||||
|
||||
boolean normalized;
|
||||
boolean needs_uitofp;
|
||||
bool normalized;
|
||||
bool needs_uitofp;
|
||||
unsigned i;
|
||||
|
||||
/* TODO: Support more formats */
|
||||
|
|
@ -372,7 +372,7 @@ lp_build_pack_rgba_aos(struct gallivm_state *gallivm,
|
|||
LLVMValueRef shifted, casted, scaled, unswizzled;
|
||||
LLVMValueRef shifts[4];
|
||||
LLVMValueRef scales[4];
|
||||
boolean normalized;
|
||||
bool normalized;
|
||||
unsigned i, j;
|
||||
|
||||
assert(desc->layout == UTIL_FORMAT_LAYOUT_PLAIN);
|
||||
|
|
@ -471,7 +471,7 @@ LLVMValueRef
|
|||
lp_build_fetch_rgba_aos(struct gallivm_state *gallivm,
|
||||
const struct util_format_description *format_desc,
|
||||
struct lp_type type,
|
||||
boolean aligned,
|
||||
bool aligned,
|
||||
LLVMValueRef base_ptr,
|
||||
LLVMValueRef offset,
|
||||
LLVMValueRef i,
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ lp_build_fetch_rgba_aos_array(struct gallivm_state *gallivm,
|
|||
LLVMTypeRef src_vec_type;
|
||||
LLVMValueRef ptr, res = NULL;
|
||||
struct lp_type src_type;
|
||||
boolean pure_integer = format_desc->channel[0].pure_integer;
|
||||
bool pure_integer = format_desc->channel[0].pure_integer;
|
||||
struct lp_type tmp_type;
|
||||
|
||||
lp_type_from_format_desc(&src_type, format_desc);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ lp_build_float_to_smallfloat(struct gallivm_state *gallivm,
|
|||
unsigned mantissa_bits,
|
||||
unsigned exponent_bits,
|
||||
unsigned mantissa_start,
|
||||
boolean has_sign)
|
||||
bool has_sign)
|
||||
{
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
LLVMValueRef i32_floatexpmask, i32_smallexpmask, magic, normal;
|
||||
|
|
@ -86,8 +86,8 @@ lp_build_float_to_smallfloat(struct gallivm_state *gallivm,
|
|||
struct lp_build_context f32_bld, i32_bld;
|
||||
LLVMValueRef zero = lp_build_const_vec(gallivm, f32_type, 0.0f);
|
||||
unsigned exponent_start = mantissa_start + mantissa_bits;
|
||||
boolean always_preserve_nans = true;
|
||||
boolean maybe_correct_denorm_rounding = true;
|
||||
bool always_preserve_nans = true;
|
||||
bool maybe_correct_denorm_rounding = true;
|
||||
|
||||
lp_build_context_init(&f32_bld, gallivm, f32_type);
|
||||
lp_build_context_init(&i32_bld, gallivm, i32_type);
|
||||
|
|
@ -284,7 +284,7 @@ lp_build_smallfloat_to_float(struct gallivm_state *gallivm,
|
|||
unsigned mantissa_bits,
|
||||
unsigned exponent_bits,
|
||||
unsigned mantissa_start,
|
||||
boolean has_sign)
|
||||
bool has_sign)
|
||||
{
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
LLVMValueRef smallexpmask, i32_floatexpmask, magic;
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ lp_build_shuffle1undef(struct gallivm_state *gallivm,
|
|||
return LLVMBuildShuffleVector(gallivm->builder, a, a, shuf, "");
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
format_dxt1_variant(enum pipe_format format)
|
||||
{
|
||||
return format == PIPE_FORMAT_DXT1_RGB ||
|
||||
|
|
@ -573,7 +573,7 @@ s3tc_dxt1_full_to_rgba_aos(struct gallivm_state *gallivm,
|
|||
LLVMValueRef bit_pos, sel_mask, sel_lo, sel_hi, indices;
|
||||
struct lp_type type, type8;
|
||||
struct lp_build_context bld8, bld32;
|
||||
boolean is_dxt1_variant = format_dxt1_variant(format);
|
||||
bool is_dxt1_variant = format_dxt1_variant(format);
|
||||
|
||||
memset(&type, 0, sizeof type);
|
||||
type.width = 32;
|
||||
|
|
@ -1269,7 +1269,7 @@ s3tc_decode_block_dxt1(struct gallivm_state *gallivm,
|
|||
struct lp_type type8, type32, type16, type64;
|
||||
struct lp_build_context bld8, bld32, bld16, bld64;
|
||||
unsigned i;
|
||||
boolean is_dxt1_variant = format_dxt1_variant(format);
|
||||
bool is_dxt1_variant = format_dxt1_variant(format);
|
||||
|
||||
memset(&type32, 0, sizeof type32);
|
||||
type32.width = 32;
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ lp_build_format_swizzle_soa(const struct util_format_description *format_desc,
|
|||
static LLVMValueRef
|
||||
lp_build_extract_soa_chan(struct lp_build_context *bld,
|
||||
unsigned blockbits,
|
||||
boolean srgb_chan,
|
||||
bool srgb_chan,
|
||||
struct util_format_channel_description chan_desc,
|
||||
LLVMValueRef packed)
|
||||
{
|
||||
|
|
@ -322,7 +322,7 @@ lp_build_unpack_rgba_soa(struct gallivm_state *gallivm,
|
|||
/* Decode the input vector components */
|
||||
for (chan = 0; chan < format_desc->nr_channels; ++chan) {
|
||||
struct util_format_channel_description chan_desc = format_desc->channel[chan];
|
||||
boolean srgb_chan = FALSE;
|
||||
bool srgb_chan = FALSE;
|
||||
|
||||
if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB &&
|
||||
format_desc->swizzle[3] != chan) {
|
||||
|
|
@ -415,7 +415,7 @@ void
|
|||
lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
|
||||
const struct util_format_description *format_desc,
|
||||
struct lp_type type,
|
||||
boolean aligned,
|
||||
bool aligned,
|
||||
LLVMValueRef base_ptr,
|
||||
LLVMValueRef offset,
|
||||
LLVMValueRef i,
|
||||
|
|
@ -496,7 +496,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm,
|
|||
struct lp_type fetch_type, gather_type = type;
|
||||
unsigned num_gather, fetch_width, i, j;
|
||||
struct lp_build_context bld;
|
||||
boolean fp64 = format_desc->channel[0].size == 64;
|
||||
bool fp64 = format_desc->channel[0].size == 64;
|
||||
|
||||
lp_build_context_init(&bld, gallivm, type);
|
||||
|
||||
|
|
|
|||
|
|
@ -82,11 +82,11 @@ lp_build_gather_elem(struct gallivm_state *gallivm,
|
|||
unsigned length,
|
||||
unsigned src_width,
|
||||
unsigned dst_width,
|
||||
boolean aligned,
|
||||
bool aligned,
|
||||
LLVMValueRef base_ptr,
|
||||
LLVMValueRef offsets,
|
||||
unsigned i,
|
||||
boolean vector_justify)
|
||||
bool vector_justify)
|
||||
{
|
||||
LLVMTypeRef src_type = LLVMIntTypeInContext(gallivm->context, src_width);
|
||||
LLVMTypeRef dst_elem_type = LLVMIntTypeInContext(gallivm->context, dst_width);
|
||||
|
|
@ -166,11 +166,11 @@ lp_build_gather_elem_vec(struct gallivm_state *gallivm,
|
|||
unsigned src_width,
|
||||
LLVMTypeRef src_type,
|
||||
struct lp_type dst_type,
|
||||
boolean aligned,
|
||||
bool aligned,
|
||||
LLVMValueRef base_ptr,
|
||||
LLVMValueRef offsets,
|
||||
unsigned i,
|
||||
boolean vector_justify)
|
||||
bool vector_justify)
|
||||
{
|
||||
LLVMValueRef ptr, res;
|
||||
assert(LLVMTypeOf(base_ptr) == LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0));
|
||||
|
|
@ -409,14 +409,14 @@ lp_build_gather(struct gallivm_state *gallivm,
|
|||
unsigned length,
|
||||
unsigned src_width,
|
||||
struct lp_type dst_type,
|
||||
boolean aligned,
|
||||
bool aligned,
|
||||
LLVMValueRef base_ptr,
|
||||
LLVMValueRef offsets,
|
||||
boolean vector_justify)
|
||||
bool vector_justify)
|
||||
{
|
||||
LLVMValueRef res;
|
||||
boolean need_expansion = src_width < dst_type.width * dst_type.length;
|
||||
boolean vec_fetch;
|
||||
bool need_expansion = src_width < dst_type.width * dst_type.length;
|
||||
bool vec_fetch;
|
||||
struct lp_type fetch_type, fetch_dst_type;
|
||||
LLVMTypeRef src_type;
|
||||
|
||||
|
|
@ -508,7 +508,7 @@ lp_build_gather(struct gallivm_state *gallivm,
|
|||
|
||||
LLVMValueRef elems[LP_MAX_VECTOR_WIDTH / 8];
|
||||
unsigned i;
|
||||
boolean vec_zext = FALSE;
|
||||
bool vec_zext = FALSE;
|
||||
struct lp_type res_type, gather_res_type;
|
||||
LLVMTypeRef res_t, gather_res_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,21 +45,21 @@ lp_build_gather_elem(struct gallivm_state *gallivm,
|
|||
unsigned length,
|
||||
unsigned src_width,
|
||||
unsigned dst_width,
|
||||
boolean aligned,
|
||||
bool aligned,
|
||||
LLVMValueRef base_ptr,
|
||||
LLVMValueRef offsets,
|
||||
unsigned i,
|
||||
boolean vector_justify);
|
||||
bool vector_justify);
|
||||
|
||||
LLVMValueRef
|
||||
lp_build_gather(struct gallivm_state *gallivm,
|
||||
unsigned length,
|
||||
unsigned src_width,
|
||||
struct lp_type dst_type,
|
||||
boolean aligned,
|
||||
bool aligned,
|
||||
LLVMValueRef base_ptr,
|
||||
LLVMValueRef offsets,
|
||||
boolean vector_justify);
|
||||
bool vector_justify);
|
||||
|
||||
LLVMValueRef
|
||||
lp_build_gather_values(struct gallivm_state * gallivm,
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ static const struct debug_named_value lp_bld_debug_flags[] = {
|
|||
DEBUG_GET_ONCE_FLAGS_OPTION(gallivm_debug, "GALLIVM_DEBUG", lp_bld_debug_flags, 0)
|
||||
|
||||
|
||||
static boolean gallivm_initialized = FALSE;
|
||||
static bool gallivm_initialized = FALSE;
|
||||
|
||||
unsigned lp_native_vector_width;
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ enum LLVM_CodeGenOpt_Level {
|
|||
* relevant optimization passes.
|
||||
* \return TRUE for success, FALSE for failure
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
create_pass_manager(struct gallivm_state *gallivm)
|
||||
{
|
||||
#if GALLIVM_USE_NEW_PASS == 0
|
||||
|
|
@ -266,7 +266,7 @@ gallivm_free_code(struct gallivm_state *gallivm)
|
|||
}
|
||||
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
init_gallivm_engine(struct gallivm_state *gallivm)
|
||||
{
|
||||
if (1) {
|
||||
|
|
@ -327,7 +327,7 @@ fail:
|
|||
* Allocate gallivm LLVM objects.
|
||||
* \return TRUE for success, FALSE for failure
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
init_gallivm_state(struct gallivm_state *gallivm, const char *name,
|
||||
LLVMContextRef context, struct lp_cached_code *cache)
|
||||
{
|
||||
|
|
@ -433,7 +433,7 @@ lp_build_init_native_width(void)
|
|||
return lp_native_vector_width;
|
||||
}
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_build_init(void)
|
||||
{
|
||||
lp_build_init_native_width();
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ struct gallivm_state
|
|||
unsigned
|
||||
lp_build_init_native_width(void);
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_build_init(void);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ func_ctx(struct lp_exec_mask *mask)
|
|||
* no loop inside the current function, but we were inside
|
||||
* a loop inside another function, from which this one was called.
|
||||
*/
|
||||
static inline boolean
|
||||
static inline bool
|
||||
mask_has_loop(struct lp_exec_mask *mask)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -69,7 +69,7 @@ mask_has_loop(struct lp_exec_mask *mask)
|
|||
* no switch in the current function, but we were inside
|
||||
* a switch inside another function, from which this one was called.
|
||||
*/
|
||||
static inline boolean
|
||||
static inline bool
|
||||
mask_has_switch(struct lp_exec_mask *mask)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -87,7 +87,7 @@ mask_has_switch(struct lp_exec_mask *mask)
|
|||
* no conditional in the current function, but we were inside
|
||||
* a conditional inside another function, from which this one was called.
|
||||
*/
|
||||
static inline boolean
|
||||
static inline bool
|
||||
mask_has_cond(struct lp_exec_mask *mask)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -102,10 +102,10 @@ mask_has_cond(struct lp_exec_mask *mask)
|
|||
void lp_exec_mask_update(struct lp_exec_mask *mask)
|
||||
{
|
||||
LLVMBuilderRef builder = mask->bld->gallivm->builder;
|
||||
boolean has_loop_mask = mask_has_loop(mask);
|
||||
boolean has_cond_mask = mask_has_cond(mask);
|
||||
boolean has_switch_mask = mask_has_switch(mask);
|
||||
boolean has_ret_mask = mask->function_stack_size > 1 ||
|
||||
bool has_loop_mask = mask_has_loop(mask);
|
||||
bool has_cond_mask = mask_has_cond(mask);
|
||||
bool has_switch_mask = mask_has_switch(mask);
|
||||
bool has_ret_mask = mask->function_stack_size > 1 ||
|
||||
mask->ret_in_main;
|
||||
|
||||
if (has_loop_mask) {
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ enum lp_exec_mask_break_type {
|
|||
struct lp_exec_mask {
|
||||
struct lp_build_context *bld;
|
||||
|
||||
boolean has_mask;
|
||||
boolean ret_in_main;
|
||||
bool has_mask;
|
||||
bool ret_in_main;
|
||||
|
||||
LLVMTypeRef int_vec_type;
|
||||
|
||||
|
|
@ -76,13 +76,13 @@ struct lp_exec_mask {
|
|||
LLVMValueRef switch_val;
|
||||
LLVMValueRef switch_mask;
|
||||
LLVMValueRef switch_mask_default;
|
||||
boolean switch_in_default;
|
||||
bool switch_in_default;
|
||||
unsigned switch_pc;
|
||||
} switch_stack[LP_MAX_TGSI_NESTING];
|
||||
int switch_stack_size;
|
||||
LLVMValueRef switch_val;
|
||||
LLVMValueRef switch_mask_default; /* reverse of switch mask used for default */
|
||||
boolean switch_in_default; /* if switch exec is currently in default */
|
||||
bool switch_in_default; /* if switch exec is currently in default */
|
||||
unsigned switch_pc; /* when used points to default or endswitch-1 */
|
||||
|
||||
LLVMValueRef loop_limiter;
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ lp_build_llvm_texture_member(struct gallivm_state *gallivm,
|
|||
LLVMValueRef texture_unit_offset,
|
||||
unsigned member_index,
|
||||
const char *member_name,
|
||||
boolean emit_load,
|
||||
bool emit_load,
|
||||
LLVMTypeRef *out_type)
|
||||
{
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
|
|
@ -420,7 +420,7 @@ lp_build_llvm_sampler_member(struct gallivm_state *gallivm,
|
|||
unsigned sampler_unit,
|
||||
unsigned member_index,
|
||||
const char *member_name,
|
||||
boolean emit_load)
|
||||
bool emit_load)
|
||||
{
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
LLVMValueRef indices[4];
|
||||
|
|
@ -487,7 +487,7 @@ lp_build_llvm_image_member(struct gallivm_state *gallivm,
|
|||
LLVMValueRef image_unit_offset,
|
||||
unsigned member_index,
|
||||
const char *member_name,
|
||||
boolean emit_load)
|
||||
bool emit_load)
|
||||
{
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
LLVMValueRef indices[4];
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ lp_build_compare_ext(struct gallivm_state *gallivm,
|
|||
enum pipe_compare_func func,
|
||||
LLVMValueRef a,
|
||||
LLVMValueRef b,
|
||||
boolean ordered)
|
||||
bool ordered)
|
||||
{
|
||||
LLVMBuilderRef builder = gallivm->builder;
|
||||
LLVMTypeRef int_vec_type = lp_build_int_vec_type(gallivm, type);
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ lp_build_pack2(struct gallivm_state *gallivm,
|
|||
if ((util_get_cpu_caps()->has_sse2 || util_get_cpu_caps()->has_altivec) &&
|
||||
src_type.width * src_type.length >= 128) {
|
||||
const char *intrinsic = NULL;
|
||||
boolean swap_intrinsic_operands = FALSE;
|
||||
bool swap_intrinsic_operands = FALSE;
|
||||
|
||||
switch(src_type.width) {
|
||||
case 32:
|
||||
|
|
@ -781,7 +781,7 @@ lp_build_packs2(struct gallivm_state *gallivm,
|
|||
LLVMValueRef lo,
|
||||
LLVMValueRef hi)
|
||||
{
|
||||
boolean clamp;
|
||||
bool clamp;
|
||||
|
||||
assert(!src_type.floating);
|
||||
assert(!dst_type.floating);
|
||||
|
|
@ -823,7 +823,7 @@ LLVMValueRef
|
|||
lp_build_pack(struct gallivm_state *gallivm,
|
||||
struct lp_type src_type,
|
||||
struct lp_type dst_type,
|
||||
boolean clamped,
|
||||
bool clamped,
|
||||
const LLVMValueRef *src, unsigned num_srcs)
|
||||
{
|
||||
LLVMValueRef (*pack2)(struct gallivm_state *gallivm,
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ LLVMValueRef
|
|||
lp_build_pack(struct gallivm_state *gallivm,
|
||||
struct lp_type src_type,
|
||||
struct lp_type dst_type,
|
||||
boolean clamped,
|
||||
bool clamped,
|
||||
const LLVMValueRef *src, unsigned num_srcs);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
* Does the given texture wrap mode allow sampling the texture border color?
|
||||
* XXX maybe move this into gallium util code.
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
lp_sampler_wrap_mode_uses_border_color(enum pipe_tex_wrap mode,
|
||||
enum pipe_tex_filter min_img_filter,
|
||||
enum pipe_tex_filter mag_img_filter)
|
||||
|
|
@ -271,7 +271,7 @@ lp_build_pmin(struct lp_build_sample_context *bld,
|
|||
LLVMValueRef int_size, float_size;
|
||||
const unsigned length = coord_bld->type.length;
|
||||
const unsigned num_quads = length / 4;
|
||||
const boolean pmin_per_quad = pmin_bld->type.length != length;
|
||||
const bool pmin_per_quad = pmin_bld->type.length != length;
|
||||
|
||||
int_size = lp_build_minify(int_size_bld, bld->int_size, first_level, TRUE);
|
||||
float_size = lp_build_int_to_float(float_size_bld, int_size);
|
||||
|
|
@ -366,8 +366,8 @@ lp_build_rho(struct lp_build_sample_context *bld,
|
|||
LLVMValueRef rho;
|
||||
unsigned length = coord_bld->type.length;
|
||||
unsigned num_quads = length / 4;
|
||||
boolean rho_per_quad = rho_bld->type.length != length;
|
||||
boolean no_rho_opt = bld->no_rho_approx && (dims > 1);
|
||||
bool rho_per_quad = rho_bld->type.length != length;
|
||||
bool no_rho_opt = bld->no_rho_approx && (dims > 1);
|
||||
LLVMValueRef i32undef = LLVMGetUndef(LLVMInt32TypeInContext(gallivm->context));
|
||||
LLVMValueRef rho_xvec, rho_yvec;
|
||||
|
||||
|
|
@ -793,7 +793,7 @@ lp_build_ilog2_sqrt(struct lp_build_context *bld,
|
|||
*/
|
||||
void
|
||||
lp_build_lod_selector(struct lp_build_sample_context *bld,
|
||||
boolean is_lodq,
|
||||
bool is_lodq,
|
||||
unsigned sampler_unit,
|
||||
LLVMValueRef first_level,
|
||||
LLVMValueRef s,
|
||||
|
|
@ -855,7 +855,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
|
|||
lod = explicit_lod;
|
||||
} else {
|
||||
LLVMValueRef rho;
|
||||
boolean rho_squared = bld->no_rho_approx && (bld->dims > 1);
|
||||
bool rho_squared = bld->no_rho_approx && (bld->dims > 1);
|
||||
|
||||
if (bld->static_sampler_state->aniso &&
|
||||
!explicit_lod) {
|
||||
|
|
@ -1205,7 +1205,7 @@ LLVMValueRef
|
|||
lp_build_minify(struct lp_build_context *bld,
|
||||
LLVMValueRef base_size,
|
||||
LLVMValueRef level,
|
||||
boolean lod_scalar)
|
||||
bool lod_scalar)
|
||||
{
|
||||
LLVMBuilderRef builder = bld->gallivm->builder;
|
||||
assert(lp_check_value(bld->type, base_size));
|
||||
|
|
@ -1814,7 +1814,7 @@ lp_build_cube_lookup(struct lp_build_sample_context *bld,
|
|||
LLVMValueRef *coords,
|
||||
const struct lp_derivatives *derivs_in, /* optional */
|
||||
struct lp_derivatives *derivs_out, /* optional */
|
||||
boolean need_derivs)
|
||||
bool need_derivs)
|
||||
{
|
||||
struct lp_build_context *coord_bld = &bld->coord_bld;
|
||||
LLVMBuilderRef builder = bld->gallivm->builder;
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ struct lp_sampler_size_query_params
|
|||
unsigned target;
|
||||
LLVMTypeRef resources_type;
|
||||
LLVMValueRef resources_ptr;
|
||||
boolean is_sviewinfo;
|
||||
bool is_sviewinfo;
|
||||
bool samples_only;
|
||||
enum lp_sampler_lod_property lod_property;
|
||||
LLVMValueRef explicit_lod;
|
||||
|
|
@ -386,10 +386,10 @@ struct lp_build_sample_context
|
|||
unsigned num_lods;
|
||||
|
||||
unsigned gather_comp;
|
||||
boolean no_quad_lod;
|
||||
boolean no_brilinear;
|
||||
boolean no_rho_approx;
|
||||
boolean fetch_ms;
|
||||
bool no_quad_lod;
|
||||
bool no_brilinear;
|
||||
bool no_rho_approx;
|
||||
bool fetch_ms;
|
||||
|
||||
/** regular scalar float type */
|
||||
struct lp_type float_type;
|
||||
|
|
@ -499,7 +499,7 @@ struct lp_build_img_op_array_switch {
|
|||
* We only support a few wrap modes in lp_build_sample_wrap_linear_int() at
|
||||
* this time. Return whether the given mode is supported by that function.
|
||||
*/
|
||||
static inline boolean
|
||||
static inline bool
|
||||
lp_is_simple_wrap_mode(unsigned mode)
|
||||
{
|
||||
switch (mode) {
|
||||
|
|
@ -553,7 +553,7 @@ texture_dims(enum pipe_texture_target tex)
|
|||
}
|
||||
|
||||
|
||||
static inline boolean
|
||||
static inline bool
|
||||
has_layer_coord(enum pipe_texture_target tex)
|
||||
{
|
||||
switch (tex) {
|
||||
|
|
@ -569,7 +569,7 @@ has_layer_coord(enum pipe_texture_target tex)
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_sampler_wrap_mode_uses_border_color(enum pipe_tex_wrap mode,
|
||||
enum pipe_tex_filter min_img_filter,
|
||||
enum pipe_tex_filter mag_img_filter);
|
||||
|
|
@ -592,7 +592,7 @@ lp_sampler_static_texture_state_image(struct lp_static_texture_state *state,
|
|||
|
||||
void
|
||||
lp_build_lod_selector(struct lp_build_sample_context *bld,
|
||||
boolean is_lodq,
|
||||
bool is_lodq,
|
||||
unsigned sampler_index,
|
||||
LLVMValueRef first_level,
|
||||
LLVMValueRef s,
|
||||
|
|
@ -676,7 +676,7 @@ lp_build_cube_lookup(struct lp_build_sample_context *bld,
|
|||
LLVMValueRef *coords,
|
||||
const struct lp_derivatives *derivs_in, /* optional */
|
||||
struct lp_derivatives *derivs_out, /* optional */
|
||||
boolean need_derivs);
|
||||
bool need_derivs);
|
||||
|
||||
|
||||
void
|
||||
|
|
@ -748,7 +748,7 @@ LLVMValueRef
|
|||
lp_build_minify(struct lp_build_context *bld,
|
||||
LLVMValueRef base_size,
|
||||
LLVMValueRef level,
|
||||
boolean lod_scalar);
|
||||
bool lod_scalar);
|
||||
|
||||
void
|
||||
lp_build_img_op_soa(const struct lp_static_texture_state *static_texture_state,
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ lp_build_sample_wrap_nearest_int(struct lp_build_sample_context *bld,
|
|||
LLVMValueRef length,
|
||||
LLVMValueRef stride,
|
||||
LLVMValueRef offset,
|
||||
boolean is_pot,
|
||||
bool is_pot,
|
||||
unsigned wrap_mode,
|
||||
LLVMValueRef *out_offset,
|
||||
LLVMValueRef *out_i)
|
||||
|
|
@ -219,7 +219,7 @@ lp_build_sample_wrap_linear_int(struct lp_build_sample_context *bld,
|
|||
LLVMValueRef length,
|
||||
LLVMValueRef stride,
|
||||
LLVMValueRef offset,
|
||||
boolean is_pot,
|
||||
bool is_pot,
|
||||
unsigned wrap_mode,
|
||||
LLVMValueRef *offset0,
|
||||
LLVMValueRef *offset1,
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
|
|||
*/
|
||||
static LLVMValueRef
|
||||
lp_build_coord_mirror(struct lp_build_sample_context *bld,
|
||||
LLVMValueRef coord, boolean posOnly)
|
||||
LLVMValueRef coord, bool posOnly)
|
||||
{
|
||||
struct lp_build_context *coord_bld = &bld->coord_bld;
|
||||
LLVMValueRef fract;
|
||||
|
|
@ -312,12 +312,12 @@ lp_build_coord_repeat_npot_linear(struct lp_build_sample_context *bld,
|
|||
*/
|
||||
static void
|
||||
lp_build_sample_wrap_linear(struct lp_build_sample_context *bld,
|
||||
boolean is_gather,
|
||||
bool is_gather,
|
||||
LLVMValueRef coord,
|
||||
LLVMValueRef length,
|
||||
LLVMValueRef length_f,
|
||||
LLVMValueRef offset,
|
||||
boolean is_pot,
|
||||
bool is_pot,
|
||||
unsigned wrap_mode,
|
||||
LLVMValueRef *x0_out,
|
||||
LLVMValueRef *x1_out,
|
||||
|
|
@ -682,7 +682,7 @@ lp_build_sample_wrap_nearest(struct lp_build_sample_context *bld,
|
|||
LLVMValueRef length,
|
||||
LLVMValueRef length_f,
|
||||
LLVMValueRef offset,
|
||||
boolean is_pot,
|
||||
bool is_pot,
|
||||
unsigned wrap_mode)
|
||||
{
|
||||
struct lp_build_context *coord_bld = &bld->coord_bld;
|
||||
|
|
@ -999,7 +999,7 @@ lp_build_masklerp2d(struct lp_build_context *bld,
|
|||
*/
|
||||
static void
|
||||
lp_build_sample_image_linear(struct lp_build_sample_context *bld,
|
||||
boolean is_gather,
|
||||
bool is_gather,
|
||||
LLVMValueRef size,
|
||||
LLVMValueRef linear_mask,
|
||||
LLVMValueRef row_stride_vec,
|
||||
|
|
@ -1030,7 +1030,7 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
|
|||
LLVMValueRef s_fpart, t_fpart = NULL, r_fpart = NULL;
|
||||
LLVMValueRef xs[4], ys[4], zs[4];
|
||||
LLVMValueRef neighbors[2][2][4];
|
||||
boolean seamless_cube_filter, accurate_cube_corners;
|
||||
bool seamless_cube_filter, accurate_cube_corners;
|
||||
unsigned chan_swiz = bld->static_texture_state->swizzle_r;
|
||||
|
||||
if (is_gather) {
|
||||
|
|
@ -1762,7 +1762,7 @@ static void
|
|||
lp_build_sample_mipmap(struct lp_build_sample_context *bld,
|
||||
unsigned img_filter,
|
||||
unsigned mip_filter,
|
||||
boolean is_gather,
|
||||
bool is_gather,
|
||||
const LLVMValueRef *coords,
|
||||
const LLVMValueRef *offsets,
|
||||
LLVMValueRef ilevel0,
|
||||
|
|
@ -2010,7 +2010,7 @@ lp_build_sample_mipmap_both(struct lp_build_sample_context *bld,
|
|||
static LLVMValueRef
|
||||
lp_build_layer_coord(struct lp_build_sample_context *bld,
|
||||
unsigned texture_unit,
|
||||
boolean is_cube_array,
|
||||
bool is_cube_array,
|
||||
LLVMValueRef layer,
|
||||
LLVMValueRef *out_of_bounds)
|
||||
{
|
||||
|
|
@ -2066,7 +2066,7 @@ static void
|
|||
lp_build_sample_aniso(struct lp_build_sample_context *bld,
|
||||
unsigned img_filter,
|
||||
unsigned mip_filter,
|
||||
boolean is_gather,
|
||||
bool is_gather,
|
||||
const LLVMValueRef *coords,
|
||||
const LLVMValueRef *offsets,
|
||||
LLVMValueRef ilevel0,
|
||||
|
|
@ -2513,7 +2513,7 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld,
|
|||
*/
|
||||
static void
|
||||
lp_build_sample_common(struct lp_build_sample_context *bld,
|
||||
boolean is_lodq,
|
||||
bool is_lodq,
|
||||
unsigned texture_index,
|
||||
unsigned sampler_index,
|
||||
LLVMValueRef *coords,
|
||||
|
|
@ -2554,7 +2554,7 @@ lp_build_sample_common(struct lp_build_sample_context *bld,
|
|||
* calculate / transform derivatives.
|
||||
*/
|
||||
if (target == PIPE_TEXTURE_CUBE || target == PIPE_TEXTURE_CUBE_ARRAY) {
|
||||
boolean need_derivs = ((min_filter != mag_filter ||
|
||||
bool need_derivs = ((min_filter != mag_filter ||
|
||||
mip_filter != PIPE_TEX_MIPFILTER_NONE) &&
|
||||
!bld->static_sampler_state->min_max_lod_equal &&
|
||||
!explicit_lod);
|
||||
|
|
@ -2927,7 +2927,7 @@ lp_build_clamp_border_color(struct lp_build_sample_context *bld,
|
|||
static void
|
||||
lp_build_sample_general(struct lp_build_sample_context *bld,
|
||||
unsigned sampler_unit,
|
||||
boolean is_gather,
|
||||
bool is_gather,
|
||||
const LLVMValueRef *coords,
|
||||
const LLVMValueRef *offsets,
|
||||
LLVMValueRef lod_positive,
|
||||
|
|
@ -3097,7 +3097,7 @@ lp_build_fetch_texel(struct lp_build_sample_context *bld,
|
|||
struct lp_build_context *int_coord_bld = &bld->int_coord_bld;
|
||||
unsigned dims = bld->dims, chan;
|
||||
unsigned target = bld->static_texture_state->target;
|
||||
boolean out_of_bound_ret_zero = TRUE;
|
||||
bool out_of_bound_ret_zero = TRUE;
|
||||
LLVMValueRef size, ilevel;
|
||||
LLVMValueRef row_stride_vec = NULL, img_stride_vec = NULL;
|
||||
LLVMValueRef x = coords[0], y = coords[1], z = coords[2];
|
||||
|
|
@ -3334,10 +3334,10 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
|
|||
(sample_key & LP_SAMPLER_OP_TYPE_MASK) >>
|
||||
LP_SAMPLER_OP_TYPE_SHIFT;
|
||||
|
||||
const boolean fetch_ms = !!(sample_key & LP_SAMPLER_FETCH_MS);
|
||||
const boolean op_is_tex = op_type == LP_SAMPLER_OP_TEXTURE;
|
||||
const boolean op_is_lodq = op_type == LP_SAMPLER_OP_LODQ;
|
||||
const boolean op_is_gather = op_type == LP_SAMPLER_OP_GATHER;
|
||||
const bool fetch_ms = !!(sample_key & LP_SAMPLER_FETCH_MS);
|
||||
const bool op_is_tex = op_type == LP_SAMPLER_OP_TEXTURE;
|
||||
const bool op_is_lodq = op_type == LP_SAMPLER_OP_LODQ;
|
||||
const bool op_is_gather = op_type == LP_SAMPLER_OP_GATHER;
|
||||
|
||||
LLVMValueRef lod_bias = NULL;
|
||||
LLVMValueRef explicit_lod = NULL;
|
||||
|
|
@ -3685,7 +3685,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
|
|||
} else {
|
||||
LLVMValueRef lod_fpart = NULL, lod_positive = NULL;
|
||||
LLVMValueRef ilevel0 = NULL, ilevel1 = NULL, lod = NULL;
|
||||
boolean use_aos = util_format_fits_8unorm(bld.format_desc) &&
|
||||
bool use_aos = util_format_fits_8unorm(bld.format_desc) &&
|
||||
op_is_tex &&
|
||||
/* not sure this is strictly needed or simply impossible */
|
||||
derived_sampler_state.compare_mode == PIPE_TEX_COMPARE_NONE &&
|
||||
|
|
@ -4013,7 +4013,7 @@ lp_build_sample_gen_func(struct gallivm_state *gallivm,
|
|||
struct lp_derivatives *deriv_ptr = NULL;
|
||||
unsigned num_param = 0;
|
||||
unsigned num_coords, num_derivs, num_offsets, layer;
|
||||
boolean need_cache = FALSE;
|
||||
bool need_cache = FALSE;
|
||||
|
||||
const enum lp_sampler_lod_control lod_control =
|
||||
(sample_key & LP_SAMPLER_LOD_CONTROL_MASK)
|
||||
|
|
@ -4153,7 +4153,7 @@ lp_build_sample_soa_func(struct gallivm_state *gallivm,
|
|||
if (layer && op_type == LP_SAMPLER_OP_LODQ)
|
||||
layer = 0;
|
||||
|
||||
boolean need_cache = FALSE;
|
||||
bool need_cache = FALSE;
|
||||
if (dynamic_state->cache_ptr) {
|
||||
const struct util_format_description *format_desc;
|
||||
format_desc = util_format_description(static_texture_state->format);
|
||||
|
|
@ -4308,7 +4308,7 @@ lp_build_sample_soa(const struct lp_static_texture_state *static_texture_state,
|
|||
struct gallivm_state *gallivm,
|
||||
const struct lp_sampler_params *params)
|
||||
{
|
||||
boolean use_tex_func = FALSE;
|
||||
bool use_tex_func = FALSE;
|
||||
|
||||
/*
|
||||
* Do not use a function call if the sampling is "simple enough".
|
||||
|
|
@ -4328,13 +4328,13 @@ lp_build_sample_soa(const struct lp_static_texture_state *static_texture_state,
|
|||
if (USE_TEX_FUNC_CALL) {
|
||||
const struct util_format_description *format_desc =
|
||||
util_format_description(static_texture_state->format);
|
||||
const boolean simple_format =
|
||||
const bool simple_format =
|
||||
(util_format_is_rgba8_variant(format_desc) &&
|
||||
format_desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB);
|
||||
const enum lp_sampler_op_type op_type =
|
||||
(params->sample_key & LP_SAMPLER_OP_TYPE_MASK) >>
|
||||
LP_SAMPLER_OP_TYPE_SHIFT;
|
||||
const boolean simple_tex =
|
||||
const bool simple_tex =
|
||||
op_type != LP_SAMPLER_OP_TEXTURE ||
|
||||
((static_sampler_state->min_mip_filter == PIPE_TEX_MIPFILTER_NONE ||
|
||||
static_texture_state->level_zero_only == TRUE) &&
|
||||
|
|
@ -4439,7 +4439,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm,
|
|||
|
||||
const unsigned dims = texture_dims(target);
|
||||
|
||||
const boolean has_array = has_layer_coord(target);
|
||||
const bool has_array = has_layer_coord(target);
|
||||
|
||||
assert(!params->int_type.floating);
|
||||
|
||||
|
|
@ -4834,7 +4834,7 @@ lp_build_img_op_soa(const struct lp_static_texture_state *static_texture_state,
|
|||
params->resources_type,
|
||||
params->resources_ptr,
|
||||
params->image_index, NULL);
|
||||
boolean layer_coord = has_layer_coord(target);
|
||||
bool layer_coord = has_layer_coord(target);
|
||||
|
||||
width = lp_build_scale_view_dim(gallivm, width, res_format_desc->block.width,
|
||||
format_desc->block.width);
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ get_src_chan_idx(enum tgsi_opcode opcode,
|
|||
/* XXX: COMMENT
|
||||
* It should be assumed that this function ignores writemasks
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
lp_build_tgsi_inst_llvm(struct lp_build_tgsi_context *bld_base,
|
||||
const struct tgsi_full_instruction *inst)
|
||||
{
|
||||
|
|
@ -508,7 +508,7 @@ lp_build_emit_fetch_texoffset(struct lp_build_tgsi_context *bld_base,
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_build_tgsi_llvm(struct lp_build_tgsi_context *bld_base,
|
||||
const struct tgsi_token *tokens)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ struct lp_build_tgsi_context
|
|||
* to every function. */
|
||||
void * userdata;
|
||||
|
||||
boolean soa;
|
||||
bool soa;
|
||||
|
||||
int pc;
|
||||
|
||||
|
|
@ -429,9 +429,9 @@ struct lp_build_gs_iface
|
|||
{
|
||||
LLVMValueRef (*fetch_input)(const struct lp_build_gs_iface *gs_iface,
|
||||
struct lp_build_context * bld,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
LLVMValueRef swizzle_index);
|
||||
void (*emit_vertex)(const struct lp_build_gs_iface *gs_iface,
|
||||
|
|
@ -459,31 +459,31 @@ struct lp_build_tcs_iface
|
|||
void (*emit_store_output)(const struct lp_build_tcs_iface *tcs_iface,
|
||||
struct lp_build_context * bld,
|
||||
unsigned name,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
boolean is_sindex_indirect,
|
||||
bool is_sindex_indirect,
|
||||
LLVMValueRef swizzle_index,
|
||||
LLVMValueRef value,
|
||||
LLVMValueRef mask_vec);
|
||||
|
||||
LLVMValueRef (*emit_fetch_input)(const struct lp_build_tcs_iface *tcs_iface,
|
||||
struct lp_build_context * bld,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
boolean is_sindex_indirect,
|
||||
bool is_sindex_indirect,
|
||||
LLVMValueRef swizzle_index);
|
||||
|
||||
LLVMValueRef (*emit_fetch_output)(const struct lp_build_tcs_iface *tcs_iface,
|
||||
struct lp_build_context * bld,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
boolean is_sindex_indirect,
|
||||
bool is_sindex_indirect,
|
||||
LLVMValueRef swizzle_index,
|
||||
uint32_t name);
|
||||
};
|
||||
|
|
@ -492,16 +492,16 @@ struct lp_build_tes_iface
|
|||
{
|
||||
LLVMValueRef (*fetch_vertex_input)(const struct lp_build_tes_iface *tes_iface,
|
||||
struct lp_build_context * bld,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
boolean is_sindex_indirect,
|
||||
bool is_sindex_indirect,
|
||||
LLVMValueRef swizzle_index);
|
||||
|
||||
LLVMValueRef (*fetch_patch_input)(const struct lp_build_tes_iface *tes_iface,
|
||||
struct lp_build_context * bld,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
LLVMValueRef swizzle_index);
|
||||
};
|
||||
|
|
@ -511,11 +511,11 @@ struct lp_build_mesh_iface
|
|||
void (*emit_store_output)(const struct lp_build_mesh_iface *mesh_iface,
|
||||
struct lp_build_context * bld,
|
||||
unsigned name,
|
||||
boolean is_vindex_indirect,
|
||||
bool is_vindex_indirect,
|
||||
LLVMValueRef vertex_index,
|
||||
boolean is_aindex_indirect,
|
||||
bool is_aindex_indirect,
|
||||
LLVMValueRef attrib_index,
|
||||
boolean is_sindex_indirect,
|
||||
bool is_sindex_indirect,
|
||||
LLVMValueRef swizzle_index,
|
||||
LLVMValueRef value,
|
||||
LLVMValueRef mask_vec);
|
||||
|
|
@ -605,7 +605,7 @@ struct lp_build_tgsi_soa_context
|
|||
struct lp_exec_mask exec_mask;
|
||||
|
||||
uint num_immediates;
|
||||
boolean use_immediates_array;
|
||||
bool use_immediates_array;
|
||||
};
|
||||
|
||||
void
|
||||
|
|
@ -617,7 +617,7 @@ void lp_emit_immediate_soa(
|
|||
struct lp_build_tgsi_context *bld_base,
|
||||
const struct tgsi_full_immediate *imm);
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_emit_instruction_soa(
|
||||
struct lp_build_tgsi_soa_context *bld,
|
||||
const struct tgsi_full_instruction *inst,
|
||||
|
|
@ -694,7 +694,7 @@ lp_emit_declaration_aos(
|
|||
const struct tgsi_full_declaration *decl);
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_emit_instruction_aos(
|
||||
struct lp_build_tgsi_aos_context *bld,
|
||||
const struct tgsi_full_instruction *inst,
|
||||
|
|
@ -750,7 +750,7 @@ lp_build_emit_llvm_ternary(
|
|||
LLVMValueRef arg1,
|
||||
LLVMValueRef arg2);
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_build_tgsi_inst_llvm(
|
||||
struct lp_build_tgsi_context * bld_base,
|
||||
const struct tgsi_full_instruction *inst);
|
||||
|
|
@ -777,7 +777,7 @@ lp_build_emit_fetch_texoffset(
|
|||
unsigned tex_off_op,
|
||||
const unsigned chan_index);
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_build_tgsi_llvm(
|
||||
struct lp_build_tgsi_context * bld_base,
|
||||
const struct tgsi_token *tokens);
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ lp_emit_declaration_aos(
|
|||
* Emit LLVM for one TGSI instruction.
|
||||
* \param return TRUE for success, FALSE otherwise
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
lp_emit_instruction_aos(
|
||||
struct lp_build_tgsi_aos_context *bld,
|
||||
const struct tgsi_full_instruction *inst,
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ analyse_src(struct analysis_context *ctx,
|
|||
/**
|
||||
* Whether this register channel refers to a specific immediate value.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
is_immediate(const struct lp_tgsi_channel_info *chan_info, float value)
|
||||
{
|
||||
return chan_info->file == TGSI_FILE_IMMEDIATE &&
|
||||
|
|
@ -113,7 +113,7 @@ analyse_tex(struct analysis_context *ctx,
|
|||
|
||||
if (info->num_texs < ARRAY_SIZE(info->tex)) {
|
||||
struct lp_tgsi_texture_info *tex_info = &info->tex[info->num_texs];
|
||||
boolean indirect = FALSE;
|
||||
bool indirect = FALSE;
|
||||
unsigned readmask = 0;
|
||||
|
||||
tex_info->target = inst->Texture.Texture;
|
||||
|
|
@ -202,7 +202,7 @@ static void
|
|||
analyse_sample(struct analysis_context *ctx,
|
||||
const struct tgsi_full_instruction *inst,
|
||||
enum lp_build_tex_modifier modifier,
|
||||
boolean shadow)
|
||||
bool shadow)
|
||||
{
|
||||
struct lp_tgsi_info *info = ctx->info;
|
||||
unsigned chan;
|
||||
|
|
@ -210,8 +210,8 @@ analyse_sample(struct analysis_context *ctx,
|
|||
if (info->num_texs < ARRAY_SIZE(info->tex)) {
|
||||
struct lp_tgsi_texture_info *tex_info = &info->tex[info->num_texs];
|
||||
unsigned target = ctx->sample_target[inst->Src[1].Register.Index];
|
||||
boolean indirect = FALSE;
|
||||
boolean shadow = FALSE;
|
||||
bool indirect = FALSE;
|
||||
bool shadow = FALSE;
|
||||
unsigned readmask;
|
||||
|
||||
switch (target) {
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ static void lp_exec_case(struct lp_exec_mask *mask,
|
|||
* if default wasn't last but there's no
|
||||
* fallthrough into default.
|
||||
*/
|
||||
static boolean default_analyse_is_last(struct lp_exec_mask *mask,
|
||||
static bool default_analyse_is_last(struct lp_exec_mask *mask,
|
||||
struct lp_build_tgsi_context * bld_base,
|
||||
int *default_pc_start)
|
||||
{
|
||||
|
|
@ -307,7 +307,7 @@ static void lp_exec_default(struct lp_exec_mask *mask,
|
|||
struct function_ctx *ctx = func_ctx(mask);
|
||||
|
||||
int default_exec_pc = 0;
|
||||
boolean default_is_last;
|
||||
bool default_is_last;
|
||||
|
||||
if (ctx->switch_stack_size > LP_MAX_TGSI_NESTING) {
|
||||
return;
|
||||
|
|
@ -346,7 +346,7 @@ static void lp_exec_default(struct lp_exec_mask *mask,
|
|||
*/
|
||||
enum tgsi_opcode opcode =
|
||||
bld_base->instructions[bld_base->pc - 1].Instruction.Opcode;
|
||||
boolean ft_into = (opcode != TGSI_OPCODE_BRK &&
|
||||
bool ft_into = (opcode != TGSI_OPCODE_BRK &&
|
||||
opcode != TGSI_OPCODE_SWITCH);
|
||||
/*
|
||||
* If it is not last statement and there was no fallthrough into it,
|
||||
|
|
@ -776,7 +776,7 @@ static LLVMValueRef
|
|||
get_soa_array_offsets(struct lp_build_context *uint_bld,
|
||||
LLVMValueRef indirect_index,
|
||||
unsigned chan_index,
|
||||
boolean need_perelement_offset)
|
||||
bool need_perelement_offset)
|
||||
{
|
||||
struct gallivm_state *gallivm = uint_bld->gallivm;
|
||||
LLVMValueRef chan_vec =
|
||||
|
|
@ -2289,7 +2289,7 @@ static void
|
|||
emit_sample(struct lp_build_tgsi_soa_context *bld,
|
||||
const struct tgsi_full_instruction *inst,
|
||||
enum lp_build_tex_modifier modifier,
|
||||
boolean compare,
|
||||
bool compare,
|
||||
enum lp_sampler_op_type sample_type,
|
||||
LLVMValueRef *texel)
|
||||
{
|
||||
|
|
@ -2471,7 +2471,7 @@ static void
|
|||
emit_fetch_texels( struct lp_build_tgsi_soa_context *bld,
|
||||
const struct tgsi_full_instruction *inst,
|
||||
LLVMValueRef *texel,
|
||||
boolean is_samplei)
|
||||
bool is_samplei)
|
||||
{
|
||||
unsigned unit, target;
|
||||
LLVMValueRef coord_undef = LLVMGetUndef(bld->bld_base.base.int_vec_type);
|
||||
|
|
@ -2612,7 +2612,7 @@ static void
|
|||
emit_size_query( struct lp_build_tgsi_soa_context *bld,
|
||||
const struct tgsi_full_instruction *inst,
|
||||
LLVMValueRef *sizes_out,
|
||||
boolean is_sviewinfo)
|
||||
bool is_sviewinfo)
|
||||
{
|
||||
LLVMValueRef explicit_lod;
|
||||
enum lp_sampler_lod_property lod_property;
|
||||
|
|
@ -2678,7 +2678,7 @@ emit_size_query( struct lp_build_tgsi_soa_context *bld,
|
|||
¶ms);
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
near_end_of_shader(struct lp_build_tgsi_soa_context *bld,
|
||||
int pc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ lp_build_vec_type(const struct gallivm_state *gallivm, struct lp_type type)
|
|||
* XXX: I'm not sure if it wouldn't be easier/efficient to just recreate the
|
||||
* type and check for identity.
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type)
|
||||
{
|
||||
assert(elem_type);
|
||||
|
|
@ -134,7 +134,7 @@ lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type)
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_check_vec_type(struct lp_type type, LLVMTypeRef vec_type)
|
||||
{
|
||||
assert(vec_type);
|
||||
|
|
@ -161,7 +161,7 @@ lp_check_vec_type(struct lp_type type, LLVMTypeRef vec_type)
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_check_value(struct lp_type type, LLVMValueRef val)
|
||||
{
|
||||
assert(val);
|
||||
|
|
|
|||
|
|
@ -348,15 +348,15 @@ LLVMTypeRef
|
|||
lp_build_vec_type(const struct gallivm_state *gallivm, struct lp_type type);
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type);
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_check_vec_type(struct lp_type type, LLVMTypeRef vec_type);
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
lp_check_value(struct lp_type type, LLVMValueRef val);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ util_font_draw_character(void *dst_mem, unsigned dst_stride, unsigned character)
|
|||
}
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
util_font_create_fixed_8x13(struct pipe_context *pipe,
|
||||
struct util_font *out_font)
|
||||
{
|
||||
|
|
@ -442,7 +442,7 @@ util_font_create_fixed_8x13(struct pipe_context *pipe,
|
|||
}
|
||||
|
||||
|
||||
boolean
|
||||
bool
|
||||
util_font_create(struct pipe_context *pipe, enum util_font_name name,
|
||||
struct util_font *out_font)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ struct util_font {
|
|||
unsigned glyph_height;
|
||||
};
|
||||
|
||||
boolean
|
||||
bool
|
||||
util_font_create(struct pipe_context *pipe, enum util_font_name name,
|
||||
struct util_font *out_font);
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ filetime_to_scalar(FILETIME ft)
|
|||
return uli.QuadPart;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
{
|
||||
SYSTEM_INFO sysInfo;
|
||||
|
|
@ -97,7 +97,7 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
|||
|
||||
#elif DETECT_OS_BSD
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
{
|
||||
#if DETECT_OS_NETBSD || DETECT_OS_OPENBSD
|
||||
|
|
@ -172,7 +172,7 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
|||
|
||||
#else
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time)
|
||||
{
|
||||
char cpuname[32];
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ struct hud_batch_query_context {
|
|||
unsigned allocated_query_types;
|
||||
unsigned *query_types;
|
||||
|
||||
boolean failed;
|
||||
bool failed;
|
||||
struct pipe_query *query[NUM_QUERIES];
|
||||
union pipe_query_result *result[NUM_QUERIES];
|
||||
unsigned head, pending, results;
|
||||
|
|
@ -129,7 +129,7 @@ hud_batch_query_begin(struct hud_batch_query_context *bq,
|
|||
}
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
batch_query_add(struct hud_batch_query_context **pbq,
|
||||
unsigned query_type, unsigned *result_index)
|
||||
{
|
||||
|
|
@ -419,14 +419,14 @@ fail_gr:
|
|||
FREE(gr);
|
||||
}
|
||||
|
||||
boolean
|
||||
bool
|
||||
hud_driver_query_install(struct hud_batch_query_context **pbq,
|
||||
struct hud_pane *pane, struct pipe_screen *screen,
|
||||
const char *name)
|
||||
{
|
||||
struct pipe_driver_query_info query = { 0 };
|
||||
unsigned num_queries, i;
|
||||
boolean found = FALSE;
|
||||
bool found = FALSE;
|
||||
|
||||
if (!screen->get_driver_query_info)
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "util/u_memory.h"
|
||||
|
||||
struct fps_info {
|
||||
boolean frametime;
|
||||
bool frametime;
|
||||
int frames;
|
||||
uint64_t last_time;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ get_file_value(const char *fname, uint64_t *value)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
get_nic_bytes(const char *fn, uint64_t *bytes)
|
||||
{
|
||||
if (get_file_value(fn, bytes) < 0)
|
||||
|
|
|
|||
|
|
@ -141,8 +141,8 @@ struct hud_pane {
|
|||
uint64_t initial_max_value;
|
||||
uint64_t ceiling;
|
||||
unsigned dyn_ceil_last_ran;
|
||||
boolean dyn_ceiling;
|
||||
boolean sort_items;
|
||||
bool dyn_ceiling;
|
||||
bool sort_items;
|
||||
enum pipe_driver_query_type type;
|
||||
uint64_t period; /* in microseconds */
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ void hud_pipe_query_install(struct hud_batch_query_context **pbq,
|
|||
enum pipe_driver_query_type type,
|
||||
enum pipe_driver_query_result_type result_type,
|
||||
unsigned flags);
|
||||
boolean hud_driver_query_install(struct hud_batch_query_context **pbq,
|
||||
bool hud_driver_query_install(struct hud_batch_query_context **pbq,
|
||||
struct hud_pane *pane,
|
||||
struct pipe_screen *screen, const char *name);
|
||||
void hud_batch_query_begin(struct hud_batch_query_context *bq,
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ pipe_loader_sw_probe(struct pipe_loader_device **devs, int ndev);
|
|||
*
|
||||
* \sa pipe_loader_probe
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
pipe_loader_sw_probe_wrapped(struct pipe_loader_device **dev,
|
||||
struct pipe_screen *screen);
|
||||
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ pipe_loader_sw_probe(struct pipe_loader_device **devs, int ndev)
|
|||
return i;
|
||||
}
|
||||
|
||||
boolean
|
||||
bool
|
||||
pipe_loader_sw_probe_wrapped(struct pipe_loader_device **dev,
|
||||
struct pipe_screen *screen)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ pb_reference_with_winsys(void *winsys,
|
|||
* Utility function to check whether the provided alignment is consistent with
|
||||
* the requested or not.
|
||||
*/
|
||||
static inline boolean
|
||||
static inline bool
|
||||
pb_check_alignment(uint32_t requested, uint32_t provided)
|
||||
{
|
||||
if (!requested)
|
||||
|
|
@ -304,7 +304,7 @@ pb_check_alignment(uint32_t requested, uint32_t provided)
|
|||
* Utility function to check whether the provided alignment is consistent with
|
||||
* the requested or not.
|
||||
*/
|
||||
static inline boolean
|
||||
static inline bool
|
||||
pb_check_usage(unsigned requested, unsigned provided)
|
||||
{
|
||||
return (requested & provided) == requested ? TRUE : FALSE;
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ fenced_buffer_destroy_gpu_storage_locked(struct fenced_buffer *fenced_buf);
|
|||
static enum pipe_error
|
||||
fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr,
|
||||
struct fenced_buffer *fenced_buf,
|
||||
boolean wait);
|
||||
bool wait);
|
||||
|
||||
static enum pipe_error
|
||||
fenced_buffer_copy_storage_to_gpu_locked(struct fenced_buffer *fenced_buf);
|
||||
|
|
@ -290,7 +290,7 @@ fenced_buffer_add_locked(struct fenced_manager *fenced_mgr,
|
|||
*
|
||||
* Returns TRUE if the buffer was detroyed.
|
||||
*/
|
||||
static inline boolean
|
||||
static inline bool
|
||||
fenced_buffer_remove_locked(struct fenced_manager *fenced_mgr,
|
||||
struct fenced_buffer *fenced_buf)
|
||||
{
|
||||
|
|
@ -344,7 +344,7 @@ fenced_buffer_finish_locked(struct fenced_manager *fenced_mgr,
|
|||
if (fenced_buf->fence) {
|
||||
struct pipe_fence_handle *fence = NULL;
|
||||
int finished;
|
||||
boolean proceed;
|
||||
bool proceed;
|
||||
|
||||
ops->fence_reference(ops, &fence, fenced_buf->fence);
|
||||
|
||||
|
|
@ -366,7 +366,7 @@ fenced_buffer_finish_locked(struct fenced_manager *fenced_mgr,
|
|||
|
||||
if (proceed && finished == 0) {
|
||||
/* Remove from the fenced list. */
|
||||
boolean destroyed = fenced_buffer_remove_locked(fenced_mgr, fenced_buf);
|
||||
bool destroyed = fenced_buffer_remove_locked(fenced_mgr, fenced_buf);
|
||||
|
||||
/* TODO: remove consequents buffers with the same fence? */
|
||||
|
||||
|
|
@ -388,15 +388,15 @@ fenced_buffer_finish_locked(struct fenced_manager *fenced_mgr,
|
|||
*
|
||||
* Returns TRUE if at least one buffer was removed.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr,
|
||||
boolean wait)
|
||||
bool wait)
|
||||
{
|
||||
struct pb_fence_ops *ops = fenced_mgr->ops;
|
||||
struct list_head *curr, *next;
|
||||
struct fenced_buffer *fenced_buf;
|
||||
struct pipe_fence_handle *prev_fence = NULL;
|
||||
boolean ret = FALSE;
|
||||
bool ret = FALSE;
|
||||
|
||||
curr = fenced_mgr->fenced.next;
|
||||
next = curr->next;
|
||||
|
|
@ -446,7 +446,7 @@ fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr,
|
|||
*
|
||||
* Returns TRUE if at least one buffer was freed.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
fenced_manager_free_gpu_storage_locked(struct fenced_manager *fenced_mgr)
|
||||
{
|
||||
struct list_head *curr, *next;
|
||||
|
|
@ -541,7 +541,7 @@ fenced_buffer_destroy_gpu_storage_locked(struct fenced_buffer *fenced_buf)
|
|||
* This function is a shorthand around pb_manager::create_buffer for
|
||||
* fenced_buffer_create_gpu_storage_locked()'s benefit.
|
||||
*/
|
||||
static inline boolean
|
||||
static inline bool
|
||||
fenced_buffer_try_create_gpu_storage_locked(struct fenced_manager *fenced_mgr,
|
||||
struct fenced_buffer *fenced_buf)
|
||||
{
|
||||
|
|
@ -562,7 +562,7 @@ fenced_buffer_try_create_gpu_storage_locked(struct fenced_manager *fenced_mgr,
|
|||
static enum pipe_error
|
||||
fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr,
|
||||
struct fenced_buffer *fenced_buf,
|
||||
boolean wait)
|
||||
bool wait)
|
||||
{
|
||||
assert(!fenced_buf->buffer);
|
||||
|
||||
|
|
@ -826,7 +826,7 @@ fenced_buffer_fence(struct pb_buffer *buf,
|
|||
assert(fenced_buf->validation_flags);
|
||||
|
||||
if (fenced_buf->fence) {
|
||||
ASSERTED boolean destroyed = fenced_buffer_remove_locked(fenced_mgr, fenced_buf);
|
||||
ASSERTED bool destroyed = fenced_buffer_remove_locked(fenced_mgr, fenced_buf);
|
||||
assert(!destroyed);
|
||||
}
|
||||
if (fence) {
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ struct pb_manager
|
|||
void
|
||||
(*flush)( struct pb_manager *mgr );
|
||||
|
||||
boolean
|
||||
bool
|
||||
(*is_buffer_busy)( struct pb_manager *mgr,
|
||||
struct pb_buffer *buf );
|
||||
};
|
||||
|
|
|
|||
|
|
@ -134,11 +134,11 @@ fill_random_pattern(uint8_t *dst, pb_size size)
|
|||
}
|
||||
|
||||
|
||||
static inline boolean
|
||||
static inline bool
|
||||
check_random_pattern(const uint8_t *dst, pb_size size,
|
||||
pb_size *min_ofs, pb_size *max_ofs)
|
||||
{
|
||||
boolean result = TRUE;
|
||||
bool result = TRUE;
|
||||
pb_size i;
|
||||
*min_ofs = size;
|
||||
*max_ofs = 0;
|
||||
|
|
@ -184,7 +184,7 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
|
|||
PB_USAGE_UNSYNCHRONIZED, NULL);
|
||||
assert(map);
|
||||
if (map) {
|
||||
boolean underflow, overflow;
|
||||
bool underflow, overflow;
|
||||
pb_size min_ofs, max_ofs;
|
||||
|
||||
underflow = !check_random_pattern(map, buf->underflow_size,
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ pb_validate_add_buffer(struct pb_validate *vl,
|
|||
struct pb_buffer *buf,
|
||||
enum pb_usage_flags flags,
|
||||
struct hash_table *ht,
|
||||
boolean *already_present)
|
||||
bool *already_present)
|
||||
{
|
||||
assert(buf);
|
||||
*already_present = FALSE;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ pb_validate_add_buffer(struct pb_validate *vl,
|
|||
struct pb_buffer *buf,
|
||||
enum pb_usage_flags flags,
|
||||
struct hash_table *ht,
|
||||
boolean *already_present);
|
||||
bool *already_present);
|
||||
|
||||
enum pipe_error
|
||||
pb_validate_foreach(struct pb_validate *vl,
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ renderonly_create_gpu_import_for_resource(struct pipe_resource *rsc,
|
|||
{
|
||||
struct pipe_screen *screen = rsc->screen;
|
||||
struct renderonly_scanout *scanout = NULL;
|
||||
boolean status;
|
||||
bool status;
|
||||
uint32_t scanout_handle;
|
||||
int fd, err;
|
||||
struct winsys_handle handle = {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ void
|
|||
renderonly_scanout_destroy(struct renderonly_scanout *scanout,
|
||||
struct renderonly *ro);
|
||||
|
||||
static inline boolean
|
||||
static inline bool
|
||||
renderonly_get_handle(struct renderonly_scanout *scanout,
|
||||
struct winsys_handle *handle)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ struct dump_ctx
|
|||
{
|
||||
struct tgsi_iterate_context iter;
|
||||
|
||||
boolean dump_float_as_hex;
|
||||
bool dump_float_as_hex;
|
||||
|
||||
uint instno;
|
||||
uint immno;
|
||||
|
|
@ -294,13 +294,13 @@ dump_imm_data(struct tgsi_iterate_context *iter,
|
|||
TXT( "}" );
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
iter_declaration(
|
||||
struct tgsi_iterate_context *iter,
|
||||
struct tgsi_full_declaration *decl )
|
||||
{
|
||||
struct dump_ctx *ctx = (struct dump_ctx *)iter;
|
||||
boolean patch = decl->Semantic.Name == TGSI_SEMANTIC_PATCH ||
|
||||
bool patch = decl->Semantic.Name == TGSI_SEMANTIC_PATCH ||
|
||||
decl->Semantic.Name == TGSI_SEMANTIC_TESSINNER ||
|
||||
decl->Semantic.Name == TGSI_SEMANTIC_TESSOUTER ||
|
||||
decl->Semantic.Name == TGSI_SEMANTIC_PRIMID;
|
||||
|
|
@ -447,7 +447,7 @@ iter_declaration(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
iter_property(
|
||||
struct tgsi_iterate_context *iter,
|
||||
struct tgsi_full_property *prop )
|
||||
|
|
@ -488,7 +488,7 @@ iter_property(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
iter_immediate(
|
||||
struct tgsi_iterate_context *iter,
|
||||
struct tgsi_full_immediate *imm )
|
||||
|
|
@ -508,7 +508,7 @@ iter_immediate(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
iter_instruction(
|
||||
struct tgsi_iterate_context *iter,
|
||||
struct tgsi_full_instruction *inst )
|
||||
|
|
@ -517,7 +517,7 @@ iter_instruction(
|
|||
uint instno = ctx->instno++;
|
||||
const struct tgsi_opcode_info *info = tgsi_get_opcode_info( inst->Instruction.Opcode );
|
||||
uint i;
|
||||
boolean first_reg = TRUE;
|
||||
bool first_reg = TRUE;
|
||||
|
||||
INSTID( instno );
|
||||
TXT( ": " );
|
||||
|
|
@ -664,7 +664,7 @@ tgsi_dump_instruction(
|
|||
iter_instruction( &ctx.iter, (struct tgsi_full_instruction *)inst );
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
prolog(
|
||||
struct tgsi_iterate_context *iter )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ remove_dynamic_indexes(struct tgsi_transform_context *ctx,
|
|||
ctx->emit_instruction(ctx, &inst);
|
||||
|
||||
for (i = 0; i < dc->num_iterations; i++) {
|
||||
boolean out_of_bound_index = FALSE;
|
||||
bool out_of_bound_index = FALSE;
|
||||
/**
|
||||
* Make sure we are not exceeding index limit of constant buffer
|
||||
*
|
||||
|
|
@ -279,7 +279,7 @@ dIndexing_inst(struct tgsi_transform_context *ctx,
|
|||
struct tgsi_full_instruction *inst)
|
||||
{
|
||||
int i;
|
||||
boolean indexing = FALSE;
|
||||
bool indexing = FALSE;
|
||||
struct dIndexing_transform_context *dc = dIndexing_transform_context(ctx);
|
||||
|
||||
for (i = 0; i < inst->Instruction.NumSrcRegs; i++) {
|
||||
|
|
|
|||
|
|
@ -2433,7 +2433,7 @@ exec_txq(struct tgsi_exec_machine *mach,
|
|||
static void
|
||||
exec_sample(struct tgsi_exec_machine *mach,
|
||||
const struct tgsi_full_instruction *inst,
|
||||
uint modifier, boolean compare)
|
||||
uint modifier, bool compare)
|
||||
{
|
||||
const uint resource_unit = inst->Src[1].Register.Index;
|
||||
const uint sampler_unit = inst->Src[2].Register.Index;
|
||||
|
|
@ -4892,7 +4892,7 @@ exec_interp_at_centroid(struct tgsi_exec_machine *mach,
|
|||
* Returns TRUE if a barrier instruction is hit,
|
||||
* otherwise FALSE.
|
||||
*/
|
||||
static boolean
|
||||
static bool
|
||||
exec_instruction(
|
||||
struct tgsi_exec_machine *mach,
|
||||
const struct tgsi_full_instruction *inst,
|
||||
|
|
@ -6015,7 +6015,7 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach, int start_pc )
|
|||
|
||||
/* execute instructions, until pc is set to -1 */
|
||||
while (mach->pc != -1) {
|
||||
boolean barrier_hit;
|
||||
bool barrier_hit;
|
||||
#if DEBUG_EXECUTION
|
||||
uint i;
|
||||
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ struct tgsi_exec_machine
|
|||
struct tgsi_declaration_sampler_view
|
||||
SamplerViews[PIPE_MAX_SHADER_SAMPLER_VIEWS];
|
||||
|
||||
boolean UsedGeometryShader;
|
||||
bool UsedGeometryShader;
|
||||
|
||||
int pc;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] =
|
|||
const struct tgsi_opcode_info *
|
||||
tgsi_get_opcode_info(enum tgsi_opcode opcode)
|
||||
{
|
||||
static boolean firsttime = 1;
|
||||
static bool firsttime = 1;
|
||||
|
||||
ASSERT_BITFIELD_SIZE(struct tgsi_opcode_info, opcode, TGSI_OPCODE_LAST - 1);
|
||||
ASSERT_BITFIELD_SIZE(struct tgsi_opcode_info, output_mode,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "util/u_debug.h"
|
||||
#include "tgsi_iterate.h"
|
||||
|
||||
boolean
|
||||
bool
|
||||
tgsi_iterate_shader(
|
||||
const struct tgsi_token *tokens,
|
||||
struct tgsi_iterate_context *ctx )
|
||||
|
|
|
|||
|
|
@ -37,38 +37,38 @@ extern "C" {
|
|||
|
||||
struct tgsi_iterate_context
|
||||
{
|
||||
boolean
|
||||
bool
|
||||
(* prolog)(
|
||||
struct tgsi_iterate_context *ctx );
|
||||
|
||||
boolean
|
||||
bool
|
||||
(* iterate_instruction)(
|
||||
struct tgsi_iterate_context *ctx,
|
||||
struct tgsi_full_instruction *inst );
|
||||
|
||||
boolean
|
||||
bool
|
||||
(* iterate_declaration)(
|
||||
struct tgsi_iterate_context *ctx,
|
||||
struct tgsi_full_declaration *decl );
|
||||
|
||||
boolean
|
||||
bool
|
||||
(* iterate_immediate)(
|
||||
struct tgsi_iterate_context *ctx,
|
||||
struct tgsi_full_immediate *imm );
|
||||
|
||||
boolean
|
||||
bool
|
||||
(* iterate_property)(
|
||||
struct tgsi_iterate_context *ctx,
|
||||
struct tgsi_full_property *prop );
|
||||
|
||||
boolean
|
||||
bool
|
||||
(* epilog)(
|
||||
struct tgsi_iterate_context *ctx );
|
||||
|
||||
struct tgsi_processor processor;
|
||||
};
|
||||
|
||||
boolean
|
||||
bool
|
||||
tgsi_iterate_shader(
|
||||
const struct tgsi_token *tokens,
|
||||
struct tgsi_iterate_context *ctx );
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ tgsi_parse_free(
|
|||
{
|
||||
}
|
||||
|
||||
boolean
|
||||
bool
|
||||
tgsi_parse_end_of_tokens(
|
||||
struct tgsi_parse_context *ctx )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ void
|
|||
tgsi_parse_free(
|
||||
struct tgsi_parse_context *ctx );
|
||||
|
||||
boolean
|
||||
bool
|
||||
tgsi_parse_end_of_tokens(
|
||||
struct tgsi_parse_context *ctx );
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ struct sanity_check_ctx
|
|||
uint implied_array_size;
|
||||
uint implied_out_array_size;
|
||||
|
||||
boolean print;
|
||||
bool print;
|
||||
};
|
||||
|
||||
static inline unsigned
|
||||
|
|
@ -185,7 +185,7 @@ report_warning(
|
|||
ctx->warnings++;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
check_file_name(
|
||||
struct sanity_check_ctx *ctx,
|
||||
uint file )
|
||||
|
|
@ -197,7 +197,7 @@ check_file_name(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
is_register_declared(
|
||||
struct sanity_check_ctx *ctx,
|
||||
const scan_register *reg)
|
||||
|
|
@ -208,7 +208,7 @@ is_register_declared(
|
|||
return data ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
is_any_register_declared(
|
||||
struct sanity_check_ctx *ctx,
|
||||
uint file )
|
||||
|
|
@ -226,7 +226,7 @@ is_any_register_declared(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
is_register_used(
|
||||
struct sanity_check_ctx *ctx,
|
||||
scan_register *reg)
|
||||
|
|
@ -238,7 +238,7 @@ is_register_used(
|
|||
}
|
||||
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
is_ind_register_used(
|
||||
struct sanity_check_ctx *ctx,
|
||||
scan_register *reg)
|
||||
|
|
@ -260,12 +260,12 @@ static const char *file_names[TGSI_FILE_COUNT] =
|
|||
"RES"
|
||||
};
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
check_register_usage(
|
||||
struct sanity_check_ctx *ctx,
|
||||
scan_register *reg,
|
||||
const char *name,
|
||||
boolean indirect_access )
|
||||
bool indirect_access )
|
||||
{
|
||||
if (!check_file_name( ctx, reg->file )) {
|
||||
FREE(reg);
|
||||
|
|
@ -303,7 +303,7 @@ check_register_usage(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
iter_instruction(
|
||||
struct tgsi_iterate_context *iter,
|
||||
struct tgsi_full_instruction *inst )
|
||||
|
|
@ -354,7 +354,7 @@ iter_instruction(
|
|||
ctx,
|
||||
reg,
|
||||
"source",
|
||||
(boolean)inst->Src[i].Register.Indirect );
|
||||
(bool)inst->Src[i].Register.Indirect );
|
||||
if (inst->Src[i].Register.Indirect) {
|
||||
scan_register *ind_reg = MALLOC(sizeof(scan_register));
|
||||
|
||||
|
|
@ -387,7 +387,7 @@ check_and_declare(struct sanity_check_ctx *ctx,
|
|||
}
|
||||
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
iter_declaration(
|
||||
struct tgsi_iterate_context *iter,
|
||||
struct tgsi_full_declaration *decl )
|
||||
|
|
@ -446,7 +446,7 @@ iter_declaration(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
iter_immediate(
|
||||
struct tgsi_iterate_context *iter,
|
||||
struct tgsi_full_immediate *imm )
|
||||
|
|
@ -479,7 +479,7 @@ iter_immediate(
|
|||
}
|
||||
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
iter_property(
|
||||
struct tgsi_iterate_context *iter,
|
||||
struct tgsi_full_property *prop )
|
||||
|
|
@ -496,7 +496,7 @@ iter_property(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
prolog(struct tgsi_iterate_context *iter)
|
||||
{
|
||||
struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter;
|
||||
|
|
@ -506,7 +506,7 @@ prolog(struct tgsi_iterate_context *iter)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static boolean
|
||||
static bool
|
||||
epilog(
|
||||
struct tgsi_iterate_context *iter )
|
||||
{
|
||||
|
|
@ -555,12 +555,12 @@ regs_hash_destroy(struct cso_hash *hash)
|
|||
cso_hash_deinit(hash);
|
||||
}
|
||||
|
||||
boolean
|
||||
bool
|
||||
tgsi_sanity_check(
|
||||
const struct tgsi_token *tokens )
|
||||
{
|
||||
struct sanity_check_ctx ctx;
|
||||
boolean retval;
|
||||
bool retval;
|
||||
|
||||
ctx.iter.prolog = prolog;
|
||||
ctx.iter.iterate_instruction = iter_instruction;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ struct tgsi_token;
|
|||
* controlled by the debug option TGSI_PRINT_SANITY (default false).
|
||||
* Returns TRUE if there are no errors, even though there could be some warnings.
|
||||
*/
|
||||
boolean
|
||||
bool
|
||||
tgsi_sanity_check(
|
||||
const struct tgsi_token *tokens );
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue