treewide: style fixes after 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>
Reviewed-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:
Yonggang Luo 2023-06-22 23:32:13 +08:00
parent 7b45a0bd66
commit 49e84fdad2
37 changed files with 131 additions and 131 deletions

View file

@ -1596,7 +1596,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
* the values).
*/
const bool bypass_viewport = key->has_gs_or_tes || key->bypass_viewport ||
vs_info->writes_viewport_index;
vs_info->writes_viewport_index;
const bool enable_cliptest = !key->has_gs_or_tes && (key->clip_xy ||
key->clip_z ||
key->clip_user ||

View file

@ -5,11 +5,11 @@
unsigned start, \
unsigned count
#define FUNC_ENTER \
/* declare more local vars */ \
const enum mesa_prim prim = input_prims->prim; \
const unsigned prim_flags = input_prims->flags; \
const bool last_vertex_last = false; \
#define FUNC_ENTER \
/* declare more local vars */ \
const enum mesa_prim prim = input_prims->prim; \
const unsigned prim_flags = input_prims->flags; \
const bool last_vertex_last = false; \
switch (prim) { \
case MESA_PRIM_POINTS: \
case MESA_PRIM_LINES: \

View file

@ -266,8 +266,8 @@ 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;
bool is_unfilled = (rast &&
(rast->fill_front != PIPE_POLYGON_MODE_FILL ||
rast->fill_back != PIPE_POLYGON_MODE_FILL));
(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;
if (is_unfilled && fs && fs->info.uses_frontface) {

View file

@ -1,8 +1,8 @@
#define LOCAL_VARS \
char *verts = (char *) vertices; \
const bool quads_flatshade_last = \
const bool quads_flatshade_last = \
draw->quads_always_flatshade_last; \
const bool last_vertex_last = \
const bool last_vertex_last = \
!draw->rasterizer->flatshade_first;
#include "draw_decompose_tmp.h"

View file

@ -49,8 +49,8 @@ struct pt_post_vs {
unsigned flags;
bool (*run)(struct pt_post_vs *pvs,
struct draw_vertex_info *info,
const struct draw_prim_info *prim_info);
struct draw_vertex_info *info,
const struct draw_prim_info *prim_info);
};

View file

@ -7,9 +7,9 @@
#define FUNC_ENTER \
/* declare more local vars */ \
const enum mesa_prim prim = input_prims->prim; \
const enum mesa_prim prim = input_prims->prim; \
const unsigned prim_flags = input_prims->flags; \
const bool quads_flatshade_last = FALSE; \
const bool quads_flatshade_last = FALSE; \
const bool last_vertex_last = !so->draw->rasterizer->flatshade_first; \
do { \
switch (prim) { \
@ -17,7 +17,7 @@
case MESA_PRIM_LINE_STRIP_ADJACENCY: \
case MESA_PRIM_TRIANGLES_ADJACENCY: \
case MESA_PRIM_TRIANGLE_STRIP_ADJACENCY: \
assert(!"unexpected primitive type in stream output"); \
assert(!"unexpected primitive type in stream output"); \
return; \
default: \
break; \

View file

@ -66,8 +66,8 @@ struct vbuf_render {
* Currently optional.
*/
bool (*need_pipeline)(const struct vbuf_render *render,
const struct pipe_rasterizer_state *rasterizer,
unsigned int prim);
const struct pipe_rasterizer_state *rasterizer,
unsigned int prim);
/**
@ -83,8 +83,8 @@ struct vbuf_render {
* something.
*/
bool (*allocate_vertices)(struct vbuf_render *,
ushort vertex_size,
ushort nr_vertices);
ushort vertex_size,
ushort nr_vertices);
void *(*map_vertices)(struct vbuf_render *);
void (*unmap_vertices)(struct vbuf_render *,

View file

@ -2555,9 +2555,9 @@ lp_build_sample_common(struct lp_build_sample_context *bld,
*/
if (target == PIPE_TEXTURE_CUBE || target == PIPE_TEXTURE_CUBE_ARRAY) {
bool need_derivs = ((min_filter != mag_filter ||
mip_filter != PIPE_TEX_MIPFILTER_NONE) &&
!bld->static_sampler_state->min_max_lod_equal &&
!explicit_lod);
mip_filter != PIPE_TEX_MIPFILTER_NONE) &&
!bld->static_sampler_state->min_max_lod_equal &&
!explicit_lod);
lp_build_cube_lookup(bld, coords, derivs, &cube_derivs, need_derivs);
if (need_derivs)
derivs = &cube_derivs;

View file

@ -347,7 +347,7 @@ static void lp_exec_default(struct lp_exec_mask *mask,
enum tgsi_opcode opcode =
bld_base->instructions[bld_base->pc - 1].Instruction.Opcode;
bool ft_into = (opcode != TGSI_OPCODE_BRK &&
opcode != TGSI_OPCODE_SWITCH);
opcode != TGSI_OPCODE_SWITCH);
/*
* If it is not last statement and there was no fallthrough into it,
* we record the PC and continue execution at next case (again, those

View file

@ -180,8 +180,8 @@ void hud_pipe_query_install(struct hud_batch_query_context **pbq,
enum pipe_driver_query_result_type result_type,
unsigned flags);
bool hud_driver_query_install(struct hud_batch_query_context **pbq,
struct hud_pane *pane,
struct pipe_screen *screen, const char *name);
struct hud_pane *pane,
struct pipe_screen *screen, const char *name);
void hud_batch_query_begin(struct hud_batch_query_context *bq,
struct pipe_context *pipe);
void hud_batch_query_update(struct hud_batch_query_context *bq,

View file

@ -1173,7 +1173,7 @@ parse_instruction(
/* parses a 4-touple of the form {x, y, z, w}
* where x, y, z, w are numbers */
static bool parse_immediate_data(struct translate_ctx *ctx, unsigned type,
union tgsi_immediate_data *values)
union tgsi_immediate_data *values)
{
unsigned i;
int ret;

View file

@ -12,7 +12,7 @@ static inline bool util_blend_factor_is_dual_src(int factor)
}
static inline bool util_blend_state_is_dual(const struct pipe_blend_state *blend,
int index)
int index)
{
if (util_blend_factor_is_dual_src(blend->rt[index].rgb_src_factor) ||
util_blend_factor_is_dual_src(blend->rt[index].alpha_src_factor) ||

View file

@ -219,15 +219,15 @@ struct cmd_block *lp_scene_new_cmd_block(struct lp_scene *scene,
struct cmd_bin *bin);
bool lp_scene_add_resource_reference(struct lp_scene *scene,
struct pipe_resource *resource,
bool initializing_scene,
bool writeable);
struct pipe_resource *resource,
bool initializing_scene,
bool writeable);
unsigned lp_scene_is_resource_referenced(const struct lp_scene *scene,
const struct pipe_resource *resource);
bool lp_scene_add_frag_shader_reference(struct lp_scene *scene,
struct lp_fragment_shader_variant *variant);
struct lp_fragment_shader_variant *variant);

View file

@ -675,10 +675,10 @@ generate_fs_loop(struct gallivm_state *gallivm,
* code since tests tend to take another codepath than real shaders.
*/
bool simple_shader = (shader->info.base.file_count[TGSI_FILE_SAMPLER] == 0 &&
shader->info.base.num_inputs < 3 &&
shader->info.base.num_instructions < 8) && 0;
shader->info.base.num_inputs < 3 &&
shader->info.base.num_instructions < 8) && 0;
const bool dual_source_blend = key->blend.rt[0].blend_enable &&
util_blend_state_is_dual(&key->blend, 0);
util_blend_state_is_dual(&key->blend, 0);
const bool post_depth_coverage = shader->info.base.properties[TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE];
struct lp_bld_tgsi_system_values system_values;
@ -3135,7 +3135,7 @@ generate_fragment(struct llvmpipe_context *lp,
LLVMValueRef facing;
bool cbuf0_write_all;
const bool dual_source_blend = key->blend.rt[0].blend_enable &&
util_blend_state_is_dual(&key->blend, 0);
util_blend_state_is_dual(&key->blend, 0);
assert(lp_native_vector_width / 32 >= 4);
@ -3486,9 +3486,9 @@ generate_fragment(struct llvmpipe_context *lp,
LLVMValueRef index = lp_build_const_int32(gallivm, cbuf);
bool do_branch = ((key->depth.enabled
|| key->stencil[0].enabled
|| key->alpha.enabled)
&& !shader->info.base.uses_kill);
|| key->stencil[0].enabled
|| key->alpha.enabled)
&& !shader->info.base.uses_kill);
color_ptr = LLVMBuildLoad2(builder, int8p_type,
LLVMBuildGEP2(builder, int8p_type, color_ptr_ptr,
@ -4543,7 +4543,7 @@ make_variant_key(struct llvmpipe_context *lp,
format_desc->swizzle[3] == format_desc->swizzle[0]) {
// Doesn't cover mixed snorm/unorm but can't render to them anyway
bool clamped_zero = !util_format_is_float(format) &&
!util_format_is_snorm(format);
!util_format_is_snorm(format);
blend_rt->rgb_src_factor =
force_dst_alpha_one(blend_rt->rgb_src_factor, clamped_zero);
blend_rt->rgb_dst_factor =

View file

@ -133,7 +133,7 @@ static uint32_t r300_depth_clear_cb_value(enum pipe_format format,
}
static bool r300_cbzb_clear_allowed(struct r300_context *r300,
unsigned clear_buffers)
unsigned clear_buffers)
{
struct pipe_framebuffer_state *fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;
@ -146,7 +146,7 @@ static bool r300_cbzb_clear_allowed(struct r300_context *r300,
}
static bool r300_fast_zclear_allowed(struct r300_context *r300,
unsigned clear_buffers)
unsigned clear_buffers)
{
struct pipe_framebuffer_state *fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;

View file

@ -1301,8 +1301,8 @@ void r300_emit_texture_cache_inval(struct r300_context* r300, unsigned size, voi
}
bool r300_emit_buffer_validate(struct r300_context *r300,
bool do_validate_vertex_buffers,
struct pipe_resource *index_buffer)
bool do_validate_vertex_buffers,
struct pipe_resource *index_buffer)
{
struct pipe_framebuffer_state *fb =
(struct pipe_framebuffer_state*)r300->fb_state.state;

View file

@ -126,7 +126,7 @@ unsigned r300_get_num_cs_end_dwords(struct r300_context *r300);
void r300_emit_dirty_state(struct r300_context* r300);
bool r300_emit_buffer_validate(struct r300_context *r300,
bool do_validate_vertex_buffers,
struct pipe_resource *index_buffer);
bool do_validate_vertex_buffers,
struct pipe_resource *index_buffer);
#endif /* R300_EMIT_H */

View file

@ -576,8 +576,8 @@ static void r300_translate_fragment_shader(
}
bool r300_pick_fragment_shader(struct r300_context *r300,
struct r300_fragment_shader* fs,
struct r300_fragment_program_external_state *state)
struct r300_fragment_shader* fs,
struct r300_fragment_program_external_state *state)
{
struct r300_fragment_shader_code* ptr;

View file

@ -76,8 +76,8 @@ void r300_shader_read_fs_inputs(struct tgsi_shader_info* info,
/* Return TRUE if the shader was switched and should be re-emitted. */
bool r300_pick_fragment_shader(struct r300_context *r300,
struct r300_fragment_shader* fs,
struct r300_fragment_program_external_state *state);
struct r300_fragment_shader* fs,
struct r300_fragment_program_external_state *state);
void r300_fragment_program_get_external_state(struct r300_context *r300,
struct r300_fragment_program_external_state *state);

View file

@ -194,8 +194,8 @@ enum r300_prepare_flags {
* \return TRUE if the CS was flushed
*/
static bool r300_reserve_cs_dwords(struct r300_context *r300,
enum r300_prepare_flags flags,
unsigned cs_dwords)
enum r300_prepare_flags flags,
unsigned cs_dwords)
{
bool flushed = FALSE;
bool emit_states = flags & PREP_EMIT_STATES;
@ -237,10 +237,10 @@ static bool r300_reserve_cs_dwords(struct r300_context *r300,
* \return TRUE if rendering should be skipped
*/
static bool r300_emit_states(struct r300_context *r300,
enum r300_prepare_flags flags,
struct pipe_resource *index_buffer,
int buffer_offset,
int index_bias, int instance_id)
enum r300_prepare_flags flags,
struct pipe_resource *index_buffer,
int buffer_offset,
int index_bias, int instance_id)
{
bool emit_states = flags & PREP_EMIT_STATES;
bool emit_vertex_arrays = flags & PREP_EMIT_VARRAYS;
@ -300,12 +300,12 @@ static bool r300_emit_states(struct r300_context *r300,
* \return TRUE if rendering should be skipped
*/
static bool r300_prepare_for_rendering(struct r300_context *r300,
enum r300_prepare_flags flags,
struct pipe_resource *index_buffer,
unsigned cs_dwords,
int buffer_offset,
int index_bias,
int instance_id)
enum r300_prepare_flags flags,
struct pipe_resource *index_buffer,
unsigned cs_dwords,
int buffer_offset,
int index_bias,
int instance_id)
{
/* Make sure there is enough space in the command stream and emit states. */
if (r300_reserve_cs_dwords(r300, flags, cs_dwords))
@ -316,7 +316,7 @@ static bool r300_prepare_for_rendering(struct r300_context *r300,
}
static bool immd_is_good_idea(struct r300_context *r300,
unsigned count)
unsigned count)
{
if (DBG_ON(r300, DBG_NO_IMMD)) {
return FALSE;
@ -940,8 +940,8 @@ r300_render_get_vertex_info(struct vbuf_render* render)
}
static bool r300_render_allocate_vertices(struct vbuf_render* render,
ushort vertex_size,
ushort count)
ushort vertex_size,
ushort count)
{
struct r300_render* r300render = r300_render(render);
struct r300_context* r300 = r300render->r300;

View file

@ -647,23 +647,23 @@ static bool r300_is_format_supported(struct pipe_screen* screen,
bool is_r500 = r300_screen(screen)->caps.is_r500;
bool is_r400 = r300_screen(screen)->caps.is_r400;
bool is_color2101010 = format == PIPE_FORMAT_R10G10B10A2_UNORM ||
format == PIPE_FORMAT_R10G10B10X2_SNORM ||
format == PIPE_FORMAT_B10G10R10A2_UNORM ||
format == PIPE_FORMAT_B10G10R10X2_UNORM ||
format == PIPE_FORMAT_R10SG10SB10SA2U_NORM;
format == PIPE_FORMAT_R10G10B10X2_SNORM ||
format == PIPE_FORMAT_B10G10R10A2_UNORM ||
format == PIPE_FORMAT_B10G10R10X2_UNORM ||
format == PIPE_FORMAT_R10SG10SB10SA2U_NORM;
bool is_ati1n = format == PIPE_FORMAT_RGTC1_UNORM ||
format == PIPE_FORMAT_RGTC1_SNORM ||
format == PIPE_FORMAT_LATC1_UNORM ||
format == PIPE_FORMAT_LATC1_SNORM;
format == PIPE_FORMAT_RGTC1_SNORM ||
format == PIPE_FORMAT_LATC1_UNORM ||
format == PIPE_FORMAT_LATC1_SNORM;
bool is_ati2n = format == PIPE_FORMAT_RGTC2_UNORM ||
format == PIPE_FORMAT_RGTC2_SNORM ||
format == PIPE_FORMAT_LATC2_UNORM ||
format == PIPE_FORMAT_LATC2_SNORM;
format == PIPE_FORMAT_RGTC2_SNORM ||
format == PIPE_FORMAT_LATC2_UNORM ||
format == PIPE_FORMAT_LATC2_SNORM;
bool is_half_float = format == PIPE_FORMAT_R16_FLOAT ||
format == PIPE_FORMAT_R16G16_FLOAT ||
format == PIPE_FORMAT_R16G16B16_FLOAT ||
format == PIPE_FORMAT_R16G16B16A16_FLOAT ||
format == PIPE_FORMAT_R16G16B16X16_FLOAT;
format == PIPE_FORMAT_R16G16_FLOAT ||
format == PIPE_FORMAT_R16G16B16_FLOAT ||
format == PIPE_FORMAT_R16G16B16A16_FLOAT ||
format == PIPE_FORMAT_R16G16B16X16_FLOAT;
const struct util_format_description *desc;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))

View file

@ -59,7 +59,7 @@
}
static bool blend_discard_if_src_alpha_0(unsigned srcRGB, unsigned srcA,
unsigned dstRGB, unsigned dstA)
unsigned dstRGB, unsigned dstA)
{
/* If the blend equation is ADD or REVERSE_SUBTRACT,
* SRC_ALPHA == 0, and the following state is set, the colorbuffer
@ -80,7 +80,7 @@ static bool blend_discard_if_src_alpha_0(unsigned srcRGB, unsigned srcA,
}
static bool blend_discard_if_src_alpha_1(unsigned srcRGB, unsigned srcA,
unsigned dstRGB, unsigned dstA)
unsigned dstRGB, unsigned dstA)
{
/* If the blend equation is ADD or REVERSE_SUBTRACT,
* SRC_ALPHA == 1, and the following state is set, the colorbuffer
@ -99,7 +99,7 @@ static bool blend_discard_if_src_alpha_1(unsigned srcRGB, unsigned srcA,
}
static bool blend_discard_if_src_color_0(unsigned srcRGB, unsigned srcA,
unsigned dstRGB, unsigned dstA)
unsigned dstRGB, unsigned dstA)
{
/* If the blend equation is ADD or REVERSE_SUBTRACT,
* SRC_COLOR == (0,0,0), and the following state is set, the colorbuffer
@ -114,7 +114,7 @@ static bool blend_discard_if_src_color_0(unsigned srcRGB, unsigned srcA,
}
static bool blend_discard_if_src_color_1(unsigned srcRGB, unsigned srcA,
unsigned dstRGB, unsigned dstA)
unsigned dstRGB, unsigned dstA)
{
/* If the blend equation is ADD or REVERSE_SUBTRACT,
* SRC_COLOR == (1,1,1), and the following state is set, the colorbuffer
@ -129,7 +129,7 @@ static bool blend_discard_if_src_color_1(unsigned srcRGB, unsigned srcA,
}
static bool blend_discard_if_src_alpha_color_0(unsigned srcRGB, unsigned srcA,
unsigned dstRGB, unsigned dstA)
unsigned dstRGB, unsigned dstA)
{
/* If the blend equation is ADD or REVERSE_SUBTRACT,
* SRC_ALPHA_COLOR == (0,0,0,0), and the following state is set,
@ -152,7 +152,7 @@ static bool blend_discard_if_src_alpha_color_0(unsigned srcRGB, unsigned srcA,
}
static bool blend_discard_if_src_alpha_color_1(unsigned srcRGB, unsigned srcA,
unsigned dstRGB, unsigned dstA)
unsigned dstRGB, unsigned dstA)
{
/* If the blend equation is ADD or REVERSE_SUBTRACT,
* SRC_ALPHA_COLOR == (1,1,1,1), and the following state is set,

View file

@ -323,7 +323,7 @@ static void r300_update_rs_block(struct r300_context *r300)
void (*rX00_rs_tex)(struct r300_rs_block*, int, int, enum r300_rs_swizzle);
void (*rX00_rs_tex_write)(struct r300_rs_block*, int, int);
bool any_bcolor_used = vs_outputs->bcolor[0] != ATTR_UNUSED ||
vs_outputs->bcolor[1] != ATTR_UNUSED;
vs_outputs->bcolor[1] != ATTR_UNUSED;
int *stream_loc_notcl = r300->stream_loc_notcl;
uint32_t stuffing_enable = 0;

View file

@ -81,9 +81,9 @@ unsigned r300_get_pixel_alignment(enum pipe_format format,
/* Return true if macrotiling should be enabled on the miplevel. */
static bool r300_texture_macro_switch(struct r300_resource *tex,
unsigned level,
bool rv350_mode,
enum r300_dim dim)
unsigned level,
bool rv350_mode,
enum r300_dim dim)
{
unsigned tile, texdim;
@ -117,8 +117,8 @@ static unsigned r300_texture_get_stride(struct r300_screen *screen,
{
unsigned tile_width, width, stride;
bool is_rs690 = (screen->caps.family == CHIP_RS600 ||
screen->caps.family == CHIP_RS690 ||
screen->caps.family == CHIP_RS740);
screen->caps.family == CHIP_RS690 ||
screen->caps.family == CHIP_RS740);
if (tex->tex.stride_in_bytes_override)
return tex->tex.stride_in_bytes_override;

View file

@ -114,7 +114,7 @@ static void set_vertex_inputs_outputs(struct r300_vertex_program_compiler * c)
struct tgsi_shader_info* info = &vs->info;
int i, reg = 0;
bool any_bcolor_used = outputs->bcolor[0] != ATTR_UNUSED ||
outputs->bcolor[1] != ATTR_UNUSED;
outputs->bcolor[1] != ATTR_UNUSED;
/* Fill in the input mapping */
for (i = 0; i < info->num_inputs; i++)

View file

@ -1110,7 +1110,7 @@ svga_retry_exit(struct svga_context *svga)
*/
#define SVGA_RETRY(_svga, _func) \
do { \
UNUSED bool retried; \
UNUSED bool retried; \
\
SVGA_RETRY_CHECK(_svga, _func, retried); \
} while(0)

View file

@ -481,7 +481,7 @@ svga_texture_transfer_map(struct pipe_context *pipe,
struct svga_transfer *st;
struct svga_winsys_surface *surf = tex->handle;
bool use_direct_map = svga_have_gb_objects(svga) &&
(!svga_have_gb_dma(svga) || (usage & PIPE_MAP_WRITE));
(!svga_have_gb_dma(svga) || (usage & PIPE_MAP_WRITE));
void *map = NULL;
int64_t begin = svga_get_time(svga);
@ -564,7 +564,7 @@ svga_texture_transfer_map(struct pipe_context *pipe,
}
else {
bool can_use_upload = tex->can_use_upload &&
!(st->base.usage & PIPE_MAP_READ);
!(st->base.usage & PIPE_MAP_READ);
bool was_rendered_to =
svga_was_texture_rendered_to(svga_texture(texture));
bool is_dirty = svga_is_texture_dirty(svga_texture(texture));

View file

@ -1354,12 +1354,12 @@ emit_cond_discard(struct svga_shader_emitter *emit,
const struct tgsi_full_src_register *reg = &insn->Src[0];
struct src_register src0, srcIn;
const bool special = (reg->Register.Absolute ||
reg->Register.Negate ||
reg->Register.Indirect ||
reg->Register.SwizzleX != 0 ||
reg->Register.SwizzleY != 1 ||
reg->Register.SwizzleZ != 2 ||
reg->Register.File != TGSI_FILE_TEMPORARY);
reg->Register.Negate ||
reg->Register.Indirect ||
reg->Register.SwizzleX != 0 ||
reg->Register.SwizzleY != 1 ||
reg->Register.SwizzleZ != 2 ||
reg->Register.File != TGSI_FILE_TEMPORARY);
SVGA3dShaderDestToken temp;
src0 = srcIn = translate_src_register( emit, reg );
@ -1812,13 +1812,13 @@ emit_tex(struct svga_shader_emitter *emit,
/* check for shadow samplers */
bool compare = (emit->key.tex[unit].compare_mode ==
PIPE_TEX_COMPARE_R_TO_TEXTURE);
PIPE_TEX_COMPARE_R_TO_TEXTURE);
/* texture swizzle */
bool swizzle = (emit->key.tex[unit].swizzle_r != PIPE_SWIZZLE_X ||
emit->key.tex[unit].swizzle_g != PIPE_SWIZZLE_Y ||
emit->key.tex[unit].swizzle_b != PIPE_SWIZZLE_Z ||
emit->key.tex[unit].swizzle_a != PIPE_SWIZZLE_W);
emit->key.tex[unit].swizzle_g != PIPE_SWIZZLE_Y ||
emit->key.tex[unit].swizzle_b != PIPE_SWIZZLE_Z ||
emit->key.tex[unit].swizzle_a != PIPE_SWIZZLE_W);
bool saturate = insn->Instruction.Saturate;

View file

@ -10361,7 +10361,7 @@ emit_load_instruction(struct svga_shader_emitter_v10 *emit,
*/
static bool
emit_load(struct svga_shader_emitter_v10 *emit,
const struct tgsi_full_instruction *inst)
const struct tgsi_full_instruction *inst)
{
enum tgsi_file_type resourceType = inst->Src[0].Register.File;
unsigned resourceIndex = inst->Src[0].Register.Index;
@ -10850,7 +10850,7 @@ emit_memory_barrier(struct svga_shader_emitter_v10 *emit,
*/
static bool
emit_resq(struct svga_shader_emitter_v10 *emit,
const struct tgsi_full_instruction *inst)
const struct tgsi_full_instruction *inst)
{
struct tgsi_full_src_register zero =
make_immediate_reg_int(emit, 0);

View file

@ -753,10 +753,10 @@ virgl_is_format_supported( struct pipe_screen *screen,
const struct util_format_description *format_desc;
int i;
union virgl_caps *caps = &vscreen->caps.caps;
union virgl_caps *caps = &vscreen->caps.caps;
bool may_emulate_bgra = (caps->v2.capability_bits &
VIRGL_CAP_APP_TWEAK_SUPPORT) &&
vscreen->tweak_gles_emulate_bgra;
VIRGL_CAP_APP_TWEAK_SUPPORT) &&
vscreen->tweak_gles_emulate_bgra;
if (MAX2(1, sample_count) != MAX2(1, storage_sample_count))
return false;

View file

@ -82,7 +82,7 @@ struct virgl_winsys {
void *(*resource_map)(struct virgl_winsys *vws, struct virgl_hw_res *res);
void (*resource_wait)(struct virgl_winsys *vws, struct virgl_hw_res *res);
bool (*resource_is_busy)(struct virgl_winsys *vws,
struct virgl_hw_res *res);
struct virgl_hw_res *res);
struct virgl_hw_res *(*resource_create_from_handle)(struct virgl_winsys *vws,
struct winsys_handle *whandle,
@ -101,9 +101,9 @@ struct virgl_winsys {
const uint32_t *plane_offsets);
bool (*resource_get_handle)(struct virgl_winsys *vws,
struct virgl_hw_res *res,
uint32_t stride,
struct winsys_handle *whandle);
struct virgl_hw_res *res,
uint32_t stride,
struct winsys_handle *whandle);
uint32_t (*resource_get_storage_size)(struct virgl_winsys* vws,
struct virgl_hw_res* res);
@ -116,8 +116,8 @@ struct virgl_winsys {
struct pipe_fence_handle **fence);
bool (*res_is_referenced)(struct virgl_winsys *vws,
struct virgl_cmd_buf *buf,
struct virgl_hw_res *res);
struct virgl_cmd_buf *buf,
struct virgl_hw_res *res);
int (*get_caps)(struct virgl_winsys *vws, struct virgl_drm_caps *caps);

View file

@ -218,8 +218,8 @@ struct Shader_xlate {
struct {
bool declared;
uint writemask;
uint siv_name;
uint writemask;
uint siv_name;
bool overloaded;
struct ureg_src reg;
} inputs[SHADER_MAX_INPUTS];

View file

@ -399,7 +399,7 @@ static GLuint
choose_pixel_format(XMesaVisual v)
{
bool native_byte_order = (host_byte_order() ==
ImageByteOrder(v->display));
ImageByteOrder(v->display));
if ( GET_REDMASK(v) == 0x0000ff
&& GET_GREENMASK(v) == 0x00ff00

View file

@ -6,7 +6,7 @@
#include "vertexdeclaration9.h"
bool nine_ff_init(struct NineDevice9 *);
void nine_ff_fini(struct NineDevice9 *);
void nine_ff_fini(struct NineDevice9 *);
void nine_ff_update(struct NineDevice9 *);

View file

@ -104,7 +104,7 @@ static void virgl_hw_res_destroy(struct virgl_drm_winsys *qdws,
}
static bool virgl_drm_resource_is_busy(struct virgl_winsys *vws,
struct virgl_hw_res *res)
struct virgl_hw_res *res)
{
struct virgl_drm_winsys *vdws = virgl_drm_winsys(vws);
struct drm_virtgpu_3d_wait waitcmd;
@ -629,9 +629,9 @@ virgl_drm_winsys_resource_set_type(struct virgl_winsys *qws,
}
static bool virgl_drm_winsys_resource_get_handle(struct virgl_winsys *qws,
struct virgl_hw_res *res,
uint32_t stride,
struct winsys_handle *whandle)
struct virgl_hw_res *res,
uint32_t stride,
struct winsys_handle *whandle)
{
struct virgl_drm_winsys *qdws = virgl_drm_winsys(qws);
struct drm_gem_flink flink;
@ -747,7 +747,7 @@ static void virgl_drm_free_res_list(struct virgl_drm_cmd_buf *cbuf)
}
static bool virgl_drm_lookup_res(struct virgl_drm_cmd_buf *cbuf,
struct virgl_hw_res *res)
struct virgl_hw_res *res)
{
unsigned hash = res->res_handle & (sizeof(cbuf->is_handle_added)-1);
int i;
@ -839,8 +839,8 @@ static void virgl_drm_emit_res(struct virgl_winsys *qws,
}
static bool virgl_drm_res_is_ref(struct virgl_winsys *qws,
struct virgl_cmd_buf *_cbuf,
struct virgl_hw_res *res)
struct virgl_cmd_buf *_cbuf,
struct virgl_hw_res *res)
{
if (!p_atomic_read(&res->num_cs_references))
return FALSE;

View file

@ -188,7 +188,7 @@ static void virgl_hw_res_destroy(struct virgl_vtest_winsys *vtws,
}
static bool virgl_vtest_resource_is_busy(struct virgl_winsys *vws,
struct virgl_hw_res *res)
struct virgl_hw_res *res)
{
struct virgl_vtest_winsys *vtws = virgl_vtest_winsys(vws);
@ -415,7 +415,7 @@ alloc:
}
static bool virgl_vtest_lookup_res(struct virgl_vtest_cmd_buf *cbuf,
struct virgl_hw_res *res)
struct virgl_hw_res *res)
{
unsigned hash = res->res_handle & (sizeof(cbuf->is_handle_added)-1);
int i;
@ -568,8 +568,8 @@ static void virgl_vtest_emit_res(struct virgl_winsys *vws,
}
static bool virgl_vtest_res_is_ref(struct virgl_winsys *vws,
struct virgl_cmd_buf *_cbuf,
struct virgl_hw_res *res)
struct virgl_cmd_buf *_cbuf,
struct virgl_hw_res *res)
{
if (!p_atomic_read(&res->num_cs_references))
return FALSE;

View file

@ -738,7 +738,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
GLfloat x0, y0, x1, y1;
ASSERTED GLsizei maxSize;
bool normalized = sv[0]->texture->target == PIPE_TEXTURE_2D ||
(sv[0]->texture->target == PIPE_TEXTURE_RECT && st->lower_rect_tex);
(sv[0]->texture->target == PIPE_TEXTURE_RECT && st->lower_rect_tex);
unsigned cso_state_mask;
assert(sv[0]->texture->target == st->internal_target);