From 7b45a0bd666f54c3b5497ea0db19b5ed2db7dd02 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Fri, 23 Jun 2023 00:24:20 +0800 Subject: [PATCH] treewide: replace usage of boolean to bool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yonggang Luo Acked-by: David Heidelberg Acked-by: Marek Olšák Acked-by: Erik Faye-Lund Part-of: --- src/freedreno/fdl/fd6_format_table.c | 2 +- src/gallium/auxiliary/cso_cache/cso_context.c | 18 +- src/gallium/auxiliary/cso_cache/cso_context.h | 4 +- .../auxiliary/draw/draw_cliptest_tmp.h | 2 +- src/gallium/auxiliary/draw/draw_context.c | 26 +- src/gallium/auxiliary/draw/draw_context.h | 30 +- src/gallium/auxiliary/draw/draw_gs.c | 8 +- src/gallium/auxiliary/draw/draw_gs_tmp.h | 4 +- src/gallium/auxiliary/draw/draw_llvm.c | 50 +-- src/gallium/auxiliary/draw/draw_llvm.h | 6 +- .../auxiliary/draw/draw_mesh_prim_tmp.h | 2 +- src/gallium/auxiliary/draw/draw_pipe.c | 2 +- src/gallium/auxiliary/draw/draw_pipe.h | 2 +- src/gallium/auxiliary/draw/draw_pipe_aaline.c | 8 +- .../auxiliary/draw/draw_pipe_aapoint.c | 8 +- src/gallium/auxiliary/draw/draw_pipe_clip.c | 24 +- src/gallium/auxiliary/draw/draw_pipe_offset.c | 4 +- .../auxiliary/draw/draw_pipe_pstipple.c | 6 +- .../auxiliary/draw/draw_pipe_unfilled.c | 4 +- .../auxiliary/draw/draw_pipe_user_cull.c | 14 +- src/gallium/auxiliary/draw/draw_pipe_util.c | 2 +- .../auxiliary/draw/draw_pipe_validate.c | 8 +- .../auxiliary/draw/draw_pipe_wide_line.c | 2 +- .../auxiliary/draw/draw_pipe_wide_point.c | 2 +- .../auxiliary/draw/draw_prim_assembler.c | 6 +- .../auxiliary/draw/draw_prim_assembler.h | 2 +- .../auxiliary/draw/draw_prim_assembler_tmp.h | 2 +- src/gallium/auxiliary/draw/draw_private.h | 60 ++-- src/gallium/auxiliary/draw/draw_pt.c | 4 +- src/gallium/auxiliary/draw/draw_pt.h | 20 +- .../auxiliary/draw/draw_pt_decompose.h | 4 +- .../auxiliary/draw/draw_pt_fetch_shade_emit.c | 2 +- .../draw/draw_pt_fetch_shade_pipeline.c | 4 +- .../draw/draw_pt_fetch_shade_pipeline_llvm.c | 6 +- src/gallium/auxiliary/draw/draw_pt_post_vs.c | 18 +- src/gallium/auxiliary/draw/draw_pt_so_emit.c | 12 +- src/gallium/auxiliary/draw/draw_so_emit_tmp.h | 4 +- src/gallium/auxiliary/draw/draw_tess.c | 4 +- src/gallium/auxiliary/draw/draw_vbuf.h | 4 +- src/gallium/auxiliary/draw/draw_vs.c | 2 +- src/gallium/auxiliary/draw/draw_vs_exec.c | 2 +- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 10 +- src/gallium/auxiliary/gallivm/lp_bld_arit.h | 6 +- .../auxiliary/gallivm/lp_bld_debug.cpp | 4 +- src/gallium/auxiliary/gallivm/lp_bld_debug.h | 2 +- src/gallium/auxiliary/gallivm/lp_bld_format.h | 8 +- .../auxiliary/gallivm/lp_bld_format_aos.c | 10 +- .../gallivm/lp_bld_format_aos_array.c | 2 +- .../auxiliary/gallivm/lp_bld_format_float.c | 8 +- .../auxiliary/gallivm/lp_bld_format_s3tc.c | 6 +- .../auxiliary/gallivm/lp_bld_format_soa.c | 8 +- src/gallium/auxiliary/gallivm/lp_bld_gather.c | 18 +- src/gallium/auxiliary/gallivm/lp_bld_gather.h | 8 +- src/gallium/auxiliary/gallivm/lp_bld_init.c | 10 +- src/gallium/auxiliary/gallivm/lp_bld_init.h | 2 +- .../auxiliary/gallivm/lp_bld_ir_common.c | 14 +- .../auxiliary/gallivm/lp_bld_ir_common.h | 8 +- .../auxiliary/gallivm/lp_bld_jit_types.c | 6 +- src/gallium/auxiliary/gallivm/lp_bld_logic.c | 2 +- src/gallium/auxiliary/gallivm/lp_bld_pack.c | 6 +- src/gallium/auxiliary/gallivm/lp_bld_pack.h | 2 +- src/gallium/auxiliary/gallivm/lp_bld_sample.c | 16 +- src/gallium/auxiliary/gallivm/lp_bld_sample.h | 22 +- .../auxiliary/gallivm/lp_bld_sample_aos.c | 4 +- .../auxiliary/gallivm/lp_bld_sample_soa.c | 50 +-- src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 4 +- src/gallium/auxiliary/gallivm/lp_bld_tgsi.h | 48 +-- .../auxiliary/gallivm/lp_bld_tgsi_aos.c | 2 +- .../auxiliary/gallivm/lp_bld_tgsi_info.c | 10 +- .../auxiliary/gallivm/lp_bld_tgsi_soa.c | 16 +- src/gallium/auxiliary/gallivm/lp_bld_type.c | 6 +- src/gallium/auxiliary/gallivm/lp_bld_type.h | 6 +- src/gallium/auxiliary/hud/font.c | 4 +- src/gallium/auxiliary/hud/font.h | 2 +- src/gallium/auxiliary/hud/hud_cpu.c | 6 +- src/gallium/auxiliary/hud/hud_driver_query.c | 8 +- src/gallium/auxiliary/hud/hud_fps.c | 2 +- src/gallium/auxiliary/hud/hud_nic.c | 2 +- src/gallium/auxiliary/hud/hud_private.h | 6 +- .../auxiliary/pipe-loader/pipe_loader.h | 2 +- .../auxiliary/pipe-loader/pipe_loader_sw.c | 2 +- src/gallium/auxiliary/pipebuffer/pb_buffer.h | 4 +- .../auxiliary/pipebuffer/pb_buffer_fenced.c | 22 +- src/gallium/auxiliary/pipebuffer/pb_bufmgr.h | 2 +- .../auxiliary/pipebuffer/pb_bufmgr_debug.c | 6 +- .../auxiliary/pipebuffer/pb_validate.c | 2 +- .../auxiliary/pipebuffer/pb_validate.h | 2 +- src/gallium/auxiliary/renderonly/renderonly.c | 2 +- src/gallium/auxiliary/renderonly/renderonly.h | 2 +- src/gallium/auxiliary/tgsi/tgsi_dump.c | 16 +- .../auxiliary/tgsi/tgsi_dynamic_indexing.c | 4 +- src/gallium/auxiliary/tgsi/tgsi_exec.c | 6 +- src/gallium/auxiliary/tgsi/tgsi_exec.h | 2 +- src/gallium/auxiliary/tgsi/tgsi_info.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_iterate.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_iterate.h | 14 +- src/gallium/auxiliary/tgsi/tgsi_parse.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_parse.h | 2 +- src/gallium/auxiliary/tgsi/tgsi_sanity.c | 34 +- src/gallium/auxiliary/tgsi/tgsi_sanity.h | 2 +- src/gallium/auxiliary/tgsi/tgsi_scan.h | 98 +++--- src/gallium/auxiliary/tgsi/tgsi_text.c | 94 +++--- src/gallium/auxiliary/tgsi/tgsi_text.h | 2 +- src/gallium/auxiliary/tgsi/tgsi_transform.c | 4 +- src/gallium/auxiliary/tgsi/tgsi_transform.h | 2 +- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 36 +- src/gallium/auxiliary/tgsi/tgsi_ureg.h | 16 +- src/gallium/auxiliary/translate/translate.c | 2 +- src/gallium/auxiliary/translate/translate.h | 4 +- .../auxiliary/translate/translate_generic.c | 4 +- .../auxiliary/translate/translate_sse.c | 16 +- src/gallium/auxiliary/util/u_bitmask.c | 4 +- src/gallium/auxiliary/util/u_bitmask.h | 2 +- src/gallium/auxiliary/util/u_blitter.h | 4 +- src/gallium/auxiliary/util/u_box.h | 6 +- src/gallium/auxiliary/util/u_debug_flush.c | 18 +- src/gallium/auxiliary/util/u_debug_flush.h | 4 +- src/gallium/auxiliary/util/u_dual_blend.h | 4 +- src/gallium/auxiliary/util/u_dump.h | 24 +- src/gallium/auxiliary/util/u_dump_defines.c | 4 +- src/gallium/auxiliary/util/u_framebuffer.c | 4 +- src/gallium/auxiliary/util/u_framebuffer.h | 4 +- src/gallium/auxiliary/util/u_gen_mipmap.c | 6 +- src/gallium/auxiliary/util/u_gen_mipmap.h | 2 +- src/gallium/auxiliary/util/u_inlines.h | 10 +- src/gallium/auxiliary/util/u_prim.h | 4 +- src/gallium/auxiliary/util/u_prim_restart.c | 2 +- src/gallium/auxiliary/util/u_range.h | 2 +- src/gallium/auxiliary/util/u_rect.h | 2 +- src/gallium/auxiliary/util/u_resource.h | 2 +- src/gallium/auxiliary/util/u_screen.c | 2 +- src/gallium/auxiliary/util/u_simple_shaders.c | 2 +- src/gallium/auxiliary/util/u_simple_shaders.h | 2 +- src/gallium/auxiliary/util/u_split_prim.h | 4 +- src/gallium/auxiliary/util/u_suballoc.c | 2 +- src/gallium/auxiliary/util/u_suballoc.h | 4 +- src/gallium/auxiliary/util/u_surface.c | 4 +- src/gallium/auxiliary/util/u_texture.c | 2 +- src/gallium/auxiliary/util/u_texture.h | 2 +- src/gallium/auxiliary/util/u_tile.h | 2 +- src/gallium/auxiliary/util/u_upload_mgr.c | 4 +- src/gallium/auxiliary/util/u_vbuf.c | 18 +- src/gallium/drivers/d3d12/d3d12_bufmgr.cpp | 2 +- .../drivers/freedreno/a3xx/fd3_format.c | 2 +- .../drivers/freedreno/a4xx/fd4_format.c | 2 +- .../drivers/freedreno/a5xx/fd5_format.c | 2 +- .../drivers/freedreno/freedreno_screen.h | 16 +- .../drivers/freedreno/freedreno_state.c | 4 +- src/gallium/drivers/i915/i915_prim_vbuf.c | 2 +- src/gallium/drivers/llvmpipe/lp_bld_alpha.c | 2 +- src/gallium/drivers/llvmpipe/lp_bld_alpha.h | 2 +- src/gallium/drivers/llvmpipe/lp_bld_blend.c | 16 +- src/gallium/drivers/llvmpipe/lp_bld_blend.h | 10 +- .../drivers/llvmpipe/lp_bld_blend_aos.c | 8 +- src/gallium/drivers/llvmpipe/lp_bld_depth.c | 12 +- src/gallium/drivers/llvmpipe/lp_bld_depth.h | 6 +- src/gallium/drivers/llvmpipe/lp_bld_interp.c | 2 +- src/gallium/drivers/llvmpipe/lp_bld_interp.h | 4 +- src/gallium/drivers/llvmpipe/lp_context.h | 8 +- src/gallium/drivers/llvmpipe/lp_fence.c | 6 +- src/gallium/drivers/llvmpipe/lp_fence.h | 8 +- src/gallium/drivers/llvmpipe/lp_flush.c | 8 +- src/gallium/drivers/llvmpipe/lp_flush.h | 8 +- src/gallium/drivers/llvmpipe/lp_jit.c | 2 +- src/gallium/drivers/llvmpipe/lp_jit.h | 4 +- src/gallium/drivers/llvmpipe/lp_linear.c | 6 +- .../drivers/llvmpipe/lp_linear_fastpath.c | 10 +- .../drivers/llvmpipe/lp_linear_interp.c | 8 +- src/gallium/drivers/llvmpipe/lp_linear_priv.h | 20 +- .../drivers/llvmpipe/lp_linear_sampler.c | 16 +- src/gallium/drivers/llvmpipe/lp_query.c | 2 +- src/gallium/drivers/llvmpipe/lp_query.h | 2 +- src/gallium/drivers/llvmpipe/lp_rast.c | 4 +- src/gallium/drivers/llvmpipe/lp_rast_debug.c | 18 +- src/gallium/drivers/llvmpipe/lp_rast_priv.h | 4 +- src/gallium/drivers/llvmpipe/lp_scene.c | 14 +- src/gallium/drivers/llvmpipe/lp_scene.h | 24 +- src/gallium/drivers/llvmpipe/lp_scene_queue.c | 2 +- src/gallium/drivers/llvmpipe/lp_scene_queue.h | 2 +- src/gallium/drivers/llvmpipe/lp_setup.c | 36 +- src/gallium/drivers/llvmpipe/lp_setup.h | 4 +- .../drivers/llvmpipe/lp_setup_analysis.c | 12 +- .../drivers/llvmpipe/lp_setup_context.h | 36 +- src/gallium/drivers/llvmpipe/lp_setup_line.c | 10 +- src/gallium/drivers/llvmpipe/lp_setup_point.c | 10 +- src/gallium/drivers/llvmpipe/lp_setup_rect.c | 30 +- src/gallium/drivers/llvmpipe/lp_setup_tri.c | 22 +- src/gallium/drivers/llvmpipe/lp_setup_vbuf.c | 6 +- src/gallium/drivers/llvmpipe/lp_state.h | 6 +- src/gallium/drivers/llvmpipe/lp_state_cs.c | 8 +- .../drivers/llvmpipe/lp_state_derived.c | 2 +- src/gallium/drivers/llvmpipe/lp_state_fs.c | 38 +-- .../drivers/llvmpipe/lp_state_fs_analysis.c | 4 +- .../drivers/llvmpipe/lp_state_fs_linear.c | 20 +- .../drivers/llvmpipe/lp_state_rasterizer.c | 2 +- src/gallium/drivers/llvmpipe/lp_state_setup.h | 2 +- src/gallium/drivers/llvmpipe/lp_state_so.c | 2 +- .../drivers/llvmpipe/lp_state_surface.c | 2 +- src/gallium/drivers/llvmpipe/lp_surface.c | 2 +- src/gallium/drivers/llvmpipe/lp_test.h | 10 +- src/gallium/drivers/llvmpipe/lp_test_arit.c | 14 +- src/gallium/drivers/llvmpipe/lp_test_blend.c | 16 +- src/gallium/drivers/llvmpipe/lp_test_conv.c | 18 +- src/gallium/drivers/llvmpipe/lp_test_format.c | 30 +- src/gallium/drivers/llvmpipe/lp_test_main.c | 8 +- src/gallium/drivers/llvmpipe/lp_test_printf.c | 12 +- src/gallium/drivers/llvmpipe/lp_texture.c | 12 +- src/gallium/drivers/llvmpipe/lp_texture.h | 4 +- src/gallium/drivers/nouveau/nv30/nv30_draw.c | 2 +- src/gallium/drivers/r300/r300_blit.c | 10 +- src/gallium/drivers/r300/r300_chipset.h | 16 +- src/gallium/drivers/r300/r300_context.c | 8 +- src/gallium/drivers/r300/r300_context.h | 64 ++-- src/gallium/drivers/r300/r300_emit.c | 14 +- src/gallium/drivers/r300/r300_emit.h | 8 +- src/gallium/drivers/r300/r300_fs.c | 2 +- src/gallium/drivers/r300/r300_fs.h | 10 +- src/gallium/drivers/r300/r300_hyperz.c | 8 +- src/gallium/drivers/r300/r300_render.c | 36 +- .../drivers/r300/r300_render_stencilref.c | 2 +- src/gallium/drivers/r300/r300_screen.c | 20 +- src/gallium/drivers/r300/r300_screen.h | 2 +- src/gallium/drivers/r300/r300_state.c | 42 +-- src/gallium/drivers/r300/r300_state_derived.c | 12 +- src/gallium/drivers/r300/r300_state_inlines.h | 4 +- src/gallium/drivers/r300/r300_texture.c | 18 +- src/gallium/drivers/r300/r300_texture.h | 12 +- src/gallium/drivers/r300/r300_texture_desc.c | 26 +- src/gallium/drivers/r300/r300_texture_desc.h | 2 +- src/gallium/drivers/r300/r300_tgsi_to_rc.h | 2 +- src/gallium/drivers/r300/r300_transfer.c | 2 +- src/gallium/drivers/r300/r300_vs.c | 2 +- src/gallium/drivers/r300/r300_vs.h | 4 +- src/gallium/drivers/r300/r300_vs_draw.c | 10 +- src/gallium/drivers/r600/evergreen_compute.c | 8 +- src/gallium/drivers/r600/evergreen_state.c | 4 +- src/gallium/drivers/r600/r600_asm.c | 4 +- src/gallium/drivers/r600/r600_asm.h | 4 +- src/gallium/drivers/r600/r600_hw_context.c | 2 +- src/gallium/drivers/r600/r600_pipe.h | 22 +- src/gallium/drivers/r600/r600_shader.c | 4 +- src/gallium/drivers/r600/r600_shader.h | 40 +-- src/gallium/drivers/r600/r600_state.c | 4 +- src/gallium/drivers/r600/r600_state_common.c | 4 +- src/gallium/drivers/softpipe/sp_context.h | 2 +- src/gallium/drivers/softpipe/sp_flush.c | 8 +- src/gallium/drivers/softpipe/sp_flush.h | 8 +- src/gallium/drivers/softpipe/sp_prim_vbuf.c | 6 +- src/gallium/drivers/softpipe/sp_quad_blend.c | 8 +- .../drivers/softpipe/sp_quad_depth_test.c | 26 +- src/gallium/drivers/softpipe/sp_quad_fs.c | 2 +- src/gallium/drivers/softpipe/sp_quad_pipe.c | 2 +- src/gallium/drivers/softpipe/sp_query.c | 4 +- src/gallium/drivers/softpipe/sp_query.h | 2 +- src/gallium/drivers/softpipe/sp_screen.h | 2 +- src/gallium/drivers/softpipe/sp_setup.c | 10 +- src/gallium/drivers/softpipe/sp_tex_sample.h | 10 +- .../drivers/softpipe/sp_tex_tile_cache.c | 2 +- src/gallium/drivers/softpipe/sp_texture.c | 10 +- src/gallium/drivers/softpipe/sp_texture.h | 4 +- src/gallium/drivers/softpipe/sp_tile_cache.h | 2 +- src/gallium/drivers/svga/svga_context.h | 74 ++-- src/gallium/drivers/svga/svga_draw.c | 12 +- src/gallium/drivers/svga/svga_draw.h | 4 +- src/gallium/drivers/svga/svga_draw_arrays.c | 2 +- src/gallium/drivers/svga/svga_draw_private.h | 2 +- src/gallium/drivers/svga/svga_format.c | 8 +- src/gallium/drivers/svga/svga_format.h | 6 +- src/gallium/drivers/svga/svga_pipe_blit.c | 4 +- src/gallium/drivers/svga/svga_pipe_clear.c | 6 +- src/gallium/drivers/svga/svga_pipe_draw.c | 4 +- src/gallium/drivers/svga/svga_pipe_query.c | 6 +- .../drivers/svga/svga_pipe_rasterizer.c | 6 +- src/gallium/drivers/svga/svga_pipe_sampler.c | 10 +- .../drivers/svga/svga_pipe_streamout.c | 2 +- src/gallium/drivers/svga/svga_pipe_vertex.c | 2 +- .../drivers/svga/svga_resource_buffer.c | 8 +- .../drivers/svga/svga_resource_buffer.h | 22 +- .../svga/svga_resource_buffer_upload.c | 6 +- .../drivers/svga/svga_resource_texture.c | 24 +- .../drivers/svga/svga_resource_texture.h | 22 +- src/gallium/drivers/svga/svga_sampler_view.c | 2 +- src/gallium/drivers/svga/svga_sampler_view.h | 4 +- src/gallium/drivers/svga/svga_screen.c | 6 +- src/gallium/drivers/svga/svga_screen.h | 6 +- src/gallium/drivers/svga/svga_screen_cache.c | 8 +- src/gallium/drivers/svga/svga_screen_cache.h | 4 +- src/gallium/drivers/svga/svga_shader.c | 2 +- src/gallium/drivers/svga/svga_shader.h | 44 +-- src/gallium/drivers/svga/svga_state.c | 4 +- .../drivers/svga/svga_state_framebuffer.c | 6 +- src/gallium/drivers/svga/svga_state_fs.c | 2 +- .../drivers/svga/svga_state_need_swtnl.c | 4 +- src/gallium/drivers/svga/svga_state_sampler.c | 10 +- .../drivers/svga/svga_state_tgsi_transform.c | 6 +- src/gallium/drivers/svga/svga_state_tss.c | 4 +- src/gallium/drivers/svga/svga_state_uav.c | 6 +- src/gallium/drivers/svga/svga_surface.c | 16 +- src/gallium/drivers/svga/svga_surface.h | 8 +- src/gallium/drivers/svga/svga_swtnl.h | 2 +- src/gallium/drivers/svga/svga_swtnl_backend.c | 12 +- src/gallium/drivers/svga/svga_swtnl_draw.c | 4 +- src/gallium/drivers/svga/svga_tgsi.c | 12 +- src/gallium/drivers/svga/svga_tgsi.h | 2 +- .../drivers/svga/svga_tgsi_decl_sm30.c | 26 +- src/gallium/drivers/svga/svga_tgsi_emit.h | 30 +- src/gallium/drivers/svga/svga_tgsi_insn.c | 198 +++++------ src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 318 +++++++++--------- src/gallium/drivers/svga/svga_winsys.h | 46 +-- .../drivers/svga/svgadump/svga_shader_dump.c | 8 +- src/gallium/drivers/virgl/virgl_context.h | 2 +- src/gallium/drivers/virgl/virgl_encode.c | 6 +- src/gallium/drivers/virgl/virgl_encode.h | 6 +- src/gallium/drivers/virgl/virgl_screen.c | 2 +- src/gallium/drivers/virgl/virgl_winsys.h | 8 +- src/gallium/drivers/zink/zink_resource.c | 2 +- src/gallium/frontends/d3d10umd/Draw.cpp | 2 +- src/gallium/frontends/d3d10umd/Query.cpp | 6 +- src/gallium/frontends/d3d10umd/Shader.cpp | 2 +- src/gallium/frontends/d3d10umd/ShaderParse.c | 6 +- src/gallium/frontends/d3d10umd/ShaderParse.h | 4 +- src/gallium/frontends/d3d10umd/ShaderTGSI.c | 12 +- src/gallium/frontends/d3d10umd/State.h | 2 +- src/gallium/frontends/glx/xlib/glx_api.c | 4 +- src/gallium/frontends/glx/xlib/xm_api.c | 2 +- src/gallium/frontends/hgl/hgl.c | 2 +- src/gallium/frontends/nine/adapter9.c | 12 +- src/gallium/frontends/nine/basetexture9.h | 8 +- src/gallium/frontends/nine/buffer9.h | 6 +- src/gallium/frontends/nine/device9.c | 10 +- src/gallium/frontends/nine/device9.h | 44 +-- src/gallium/frontends/nine/guid.c | 2 +- src/gallium/frontends/nine/guid.h | 2 +- src/gallium/frontends/nine/iunknown.h | 2 +- src/gallium/frontends/nine/nine_debug.c | 2 +- src/gallium/frontends/nine/nine_debug.h | 2 +- src/gallium/frontends/nine/nine_ff.c | 16 +- src/gallium/frontends/nine/nine_ff.h | 2 +- src/gallium/frontends/nine/nine_pdata.h | 2 +- src/gallium/frontends/nine/nine_pipe.h | 16 +- src/gallium/frontends/nine/nine_quirk.c | 4 +- src/gallium/frontends/nine/nine_quirk.h | 2 +- src/gallium/frontends/nine/nine_shader.c | 52 +-- src/gallium/frontends/nine/nine_shader.h | 28 +- src/gallium/frontends/nine/nine_state.c | 18 +- src/gallium/frontends/nine/nine_state.h | 16 +- src/gallium/frontends/nine/pixelshader9.h | 4 +- src/gallium/frontends/nine/query9.c | 2 +- src/gallium/frontends/nine/query9.h | 2 +- src/gallium/frontends/nine/stateblock9.c | 8 +- src/gallium/frontends/nine/surface9.h | 2 +- .../frontends/nine/vertexdeclaration9.c | 2 +- src/gallium/frontends/nine/vertexshader9.h | 10 +- src/gallium/frontends/osmesa/osmesa.c | 4 +- src/gallium/frontends/vdpau/ftab.c | 2 +- src/gallium/frontends/vdpau/htab.c | 4 +- src/gallium/frontends/vdpau/vdpau_private.h | 4 +- src/gallium/frontends/wgl/stw_device.c | 6 +- src/gallium/frontends/wgl/stw_device.h | 2 +- src/gallium/frontends/wgl/stw_ext_pbuffer.c | 2 +- .../frontends/wgl/stw_ext_pixelformat.c | 4 +- .../frontends/wgl/stw_ext_rendertexture.c | 2 +- src/gallium/frontends/wgl/stw_framebuffer.c | 2 +- src/gallium/frontends/wgl/stw_framebuffer.h | 6 +- src/gallium/frontends/wgl/stw_pixelformat.c | 10 +- src/gallium/frontends/wgl/stw_pixelformat.h | 4 +- src/gallium/frontends/wgl/stw_tls.c | 4 +- src/gallium/frontends/wgl/stw_tls.h | 4 +- src/gallium/frontends/wgl/stw_winsys.h | 8 +- src/gallium/frontends/xa/xa_composite.c | 16 +- src/gallium/frontends/xa/xa_context.c | 2 +- src/gallium/frontends/xa/xa_renderer.c | 2 +- src/gallium/frontends/xa/xa_tgsi.c | 20 +- src/gallium/frontends/xa/xa_tracker.c | 2 +- src/gallium/targets/wgl/wgl.c | 8 +- src/gallium/tests/unit/translate_test.c | 2 +- .../d3d12/wgl/d3d12_wgl_framebuffer.cpp | 2 +- .../d3d12/wgl/d3d12_wgl_framebuffer_xbox.cpp | 2 +- .../winsys/svga/drm/pb_buffer_simple_fenced.c | 20 +- src/gallium/winsys/svga/drm/vmw_buffer.c | 2 +- src/gallium/winsys/svga/drm/vmw_buffer.h | 2 +- src/gallium/winsys/svga/drm/vmw_context.c | 12 +- src/gallium/winsys/svga/drm/vmw_fence.c | 6 +- src/gallium/winsys/svga/drm/vmw_screen.h | 46 +-- src/gallium/winsys/svga/drm/vmw_screen_dri.c | 6 +- .../winsys/svga/drm/vmw_screen_ioctl.c | 28 +- .../winsys/svga/drm/vmw_screen_pools.c | 6 +- src/gallium/winsys/svga/drm/vmw_screen_svga.c | 10 +- src/gallium/winsys/svga/drm/vmw_surface.c | 6 +- src/gallium/winsys/svga/drm/vmw_surface.h | 10 +- .../winsys/virgl/drm/virgl_drm_winsys.c | 16 +- .../winsys/virgl/vtest/virgl_vtest_winsys.c | 12 +- src/mesa/main/condrender.c | 2 +- src/mesa/main/fbobject.c | 2 +- src/mesa/main/mtypes.h | 6 +- src/mesa/main/queryobj.c | 4 +- src/mesa/main/renderbuffer.c | 2 +- src/mesa/state_tracker/st_atifs_to_nir.c | 2 +- src/mesa/state_tracker/st_cb_drawpixels.c | 2 +- src/mesa/state_tracker/st_cb_readpixels.c | 2 +- src/mesa/state_tracker/st_cb_texture.c | 10 +- src/mesa/state_tracker/st_context.h | 102 +++--- src/mesa/state_tracker/st_format.c | 2 +- src/mesa/state_tracker/st_interop.c | 2 +- src/mesa/state_tracker/st_manager.c | 2 +- src/mesa/state_tracker/st_program.h | 2 +- src/mesa/state_tracker/st_sampler_view.c | 2 +- src/util/u_debug_refcnt.c | 6 +- 408 files changed, 2166 insertions(+), 2166 deletions(-) diff --git a/src/freedreno/fdl/fd6_format_table.c b/src/freedreno/fdl/fd6_format_table.c index 60502441820..ec6ac8ebb29 100644 --- a/src/freedreno/fdl/fd6_format_table.c +++ b/src/freedreno/fdl/fd6_format_table.c @@ -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) \ diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 751186ac442..9702ab6a0d1 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -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; diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h index b636474ae67..3791984a84c 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.h +++ b/src/gallium/auxiliary/cso_cache/cso_context.h @@ -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 */ diff --git a/src/gallium/auxiliary/draw/draw_cliptest_tmp.h b/src/gallium/auxiliary/draw/draw_cliptest_tmp.h index 229ef38c881..a2d58f2c7d2 100644 --- a/src/gallium/auxiliary/draw/draw_cliptest_tmp.h +++ b/src/gallium/auxiliary/draw/draw_cliptest_tmp.h @@ -28,7 +28,7 @@ #include "util/u_bitcast.h" #include -static boolean +static bool TAG(do_cliptest)(struct pt_post_vs *pvs, struct draw_vertex_info *info, const struct draw_prim_info *prim_info) diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 652f91cc123..1df934c906c 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -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); diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h index 65acea1bd76..7e809ef1c26 100644 --- a/src/gallium/auxiliary/draw/draw_context.h +++ b/src/gallium/auxiliary/draw/draw_context.h @@ -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); diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index db508ed81ae..1957ae5ac28 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/src/gallium/auxiliary/draw/draw_gs.c @@ -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; diff --git a/src/gallium/auxiliary/draw/draw_gs_tmp.h b/src/gallium/auxiliary/draw/draw_gs_tmp.h index 9f27bf9d1c1..9e6e1d761e1 100644 --- a/src/gallium/auxiliary/draw/draw_gs_tmp.h +++ b/src/gallium/auxiliary/draw/draw_gs_tmp.h @@ -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: \ diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 02c58538cb8..16caa1c5670 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -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 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) { diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h index 6c6cf41f49c..2f66c807c55 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.h +++ b/src/gallium/auxiliary/draw/draw_llvm.h @@ -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 diff --git a/src/gallium/auxiliary/draw/draw_mesh_prim_tmp.h b/src/gallium/auxiliary/draw/draw_mesh_prim_tmp.h index 9dac5a62dc7..de3f509c742 100644 --- a/src/gallium/auxiliary/draw/draw_mesh_prim_tmp.h +++ b/src/gallium/auxiliary/draw/draw_mesh_prim_tmp.h @@ -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: \ diff --git a/src/gallium/auxiliary/draw/draw_pipe.c b/src/gallium/auxiliary/draw/draw_pipe.c index bbbae8461d3..ced23d8ec82 100644 --- a/src/gallium/auxiliary/draw/draw_pipe.c +++ b/src/gallium/auxiliary/draw/draw_pipe.c @@ -36,7 +36,7 @@ #include "util/u_math.h" -boolean +bool draw_pipeline_init(struct draw_context *draw) { /* create pipeline stages */ diff --git a/src/gallium/auxiliary/draw/draw_pipe.h b/src/gallium/auxiliary/draw/draw_pipe.h index b660ab66d1e..9ab6883dcc3 100644 --- a/src/gallium/auxiliary/draw/draw_pipe.h +++ b/src/gallium/auxiliary/draw/draw_pipe.h @@ -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); diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c index d01216b9a5d..c0f7c6e0e0b 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c @@ -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; diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c index 87f06449025..0c7be92e16f 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c @@ -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) diff --git a/src/gallium/auxiliary/draw/draw_pipe_clip.c b/src/gallium/auxiliary/draw/draw_pipe_clip.c index b2b72fb167a..107df628ad8 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_clip.c +++ b/src/gallium/auxiliary/draw/draw_pipe_clip.c @@ -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; } diff --git a/src/gallium/auxiliary/draw/draw_pipe_offset.c b/src/gallium/auxiliary/draw/draw_pipe_offset.c index 1600075d6c8..d1ad5ab67b3 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_offset.c +++ b/src/gallium/auxiliary/draw/draw_pipe_offset.c @@ -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; } diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c index e1cd59f4447..dec2a26e791 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c @@ -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) { diff --git a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c index e74b90672ab..4ebb5adea87 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c +++ b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c @@ -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; diff --git a/src/gallium/auxiliary/draw/draw_pipe_user_cull.c b/src/gallium/auxiliary/draw/draw_pipe_user_cull.c index 09b3a654482..0a1289edfbb 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_user_cull.c +++ b/src/gallium/auxiliary/draw/draw_pipe_user_cull.c @@ -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; } diff --git a/src/gallium/auxiliary/draw/draw_pipe_util.c b/src/gallium/auxiliary/draw/draw_pipe_util.c index 172e27070a2..01c4cbb623d 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_util.c +++ b/src/gallium/auxiliary/draw/draw_pipe_util.c @@ -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); diff --git a/src/gallium/auxiliary/draw/draw_pipe_validate.c b/src/gallium/auxiliary/draw/draw_pipe_validate.c index 32f7b635418..d0236b20241 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_validate.c +++ b/src/gallium/auxiliary/draw/draw_pipe_validate.c @@ -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 diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c index 0f6c97a5037..cfcbbecd4f1 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c +++ b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c @@ -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 */ diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c index 89ddec24069..6cf486d530e 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c +++ b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c @@ -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; diff --git a/src/gallium/auxiliary/draw/draw_prim_assembler.c b/src/gallium/auxiliary/draw/draw_prim_assembler.c index 7b4fd1ae8bd..2c48a4155f8 100644 --- a/src/gallium/auxiliary/draw/draw_prim_assembler.c +++ b/src/gallium/auxiliary/draw/draw_prim_assembler.c @@ -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) diff --git a/src/gallium/auxiliary/draw/draw_prim_assembler.h b/src/gallium/auxiliary/draw/draw_prim_assembler.h index e93d0234082..1290ff996da 100644 --- a/src/gallium/auxiliary/draw/draw_prim_assembler.h +++ b/src/gallium/auxiliary/draw/draw_prim_assembler.h @@ -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); diff --git a/src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h b/src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h index 4974a1232aa..2bfa4778c7a 100644 --- a/src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h +++ b/src/gallium/auxiliary/draw/draw_prim_assembler_tmp.h @@ -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"); \ diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index e92ed9bb85c..0ffe8c9d117 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -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); /* diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index 557524ade69..cf834d759ed 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -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(); diff --git a/src/gallium/auxiliary/draw/draw_pt.h b/src/gallium/auxiliary/draw/draw_pt.h index f03c5117655..591fc8c353a 100644 --- a/src/gallium/auxiliary/draw/draw_pt.h +++ b/src/gallium/auxiliary/draw/draw_pt.h @@ -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); diff --git a/src/gallium/auxiliary/draw/draw_pt_decompose.h b/src/gallium/auxiliary/draw/draw_pt_decompose.h index 0b2522c08f0..2508faf12c5 100644 --- a/src/gallium/auxiliary/draw/draw_pt_decompose.h +++ b/src/gallium/auxiliary/draw/draw_pt_decompose.h @@ -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" diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c index 9f20b8a640c..1f2ecf3af82 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c @@ -294,7 +294,7 @@ fail: } -static boolean +static bool fse_run_linear_elts(struct draw_pt_middle_end *middle, unsigned start, unsigned count, diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c index ffcbf6e1b22..60ac9f32ff0 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -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, diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c index af743060ea4..950fc4fe7eb 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c @@ -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, diff --git a/src/gallium/auxiliary/draw/draw_pt_post_vs.c b/src/gallium/auxiliary/draw/draw_pt_post_vs.c index a03336505c8..a6ba46fbc66 100644 --- a/src/gallium/auxiliary/draw/draw_pt_post_vs.c +++ b/src/gallium/auxiliary/draw/draw_pt_post_vs.c @@ -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; diff --git a/src/gallium/auxiliary/draw/draw_pt_so_emit.c b/src/gallium/auxiliary/draw/draw_pt_so_emit.c index 6353d78195e..3a58d8f5567 100644 --- a/src/gallium/auxiliary/draw/draw_pt_so_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_so_emit.c @@ -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) diff --git a/src/gallium/auxiliary/draw/draw_so_emit_tmp.h b/src/gallium/auxiliary/draw/draw_so_emit_tmp.h index 4fb341af146..b3a36605a19 100644 --- a/src/gallium/auxiliary/draw/draw_so_emit_tmp.h +++ b/src/gallium/auxiliary/draw/draw_so_emit_tmp.h @@ -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: \ diff --git a/src/gallium/auxiliary/draw/draw_tess.c b/src/gallium/auxiliary/draw/draw_tess.c index 15b2c141391..565867226d6 100644 --- a/src/gallium/auxiliary/draw/draw_tess.c +++ b/src/gallium/auxiliary/draw/draw_tess.c @@ -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; diff --git a/src/gallium/auxiliary/draw/draw_vbuf.h b/src/gallium/auxiliary/draw/draw_vbuf.h index 5df2887ed59..95e57cbae95 100644 --- a/src/gallium/auxiliary/draw/draw_vbuf.h +++ b/src/gallium/auxiliary/draw/draw_vbuf.h @@ -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); diff --git a/src/gallium/auxiliary/draw/draw_vs.c b/src/gallium/auxiliary/draw/draw_vs.c index 7524368ee02..7f42bf1c6e5 100644 --- a/src/gallium/auxiliary/draw/draw_vs.c +++ b/src/gallium/auxiliary/draw/draw_vs.c @@ -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(); diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c index 862c94ba314..b56283cde0b 100644 --- a/src/gallium/auxiliary/draw/draw_vs_exec.c +++ b/src/gallium/auxiliary/draw/draw_vs_exec.c @@ -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, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 511c57834b3..203e94f0b67 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -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 */ diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.h b/src/gallium/auxiliary/gallivm/lp_bld_arit.h index 488589e0ae5..df101830b02 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.h @@ -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); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index f78f04f042b..f70024b1620 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -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) { /* diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.h b/src/gallium/auxiliary/gallivm/lp_bld_debug.h index 291e6d5a731..2680456add2 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.h @@ -80,7 +80,7 @@ void lp_debug_dump_value(LLVMValueRef value); -boolean +bool lp_check_alignment(const void *ptr, unsigned alignment); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format.h b/src/gallium/auxiliary/gallivm/lp_bld_format.h index c4505b2fca4..4f0bb28a84a 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_format.h @@ -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, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c index 49aa549f837..6cd062de175 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c @@ -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, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c index 55b5bec53e5..4e4cf8f959f 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c @@ -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); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_float.c b/src/gallium/auxiliary/gallivm/lp_bld_format_float.c index 1924650ca40..b0d1e806757 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_float.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_float.c @@ -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; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c index 4ea40d14f8c..996fca4b250 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c @@ -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; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c index a22bf3e4e13..e6ddae8ab3d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c @@ -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); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_gather.c b/src/gallium/auxiliary/gallivm/lp_bld_gather.c index f55f2f3145e..361054c9dff 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_gather.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_gather.c @@ -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; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_gather.h b/src/gallium/auxiliary/gallivm/lp_bld_gather.h index 5fabed956ca..3cc0f98290d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_gather.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_gather.h @@ -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, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 9e0d6a5f643..bf53843bb76 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -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(); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.h b/src/gallium/auxiliary/gallivm/lp_bld_init.h index be41a34485b..ffed2a9a1bc 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.h @@ -71,7 +71,7 @@ struct gallivm_state unsigned lp_build_init_native_width(void); -boolean +bool lp_build_init(void); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c index 042cd5c814f..cac7f0d424c 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c @@ -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) { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.h b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.h index ebcf9a21b26..0e0a7f74f1b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.h @@ -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; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c index 9102c3f4bb8..cf4381febf7 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c @@ -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]; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_logic.c b/src/gallium/auxiliary/gallivm/lp_bld_logic.c index 3bf4534da95..0e75aeb0895 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_logic.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_logic.c @@ -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); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_pack.c b/src/gallium/auxiliary/gallivm/lp_bld_pack.c index 76e57c52f80..ec147275a62 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_pack.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_pack.c @@ -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, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_pack.h b/src/gallium/auxiliary/gallivm/lp_bld_pack.h index 3e07716dfe3..62c8e7a8750 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_pack.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_pack.h @@ -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); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index b037a8a95b4..a0852292237 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c @@ -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; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h index 8e2d6febf00..7c839034be6 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h @@ -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, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c index 99da2975b1f..ed430051fc6 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c @@ -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, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index 6262c02010b..07d07873794 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -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); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c index ef63390d1a9..5cb8e620f36 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c @@ -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) { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h index b9fe3682c61..9a9fe5f46a3 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h @@ -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); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c index 7898c68ef55..80cb0fa1b7e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c @@ -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, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c index 8650f97054c..06750d06ee8 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c @@ -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) { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index a6175ca8c86..419c0debc8b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -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) { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.c b/src/gallium/auxiliary/gallivm/lp_bld_type.c index db91f50ff48..7b6b3cb0721 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_type.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_type.c @@ -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); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.h b/src/gallium/auxiliary/gallivm/lp_bld_type.h index 5412d823c2a..a459c5a28e2 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_type.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_type.h @@ -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); diff --git a/src/gallium/auxiliary/hud/font.c b/src/gallium/auxiliary/hud/font.c index 0173808f9f7..d19f06f96f8 100644 --- a/src/gallium/auxiliary/hud/font.c +++ b/src/gallium/auxiliary/hud/font.c @@ -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) { diff --git a/src/gallium/auxiliary/hud/font.h b/src/gallium/auxiliary/hud/font.h index 5269c1456a1..01cdeba9b61 100644 --- a/src/gallium/auxiliary/hud/font.h +++ b/src/gallium/auxiliary/hud/font.h @@ -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); diff --git a/src/gallium/auxiliary/hud/hud_cpu.c b/src/gallium/auxiliary/hud/hud_cpu.c index a4313b2c734..be192d518ac 100644 --- a/src/gallium/auxiliary/hud/hud_cpu.c +++ b/src/gallium/auxiliary/hud/hud_cpu.c @@ -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]; diff --git a/src/gallium/auxiliary/hud/hud_driver_query.c b/src/gallium/auxiliary/hud/hud_driver_query.c index f15c7104460..683185c56db 100644 --- a/src/gallium/auxiliary/hud/hud_driver_query.c +++ b/src/gallium/auxiliary/hud/hud_driver_query.c @@ -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; diff --git a/src/gallium/auxiliary/hud/hud_fps.c b/src/gallium/auxiliary/hud/hud_fps.c index 29110f5575e..94b91f022ff 100644 --- a/src/gallium/auxiliary/hud/hud_fps.c +++ b/src/gallium/auxiliary/hud/hud_fps.c @@ -33,7 +33,7 @@ #include "util/u_memory.h" struct fps_info { - boolean frametime; + bool frametime; int frames; uint64_t last_time; }; diff --git a/src/gallium/auxiliary/hud/hud_nic.c b/src/gallium/auxiliary/hud/hud_nic.c index 6926d846de8..66067115f5f 100644 --- a/src/gallium/auxiliary/hud/hud_nic.c +++ b/src/gallium/auxiliary/hud/hud_nic.c @@ -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) diff --git a/src/gallium/auxiliary/hud/hud_private.h b/src/gallium/auxiliary/hud/hud_private.h index 0c3fbbba4db..8dda8a57d9d 100644 --- a/src/gallium/auxiliary/hud/hud_private.h +++ b/src/gallium/auxiliary/hud/hud_private.h @@ -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, diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.h b/src/gallium/auxiliary/pipe-loader/pipe_loader.h index fdecf773320..b799fabf281 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader.h +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.h @@ -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); diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c index 829f41262eb..d7b73f89e76 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c @@ -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) { diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer.h b/src/gallium/auxiliary/pipebuffer/pb_buffer.h index 7d0d756eefb..518d19e97ed 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer.h +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer.h @@ -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; diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c index 76608b37147..613f45778e8 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c @@ -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) { diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h index 1bd7295081f..51f4f3fe802 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h @@ -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 ); }; diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c index f2fb620dd3f..e85c1253a01 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c @@ -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, diff --git a/src/gallium/auxiliary/pipebuffer/pb_validate.c b/src/gallium/auxiliary/pipebuffer/pb_validate.c index 8d36148d3a7..b8dbbb7407b 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_validate.c +++ b/src/gallium/auxiliary/pipebuffer/pb_validate.c @@ -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; diff --git a/src/gallium/auxiliary/pipebuffer/pb_validate.h b/src/gallium/auxiliary/pipebuffer/pb_validate.h index cb453a673d1..bdaee4fe660 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_validate.h +++ b/src/gallium/auxiliary/pipebuffer/pb_validate.h @@ -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, diff --git a/src/gallium/auxiliary/renderonly/renderonly.c b/src/gallium/auxiliary/renderonly/renderonly.c index d8628a36b9a..d3efdfae251 100644 --- a/src/gallium/auxiliary/renderonly/renderonly.c +++ b/src/gallium/auxiliary/renderonly/renderonly.c @@ -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 = { diff --git a/src/gallium/auxiliary/renderonly/renderonly.h b/src/gallium/auxiliary/renderonly/renderonly.h index 911ad669774..5c47db55abd 100644 --- a/src/gallium/auxiliary/renderonly/renderonly.h +++ b/src/gallium/auxiliary/renderonly/renderonly.h @@ -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) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index 6d3adee9c6b..662edcf4725 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c @@ -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 ) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c b/src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c index d2fa4af0f2b..51279ad9da6 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c @@ -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++) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index a0bd848fbd4..c51ef27ec9c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -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; diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h index fd0a9b5e4f8..ea6969b8a6a 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h @@ -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; }; diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index 0c17a37c26a..065f3cb38d5 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.c +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c @@ -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, diff --git a/src/gallium/auxiliary/tgsi/tgsi_iterate.c b/src/gallium/auxiliary/tgsi/tgsi_iterate.c index ca318944055..40415b961df 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_iterate.c +++ b/src/gallium/auxiliary/tgsi/tgsi_iterate.c @@ -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 ) diff --git a/src/gallium/auxiliary/tgsi/tgsi_iterate.h b/src/gallium/auxiliary/tgsi/tgsi_iterate.h index d925a06b747..4420362686b 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_iterate.h +++ b/src/gallium/auxiliary/tgsi/tgsi_iterate.h @@ -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 ); diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.c b/src/gallium/auxiliary/tgsi/tgsi_parse.c index 8cc0b201541..0b95f596011 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_parse.c +++ b/src/gallium/auxiliary/tgsi/tgsi_parse.c @@ -55,7 +55,7 @@ tgsi_parse_free( { } -boolean +bool tgsi_parse_end_of_tokens( struct tgsi_parse_context *ctx ) { diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.h b/src/gallium/auxiliary/tgsi/tgsi_parse.h index b5ed12095fc..f11dbbd5eef 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_parse.h +++ b/src/gallium/auxiliary/tgsi/tgsi_parse.h @@ -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 ); diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c index 35f00730380..00cff7b009f 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c +++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c @@ -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; diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.h b/src/gallium/auxiliary/tgsi/tgsi_sanity.h index b78d1aba714..3b99351d427 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sanity.h +++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.h @@ -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 ); diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index 5d1125aaa5f..0ec81bf0736 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -84,58 +84,58 @@ struct tgsi_shader_info /** * If a tessellation control shader reads outputs, this describes which ones. */ - boolean reads_pervertex_outputs; - boolean reads_perpatch_outputs; - boolean reads_tessfactor_outputs; + bool reads_pervertex_outputs; + bool reads_perpatch_outputs; + bool reads_tessfactor_outputs; ubyte colors_read; /**< which color components are read by the FS */ ubyte colors_written; - boolean reads_position; /**< does fragment shader read position? */ - boolean reads_z; /**< does fragment shader read depth? */ - boolean reads_samplemask; /**< does fragment shader read sample mask? */ - boolean reads_tess_factors; /**< If TES reads TESSINNER or TESSOUTER */ - boolean writes_z; /**< does fragment shader write Z value? */ - boolean writes_stencil; /**< does fragment shader write stencil value? */ - boolean writes_samplemask; /**< does fragment shader write sample mask? */ - boolean writes_edgeflag; /**< vertex shader outputs edgeflag */ - boolean uses_kill; /**< KILL or KILL_IF instruction used? */ - boolean uses_persp_center; - boolean uses_persp_centroid; - boolean uses_persp_sample; - boolean uses_linear_center; - boolean uses_linear_centroid; - boolean uses_linear_sample; - boolean uses_persp_opcode_interp_centroid; - boolean uses_persp_opcode_interp_offset; - boolean uses_persp_opcode_interp_sample; - boolean uses_linear_opcode_interp_centroid; - boolean uses_linear_opcode_interp_offset; - boolean uses_linear_opcode_interp_sample; - boolean uses_instanceid; - boolean uses_vertexid; - boolean uses_vertexid_nobase; - boolean uses_basevertex; - boolean uses_drawid; - boolean uses_primid; - boolean uses_frontface; - boolean uses_invocationid; - boolean uses_thread_id[3]; - boolean uses_block_id[3]; - boolean uses_block_size; - boolean uses_grid_size; - boolean uses_subgroup_info; - boolean writes_position; - boolean writes_psize; - boolean writes_clipvertex; - boolean writes_primid; - boolean writes_viewport_index; - boolean writes_layer; - boolean writes_memory; /**< contains stores or atomics to buffers or images */ - boolean uses_doubles; /**< uses any of the double instructions */ - boolean uses_derivatives; - boolean uses_bindless_samplers; - boolean uses_bindless_images; - boolean uses_fbfetch; + bool reads_position; /**< does fragment shader read position? */ + bool reads_z; /**< does fragment shader read depth? */ + bool reads_samplemask; /**< does fragment shader read sample mask? */ + bool reads_tess_factors; /**< If TES reads TESSINNER or TESSOUTER */ + bool writes_z; /**< does fragment shader write Z value? */ + bool writes_stencil; /**< does fragment shader write stencil value? */ + bool writes_samplemask; /**< does fragment shader write sample mask? */ + bool writes_edgeflag; /**< vertex shader outputs edgeflag */ + bool uses_kill; /**< KILL or KILL_IF instruction used? */ + bool uses_persp_center; + bool uses_persp_centroid; + bool uses_persp_sample; + bool uses_linear_center; + bool uses_linear_centroid; + bool uses_linear_sample; + bool uses_persp_opcode_interp_centroid; + bool uses_persp_opcode_interp_offset; + bool uses_persp_opcode_interp_sample; + bool uses_linear_opcode_interp_centroid; + bool uses_linear_opcode_interp_offset; + bool uses_linear_opcode_interp_sample; + bool uses_instanceid; + bool uses_vertexid; + bool uses_vertexid_nobase; + bool uses_basevertex; + bool uses_drawid; + bool uses_primid; + bool uses_frontface; + bool uses_invocationid; + bool uses_thread_id[3]; + bool uses_block_id[3]; + bool uses_block_size; + bool uses_grid_size; + bool uses_subgroup_info; + bool writes_position; + bool writes_psize; + bool writes_clipvertex; + bool writes_primid; + bool writes_viewport_index; + bool writes_layer; + bool writes_memory; /**< contains stores or atomics to buffers or images */ + bool uses_doubles; /**< uses any of the double instructions */ + bool uses_derivatives; + bool uses_bindless_samplers; + bool uses_bindless_images; + bool uses_fbfetch; unsigned clipdist_writemask; unsigned culldist_writemask; unsigned num_written_culldistance; diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index 0b005976989..fc17dc438b0 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -40,7 +40,7 @@ #include "tgsi_util.h" #include "tgsi_dump.h" -static boolean is_alpha_underscore( const char *cur ) +static bool is_alpha_underscore( const char *cur ) { return (*cur >= 'a' && *cur <= 'z') || @@ -48,12 +48,12 @@ static boolean is_alpha_underscore( const char *cur ) *cur == '_'; } -static boolean is_digit( const char *cur ) +static bool is_digit( const char *cur ) { return *cur >= '0' && *cur <= '9'; } -static boolean is_digit_alpha_underscore( const char *cur ) +static bool is_digit_alpha_underscore( const char *cur ) { return is_digit( cur ) || is_alpha_underscore( cur ); } @@ -87,7 +87,7 @@ streq_nocase_uprcase(const char *str1, * The pointer to the first string is moved at end of the read word * on success. */ -static boolean str_match_no_case( const char **pcur, const char *str ) +static bool str_match_no_case( const char **pcur, const char *str ) { const char *cur = *pcur; @@ -108,7 +108,7 @@ static boolean str_match_no_case( const char **pcur, const char *str ) * The pointer to the first string is moved at end of the read word * on success. */ -static boolean str_match_nocase_whole( const char **pcur, const char *str ) +static bool str_match_nocase_whole( const char **pcur, const char *str ) { const char *cur = *pcur; @@ -167,7 +167,7 @@ static void eat_opt_white( const char **pcur ) /* Eat one or more whitespaces. * Return TRUE if at least one whitespace eaten. */ -static boolean eat_white( const char **pcur ) +static bool eat_white( const char **pcur ) { const char *cur = *pcur; @@ -178,7 +178,7 @@ static boolean eat_white( const char **pcur ) /* Parse unsigned integer. * No checks for overflow. */ -static boolean parse_uint( const char **pcur, uint *val ) +static bool parse_uint( const char **pcur, uint *val ) { const char *cur = *pcur; @@ -192,7 +192,7 @@ static boolean parse_uint( const char **pcur, uint *val ) return FALSE; } -static boolean parse_int( const char **pcur, int *val ) +static bool parse_int( const char **pcur, int *val ) { const char *cur = *pcur; int sign = (*cur == '-' ? -1 : 1); @@ -209,7 +209,7 @@ static boolean parse_int( const char **pcur, int *val ) return FALSE; } -static boolean parse_identifier( const char **pcur, char *ret, size_t len ) +static bool parse_identifier( const char **pcur, char *ret, size_t len ) { const char *cur = *pcur; size_t i = 0; @@ -229,7 +229,7 @@ static boolean parse_identifier( const char **pcur, char *ret, size_t len ) /* Parse floating point. */ -static boolean parse_float( const char **pcur, float *val ) +static bool parse_float( const char **pcur, float *val ) { const char *cur = *pcur; *val = _mesa_strtof(cur, (char**)pcur); @@ -238,7 +238,7 @@ static boolean parse_float( const char **pcur, float *val ) return TRUE; } -static boolean parse_double( const char **pcur, uint32_t *val0, uint32_t *val1) +static bool parse_double( const char **pcur, uint32_t *val0, uint32_t *val1) { const char *cur = *pcur; union { @@ -256,7 +256,7 @@ static boolean parse_double( const char **pcur, uint32_t *val0, uint32_t *val1) return TRUE; } -static boolean parse_int64( const char **pcur, uint32_t *val0, uint32_t *val1) +static bool parse_int64( const char **pcur, uint32_t *val0, uint32_t *val1) { const char *cur = *pcur; union { @@ -274,7 +274,7 @@ static boolean parse_int64( const char **pcur, uint32_t *val0, uint32_t *val1) return TRUE; } -static boolean parse_uint64( const char **pcur, uint32_t *val0, uint32_t *val1) +static bool parse_uint64( const char **pcur, uint32_t *val0, uint32_t *val1) { const char *cur = *pcur; union { @@ -329,7 +329,7 @@ static void report_error( struct translate_ctx *ctx, const char *msg ) * GEOM * VERT */ -static boolean parse_header( struct translate_ctx *ctx ) +static bool parse_header( struct translate_ctx *ctx ) { uint processor; @@ -363,7 +363,7 @@ static boolean parse_header( struct translate_ctx *ctx ) return TRUE; } -static boolean parse_label( struct translate_ctx *ctx, uint *val ) +static bool parse_label( struct translate_ctx *ctx, uint *val ) { const char *cur = ctx->cur; @@ -378,7 +378,7 @@ static boolean parse_label( struct translate_ctx *ctx, uint *val ) return FALSE; } -static boolean +static bool parse_file( const char **pcur, uint *file ) { uint i; @@ -395,7 +395,7 @@ parse_file( const char **pcur, uint *file ) return FALSE; } -static boolean +static bool parse_opt_writemask( struct translate_ctx *ctx, uint *writemask ) @@ -441,7 +441,7 @@ parse_opt_writemask( /* ::= `[' */ -static boolean +static bool parse_register_file_bracket( struct translate_ctx *ctx, uint *file ) @@ -461,7 +461,7 @@ parse_register_file_bracket( /* ::= */ -static boolean +static bool parse_register_file_bracket_index( struct translate_ctx *ctx, uint *file, @@ -483,7 +483,7 @@ parse_register_file_bracket_index( /* Parse simple 1d register operand. * ::= `]' */ -static boolean +static bool parse_register_1d(struct translate_ctx *ctx, uint *file, int *index ) @@ -509,7 +509,7 @@ struct parsed_bracket { }; -static boolean +static bool parse_register_bracket( struct translate_ctx *ctx, struct parsed_bracket *brackets) @@ -590,7 +590,7 @@ parse_register_bracket( return TRUE; } -static boolean +static bool parse_opt_register_src_bracket( struct translate_ctx *ctx, struct parsed_bracket *brackets, @@ -621,7 +621,7 @@ parse_opt_register_src_bracket( * [`.' (`x' | `y' | `z' | `w')] `+' `]' | * [`.' (`x' | `y' | `z' | `w')] `-' `]' */ -static boolean +static bool parse_register_src( struct translate_ctx *ctx, uint *file, @@ -641,7 +641,7 @@ struct parsed_dcl_bracket { uint last; }; -static boolean +static bool parse_register_dcl_bracket( struct translate_ctx *ctx, struct parsed_dcl_bracket *bracket) @@ -695,7 +695,7 @@ cleanup: * ::= `]' | * `..' `]' */ -static boolean +static bool parse_register_dcl( struct translate_ctx *ctx, uint *file, @@ -746,7 +746,7 @@ parse_register_dcl( /* Parse destination register operand.*/ -static boolean +static bool parse_register_dst( struct translate_ctx *ctx, uint *file, @@ -761,7 +761,7 @@ parse_register_dst( return TRUE; } -static boolean +static bool parse_dst_operand( struct translate_ctx *ctx, struct tgsi_full_dst_register *dst ) @@ -811,11 +811,11 @@ parse_dst_operand( return TRUE; } -static boolean +static bool parse_optional_swizzle( struct translate_ctx *ctx, uint *swizzle, - boolean *parsed_swizzle, + bool *parsed_swizzle, int components) { const char *cur = ctx->cur; @@ -849,14 +849,14 @@ parse_optional_swizzle( return TRUE; } -static boolean +static bool parse_src_operand( struct translate_ctx *ctx, struct tgsi_full_src_register *src ) { uint file; uint swizzle[4]; - boolean parsed_swizzle; + bool parsed_swizzle; struct parsed_bracket bracket[2]; int parsed_opt_brackets; @@ -925,14 +925,14 @@ parse_src_operand( return TRUE; } -static boolean +static bool parse_texoffset_operand( struct translate_ctx *ctx, struct tgsi_texture_offset *src ) { uint file; uint swizzle[3]; - boolean parsed_swizzle; + bool parsed_swizzle; struct parsed_bracket bracket; if (!parse_register_src(ctx, &file, &bracket)) @@ -954,7 +954,7 @@ parse_texoffset_operand( return TRUE; } -static boolean +static bool match_inst(const char **pcur, unsigned *saturate, unsigned *precise, @@ -990,10 +990,10 @@ match_inst(const char **pcur, return FALSE; } -static boolean +static bool parse_instruction( struct translate_ctx *ctx, - boolean has_label ) + bool has_label ) { int i; uint saturate = 0; @@ -1172,7 +1172,7 @@ parse_instruction( /* parses a 4-touple of the form {x, y, z, w} * where x, y, z, w are numbers */ -static boolean parse_immediate_data(struct translate_ctx *ctx, unsigned type, +static bool parse_immediate_data(struct translate_ctx *ctx, unsigned type, union tgsi_immediate_data *values) { unsigned i; @@ -1238,7 +1238,7 @@ static boolean parse_immediate_data(struct translate_ctx *ctx, unsigned type, return TRUE; } -static boolean parse_declaration( struct translate_ctx *ctx ) +static bool parse_declaration( struct translate_ctx *ctx ) { struct tgsi_full_declaration decl; uint file; @@ -1247,7 +1247,7 @@ static boolean parse_declaration( struct translate_ctx *ctx ) uint writemask; const char *cur, *cur2; uint advance; - boolean is_vs_input; + bool is_vs_input; if (!eat_white( &ctx->cur )) { report_error( ctx, "Syntax error" ); @@ -1590,7 +1590,7 @@ static boolean parse_declaration( struct translate_ctx *ctx ) return TRUE; } -static boolean parse_immediate( struct translate_ctx *ctx ) +static bool parse_immediate( struct translate_ctx *ctx ) { struct tgsi_full_immediate imm; uint advance; @@ -1653,7 +1653,7 @@ static boolean parse_immediate( struct translate_ctx *ctx ) return TRUE; } -static boolean +static bool parse_primitive( const char **pcur, uint *primitive ) { uint i; @@ -1670,7 +1670,7 @@ parse_primitive( const char **pcur, uint *primitive ) return FALSE; } -static boolean +static bool parse_fs_coord_origin( const char **pcur, uint *fs_coord_origin ) { uint i; @@ -1687,7 +1687,7 @@ parse_fs_coord_origin( const char **pcur, uint *fs_coord_origin ) return FALSE; } -static boolean +static bool parse_fs_coord_pixel_center( const char **pcur, uint *fs_coord_pixel_center ) { uint i; @@ -1704,7 +1704,7 @@ parse_fs_coord_pixel_center( const char **pcur, uint *fs_coord_pixel_center ) return FALSE; } -static boolean +static bool parse_property_next_shader( const char **pcur, uint *next_shader ) { uint i; @@ -1721,7 +1721,7 @@ parse_property_next_shader( const char **pcur, uint *next_shader ) return FALSE; } -static boolean parse_property( struct translate_ctx *ctx ) +static bool parse_property( struct translate_ctx *ctx ) { struct tgsi_full_property prop; uint property_name; @@ -1805,7 +1805,7 @@ static boolean parse_property( struct translate_ctx *ctx ) } -static boolean translate( struct translate_ctx *ctx ) +static bool translate( struct translate_ctx *ctx ) { eat_opt_white( &ctx->cur ); if (!parse_header( ctx )) @@ -1848,7 +1848,7 @@ static boolean translate( struct translate_ctx *ctx ) return TRUE; } -boolean +bool tgsi_text_translate( const char *text, struct tgsi_token *tokens, diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.h b/src/gallium/auxiliary/tgsi/tgsi_text.h index a34565795a9..f103692231e 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.h +++ b/src/gallium/auxiliary/tgsi/tgsi_text.h @@ -36,7 +36,7 @@ extern "C" { struct tgsi_token; -boolean +bool tgsi_text_translate( const char *text, struct tgsi_token *tokens, diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.c b/src/gallium/auxiliary/tgsi/tgsi_transform.c index 9abbdc1ea99..bda607aa2c7 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_transform.c +++ b/src/gallium/auxiliary/tgsi/tgsi_transform.c @@ -152,8 +152,8 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in, uint initial_tokens_len, struct tgsi_transform_context *ctx) { - boolean first_instruction = TRUE; - boolean epilog_emitted = FALSE; + bool first_instruction = TRUE; + bool epilog_emitted = FALSE; int cond_stack = 0; int call_stack = 0; diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h index 2cddd680f4d..64545742cc5 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_transform.h +++ b/src/gallium/auxiliary/tgsi/tgsi_transform.h @@ -495,7 +495,7 @@ tgsi_transform_kill_inst(struct tgsi_transform_context *ctx, unsigned src_file, unsigned src_index, unsigned src_swizzle, - boolean negate) + bool negate) { struct tgsi_full_instruction inst; diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index 564e2c03607..ee0a884381d 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -143,7 +143,7 @@ struct ureg_program unsigned first; unsigned last; unsigned array_id; - boolean invariant; + bool invariant; } output[UREG_MAX_OUTPUT]; unsigned nr_outputs, nr_output_regs; @@ -175,8 +175,8 @@ struct ureg_program unsigned index; enum tgsi_texture_type target; enum pipe_format format; - boolean wr; - boolean raw; + bool wr; + bool raw; } image[PIPE_MAX_SHADER_IMAGES]; unsigned nr_images; @@ -432,7 +432,7 @@ ureg_DECL_output_layout(struct ureg_program *ureg, unsigned usage_mask, unsigned array_id, unsigned array_size, - boolean invariant) + bool invariant) { unsigned i; @@ -633,7 +633,7 @@ ureg_DECL_hw_atomic(struct ureg_program *ureg, } static struct ureg_dst alloc_temporary( struct ureg_program *ureg, - boolean local ) + bool local ) { unsigned i; @@ -676,7 +676,7 @@ struct ureg_dst ureg_DECL_local_temporary( struct ureg_program *ureg ) struct ureg_dst ureg_DECL_array_temporary( struct ureg_program *ureg, unsigned size, - boolean local ) + bool local ) { unsigned i = ureg->nr_temps; struct ureg_dst dst = ureg_dst_register( TGSI_FILE_TEMPORARY, i ); @@ -783,8 +783,8 @@ ureg_DECL_image(struct ureg_program *ureg, unsigned index, enum tgsi_texture_type target, enum pipe_format format, - boolean wr, - boolean raw) + bool wr, + bool raw) { struct ureg_src reg = ureg_src_register(TGSI_FILE_IMAGE, index); unsigned i; @@ -853,7 +853,7 @@ match_or_expand_immediate64( const unsigned *v, *swizzle = 0; for (i = 0; i < nr; i += 2) { - boolean found = FALSE; + bool found = FALSE; for (j = 0; j < nr2 && !found; j += 2) { if (v[i] == v2[j] && v[i + 1] == v2[j + 1]) { @@ -899,7 +899,7 @@ match_or_expand_immediate( const unsigned *v, *swizzle = 0; for (i = 0; i < nr; i++) { - boolean found = FALSE; + bool found = FALSE; for (j = 0; j < nr2 && !found; j++) { if (v[i] == v2[j]) { @@ -1259,7 +1259,7 @@ static void validate( enum tgsi_opcode opcode, struct ureg_emit_insn_result ureg_emit_insn(struct ureg_program *ureg, enum tgsi_opcode opcode, - boolean saturate, + bool saturate, unsigned precise, unsigned num_dst, unsigned num_src) @@ -1408,7 +1408,7 @@ ureg_insn(struct ureg_program *ureg, { struct ureg_emit_insn_result insn; unsigned i; - boolean saturate; + bool saturate; if (nr_dst && ureg_dst_is_empty(dst[0])) { return; @@ -1446,7 +1446,7 @@ ureg_tex_insn(struct ureg_program *ureg, { struct ureg_emit_insn_result insn; unsigned i; - boolean saturate; + bool saturate; if (nr_dst && ureg_dst_is_empty(dst[0])) { return; @@ -1520,7 +1520,7 @@ emit_decl_semantic(struct ureg_program *ureg, unsigned streams, unsigned usage_mask, unsigned array_id, - boolean invariant) + bool invariant) { union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, array_id ? 4 : 3); @@ -1626,7 +1626,7 @@ emit_decl_fs(struct ureg_program *ureg, static void emit_decl_temps( struct ureg_program *ureg, unsigned first, unsigned last, - boolean local, + bool local, unsigned arrayid ) { union tgsi_any_token *out = get_tokens( ureg, DOMAIN_DECL, @@ -1727,8 +1727,8 @@ emit_decl_image(struct ureg_program *ureg, unsigned index, enum tgsi_texture_type target, enum pipe_format format, - boolean wr, - boolean raw) + bool wr, + bool raw) { union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3); @@ -2044,7 +2044,7 @@ static void emit_decls( struct ureg_program *ureg ) if (ureg->nr_temps) { unsigned array = 0; for (i = 0; i < ureg->nr_temps;) { - boolean local = util_bitmask_get(ureg->local_temps, i); + bool local = util_bitmask_get(ureg->local_temps, i); unsigned first = i; i = util_bitmask_get_next_index(ureg->decl_temps, i + 1); if (i == UTIL_BITMASK_INVALID_INDEX) diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h index 5c4efbe8cc9..003a7529fad 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h @@ -239,7 +239,7 @@ ureg_DECL_output_layout(struct ureg_program *, unsigned usage_mask, unsigned array_id, unsigned array_size, - boolean invariant); + bool invariant); struct ureg_dst ureg_DECL_output_masked(struct ureg_program *, @@ -330,7 +330,7 @@ ureg_DECL_local_temporary( struct ureg_program * ); struct ureg_dst ureg_DECL_array_temporary( struct ureg_program *, unsigned size, - boolean local ); + bool local ); void ureg_release_temporary( struct ureg_program *ureg, @@ -362,8 +362,8 @@ ureg_DECL_image(struct ureg_program *ureg, unsigned index, enum tgsi_texture_type target, enum pipe_format format, - boolean wr, - boolean raw); + bool wr, + bool raw); struct ureg_src ureg_DECL_buffer(struct ureg_program *ureg, unsigned nr, bool atomic); @@ -502,7 +502,7 @@ ureg_imm1i( struct ureg_program *ureg, /* Where the destination register has a valid file, but an empty * writemask. */ -static inline boolean +static inline bool ureg_dst_is_empty( struct ureg_dst dst ) { return dst.File != TGSI_FILE_NULL && @@ -583,7 +583,7 @@ struct ureg_emit_insn_result { struct ureg_emit_insn_result ureg_emit_insn(struct ureg_program *ureg, enum tgsi_opcode opcode, - boolean saturate, + bool saturate, unsigned precise, unsigned num_dst, unsigned num_src); @@ -1189,13 +1189,13 @@ ureg_src_undef( void ) return src; } -static inline boolean +static inline bool ureg_src_is_undef( struct ureg_src src ) { return src.File == TGSI_FILE_NULL; } -static inline boolean +static inline bool ureg_dst_is_undef( struct ureg_dst dst ) { return dst.File == TGSI_FILE_NULL; diff --git a/src/gallium/auxiliary/translate/translate.c b/src/gallium/auxiliary/translate/translate.c index 72e9216bc35..d6497918e77 100644 --- a/src/gallium/auxiliary/translate/translate.c +++ b/src/gallium/auxiliary/translate/translate.c @@ -49,7 +49,7 @@ struct translate *translate_create( const struct translate_key *key ) return translate_generic_create( key ); } -boolean translate_is_output_format_supported(enum pipe_format format) +bool translate_is_output_format_supported(enum pipe_format format) { return translate_generic_is_output_format_supported(format); } diff --git a/src/gallium/auxiliary/translate/translate.h b/src/gallium/auxiliary/translate/translate.h index 27d7605630c..93907f9034a 100644 --- a/src/gallium/auxiliary/translate/translate.h +++ b/src/gallium/auxiliary/translate/translate.h @@ -135,7 +135,7 @@ struct translate { struct translate *translate_create( const struct translate_key *key ); -boolean translate_is_output_format_supported(enum pipe_format format); +bool translate_is_output_format_supported(enum pipe_format format); static inline int translate_keysize( const struct translate_key *key ) { @@ -171,6 +171,6 @@ struct translate *translate_sse2_create( const struct translate_key *key ); struct translate *translate_generic_create( const struct translate_key *key ); -boolean translate_generic_is_output_format_supported(enum pipe_format format); +bool translate_generic_is_output_format_supported(enum pipe_format format); #endif diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c index c4213fb5de9..4507095cc34 100644 --- a/src/gallium/auxiliary/translate/translate_generic.c +++ b/src/gallium/auxiliary/translate/translate_generic.c @@ -757,7 +757,7 @@ generic_release(struct translate *translate) FREE(translate); } -static boolean +static bool is_legal_int_format_combo(const struct util_format_description *src, const struct util_format_description *dst) { @@ -846,7 +846,7 @@ translate_generic_create(const struct translate_key *key) return &tg->translate; } -boolean +bool translate_generic_is_output_format_supported(enum pipe_format format) { switch(format) { diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c index 8bbaac62488..45275275ed8 100644 --- a/src/gallium/auxiliary/translate/translate_sse.c +++ b/src/gallium/auxiliary/translate/translate_sse.c @@ -126,7 +126,7 @@ struct translate_sse /* Multiple elements can map to a single buffer variant. */ unsigned element_to_buffer_variant[TRANSLATE_MAX_ATTRIBS]; - boolean use_instancing; + bool use_instancing; unsigned instance_id; unsigned start_instance; @@ -190,7 +190,7 @@ get_const(struct translate_sse *p, unsigned id) /* load the data in a SSE2 register, padding with zeros */ -static boolean +static bool emit_load_sse2(struct translate_sse *p, struct x86_reg data, struct x86_reg src, unsigned size) { @@ -471,7 +471,7 @@ emit_memcpy(struct translate_sse *p, struct x86_reg dst, struct x86_reg src, } } -static boolean +static bool translate_attr_convert(struct translate_sse *p, const struct translate_element *a, struct x86_reg src, struct x86_reg dst) @@ -481,7 +481,7 @@ translate_attr_convert(struct translate_sse *p, const struct util_format_description *output_desc = util_format_description(a->output_format); unsigned i; - boolean id_swizzle = TRUE; + bool id_swizzle = TRUE; unsigned swizzle[4] = { PIPE_SWIZZLE_NONE, PIPE_SWIZZLE_NONE, PIPE_SWIZZLE_NONE, PIPE_SWIZZLE_NONE }; @@ -1083,7 +1083,7 @@ translate_attr_convert(struct translate_sse *p, } -static boolean +static bool translate_attr(struct translate_sse *p, const struct translate_element *a, struct x86_reg src, struct x86_reg dst) @@ -1097,7 +1097,7 @@ translate_attr(struct translate_sse *p, } -static boolean +static bool init_inputs(struct translate_sse *p, unsigned index_size) { unsigned i; @@ -1252,7 +1252,7 @@ get_buffer_ptr(struct translate_sse *p, } -static boolean +static bool incr_inputs(struct translate_sse *p, unsigned index_size) { if (!index_size && p->nr_buffer_variants == 1) { @@ -1316,7 +1316,7 @@ incr_inputs(struct translate_sse *p, unsigned index_size) * ECX -- pointer to current attribute * */ -static boolean +static bool build_vertex_emit(struct translate_sse *p, struct x86_function *func, unsigned index_size) { diff --git a/src/gallium/auxiliary/util/u_bitmask.c b/src/gallium/auxiliary/util/u_bitmask.c index 433a09dd0d2..a9d0853cfc1 100644 --- a/src/gallium/auxiliary/util/u_bitmask.c +++ b/src/gallium/auxiliary/util/u_bitmask.c @@ -86,7 +86,7 @@ util_bitmask_create(void) /** * Resize the bitmask if necessary */ -static inline boolean +static inline bool util_bitmask_resize(struct util_bitmask *bm, unsigned minimum_index) { @@ -249,7 +249,7 @@ util_bitmask_clear(struct util_bitmask *bm, } -boolean +bool util_bitmask_get(struct util_bitmask *bm, unsigned index) { diff --git a/src/gallium/auxiliary/util/u_bitmask.h b/src/gallium/auxiliary/util/u_bitmask.h index f0769683aa1..7dad2322363 100644 --- a/src/gallium/auxiliary/util/u_bitmask.h +++ b/src/gallium/auxiliary/util/u_bitmask.h @@ -82,7 +82,7 @@ void util_bitmask_clear(struct util_bitmask *bm, unsigned index); -boolean +bool util_bitmask_get(struct util_bitmask *bm, unsigned index); diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h index e4357bbfa5e..9ae88ae020a 100644 --- a/src/gallium/auxiliary/util/u_blitter.h +++ b/src/gallium/auxiliary/util/u_blitter.h @@ -139,7 +139,7 @@ struct blitter_context uint saved_render_cond_mode; bool saved_render_cond_cond; - boolean saved_window_rectangles_include; + bool saved_window_rectangles_include; unsigned saved_num_window_rectangles; struct pipe_scissor_state saved_window_rectangles[PIPE_MAX_WINDOW_RECTANGLES]; }; @@ -576,7 +576,7 @@ util_blitter_save_render_condition(struct blitter_context *blitter, static inline void util_blitter_save_window_rectangles(struct blitter_context *blitter, - boolean include, + bool include, unsigned num_rectangles, const struct pipe_scissor_state *rects) { diff --git a/src/gallium/auxiliary/util/u_box.h b/src/gallium/auxiliary/util/u_box.h index 328bc753eed..55c5e1acae9 100644 --- a/src/gallium/auxiliary/util/u_box.h +++ b/src/gallium/auxiliary/util/u_box.h @@ -194,7 +194,7 @@ u_box_union_3d(struct pipe_box *dst, dst->z = z; } -static inline boolean +static inline bool u_box_test_intersection_1d(const struct pipe_box *a, const struct pipe_box *b) { @@ -209,7 +209,7 @@ u_box_test_intersection_1d(const struct pipe_box *a, return ax[1] >= bx[0] && bx[1] >= ax[0]; } -static inline boolean +static inline bool u_box_test_intersection_2d(const struct pipe_box *a, const struct pipe_box *b) { @@ -233,7 +233,7 @@ u_box_test_intersection_2d(const struct pipe_box *a, return TRUE; } -static inline boolean +static inline bool u_box_test_intersection_3d(const struct pipe_box *a, const struct pipe_box *b) { diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c index 5aa8e4fafdf..4511b9303c1 100644 --- a/src/gallium/auxiliary/util/u_debug_flush.c +++ b/src/gallium/auxiliary/util/u_debug_flush.c @@ -56,7 +56,7 @@ struct debug_map_item { struct debug_stack_frame *frame; - boolean persistent; + bool persistent; }; struct debug_flush_buf { @@ -64,11 +64,11 @@ struct debug_flush_buf { struct pipe_reference reference; /* Must be the first member. */ mtx_t mutex; /* Immutable */ - boolean supports_persistent; + bool supports_persistent; unsigned bt_depth; /* Protected by mutex */ int map_count; - boolean has_sync_map; + bool has_sync_map; int last_sync_map; struct debug_map_item maps[DEBUG_FLUSH_MAP_DEPTH]; }; @@ -82,7 +82,7 @@ struct debug_flush_item { struct debug_flush_ctx { /* Contexts are used by a single thread at a time */ unsigned bt_depth; - boolean catch_map_of_referenced; + bool catch_map_of_referenced; struct hash_table *ref_hash; struct list_head head; }; @@ -104,7 +104,7 @@ debug_flush_capture_frame(int start, int depth) } struct debug_flush_buf * -debug_flush_buf_create(boolean supports_persistent, unsigned bt_depth) +debug_flush_buf_create(bool supports_persistent, unsigned bt_depth) { struct debug_flush_buf *fbuf = CALLOC_STRUCT(debug_flush_buf); @@ -152,7 +152,7 @@ debug_flush_item_destroy(struct debug_flush_item *item) } struct debug_flush_ctx * -debug_flush_ctx_create(UNUSED boolean catch_reference_of_mapped, +debug_flush_ctx_create(UNUSED bool catch_reference_of_mapped, unsigned bt_depth) { struct debug_flush_ctx *fctx = CALLOC_STRUCT(debug_flush_ctx); @@ -183,8 +183,8 @@ out_no_ctx: static void debug_flush_alert(const char *s, const char *op, unsigned start, unsigned depth, - boolean continued, - boolean capture, + bool continued, + bool capture, const struct debug_stack_frame *frame) { if (capture) @@ -211,7 +211,7 @@ debug_flush_alert(const char *s, const char *op, void debug_flush_map(struct debug_flush_buf *fbuf, unsigned flags) { - boolean map_sync, persistent; + bool map_sync, persistent; if (!fbuf) return; diff --git a/src/gallium/auxiliary/util/u_debug_flush.h b/src/gallium/auxiliary/util/u_debug_flush.h index 6e5c736fd39..6c3d0b0c059 100644 --- a/src/gallium/auxiliary/util/u_debug_flush.h +++ b/src/gallium/auxiliary/util/u_debug_flush.h @@ -52,7 +52,7 @@ struct debug_flush_ctx; * representation. */ struct debug_flush_buf * -debug_flush_buf_create(boolean supports_persistent, unsigned bt_depth); +debug_flush_buf_create(bool supports_persistent, unsigned bt_depth); /** * Reference a buffer representation. @@ -75,7 +75,7 @@ debug_flush_buf_reference(struct debug_flush_buf **dst, * representation. */ struct debug_flush_ctx * -debug_flush_ctx_create(boolean catch_map_of_referenced, unsigned bt_depth); +debug_flush_ctx_create(bool catch_map_of_referenced, unsigned bt_depth); /** * Destroy a context representation. diff --git a/src/gallium/auxiliary/util/u_dual_blend.h b/src/gallium/auxiliary/util/u_dual_blend.h index 9450800f715..239b57e9526 100644 --- a/src/gallium/auxiliary/util/u_dual_blend.h +++ b/src/gallium/auxiliary/util/u_dual_blend.h @@ -3,7 +3,7 @@ #include "pipe/p_state.h" -static inline boolean util_blend_factor_is_dual_src(int factor) +static inline bool util_blend_factor_is_dual_src(int factor) { return (factor == PIPE_BLENDFACTOR_SRC1_COLOR) || (factor == PIPE_BLENDFACTOR_SRC1_ALPHA) || @@ -11,7 +11,7 @@ static inline boolean util_blend_factor_is_dual_src(int factor) (factor == PIPE_BLENDFACTOR_INV_SRC1_ALPHA); } -static inline boolean util_blend_state_is_dual(const struct pipe_blend_state *blend, +static inline bool util_blend_state_is_dual(const struct pipe_blend_state *blend, int index) { if (util_blend_factor_is_dual_src(blend->rt[index].rgb_src_factor) || diff --git a/src/gallium/auxiliary/util/u_dump.h b/src/gallium/auxiliary/util/u_dump.h index 0469ea21f90..910cbbb96ea 100644 --- a/src/gallium/auxiliary/util/u_dump.h +++ b/src/gallium/auxiliary/util/u_dump.h @@ -55,40 +55,40 @@ extern "C" { */ const char * -util_str_blend_factor(unsigned value, boolean shortened); +util_str_blend_factor(unsigned value, bool shortened); const char * -util_str_blend_func(unsigned value, boolean shortened); +util_str_blend_func(unsigned value, bool shortened); const char * -util_str_logicop(unsigned value, boolean shortened); +util_str_logicop(unsigned value, bool shortened); const char * -util_str_func(unsigned value, boolean shortened); +util_str_func(unsigned value, bool shortened); const char * -util_str_stencil_op(unsigned value, boolean shortened); +util_str_stencil_op(unsigned value, bool shortened); const char * -util_str_tex_target(unsigned value, boolean shortened); +util_str_tex_target(unsigned value, bool shortened); const char * -util_str_tex_wrap(unsigned value, boolean shortened); +util_str_tex_wrap(unsigned value, bool shortened); const char * -util_str_tex_mipfilter(unsigned value, boolean shortened); +util_str_tex_mipfilter(unsigned value, bool shortened); const char * -util_str_tex_filter(unsigned value, boolean shortened); +util_str_tex_filter(unsigned value, bool shortened); const char * -util_str_query_type(unsigned value, boolean shortened); +util_str_query_type(unsigned value, bool shortened); const char * -util_str_query_value_type(unsigned value, boolean shortened); +util_str_query_value_type(unsigned value, bool shortened); const char * -util_str_prim_mode(unsigned value, boolean shortened); +util_str_prim_mode(unsigned value, bool shortened); void util_dump_ns(FILE *f, uint64_t time); diff --git a/src/gallium/auxiliary/util/u_dump_defines.c b/src/gallium/auxiliary/util/u_dump_defines.c index 08e1ed6656f..ec596a96cad 100644 --- a/src/gallium/auxiliary/util/u_dump_defines.c +++ b/src/gallium/auxiliary/util/u_dump_defines.c @@ -65,7 +65,7 @@ util_dump_enum_continuous(unsigned value, #define DEFINE_UTIL_STR_CONTINUOUS(_name) \ const char * \ - util_str_##_name(unsigned value, boolean shortened) \ + util_str_##_name(unsigned value, bool shortened) \ { \ if(shortened) \ return util_dump_enum_continuous(value, ARRAY_SIZE(util_##_name##_short_names), util_##_name##_short_names); \ @@ -80,7 +80,7 @@ util_dump_enum_continuous(unsigned value, */ #define DEFINE_UTIL_STR_CONTINUOUS_COUNT(_name, _count) \ const char * \ - util_str_##_name(unsigned value, boolean shortened) \ + util_str_##_name(unsigned value, bool shortened) \ { \ STATIC_ASSERT(ARRAY_SIZE(util_##_name##_names) == _count); \ STATIC_ASSERT(ARRAY_SIZE(util_##_name##_short_names) == _count); \ diff --git a/src/gallium/auxiliary/util/u_framebuffer.c b/src/gallium/auxiliary/util/u_framebuffer.c index 54a4a252018..92bc9d13bc3 100644 --- a/src/gallium/auxiliary/util/u_framebuffer.c +++ b/src/gallium/auxiliary/util/u_framebuffer.c @@ -45,7 +45,7 @@ * Compare pipe_framebuffer_state objects. * \return TRUE if same, FALSE if different */ -boolean +bool util_framebuffer_state_equal(const struct pipe_framebuffer_state *dst, const struct pipe_framebuffer_state *src) { @@ -147,7 +147,7 @@ util_unreference_framebuffer_state(struct pipe_framebuffer_state *fb) /* Where multiple sizes are allowed for framebuffer surfaces, find the * minimum width and height of all bound surfaces. */ -boolean +bool util_framebuffer_min_size(const struct pipe_framebuffer_state *fb, unsigned *width, unsigned *height) diff --git a/src/gallium/auxiliary/util/u_framebuffer.h b/src/gallium/auxiliary/util/u_framebuffer.h index 877e6e393f7..a07e5d32220 100644 --- a/src/gallium/auxiliary/util/u_framebuffer.h +++ b/src/gallium/auxiliary/util/u_framebuffer.h @@ -37,7 +37,7 @@ extern "C" { #endif -extern boolean +extern bool util_framebuffer_state_equal(const struct pipe_framebuffer_state *dst, const struct pipe_framebuffer_state *src); @@ -50,7 +50,7 @@ extern void util_unreference_framebuffer_state(struct pipe_framebuffer_state *fb); -extern boolean +extern bool util_framebuffer_min_size(const struct pipe_framebuffer_state *fb, unsigned *width, unsigned *height); diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c index d8a5f2fc008..22e377458e9 100644 --- a/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -55,7 +55,7 @@ * \param filter the minification filter used to generate mipmap levels with * one of PIPE_TEX_FILTER_LINEAR, PIPE_TEX_FILTER_NEAREST */ -boolean +bool util_gen_mipmap(struct pipe_context *pipe, struct pipe_resource *pt, enum pipe_format format, uint base_level, uint last_level, uint first_layer, uint last_layer, uint filter) @@ -63,8 +63,8 @@ util_gen_mipmap(struct pipe_context *pipe, struct pipe_resource *pt, struct pipe_screen *screen = pipe->screen; struct pipe_blit_info blit; uint dstLevel; - boolean is_zs = util_format_is_depth_or_stencil(format); - boolean has_depth = + bool is_zs = util_format_is_depth_or_stencil(format); + bool has_depth = util_format_has_depth(util_format_description(format)); /* nothing to do for stencil-only formats */ diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.h b/src/gallium/auxiliary/util/u_gen_mipmap.h index 99d01788848..c80853c9082 100644 --- a/src/gallium/auxiliary/util/u_gen_mipmap.h +++ b/src/gallium/auxiliary/util/u_gen_mipmap.h @@ -38,7 +38,7 @@ extern "C" { struct pipe_context; -extern boolean +extern bool util_gen_mipmap(struct pipe_context *pipe, struct pipe_resource *pt, enum pipe_format format, uint base_level, uint last_level, uint first_layer, uint last_layer, uint filter); diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index f42f368e244..4b3e82d5915 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -59,7 +59,7 @@ pipe_reference_init(struct pipe_reference *dst, unsigned count) dst->count = count; } -static inline boolean +static inline bool pipe_is_referenced(struct pipe_reference *src) { return p_atomic_read(&src->count) != 0; @@ -71,7 +71,7 @@ pipe_is_referenced(struct pipe_reference *src) * Both 'dst' and 'src' may be NULL. * \return TRUE if the object's refcount hits zero and should be destroyed. */ -static inline boolean +static inline bool pipe_reference_described(struct pipe_reference *dst, struct pipe_reference *src, debug_reference_descriptor get_desc) @@ -96,7 +96,7 @@ pipe_reference_described(struct pipe_reference *dst, return false; } -static inline boolean +static inline bool pipe_reference(struct pipe_reference *dst, struct pipe_reference *src) { return pipe_reference_described(dst, src, @@ -300,7 +300,7 @@ pipe_surface_init(struct pipe_context *ctx, struct pipe_surface* ps, } /* Return true if the surfaces are equal. */ -static inline boolean +static inline bool pipe_surface_equal(struct pipe_surface *s1, struct pipe_surface *s2) { return s1->texture == s2->texture && @@ -609,7 +609,7 @@ pipe_set_constant_buffer(struct pipe_context *pipe, * Get the polygon offset enable/disable flag for the given polygon fill mode. * \param fill_mode one of PIPE_POLYGON_MODE_POINT/LINE/FILL */ -static inline boolean +static inline bool util_get_offset(const struct pipe_rasterizer_state *templ, unsigned fill_mode) { diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary/util/u_prim.h index ec3c34d913e..09b090c1784 100644 --- a/src/gallium/auxiliary/util/u_prim.h +++ b/src/gallium/auxiliary/util/u_prim.h @@ -156,7 +156,7 @@ u_prims_for_vertices(enum mesa_prim prim, unsigned num) return 1 + ((num - info->min) / info->incr); } -static inline boolean +static inline bool u_validate_pipe_prim(enum mesa_prim pipe_prim, unsigned nr) { const struct u_prim_vertex_count *count = u_prim_vertex_count(pipe_prim); @@ -165,7 +165,7 @@ u_validate_pipe_prim(enum mesa_prim pipe_prim, unsigned nr) } -static inline boolean +static inline bool u_trim_pipe_prim(enum mesa_prim pipe_prim, unsigned *nr) { const struct u_prim_vertex_count *count = u_prim_vertex_count(pipe_prim); diff --git a/src/gallium/auxiliary/util/u_prim_restart.c b/src/gallium/auxiliary/util/u_prim_restart.c index 13b1b29bee4..3bbd6ccd2c7 100644 --- a/src/gallium/auxiliary/util/u_prim_restart.c +++ b/src/gallium/auxiliary/util/u_prim_restart.c @@ -104,7 +104,7 @@ struct range_info { * Helper function for util_draw_vbo_without_prim_restart() * \return true for success, false if out of memory */ -static boolean +static bool add_range(enum mesa_prim mode, struct range_info *info, unsigned start, unsigned count, unsigned index_bias) { /* degenerate primitive: ignore */ diff --git a/src/gallium/auxiliary/util/u_range.h b/src/gallium/auxiliary/util/u_range.h index 1ade98381ed..e8af46852cc 100644 --- a/src/gallium/auxiliary/util/u_range.h +++ b/src/gallium/auxiliary/util/u_range.h @@ -76,7 +76,7 @@ util_range_add(struct pipe_resource *resource, struct util_range *range, } } -static inline boolean +static inline bool util_ranges_intersect(const struct util_range *range, unsigned start, unsigned end) { diff --git a/src/gallium/auxiliary/util/u_rect.h b/src/gallium/auxiliary/util/u_rect.h index e873bbd5014..df6ddbcf8a7 100644 --- a/src/gallium/auxiliary/util/u_rect.h +++ b/src/gallium/auxiliary/util/u_rect.h @@ -44,7 +44,7 @@ struct u_rect { /* Do two rectangles intersect? * Note: empty rectangles are valid as inputs (and never intersect). */ -static inline boolean +static inline bool u_rect_test_intersection(const struct u_rect *a, const struct u_rect *b) { diff --git a/src/gallium/auxiliary/util/u_resource.h b/src/gallium/auxiliary/util/u_resource.h index 3c6194b8f07..b489bbb3596 100644 --- a/src/gallium/auxiliary/util/u_resource.h +++ b/src/gallium/auxiliary/util/u_resource.h @@ -36,7 +36,7 @@ util_resource_size(const struct pipe_resource *res); * * Note that this function returns true for single-layered array textures. */ -static inline boolean +static inline bool util_texture_is_array(enum pipe_texture_target target) { switch (target) { diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index 5e9c24ac3bd..9c3dcb59b31 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -629,7 +629,7 @@ static simple_mtx_t screen_mutex = SIMPLE_MTX_INITIALIZER; static void drm_screen_destroy(struct pipe_screen *pscreen) { - boolean destroy; + bool destroy; simple_mtx_lock(&screen_mutex); destroy = --pscreen->refcnt == 0; diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c index 119e1021614..d23034ad59f 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/src/gallium/auxiliary/util/u_simple_shaders.c @@ -372,7 +372,7 @@ void * util_make_fragment_passthrough_shader(struct pipe_context *pipe, int input_semantic, int input_interpolate, - boolean write_all_cbufs) + bool write_all_cbufs) { static const char shader_templ[] = "FRAG\n" diff --git a/src/gallium/auxiliary/util/u_simple_shaders.h b/src/gallium/auxiliary/util/u_simple_shaders.h index 07c2055ad9c..81c423d22e4 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.h +++ b/src/gallium/auxiliary/util/u_simple_shaders.h @@ -85,7 +85,7 @@ extern void * util_make_fragment_passthrough_shader(struct pipe_context *pipe, int input_semantic, int input_interpolate, - boolean write_all_cbufs); + bool write_all_cbufs); extern void * diff --git a/src/gallium/auxiliary/util/u_split_prim.h b/src/gallium/auxiliary/util/u_split_prim.h index bc5dc87b99d..cc2ec4af185 100644 --- a/src/gallium/auxiliary/util/u_split_prim.h +++ b/src/gallium/auxiliary/util/u_split_prim.h @@ -11,7 +11,7 @@ struct util_split_prim { void *priv; void (*emit)(void *priv, unsigned start, unsigned count); - void (*edge)(void *priv, boolean enabled); + void (*edge)(void *priv, bool enabled); unsigned mode; unsigned start; @@ -41,7 +41,7 @@ util_split_prim_init(struct util_split_prim *s, s->repeat_first = 0; } -static inline boolean +static inline bool util_split_prim_next(struct util_split_prim *s, unsigned max_verts) { int repeat = 0; diff --git a/src/gallium/auxiliary/util/u_suballoc.c b/src/gallium/auxiliary/util/u_suballoc.c index c5598ebc776..1b80e5a20a2 100644 --- a/src/gallium/auxiliary/util/u_suballoc.c +++ b/src/gallium/auxiliary/util/u_suballoc.c @@ -49,7 +49,7 @@ u_suballocator_init(struct u_suballocator *allocator, struct pipe_context *pipe, unsigned size, unsigned bind, enum pipe_resource_usage usage, unsigned flags, - boolean zero_buffer_memory) + bool zero_buffer_memory) { memset(allocator, 0, sizeof(*allocator)); diff --git a/src/gallium/auxiliary/util/u_suballoc.h b/src/gallium/auxiliary/util/u_suballoc.h index ed95e7c32b1..f2f15e29657 100644 --- a/src/gallium/auxiliary/util/u_suballoc.h +++ b/src/gallium/auxiliary/util/u_suballoc.h @@ -44,7 +44,7 @@ struct u_suballocator { unsigned bind; /* Bitmask of PIPE_BIND_* flags. */ enum pipe_resource_usage usage; unsigned flags; /* bitmask of PIPE_RESOURCE_FLAG_x */ - boolean zero_buffer_memory; /* If the buffer contents should be zeroed. */ + bool zero_buffer_memory; /* If the buffer contents should be zeroed. */ struct pipe_resource *buffer; /* The buffer we suballocate from. */ unsigned offset; /* Aligned offset pointing at the first unused byte. */ @@ -55,7 +55,7 @@ u_suballocator_init(struct u_suballocator *allocator, struct pipe_context *pipe, unsigned size, unsigned bind, enum pipe_resource_usage usage, unsigned flags, - boolean zero_buffer_memory); + bool zero_buffer_memory); void u_suballocator_destroy(struct u_suballocator *allocator); diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c index cbacf6c2710..d34cc9c97d2 100644 --- a/src/gallium/auxiliary/util/u_surface.c +++ b/src/gallium/auxiliary/util/u_surface.c @@ -582,7 +582,7 @@ util_clear_depth_stencil_texture(struct pipe_context *pipe, { struct pipe_transfer *dst_trans; ubyte *dst_map; - boolean need_rmw = FALSE; + bool need_rmw = FALSE; if ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) && ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) && @@ -690,7 +690,7 @@ util_clear_depth_stencil(struct pipe_context *pipe, /* Return if the box is totally inside the resource. */ -static boolean +static bool is_box_inside_resource(const struct pipe_resource *res, const struct pipe_box *box, unsigned level) diff --git a/src/gallium/auxiliary/util/u_texture.c b/src/gallium/auxiliary/util/u_texture.c index cf09368a86a..df3f43e85df 100644 --- a/src/gallium/auxiliary/util/u_texture.c +++ b/src/gallium/auxiliary/util/u_texture.c @@ -43,7 +43,7 @@ void util_map_texcoords2d_onto_cubemap(unsigned face, const float *in_st, unsigned in_stride, float *out_str, unsigned out_stride, - boolean allow_scale) + bool allow_scale) { int i; float rx, ry, rz; diff --git a/src/gallium/auxiliary/util/u_texture.h b/src/gallium/auxiliary/util/u_texture.h index ea945c8d0e5..c1e91137e64 100644 --- a/src/gallium/auxiliary/util/u_texture.h +++ b/src/gallium/auxiliary/util/u_texture.h @@ -47,7 +47,7 @@ extern "C" { void util_map_texcoords2d_onto_cubemap(unsigned face, const float *in_st, unsigned in_stride, float *out_str, unsigned out_stride, - boolean allow_scale); + bool allow_scale); #ifdef __cplusplus diff --git a/src/gallium/auxiliary/util/u_tile.h b/src/gallium/auxiliary/util/u_tile.h index bb279293fcb..3799feb476a 100644 --- a/src/gallium/auxiliary/util/u_tile.h +++ b/src/gallium/auxiliary/util/u_tile.h @@ -42,7 +42,7 @@ struct pipe_transfer; * * \return TRUE if tile is totally clipped, FALSE otherwise */ -static inline boolean +static inline bool u_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_box *box) { if ((int) x >= box->width) diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c index 1dcbff71999..47d787235ba 100644 --- a/src/gallium/auxiliary/util/u_upload_mgr.c +++ b/src/gallium/auxiliary/util/u_upload_mgr.c @@ -46,7 +46,7 @@ struct u_upload_mgr { enum pipe_resource_usage usage; unsigned flags; unsigned map_flags; /* Bitmask of PIPE_MAP_* flags. */ - boolean map_persistent; /* If persistent mappings are supported. */ + bool map_persistent; /* If persistent mappings are supported. */ struct pipe_resource *buffer; /* Upload buffer. */ struct pipe_transfer *transfer; /* Transfer object for the upload buffer. */ @@ -122,7 +122,7 @@ u_upload_disable_persistent(struct u_upload_mgr *upload) } static void -upload_unmap_internal(struct u_upload_mgr *upload, boolean destroying) +upload_unmap_internal(struct u_upload_mgr *upload, bool destroying) { if ((!destroying && upload->map_persistent) || !upload->transfer) return; diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index bb30d811b25..d2bce61c6e8 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -180,7 +180,7 @@ struct u_vbuf { struct cso_velems_state fallback_velems; /* If non-NULL, this is a vertex element state used for the translate * fallback and therefore used for rendering too. */ - boolean using_translate; + bool using_translate; /* The vertex buffer slot index where translated vertices have been * stored in. */ unsigned fallback_vbs[VB_NUM]; @@ -461,7 +461,7 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key, const struct pipe_draw_start_count_bias *draw, unsigned vb_mask, unsigned out_vb, int start_vertex, unsigned num_vertices, - int min_index, boolean unroll_indices) + int min_index, bool unroll_indices) { struct translate *tr; struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0}; @@ -613,7 +613,7 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key, return PIPE_OK; } -static boolean +static bool u_vbuf_translate_find_free_vb_slots(struct u_vbuf *mgr, unsigned mask[VB_NUM]) { @@ -624,7 +624,7 @@ u_vbuf_translate_find_free_vb_slots(struct u_vbuf *mgr, mgr->ve->incompatible_vb_mask_all | mgr->incompatible_vb_mask | ~mgr->enabled_vb_mask; uint32_t unused_vb_mask_orig; - boolean insufficient_buffers = false; + bool insufficient_buffers = false; /* No vertex buffers available at all */ if (!unused_vb_mask) @@ -674,12 +674,12 @@ u_vbuf_translate_find_free_vb_slots(struct u_vbuf *mgr, return TRUE; } -static boolean +static bool u_vbuf_translate_begin(struct u_vbuf *mgr, const struct pipe_draw_info *info, const struct pipe_draw_start_count_bias *draw, int start_vertex, unsigned num_vertices, - int min_index, boolean unroll_indices, + int min_index, bool unroll_indices, uint32_t misaligned) { unsigned mask[VB_NUM] = {0}; @@ -1257,7 +1257,7 @@ u_vbuf_upload_buffers(struct u_vbuf *mgr, return PIPE_OK; } -static boolean u_vbuf_need_minmax_index(const struct u_vbuf *mgr, uint32_t misaligned) +static bool u_vbuf_need_minmax_index(const struct u_vbuf *mgr, uint32_t misaligned) { /* See if there are any per-vertex attribs which will be uploaded or * translated. Use bitmasks to get the info instead of looping over vertex @@ -1271,7 +1271,7 @@ static boolean u_vbuf_need_minmax_index(const struct u_vbuf *mgr, uint32_t misal mgr->nonzero_stride_vb_mask)) != 0; } -static boolean u_vbuf_mapping_vertex_buffer_blocks(const struct u_vbuf *mgr, uint32_t misaligned) +static bool u_vbuf_mapping_vertex_buffer_blocks(const struct u_vbuf *mgr, uint32_t misaligned) { /* Return true if there are hw buffers which don't need to be translated. * @@ -1464,7 +1464,7 @@ void u_vbuf_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *inf int start_vertex; unsigned min_index; unsigned num_vertices; - boolean unroll_indices = FALSE; + bool unroll_indices = FALSE; const uint32_t used_vb_mask = mgr->ve->used_vb_mask; uint32_t user_vb_mask = mgr->user_vb_mask & used_vb_mask; unsigned fixed_restart_index = info->index_size ? util_prim_restart_index_from_size(info->index_size) : 0; diff --git a/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp b/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp index 4df0bcfb718..a9fa0cff278 100644 --- a/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp +++ b/src/gallium/drivers/d3d12/d3d12_bufmgr.cpp @@ -370,7 +370,7 @@ d3d12_bufmgr_destroy(struct pb_manager *_mgr) FREE(mgr); } -static boolean +static bool d3d12_bufmgr_is_buffer_busy(struct pb_manager *_mgr, struct pb_buffer *_buf) { /* We're only asked this on buffers that are known not busy */ diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_format.c b/src/gallium/drivers/freedreno/a3xx/fd3_format.c index 0c2375f2a23..9be96117d27 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_format.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_format.c @@ -36,7 +36,7 @@ struct fd3_format { enum a3xx_tex_fmt tex; enum a3xx_color_fmt rb; enum a3xx_color_swap swap; - boolean present; + bool present; }; /* vertex + texture */ diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_format.c b/src/gallium/drivers/freedreno/a4xx/fd4_format.c index c66e9a3d564..b71d899c92d 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_format.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_format.c @@ -38,7 +38,7 @@ struct fd4_format { enum a4xx_tex_fmt tex; enum a4xx_color_fmt rb; enum a3xx_color_swap swap; - boolean present; + bool present; }; /* vertex + texture */ diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_format.c b/src/gallium/drivers/freedreno/a5xx/fd5_format.c index d51fbb262ac..8a35f454b90 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_format.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_format.c @@ -38,7 +38,7 @@ struct fd5_format { enum a5xx_tex_fmt tex; enum a5xx_color_fmt rb; enum a3xx_color_swap swap; - boolean present; + bool present; }; /* vertex + texture */ diff --git a/src/gallium/drivers/freedreno/freedreno_screen.h b/src/gallium/drivers/freedreno/freedreno_screen.h index 0635fc65d1c..423caf9196e 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.h +++ b/src/gallium/drivers/freedreno/freedreno_screen.h @@ -213,13 +213,13 @@ struct pipe_screen *fd_screen_create(int fd, const struct pipe_screen_config *config, struct renderonly *ro); -static inline boolean +static inline bool is_a20x(struct fd_screen *screen) { return (screen->gpu_id >= 200) && (screen->gpu_id < 210); } -static inline boolean +static inline bool is_a2xx(struct fd_screen *screen) { return screen->gen == 2; @@ -227,38 +227,38 @@ is_a2xx(struct fd_screen *screen) /* is a3xx patch revision 0? */ /* TODO a306.0 probably doesn't need this.. be more clever?? */ -static inline boolean +static inline bool is_a3xx_p0(struct fd_screen *screen) { return (screen->chip_id & 0xff0000ff) == 0x03000000; } -static inline boolean +static inline bool is_a3xx(struct fd_screen *screen) { return screen->gen == 3; } -static inline boolean +static inline bool is_a4xx(struct fd_screen *screen) { return screen->gen == 4; } -static inline boolean +static inline bool is_a5xx(struct fd_screen *screen) { return screen->gen == 5; } -static inline boolean +static inline bool is_a6xx(struct fd_screen *screen) { return screen->gen == 6; } /* is it using the ir3 compiler (shader isa introduced with a3xx)? */ -static inline boolean +static inline bool is_ir3(struct fd_screen *screen) { return is_a3xx(screen) || is_a4xx(screen) || is_a5xx(screen) || diff --git a/src/gallium/drivers/freedreno/freedreno_state.c b/src/gallium/drivers/freedreno/freedreno_state.c index a5da323c43f..5e36730ef69 100644 --- a/src/gallium/drivers/freedreno/freedreno_state.c +++ b/src/gallium/drivers/freedreno/freedreno_state.c @@ -675,8 +675,8 @@ fd_set_stream_output_targets(struct pipe_context *pctx, unsigned num_targets, } for (i = 0; i < num_targets; i++) { - boolean changed = targets[i] != so->targets[i]; - boolean reset = (offsets[i] != (unsigned)-1); + bool changed = targets[i] != so->targets[i]; + bool reset = (offsets[i] != (unsigned)-1); so->reset |= (reset << i); diff --git a/src/gallium/drivers/i915/i915_prim_vbuf.c b/src/gallium/drivers/i915/i915_prim_vbuf.c index 939c43f1ac8..c4981951d0d 100644 --- a/src/gallium/drivers/i915/i915_prim_vbuf.c +++ b/src/gallium/drivers/i915/i915_prim_vbuf.c @@ -200,7 +200,7 @@ i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size) * a new buffer. Also updates may update the vbo state * on the i915 context. */ -static boolean +static bool i915_vbuf_render_allocate_vertices(struct vbuf_render *render, ushort vertex_size, ushort nr_vertices) { diff --git a/src/gallium/drivers/llvmpipe/lp_bld_alpha.c b/src/gallium/drivers/llvmpipe/lp_bld_alpha.c index 47035b6939b..1b7f623554b 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_alpha.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_alpha.c @@ -53,7 +53,7 @@ lp_build_alpha_test(struct gallivm_state *gallivm, struct lp_build_mask_context *mask, LLVMValueRef alpha, LLVMValueRef ref, - boolean do_branch) + bool do_branch) { struct lp_build_context bld; diff --git a/src/gallium/drivers/llvmpipe/lp_bld_alpha.h b/src/gallium/drivers/llvmpipe/lp_bld_alpha.h index 95eaad018e9..ca483ad4b1b 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_alpha.h +++ b/src/gallium/drivers/llvmpipe/lp_bld_alpha.h @@ -52,7 +52,7 @@ lp_build_alpha_test(struct gallivm_state *gallivm, struct lp_build_mask_context *mask, LLVMValueRef alpha, LLVMValueRef ref, - boolean do_branch); + bool do_branch); #endif /* !LP_BLD_ALPHA_H */ diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend.c b/src/gallium/drivers/llvmpipe/lp_bld_blend.c index aba4be5bc50..11009f63f13 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend.c @@ -42,7 +42,7 @@ /** * Is (a OP b) == (b OP a)? */ -boolean +bool lp_build_blend_func_commutative(enum pipe_blend_func func) { switch (func) { @@ -63,7 +63,7 @@ lp_build_blend_func_commutative(enum pipe_blend_func func) /** * Whether the blending functions are the reverse of each other. */ -boolean +bool lp_build_blend_func_reverse(enum pipe_blend_func rgb_func, enum pipe_blend_func alpha_func) { @@ -80,7 +80,7 @@ lp_build_blend_func_reverse(enum pipe_blend_func rgb_func, /** * Whether the blending factors are complementary of each other. */ -static inline boolean +static inline bool lp_build_blend_factor_complementary(unsigned src_factor, unsigned dst_factor) { STATIC_ASSERT((PIPE_BLENDFACTOR_ZERO ^ 0x10) == PIPE_BLENDFACTOR_ONE); @@ -93,7 +93,7 @@ lp_build_blend_factor_complementary(unsigned src_factor, unsigned dst_factor) /** * Whether this is a inverse blend factor */ -static inline boolean +static inline bool is_inverse_factor(unsigned factor) { STATIC_ASSERT(PIPE_BLENDFACTOR_ZERO == 0x11); @@ -109,7 +109,7 @@ static void lp_build_mul_norm_expand(struct lp_build_context *bld, LLVMValueRef a, LLVMValueRef b, LLVMValueRef *resl, LLVMValueRef *resh, - boolean signedness_differs) + bool signedness_differs) { const struct lp_type type = bld->type; struct lp_type wide_type = lp_wider_type(type); @@ -197,8 +197,8 @@ lp_build_blend(struct lp_build_context *bld, LLVMValueRef dst, LLVMValueRef src_factor, LLVMValueRef dst_factor, - boolean not_alpha_dependent, - boolean optimise_only) + bool not_alpha_dependent, + bool optimise_only) { LLVMValueRef result, src_term, dst_term; @@ -321,7 +321,7 @@ lp_build_alpha_to_coverage(struct gallivm_state *gallivm, struct lp_type type, struct lp_build_mask_context *mask, LLVMValueRef alpha, - boolean do_branch) + bool do_branch) { struct lp_build_context bld; LLVMValueRef test; diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend.h b/src/gallium/drivers/llvmpipe/lp_bld_blend.h index 5cba09644d2..b5db966a666 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend.h +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend.h @@ -50,8 +50,8 @@ lp_build_blend(struct lp_build_context *bld, LLVMValueRef dst, LLVMValueRef src_factor, LLVMValueRef dst_factor, - boolean not_alpha_dependent, - boolean optimise_only); + bool not_alpha_dependent, + bool optimise_only); LLVMValueRef @@ -92,11 +92,11 @@ lp_build_blend_func(struct lp_build_context *bld, LLVMValueRef term2); -boolean +bool lp_build_blend_func_reverse(enum pipe_blend_func rgb_func, enum pipe_blend_func alpha_func); -boolean +bool lp_build_blend_func_commutative(enum pipe_blend_func func); void @@ -104,6 +104,6 @@ lp_build_alpha_to_coverage(struct gallivm_state *gallivm, struct lp_type type, struct lp_build_mask_context *mask, LLVMValueRef alpha, - boolean do_branch); + bool do_branch); #endif /* !LP_BLD_BLEND_H */ diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c index 2a477069d3c..57c251c5d22 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c @@ -74,7 +74,7 @@ struct lp_build_blend_aos_context LLVMValueRef dst; LLVMValueRef const_; LLVMValueRef const_alpha; - boolean has_dst_alpha; + bool has_dst_alpha; LLVMValueRef inv_src; LLVMValueRef inv_src_alpha; @@ -93,7 +93,7 @@ struct lp_build_blend_aos_context static LLVMValueRef lp_build_blend_factor_unswizzled(struct lp_build_blend_aos_context *bld, unsigned factor, - boolean alpha) + bool alpha) { LLVMValueRef src_alpha = bld->src_alpha ? bld->src_alpha : bld->src; LLVMValueRef src1_alpha = bld->src1_alpha ? bld->src1_alpha : bld->src1; @@ -369,11 +369,11 @@ lp_build_blend_aos(struct gallivm_state *gallivm, } else if (!state->blend_enable) { result = src; } else { - boolean rgb_alpha_same = + bool rgb_alpha_same = (state->rgb_src_factor == state->rgb_dst_factor && state->alpha_src_factor == state->alpha_dst_factor) || nr_channels == 1; - boolean alpha_only = nr_channels == 1 && alpha_swizzle == PIPE_SWIZZLE_X; + bool alpha_only = nr_channels == 1 && alpha_swizzle == PIPE_SWIZZLE_X; LLVMValueRef src_factor, dst_factor; src_factor = lp_build_blend_factor(&bld, state->rgb_src_factor, diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/src/gallium/drivers/llvmpipe/lp_bld_depth.c index f93a96550ef..d1f8c73a8d1 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_depth.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.c @@ -347,7 +347,7 @@ lp_depth_type(const struct util_format_description *format_desc, * in the Z buffer (typically 0xffffff00 or 0x00ffffff). That lets us * get by with fewer bit twiddling steps. */ -static boolean +static bool get_z_shift_and_mask(const struct util_format_description *format_desc, unsigned *shift, unsigned *width, unsigned *mask) { @@ -385,7 +385,7 @@ get_z_shift_and_mask(const struct util_format_description *format_desc, * to put the stencil bits in the least significant position. * (i.e. 0x000000ff) */ -static boolean +static bool get_s_shift_and_mask(const struct util_format_description *format_desc, unsigned *shift, unsigned *mask) { @@ -531,7 +531,7 @@ void lp_build_depth_stencil_load_swizzled(struct gallivm_state *gallivm, struct lp_type z_src_type, const struct util_format_description *format_desc, - boolean is_1d, + bool is_1d, LLVMValueRef depth_ptr, LLVMValueRef depth_stride, LLVMValueRef *z_fb, @@ -669,7 +669,7 @@ void lp_build_depth_stencil_write_swizzled(struct gallivm_state *gallivm, struct lp_type z_src_type, const struct util_format_description *format_desc, - boolean is_1d, + bool is_1d, LLVMValueRef mask_value, LLVMValueRef z_fb, LLVMValueRef s_fb, @@ -829,7 +829,7 @@ lp_build_depth_stencil_test(struct gallivm_state *gallivm, LLVMValueRef face, LLVMValueRef *z_value, LLVMValueRef *s_value, - boolean do_branch, + bool do_branch, bool restrict_depth) { LLVMBuilderRef builder = gallivm->builder; @@ -844,7 +844,7 @@ lp_build_depth_stencil_test(struct gallivm_state *gallivm, LLVMValueRef z_pass = NULL, s_pass_mask = NULL; LLVMValueRef current_mask = mask ? lp_build_mask_value(mask) : *cov_mask; LLVMValueRef front_facing = NULL; - boolean have_z, have_s; + bool have_z, have_s; /* * Depths are expected to be between 0 and 1, even if they are stored in diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.h b/src/gallium/drivers/llvmpipe/lp_bld_depth.h index 1900cf68eec..6cb8d69b225 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_depth.h +++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.h @@ -68,14 +68,14 @@ lp_build_depth_stencil_test(struct gallivm_state *gallivm, LLVMValueRef face, LLVMValueRef *z_value, LLVMValueRef *s_value, - boolean do_branch, + bool do_branch, bool restrict_depth); void lp_build_depth_stencil_load_swizzled(struct gallivm_state *gallivm, struct lp_type z_src_type, const struct util_format_description *format_desc, - boolean is_1d, + bool is_1d, LLVMValueRef depth_ptr, LLVMValueRef depth_stride, LLVMValueRef *z_fb, @@ -86,7 +86,7 @@ void lp_build_depth_stencil_write_swizzled(struct gallivm_state *gallivm, struct lp_type z_src_type, const struct util_format_description *format_desc, - boolean is_1d, + bool is_1d, LLVMValueRef mask_value, LLVMValueRef z_fb, LLVMValueRef s_fb, diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.c b/src/gallium/drivers/llvmpipe/lp_bld_interp.c index b644e8d7d68..0728b6629cf 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_interp.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.c @@ -718,7 +718,7 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld, struct gallivm_state *gallivm, unsigned num_inputs, const struct lp_shader_input *inputs, - boolean pixel_center_integer, + bool pixel_center_integer, unsigned coverage_samples, LLVMTypeRef sample_pos_array_type, LLVMValueRef sample_pos_array, diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.h b/src/gallium/drivers/llvmpipe/lp_bld_interp.h index 34e44ac0939..b3276cd99b6 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_interp.h +++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.h @@ -85,7 +85,7 @@ struct lp_build_interp_soa_context unsigned mask[1 + PIPE_MAX_SHADER_INPUTS]; /**< TGSI_WRITE_MASK_x */ enum lp_interp interp[1 + PIPE_MAX_SHADER_INPUTS]; unsigned interp_loc[1 + PIPE_MAX_SHADER_INPUTS]; - boolean depth_clamp; + bool depth_clamp; double pos_offset; unsigned coverage_samples; @@ -123,7 +123,7 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld, struct gallivm_state *gallivm, unsigned num_inputs, const struct lp_shader_input *inputs, - boolean pixel_center_integer, + bool pixel_center_integer, unsigned coverage_samples, LLVMTypeRef sample_pos_array_type, LLVMValueRef sample_pos_array, diff --git a/src/gallium/drivers/llvmpipe/lp_context.h b/src/gallium/drivers/llvmpipe/lp_context.h index 4c985fa336a..80034fa974d 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.h +++ b/src/gallium/drivers/llvmpipe/lp_context.h @@ -143,7 +143,7 @@ struct llvmpipe_context { int8_t face_slot; /** Depth format and bias settings. */ - boolean floating_point_depth; + bool floating_point_depth; double mrd; /**< minimum resolvable depth value, for polygon offset */ /** The tiling engine */ @@ -162,8 +162,8 @@ struct llvmpipe_context { unsigned nr_fs_variants; unsigned nr_fs_instrs; - boolean permit_linear_rasterizer; - boolean single_vp; + bool permit_linear_rasterizer; + bool single_vp; struct lp_setup_variant_list_item setup_variants_list; unsigned nr_setup_variants; @@ -180,7 +180,7 @@ struct llvmpipe_context { /** Conditional query object and mode */ struct pipe_query *render_cond_query; enum pipe_render_cond_flag render_cond_mode; - boolean render_cond_cond; + bool render_cond_cond; /** VK render cond */ struct llvmpipe_resource *render_cond_buffer; diff --git a/src/gallium/drivers/llvmpipe/lp_fence.c b/src/gallium/drivers/llvmpipe/lp_fence.c index 67a74d30853..75207f357f2 100644 --- a/src/gallium/drivers/llvmpipe/lp_fence.c +++ b/src/gallium/drivers/llvmpipe/lp_fence.c @@ -108,7 +108,7 @@ lp_fence_signal(struct lp_fence *fence) } -boolean +bool lp_fence_signalled(struct lp_fence *f) { return f->count == f->rank; @@ -130,7 +130,7 @@ lp_fence_wait(struct lp_fence *f) } -boolean +bool lp_fence_timedwait(struct lp_fence *f, uint64_t timeout) { struct timespec ts, abs_ts; @@ -154,7 +154,7 @@ lp_fence_timedwait(struct lp_fence *f, uint64_t timeout) break; } - const boolean result = (f->count >= f->rank); + const bool result = (f->count >= f->rank); mtx_unlock(&f->mutex); return result; diff --git a/src/gallium/drivers/llvmpipe/lp_fence.h b/src/gallium/drivers/llvmpipe/lp_fence.h index 606f031fba7..eaa7c0a4a58 100644 --- a/src/gallium/drivers/llvmpipe/lp_fence.h +++ b/src/gallium/drivers/llvmpipe/lp_fence.h @@ -46,7 +46,7 @@ struct lp_fence mtx_t mutex; cnd_t signalled; - boolean issued; + bool issued; unsigned rank; unsigned count; }; @@ -59,13 +59,13 @@ lp_fence_create(unsigned rank); void lp_fence_signal(struct lp_fence *fence); -boolean +bool lp_fence_signalled(struct lp_fence *fence); void lp_fence_wait(struct lp_fence *fence); -boolean +bool lp_fence_timedwait(struct lp_fence *fence, uint64_t timeout); void @@ -88,7 +88,7 @@ lp_fence_reference(struct lp_fence **ptr, *ptr = f; } -static inline boolean +static inline bool lp_fence_issued(const struct lp_fence *fence) { return fence->issued; diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c index 8ebbeae4253..97532edaf48 100644 --- a/src/gallium/drivers/llvmpipe/lp_flush.c +++ b/src/gallium/drivers/llvmpipe/lp_flush.c @@ -109,13 +109,13 @@ llvmpipe_finish(struct pipe_context *pipe, * * TODO: move this logic to an auxiliary library? */ -boolean +bool llvmpipe_flush_resource(struct pipe_context *pipe, struct pipe_resource *resource, unsigned level, - boolean read_only, - boolean cpu_access, - boolean do_not_block, + bool read_only, + bool cpu_access, + bool do_not_block, const char *reason) { unsigned referenced = 0; diff --git a/src/gallium/drivers/llvmpipe/lp_flush.h b/src/gallium/drivers/llvmpipe/lp_flush.h index 432515db068..4d1c2df6819 100644 --- a/src/gallium/drivers/llvmpipe/lp_flush.h +++ b/src/gallium/drivers/llvmpipe/lp_flush.h @@ -43,13 +43,13 @@ void llvmpipe_finish(struct pipe_context *pipe, const char *reason); -boolean +bool llvmpipe_flush_resource(struct pipe_context *pipe, struct pipe_resource *resource, unsigned level, - boolean read_only, - boolean cpu_access, - boolean do_not_block, + bool read_only, + bool cpu_access, + bool do_not_block, const char *reason); #endif diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c index f1c7bc2ef65..6ed285dc5f4 100644 --- a/src/gallium/drivers/llvmpipe/lp_jit.c +++ b/src/gallium/drivers/llvmpipe/lp_jit.c @@ -227,7 +227,7 @@ lp_jit_screen_cleanup(struct llvmpipe_screen *screen) } -boolean +bool lp_jit_screen_init(struct llvmpipe_screen *screen) { return lp_build_init(); diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h index d0f77c0ac24..4424ef2dc89 100644 --- a/src/gallium/drivers/llvmpipe/lp_jit.h +++ b/src/gallium/drivers/llvmpipe/lp_jit.h @@ -282,7 +282,7 @@ typedef const uint8_t * /* We're not really jitting this, but I need to get into the * rast_state struct to call the function we actually are jitting. */ -typedef boolean +typedef bool (*lp_jit_linear_func)(const struct lp_rast_state *state, uint32_t x, uint32_t y, @@ -382,7 +382,7 @@ typedef void void lp_jit_screen_cleanup(struct llvmpipe_screen *screen); -boolean +bool lp_jit_screen_init(struct llvmpipe_screen *screen); void diff --git a/src/gallium/drivers/llvmpipe/lp_linear.c b/src/gallium/drivers/llvmpipe/lp_linear.c index 5346c4789ba..d450ce78315 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear.c +++ b/src/gallium/drivers/llvmpipe/lp_linear.c @@ -48,7 +48,7 @@ * purple. Keep blending active so we can see more of what's going * on. */ -static boolean +static bool linear_fallback(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -73,7 +73,7 @@ linear_fallback(const struct lp_rast_state *state, * x,y is the surface position of the linear region, width, height is the size. * Return TRUE for success, FALSE otherwise. */ -static boolean +static bool lp_fs_linear_run(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -139,7 +139,7 @@ lp_fs_linear_run(const struct lp_rast_state *state, while (input_mask) { int i = u_bit_scan(&input_mask); unsigned usage_mask = info->base.input_usage_mask[i]; - boolean perspective = + bool perspective = info->base.input_interpolate[i] == TGSI_INTERPOLATE_PERSPECTIVE || (info->base.input_interpolate[i] == TGSI_INTERPOLATE_COLOR && !variant->key.flatshade); diff --git a/src/gallium/drivers/llvmpipe/lp_linear_fastpath.c b/src/gallium/drivers/llvmpipe/lp_linear_fastpath.c index a3283335478..c584086f0ea 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear_fastpath.c +++ b/src/gallium/drivers/llvmpipe/lp_linear_fastpath.c @@ -56,7 +56,7 @@ /* Linear shader which implements the BLIT_RGBA shader with the * additional constraints imposed by lp_setup_is_blit(). */ -static boolean +static bool lp_linear_blit_rgba_blit(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -105,7 +105,7 @@ lp_linear_blit_rgba_blit(const struct lp_rast_state *state, /* Linear shader which implements the BLIT_RGB1 shader, with the * additional constraints imposed by lp_setup_is_blit(). */ -static boolean +static bool lp_linear_blit_rgb1_blit(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -161,7 +161,7 @@ lp_linear_blit_rgb1_blit(const struct lp_rast_state *state, /* Linear shader which always emits purple. Used for debugging. */ -static boolean +static bool lp_linear_purple(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -192,7 +192,7 @@ lp_linear_purple(const struct lp_rast_state *state, /* Examine the fragment shader variant and determine whether we can * substitute a fastpath linear shader implementation. */ -boolean +bool lp_linear_check_fastpath(struct lp_fragment_shader_variant *variant) { struct lp_sampler_static_state *samp0 = @@ -230,7 +230,7 @@ lp_linear_check_fastpath(struct lp_fragment_shader_variant *variant) #else -boolean +bool lp_linear_check_fastpath(struct lp_fragment_shader_variant *variant) { return FALSE; diff --git a/src/gallium/drivers/llvmpipe/lp_linear_interp.c b/src/gallium/drivers/llvmpipe/lp_linear_interp.c index 728531d6d57..4ff6c837f40 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear_interp.c +++ b/src/gallium/drivers/llvmpipe/lp_linear_interp.c @@ -120,11 +120,11 @@ lp_linear_init_noop_interp(struct lp_linear_interp *interp) } -boolean +bool lp_linear_init_interp(struct lp_linear_interp *interp, int x, int y, int width, int height, unsigned usage_mask, - boolean perspective, + bool perspective, float oow, const float *a0, const float *dadx, @@ -230,11 +230,11 @@ lp_linear_init_interp(struct lp_linear_interp *interp, #else //DETECT_ARCH_SSE -boolean +bool lp_linear_init_interp(struct lp_linear_interp *interp, int x, int y, int width, int height, unsigned usage_mask, - boolean perspective, + bool perspective, float oow, const float *a0, const float *dadx, diff --git a/src/gallium/drivers/llvmpipe/lp_linear_priv.h b/src/gallium/drivers/llvmpipe/lp_linear_priv.h index 66672ee72e1..5680974c767 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_linear_priv.h @@ -27,7 +27,7 @@ struct lp_linear_sampler { int dtdx; /* 16.16 */ int dtdy; /* 16.16 */ int width; - boolean axis_aligned; + bool axis_aligned; alignas(16) uint32_t row[64]; alignas(16) uint32_t stretched_row[2][64]; @@ -68,7 +68,7 @@ struct lp_linear_interp { * implementation - normalized texcoords, single mipmap with * nearest filtering. */ -static inline boolean +static inline bool is_nearest_sampler(const struct lp_sampler_static_state *sampler) { return @@ -86,7 +86,7 @@ is_nearest_sampler(const struct lp_sampler_static_state *sampler) * implementation - normalized texcoords, single mipmap with * linear filtering. */ -static inline boolean +static inline bool is_linear_sampler(const struct lp_sampler_static_state *sampler) { return @@ -103,7 +103,7 @@ is_linear_sampler(const struct lp_sampler_static_state *sampler) /* Check for a sampler variant which matches is_nearest_sampler * but has the additional constraints of using clamp wrapping */ -static inline boolean +static inline bool is_nearest_clamp_sampler(const struct lp_sampler_static_state *sampler) { return @@ -116,7 +116,7 @@ is_nearest_clamp_sampler(const struct lp_sampler_static_state *sampler) /* Check for a sampler variant which matches is_linear_sampler * but has the additional constraints of using clamp wrapping */ -static inline boolean +static inline bool is_linear_clamp_sampler(const struct lp_sampler_static_state *sampler) { return @@ -126,17 +126,17 @@ is_linear_clamp_sampler(const struct lp_sampler_static_state *sampler) } -boolean +bool lp_linear_init_interp(struct lp_linear_interp *interp, int x, int y, int width, int height, unsigned usage_mask, - boolean perspective, + bool perspective, float oow, const float *a0, const float *dadx, const float *dady); -boolean +bool lp_linear_init_sampler(struct lp_linear_sampler *samp, const struct lp_tgsi_texture_info *info, const struct lp_sampler_static_state *sampler_state, @@ -147,10 +147,10 @@ lp_linear_init_sampler(struct lp_linear_sampler *samp, const float (*dady)[4]); -boolean +bool lp_linear_check_fastpath(struct lp_fragment_shader_variant *variant); -boolean +bool lp_linear_check_sampler(const struct lp_sampler_static_state *sampler, const struct lp_tgsi_texture_info *tex); diff --git a/src/gallium/drivers/llvmpipe/lp_linear_sampler.c b/src/gallium/drivers/llvmpipe/lp_linear_sampler.c index 24093f04b15..c417ffa0f7c 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear_sampler.c +++ b/src/gallium/drivers/llvmpipe/lp_linear_sampler.c @@ -656,10 +656,10 @@ fetch_bgrx_linear(struct lp_linear_elem *elem) } -static boolean +static bool sampler_is_nearest(const struct lp_linear_sampler *samp, const struct lp_sampler_static_state *sampler_state, - boolean minify) + bool minify) { unsigned img_filter; @@ -719,7 +719,7 @@ sampler_is_nearest(const struct lp_linear_sampler *samp, * little info is extracted from each one. Consolidate it all down to * something succinct in the prepare phase? */ -boolean +bool lp_linear_init_sampler(struct lp_linear_sampler *samp, const struct lp_tgsi_texture_info *info, const struct lp_sampler_static_state *sampler_state, @@ -756,9 +756,9 @@ lp_linear_init_sampler(struct lp_linear_sampler *samp, float fdtdy = dtdy * height_oow; int fetch_width; int fetch_height; - boolean minify; - boolean need_wrap; - boolean is_nearest; + bool minify; + bool need_wrap; + bool is_nearest; samp->texture = texture; samp->width = width; @@ -947,7 +947,7 @@ lp_linear_init_noop_sampler(struct lp_linear_sampler *samp) /* * Check the given sampler and texture info for linear path compatibility. */ -boolean +bool lp_linear_check_sampler(const struct lp_sampler_static_state *sampler, const struct lp_tgsi_texture_info *tex) { @@ -990,7 +990,7 @@ lp_linear_check_sampler(const struct lp_sampler_static_state *sampler, #else // DETECT_ARCH_SSE -boolean +bool lp_linear_check_sampler(const struct lp_sampler_static_state *sampler, const struct lp_tgsi_texture_info *tex) { diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c index 80ecdc066f9..c787a7319e2 100644 --- a/src/gallium/drivers/llvmpipe/lp_query.c +++ b/src/gallium/drivers/llvmpipe/lp_query.c @@ -541,7 +541,7 @@ llvmpipe_end_query(struct pipe_context *pipe, struct pipe_query *q) } -boolean +bool llvmpipe_check_render_cond(struct llvmpipe_context *lp) { struct pipe_context *pipe = &lp->pipe; diff --git a/src/gallium/drivers/llvmpipe/lp_query.h b/src/gallium/drivers/llvmpipe/lp_query.h index ef10ac3afe3..7859c296872 100644 --- a/src/gallium/drivers/llvmpipe/lp_query.h +++ b/src/gallium/drivers/llvmpipe/lp_query.h @@ -56,6 +56,6 @@ struct llvmpipe_query { extern void llvmpipe_init_query_funcs(struct llvmpipe_context * ); -extern boolean llvmpipe_check_render_cond(struct llvmpipe_context *); +extern bool llvmpipe_check_render_cond(struct llvmpipe_context *); #endif /* LP_QUERY_H */ diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index fbc05946ce7..20fcf45d86c 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -1027,7 +1027,7 @@ rasterize_bin(struct lp_rasterizer_task *task, * * Try to avoid doing pointless work in this case. */ -static boolean +static bool is_empty_bin(const struct cmd_bin *bin) { return bin->head == NULL; @@ -1161,7 +1161,7 @@ thread_function(void *init_data) { struct lp_rasterizer_task *task = (struct lp_rasterizer_task *) init_data; struct lp_rasterizer *rast = task->rast; - boolean debug = false; + bool debug = false; char thread_name[16]; snprintf(thread_name, sizeof thread_name, "llvmpipe-%u", task->thread_index); diff --git a/src/gallium/drivers/llvmpipe/lp_rast_debug.c b/src/gallium/drivers/llvmpipe/lp_rast_debug.c index a42047aebbb..5ec13caf3d3 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_debug.c +++ b/src/gallium/drivers/llvmpipe/lp_rast_debug.c @@ -107,7 +107,7 @@ get_variant(const struct lp_rast_state *state, } -static boolean +static bool is_blend(const struct lp_rast_state *state, const struct cmd_block *block, int k) @@ -122,7 +122,7 @@ is_blend(const struct lp_rast_state *state, } -static boolean +static bool is_linear(const struct lp_rast_state *state, const struct cmd_block *block, int k) @@ -197,7 +197,7 @@ static void plot(struct tile *tile, int x, int y, char val, - boolean blend) + bool blend) { if (tile->data[x][y] == ' ') tile->coverage++; @@ -228,7 +228,7 @@ debug_rectangle(int x, int y, return 0; } - boolean blend = tile->state->variant->key.blend.rt[0].blend_enable; + bool blend = tile->state->variant->key.blend.rt[0].blend_enable; unsigned count = 0; for (unsigned i = 0; i < TILE_SIZE; i++) { for (unsigned j = 0; j < TILE_SIZE; j++) { @@ -277,7 +277,7 @@ debug_shade_tile(int x, int y, if (inputs->disable) return 0; - boolean blend = tile->state->variant->key.blend.rt[0].blend_enable; + bool blend = tile->state->variant->key.blend.rt[0].blend_enable; for (unsigned i = 0; i < TILE_SIZE; i++) for (unsigned j = 0; j < TILE_SIZE; j++) @@ -314,7 +314,7 @@ debug_triangle(int tilex, int tiley, int x, y; int count = 0; unsigned i, nr_planes = 0; - boolean blend = tile->state->variant->key.blend.rt[0].blend_enable; + bool blend = tile->state->variant->key.blend.rt[0].blend_enable; if (tri->inputs.disable) { /* This triangle was partially binned and has been disabled */ @@ -356,7 +356,7 @@ static void do_debug_bin(struct tile *tile, const struct cmd_bin *bin, int x, int y, - boolean print_cmds) + bool print_cmds) { unsigned k, j = 0; const struct cmd_block *block; @@ -371,8 +371,8 @@ do_debug_bin(struct tile *tile, for (block = bin->head; block; block = block->next) { for (k = 0; k < block->count; k++, j++) { - boolean blend = is_blend(tile->state, block, k); - boolean linear = is_linear(tile->state, block, k); + bool blend = is_blend(tile->state, block, k); + bool linear = is_linear(tile->state, block, k); const char *fskind = get_fs_kind(tile->state, block, k); char val = get_label(j); int count = 0; diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h index c535f7d95d0..ff1541f0bc2 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h @@ -112,8 +112,8 @@ struct lp_rasterizer_task */ struct lp_rasterizer { - boolean exit_flag; - boolean no_rast; /**< For debugging/profiling */ + bool exit_flag; + bool no_rast; /**< For debugging/profiling */ /** The incoming queue of scenes ready to rasterize */ struct lp_scene_queue *full_scenes; diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c index df16d4a3b40..19220f1d383 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.c +++ b/src/gallium/drivers/llvmpipe/lp_scene.c @@ -112,7 +112,7 @@ lp_scene_destroy(struct lp_scene *scene) * Check if the scene's bins are all empty. * For debugging purposes. */ -boolean +bool lp_scene_is_empty(struct lp_scene *scene) { for (unsigned y = 0; y < scene->tiles_y; y++) { @@ -131,7 +131,7 @@ lp_scene_is_empty(struct lp_scene *scene) * this scene. Used in triangle/rectangle emit to avoid having to * check success at each bin. */ -boolean +bool lp_scene_is_oom(struct lp_scene *scene) { return scene->alloc_failed; @@ -391,11 +391,11 @@ lp_scene_data_size(const struct lp_scene *scene) /** * Add a reference to a resource by the scene. */ -boolean +bool lp_scene_add_resource_reference(struct lp_scene *scene, struct pipe_resource *resource, - boolean initializing_scene, - boolean writeable) + bool initializing_scene, + bool writeable) { struct resource_ref *ref; int i; @@ -460,7 +460,7 @@ lp_scene_add_resource_reference(struct lp_scene *scene, * Add a reference to a fragment shader variant * Return FALSE if out of memory, TRUE otherwise. */ -boolean +bool lp_scene_add_frag_shader_reference(struct lp_scene *scene, struct lp_fragment_shader_variant *variant) { @@ -532,7 +532,7 @@ lp_scene_is_resource_referenced(const struct lp_scene *scene, /** advance curr_x,y to the next bin */ -static boolean +static bool next_bin(struct lp_scene *scene) { scene->curr_x++; diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h index ac817e763c2..a762e15d4ea 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.h +++ b/src/gallium/drivers/llvmpipe/lp_scene.h @@ -147,7 +147,7 @@ struct lp_scene { struct llvmpipe_query *active_queries[LP_MAX_ACTIVE_BINNED_QUERIES]; unsigned num_active_queries; /* If queries were either active or there were begin/end query commands */ - boolean had_queries; + bool had_queries; /* Framebuffer mappings - valid only between begin_rasterization() * and end_rasterization(). @@ -186,8 +186,8 @@ struct lp_scene { */ unsigned resource_reference_size; - boolean alloc_failed; - boolean permit_linear_rasterizer; + bool alloc_failed; + bool permit_linear_rasterizer; /** * Number of active tiles in each dimension. @@ -209,24 +209,24 @@ struct lp_scene *lp_scene_create(struct lp_setup_context *setup); void lp_scene_destroy(struct lp_scene *scene); -boolean lp_scene_is_empty(struct lp_scene *scene); +bool lp_scene_is_empty(struct lp_scene *scene); -boolean lp_scene_is_oom(struct lp_scene *scene); +bool lp_scene_is_oom(struct lp_scene *scene); struct data_block *lp_scene_new_data_block(struct lp_scene *scene); struct cmd_block *lp_scene_new_cmd_block(struct lp_scene *scene, struct cmd_bin *bin); -boolean lp_scene_add_resource_reference(struct lp_scene *scene, +bool lp_scene_add_resource_reference(struct lp_scene *scene, struct pipe_resource *resource, - boolean initializing_scene, - boolean writeable); + bool initializing_scene, + bool writeable); unsigned lp_scene_is_resource_referenced(const struct lp_scene *scene, const struct pipe_resource *resource); -boolean lp_scene_add_frag_shader_reference(struct lp_scene *scene, +bool lp_scene_add_frag_shader_reference(struct lp_scene *scene, struct lp_fragment_shader_variant *variant); @@ -314,7 +314,7 @@ lp_scene_bin_reset(struct lp_scene *scene, unsigned x, unsigned y); /* Add a command to bin[x][y]. */ -static inline boolean +static inline bool lp_scene_bin_command(struct lp_scene *scene, unsigned x, unsigned y, enum lp_rast_op cmd, @@ -346,7 +346,7 @@ lp_scene_bin_command(struct lp_scene *scene, } -static inline boolean +static inline bool lp_scene_bin_cmd_with_state(struct lp_scene *scene, unsigned x, unsigned y, const struct lp_rast_state *state, @@ -372,7 +372,7 @@ lp_scene_bin_cmd_with_state(struct lp_scene *scene, /* Add a command to all active bins. */ -static inline boolean +static inline bool lp_scene_bin_everywhere(struct lp_scene *scene, enum lp_rast_op cmd, const union lp_rast_cmd_arg arg) diff --git a/src/gallium/drivers/llvmpipe/lp_scene_queue.c b/src/gallium/drivers/llvmpipe/lp_scene_queue.c index d02a256972f..b4000b4ba17 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene_queue.c +++ b/src/gallium/drivers/llvmpipe/lp_scene_queue.c @@ -95,7 +95,7 @@ lp_scene_queue_destroy(struct lp_scene_queue *queue) /** Remove first lp_scene from head of queue */ struct lp_scene * -lp_scene_dequeue(struct lp_scene_queue *queue, boolean wait) +lp_scene_dequeue(struct lp_scene_queue *queue, bool wait) { mtx_lock(&queue->mutex); diff --git a/src/gallium/drivers/llvmpipe/lp_scene_queue.h b/src/gallium/drivers/llvmpipe/lp_scene_queue.h index dd9ab593b4a..1ce71c778c2 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene_queue.h +++ b/src/gallium/drivers/llvmpipe/lp_scene_queue.h @@ -42,7 +42,7 @@ void lp_scene_queue_destroy(struct lp_scene_queue *queue); struct lp_scene * -lp_scene_dequeue(struct lp_scene_queue *queue, boolean wait); +lp_scene_dequeue(struct lp_scene_queue *queue, bool wait); void lp_scene_enqueue(struct lp_scene_queue *queue, struct lp_scene *scene); diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 9b70d350c27..be926bd77f4 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -61,7 +61,7 @@ #include "draw/draw_vbuf.h" -static boolean +static bool try_update_scene_state(struct lp_setup_context *setup); @@ -129,7 +129,7 @@ first_triangle(struct lp_setup_context *setup, } -static boolean +static bool first_rectangle(struct lp_setup_context *setup, const float (*v0)[4], const float (*v1)[4], @@ -219,7 +219,7 @@ lp_setup_rasterize_scene(struct lp_setup_context *setup) } -static boolean +static bool begin_binning(struct lp_setup_context *setup) { struct lp_scene *scene = setup->scene; @@ -237,7 +237,7 @@ begin_binning(struct lp_setup_context *setup) return FALSE; } - boolean need_zsload = FALSE; + bool need_zsload = FALSE; if (setup->fb.zsbuf && ((setup->clear.flags & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) && util_format_is_depth_and_stencil(setup->fb.zsbuf->format)) { @@ -302,7 +302,7 @@ begin_binning(struct lp_setup_context *setup) * * TODO: fast path for fullscreen clears and no triangles. */ -static boolean +static bool execute_clears(struct lp_setup_context *setup) { LP_DBG(DEBUG_SETUP, "%s\n", __func__); @@ -318,7 +318,7 @@ static const char *states[] = { }; -static boolean +static bool set_scene_state(struct lp_setup_context *setup, enum setup_state new_state, const char *reason) @@ -418,7 +418,7 @@ lp_setup_bind_framebuffer(struct lp_setup_context *setup, * Try to clear one color buffer of the attached fb, either by binning a clear * command or queuing up the clear for later (when binning is started). */ -static boolean +static bool lp_setup_try_clear_color_buffer(struct lp_setup_context *setup, const union pipe_color_union *color, unsigned cbuf) @@ -474,7 +474,7 @@ lp_setup_try_clear_color_buffer(struct lp_setup_context *setup, } -static boolean +static bool lp_setup_try_clear_zs(struct lp_setup_context *setup, double depth, unsigned stencil, @@ -774,7 +774,7 @@ lp_setup_set_sample_mask(struct lp_setup_context *setup, void lp_setup_set_rasterizer_discard(struct lp_setup_context *setup, - boolean rasterizer_discard) + bool rasterizer_discard) { if (setup->rasterizer_discard != rasterizer_discard) { setup->rasterizer_discard = rasterizer_discard; @@ -798,7 +798,7 @@ lp_setup_set_vertex_info(struct lp_setup_context *setup, void lp_setup_set_linear_mode(struct lp_setup_context *setup, - boolean mode) + bool mode) { /* The linear rasterizer requires sse2 both at compile and runtime, * in particular for the code in lp_rast_linear_fallback.c. This @@ -991,11 +991,11 @@ lp_setup_is_resource_referenced(const struct lp_setup_context *setup, * pointers previously allocated with lp_scene_alloc() in this function (or any * function) as they may belong to a scene freed since then. */ -static boolean +static bool try_update_scene_state(struct lp_setup_context *setup) { static const float fake_const_buf[4]; - boolean new_scene = (setup->fs.stored == NULL); + bool new_scene = (setup->fs.stored == NULL); struct lp_scene *scene = setup->scene; assert(scene); @@ -1209,7 +1209,7 @@ try_update_scene_state(struct lp_setup_context *setup) } if (setup->permit_linear_rasterizer) { /* NOTE: this only takes first vp into account. */ - boolean need_vp_scissoring = + bool need_vp_scissoring = !!memcmp(&setup->vpwh, &setup->framebuffer, sizeof(setup->framebuffer)); @@ -1230,7 +1230,7 @@ try_update_scene_state(struct lp_setup_context *setup) * cause large points to always get vp scissored, regardless the * point_line_tri_clip setting.) */ - boolean need_vp_scissoring = + bool need_vp_scissoring = !!memcmp(&setup->vpwh, &setup->framebuffer, sizeof(setup->framebuffer)); if (need_vp_scissoring) { @@ -1247,9 +1247,9 @@ try_update_scene_state(struct lp_setup_context *setup) } -boolean +bool lp_setup_update_state(struct lp_setup_context *setup, - boolean update_scene) + bool update_scene) { /* Some of the 'draw' pipeline stages may have changed some driver state. * Make sure we've processed those state changes before anything else. @@ -1558,7 +1558,7 @@ fail: } -boolean +bool lp_setup_flush_and_restart(struct lp_setup_context *setup) { if (0) debug_printf("%s\n", __func__); @@ -1578,7 +1578,7 @@ lp_setup_flush_and_restart(struct lp_setup_context *setup) void lp_setup_add_scissor_planes(const struct u_rect *scissor, struct lp_rast_plane *plane_s, - boolean s_planes[4], bool multisample) + bool s_planes[4], bool multisample) { /* * When rasterizing scissored tris, use the intersection of the diff --git a/src/gallium/drivers/llvmpipe/lp_setup.h b/src/gallium/drivers/llvmpipe/lp_setup.h index 7304c84cc9e..d2785017773 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.h +++ b/src/gallium/drivers/llvmpipe/lp_setup.h @@ -136,7 +136,7 @@ lp_setup_set_sample_mask(struct lp_setup_context *setup, void lp_setup_set_rasterizer_discard(struct lp_setup_context *setup, - boolean rasterizer_discard); + bool rasterizer_discard); void lp_setup_set_vertex_info(struct lp_setup_context *setup, @@ -144,7 +144,7 @@ lp_setup_set_vertex_info(struct lp_setup_context *setup, void lp_setup_set_linear_mode(struct lp_setup_context *setup, - boolean permit_linear_rasterizer); + bool permit_linear_rasterizer); void lp_setup_begin_query(struct lp_setup_context *setup, diff --git a/src/gallium/drivers/llvmpipe/lp_setup_analysis.c b/src/gallium/drivers/llvmpipe/lp_setup_analysis.c index a935ffc7a8d..5b9832afe5e 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_analysis.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_analysis.c @@ -55,7 +55,7 @@ const_float4_ptr get_vert(const void *vertex_buffer, int index, int stride) /* Aero sends these weird zero area triangles. Test for them here. */ -static boolean +static bool is_zero_area(const float (*v0)[4], const float (*v1)[4], const float (*v2)[4]) @@ -106,7 +106,7 @@ calc_interps(float x0, float x1, /* Validate axis-aligned interpolant for s and t as functions of x and * y respectively. */ -static boolean +static bool test_interps(const_float4_ptr v, float as, float bs, float at, float bt) @@ -150,7 +150,7 @@ rect(struct lp_setup_context *setup, * | | * v2------v1 */ -static boolean +static bool test_rect(const_float4_ptr v0, const_float4_ptr v1, const_float4_ptr v2, @@ -211,7 +211,7 @@ test_rect(const_float4_ptr v0, * rectangles by introducing new vertices at vA, vB, vC and vD, and * then drawing rectangles. */ -static boolean +static bool check_elts24(struct lp_setup_context *setup, const void *vb, int stride) { const int count = 24; @@ -316,14 +316,14 @@ check_elts24(struct lp_setup_context *setup, const void *vb, int stride) return TRUE; } -boolean +bool lp_setup_analyse_triangles(struct lp_setup_context *setup, const void *vb, int stride, int nr) { int i; - const boolean variant_blit = setup->fs.current.variant->blit; + const bool variant_blit = setup->fs.current.variant->blit; if (0) { debug_printf("%s %d\n", __func__, nr); diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h index 5a0985e816b..f20a192d4cf 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_context.h +++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h @@ -186,7 +186,7 @@ struct lp_setup_context const float (*v1)[4], const float (*v2)[4]); - boolean + bool (*rect)(struct lp_setup_context *, const float (*v0)[4], const float (*v1)[4], @@ -198,7 +198,7 @@ struct lp_setup_context static inline void -scissor_planes_needed(boolean scis_planes[4], const struct u_rect *bbox, +scissor_planes_needed(bool scis_planes[4], const struct u_rect *bbox, const struct u_rect *scissor) { /* left */ @@ -215,7 +215,7 @@ scissor_planes_needed(boolean scis_planes[4], const struct u_rect *bbox, void lp_setup_add_scissor_planes(const struct u_rect *scissor, struct lp_rast_plane *plane_s, - boolean s_planes[4], bool multisample); + bool s_planes[4], bool multisample); void lp_setup_choose_triangle(struct lp_setup_context *setup); @@ -232,22 +232,22 @@ lp_setup_choose_rect(struct lp_setup_context *setup); void lp_setup_init_vbuf(struct lp_setup_context *setup); -boolean +bool lp_setup_update_state(struct lp_setup_context *setup, - boolean update_scene); + bool update_scene); void lp_setup_destroy(struct lp_setup_context *setup); -boolean +bool lp_setup_flush_and_restart(struct lp_setup_context *setup); -boolean +bool lp_setup_whole_tile(struct lp_setup_context *setup, const struct lp_rast_shader_inputs *inputs, - int tx, int ty, boolean opaque); + int tx, int ty, bool opaque); -boolean +bool lp_setup_is_blit(const struct lp_setup_context *setup, const struct lp_rast_shader_inputs *inputs); @@ -267,14 +267,14 @@ lp_rect_cw(struct lp_setup_context *setup, const float (*v0)[4], const float (*v1)[4], const float (*v2)[4], - boolean frontfacing); + bool frontfacing); void lp_setup_triangle_ccw(struct lp_setup_context *setup, const float (*v0)[4], const float (*v1)[4], const float (*v2)[4], - boolean front); + bool front); struct lp_rast_triangle * lp_setup_alloc_triangle(struct lp_scene *scene, @@ -285,27 +285,27 @@ struct lp_rast_rectangle * lp_setup_alloc_rectangle(struct lp_scene *scene, unsigned nr_inputs); -boolean +bool lp_setup_analyse_triangles(struct lp_setup_context *setup, const void *vb, int stride, int nr); -boolean +bool lp_setup_bin_triangle(struct lp_setup_context *setup, struct lp_rast_triangle *tri, - boolean use_32bits, - boolean opaque, + bool use_32bits, + bool opaque, const struct u_rect *bbox, int nr_planes, unsigned scissor_index); -boolean +bool lp_setup_bin_rectangle(struct lp_setup_context *setup, struct lp_rast_rectangle *rect, - boolean opaque); + bool opaque); -static inline boolean +static inline bool lp_setup_zero_sample_mask(struct lp_setup_context *setup) { uint32_t sample_mask = setup->fs.current.jit_context.sample_mask; diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c index 371d899d755..def6a6039d4 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_line.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c @@ -46,7 +46,7 @@ struct lp_line_info { float dx; float dy; float oneoverarea; - boolean frontfacing; + bool frontfacing; const float (*v1)[4]; const float (*v2)[4]; @@ -263,7 +263,7 @@ print_line(struct lp_setup_context *setup, } -static inline boolean +static inline bool sign(float x) { return x >= 0; @@ -279,7 +279,7 @@ fracf(float f) } -static boolean +static bool try_setup_line(struct lp_setup_context *setup, const float (*v1)[4], const float (*v2)[4]) @@ -604,7 +604,7 @@ try_setup_line(struct lp_setup_context *setup, int max_szorig = ((bbox.x1 - (bbox.x0 & ~3)) | (bbox.y1 - (bbox.y0 & ~3))); - boolean use_32bits = max_szorig <= MAX_FIXED_LENGTH32; + bool use_32bits = max_szorig <= MAX_FIXED_LENGTH32; bboxpos = bbox; /* Can safely discard negative regions: @@ -619,7 +619,7 @@ try_setup_line(struct lp_setup_context *setup, */ const struct u_rect *scissor = &setup->draw_regions[viewport_index]; - boolean s_planes[4]; + bool s_planes[4]; scissor_planes_needed(s_planes, &bboxpos, scissor); nr_planes += s_planes[0] + s_planes[1] + s_planes[2] + s_planes[3]; diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c index 659df75c159..a755eccb6f5 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_point.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c @@ -52,7 +52,7 @@ struct point_info { float (*dadx)[4]; float (*dady)[4]; - boolean frontfacing; + bool frontfacing; }; @@ -109,7 +109,7 @@ texcoord_coef(struct lp_setup_context *setup, unsigned slot, unsigned i, unsigned sprite_coord_origin, - boolean perspective) + bool perspective) { float w0 = info->v0[0][3]; @@ -215,7 +215,7 @@ setup_point_coefficients(struct lp_setup_context *setup, unsigned vert_attr = key->inputs[slot].src_index; unsigned usage_mask = key->inputs[slot].usage_mask; enum lp_interp interp = key->inputs[slot].interp; - boolean perspective = !!(interp == LP_INTERP_PERSPECTIVE); + bool perspective = !!(interp == LP_INTERP_PERSPECTIVE); unsigned i; if (perspective && usage_mask) { @@ -321,7 +321,7 @@ print_point(struct lp_setup_context *setup, } -static boolean +static bool try_setup_point(struct lp_setup_context *setup, const float (*v0)[4]) { @@ -543,7 +543,7 @@ try_setup_point(struct lp_setup_context *setup, int max_szorig = ((bbox.x1 - (bbox.x0 & ~3)) | (bbox.y1 - (bbox.y0 & ~3))); - boolean use_32bits = max_szorig <= MAX_FIXED_LENGTH32; + bool use_32bits = max_szorig <= MAX_FIXED_LENGTH32; return lp_setup_bin_triangle(setup, point, use_32bits, setup->fs.current.variant->opaque, diff --git a/src/gallium/drivers/llvmpipe/lp_setup_rect.c b/src/gallium/drivers/llvmpipe/lp_setup_rect.c index c5219c00cb9..5cb6ee48ab9 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_rect.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_rect.c @@ -80,10 +80,10 @@ lp_setup_alloc_rectangle(struct lp_scene *scene, unsigned nr_inputs) * the same code in lp_setup_tri.c * \param tx, ty the tile position in tiles, not pixels */ -boolean +bool lp_setup_whole_tile(struct lp_setup_context *setup, const struct lp_rast_shader_inputs *inputs, - int tx, int ty, boolean opaque) + int tx, int ty, bool opaque) { struct lp_scene *scene = setup->scene; @@ -135,7 +135,7 @@ lp_setup_whole_tile(struct lp_setup_context *setup, } -boolean +bool lp_setup_is_blit(const struct lp_setup_context *setup, const struct lp_rast_shader_inputs *inputs) { @@ -195,7 +195,7 @@ lp_setup_is_blit(const struct lp_setup_context *setup, static inline void partial(struct lp_setup_context *setup, const struct lp_rast_rectangle *rect, - boolean opaque, + bool opaque, unsigned ix, unsigned iy, unsigned mask) // RECT_PLANE_x bits { @@ -232,12 +232,12 @@ partial(struct lp_setup_context *setup, * coordinate space), while the other half prefers to work with D3D * CCW rectangles. */ -static boolean +static bool try_rect_cw(struct lp_setup_context *setup, const float (*v0)[4], const float (*v1)[4], const float (*v2)[4], - boolean frontfacing) + bool frontfacing) { const struct lp_fragment_shader_variant *variant = setup->fs.current.variant; @@ -256,7 +256,7 @@ try_rect_cw(struct lp_setup_context *setup, /* Cull clockwise rects without overflowing. */ - const boolean cw = (x2 < x1) ^ (y0 < y2); + const bool cw = (x2 < x1) ^ (y0 < y2); if (cw) { LP_COUNT(nr_culled_rects); return TRUE; @@ -349,10 +349,10 @@ try_rect_cw(struct lp_setup_context *setup, } -boolean +bool lp_setup_bin_rectangle(struct lp_setup_context *setup, struct lp_rast_rectangle *rect, - boolean opaque) + bool opaque) { struct lp_scene *scene = setup->scene; unsigned left_mask = 0; @@ -458,7 +458,7 @@ lp_rect_cw(struct lp_setup_context *setup, const float (*v0)[4], const float (*v1)[4], const float (*v2)[4], - boolean frontfacing) + bool frontfacing) { if (lp_setup_zero_sample_mask(setup)) { if (0) debug_printf("zero sample mask\n"); @@ -489,7 +489,7 @@ do_rect_ccw(struct lp_setup_context *setup, const float (*v3)[4], const float (*v4)[4], const float (*v5)[4], - boolean front) + bool front) { const float (*rv0)[4], (*rv1)[4], (*rv2)[4], (*rv3)[4]; /* rect verts */ @@ -756,7 +756,7 @@ winding(const float (*v0)[4], } -static boolean +static bool setup_rect_cw(struct lp_setup_context *setup, const float (*v0)[4], const float (*v1)[4], @@ -783,7 +783,7 @@ setup_rect_cw(struct lp_setup_context *setup, } -static boolean +static bool setup_rect_ccw(struct lp_setup_context *setup, const float (*v0)[4], const float (*v1)[4], @@ -811,7 +811,7 @@ setup_rect_ccw(struct lp_setup_context *setup, } -static boolean +static bool setup_rect_noop(struct lp_setup_context *setup, const float (*v0)[4], const float (*v1)[4], @@ -828,7 +828,7 @@ setup_rect_noop(struct lp_setup_context *setup, * Return true if the rect is handled here, else return false indicating * the caller should render with triangles instead. */ -static boolean +static bool setup_rect_both(struct lp_setup_context *setup, const float (*v0)[4], const float (*v1)[4], diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index b8472087fae..460b4f98fa3 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -233,7 +233,7 @@ lp_rast_ms_tri_tab[MAX_PLANES+1] = { * This is used when simulating anti-aliasing primitives in shaders, e.g., * when drawing the windows client area in Aero's flip-3d effect. */ -static boolean +static bool check_opaque(const struct lp_setup_context *setup, const float (*v1)[4], const float (*v2)[4], @@ -271,13 +271,13 @@ check_opaque(const struct lp_setup_context *setup, * framebuffer tiles are touched. Put the triangle in the scene's * bins for the tiles which we overlap. */ -static boolean +static bool do_triangle_ccw(struct lp_setup_context *setup, struct fixed_position *position, const float (*v0)[4], const float (*v1)[4], const float (*v2)[4], - boolean frontfacing) + bool frontfacing) { struct lp_scene *scene = setup->scene; @@ -331,9 +331,9 @@ do_triangle_ccw(struct lp_setup_context *setup, int max_szorig = ((bbox.x1 - (bbox.x0 & ~3)) | (bbox.y1 - (bbox.y0 & ~3))); - boolean use_32bits = max_szorig <= MAX_FIXED_LENGTH32; + bool use_32bits = max_szorig <= MAX_FIXED_LENGTH32; #if defined(_ARCH_PWR8) && UTIL_ARCH_LITTLE_ENDIAN - boolean pwr8_limit_check = (bbox.x1 - bbox.x0) <= MAX_FIXED_LENGTH32 && + bool pwr8_limit_check = (bbox.x1 - bbox.x0) <= MAX_FIXED_LENGTH32 && (bbox.y1 - bbox.y0) <= MAX_FIXED_LENGTH32; #endif @@ -351,7 +351,7 @@ do_triangle_ccw(struct lp_setup_context *setup, * edges if the bounding box of the tri is fully inside that edge. */ const struct u_rect *scissor = &setup->draw_regions[viewport_index]; - boolean s_planes[4]; + bool s_planes[4]; scissor_planes_needed(s_planes, &bbox, scissor); nr_planes += s_planes[0] + s_planes[1] + s_planes[2] + s_planes[3]; @@ -776,11 +776,11 @@ floor_pot(uint32_t n) } -boolean +bool lp_setup_bin_triangle(struct lp_setup_context *setup, struct lp_rast_triangle *tri, - boolean use_32bits, - boolean opaque, + bool use_32bits, + bool opaque, const struct u_rect *bbox, int nr_planes, unsigned viewport_index) @@ -927,7 +927,7 @@ lp_setup_bin_triangle(struct lp_setup_context *setup, * Else, bin a lp_rast_triangle command. */ for (int y = iy0; y <= iy1; y++) { - boolean in = FALSE; /* are we inside the triangle? */ + bool in = FALSE; /* are we inside the triangle? */ int64_t cx[MAX_PLANES]; for (int i = 0; i < nr_planes; i++) @@ -1005,7 +1005,7 @@ retry_triangle_ccw(struct lp_setup_context *setup, const float (*v0)[4], const float (*v1)[4], const float (*v2)[4], - boolean front) + bool front) { if (0) lp_setup_print_triangle(setup, v0, v1, v2); diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c index 7afa2ae693f..21b9175d52f 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c @@ -78,7 +78,7 @@ lp_setup_get_vertex_info(struct vbuf_render *vbr) } -static boolean +static bool lp_setup_allocate_vertices(struct vbuf_render *vbr, ushort vertex_size, ushort nr_vertices) { @@ -174,7 +174,7 @@ lp_setup_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr) struct lp_setup_context *setup = lp_setup_context(vbr); const unsigned stride = setup->vertex_info->size * sizeof(float); const void *vertex_buffer = setup->vertex_buffer; - const boolean flatshade_first = setup->flatshade_first; + const bool flatshade_first = setup->flatshade_first; unsigned i; assert(setup->setup.variant); @@ -384,7 +384,7 @@ lp_setup_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) const unsigned stride = setup->vertex_info->size * sizeof(float); const void *vertex_buffer = (void *) get_vert(setup->vertex_buffer, start, stride); - const boolean flatshade_first = setup->flatshade_first; + const bool flatshade_first = setup->flatshade_first; unsigned i; if (!lp_setup_update_state(setup, TRUE)) diff --git a/src/gallium/drivers/llvmpipe/lp_state.h b/src/gallium/drivers/llvmpipe/lp_state.h index 93c6a44bc8d..302e3b25267 100644 --- a/src/gallium/drivers/llvmpipe/lp_state.h +++ b/src/gallium/drivers/llvmpipe/lp_state.h @@ -88,19 +88,19 @@ struct llvmpipe_context; struct lp_geometry_shader { - boolean no_tokens; + bool no_tokens; struct pipe_stream_output_info stream_output; struct draw_geometry_shader *dgs; }; struct lp_tess_ctrl_shader { - boolean no_tokens; + bool no_tokens; struct pipe_stream_output_info stream_output; struct draw_tess_ctrl_shader *dtcs; }; struct lp_tess_eval_shader { - boolean no_tokens; + bool no_tokens; struct pipe_stream_output_info stream_output; struct draw_tess_eval_shader *dtes; }; diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c index 33ba7eb16b1..aaaa35ec25c 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_cs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c @@ -138,11 +138,11 @@ static void lp_mesh_llvm_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) @@ -236,7 +236,7 @@ mesh_convert_to_aos(struct gallivm_state *gallivm, LLVMValueRef vertex_index, struct lp_type soa_type, int primid_slot, - boolean need_edgeflag) + bool need_edgeflag) { LLVMBuilderRef builder = gallivm->builder; LLVMValueRef inds[3]; diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c index 1a5a5535b91..616b3337251 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_derived.c +++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c @@ -300,7 +300,7 @@ llvmpipe_update_derived(struct llvmpipe_context *llvmpipe) LP_NEW_RASTERIZER | LP_NEW_SAMPLE_MASK | LP_NEW_DEPTH_STENCIL_ALPHA)) { - boolean discard = + bool discard = llvmpipe->rasterizer ? llvmpipe->rasterizer->rasterizer_discard : FALSE; lp_setup_set_rasterizer_discard(llvmpipe->setup, discard); } diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 9a68f6f46f6..462d341652c 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -132,10 +132,10 @@ load_unswizzled_block(struct gallivm_state *gallivm, * * A format which has irregular channel sizes such as R3_G3_B2 or R5_G6_B5. */ -static inline boolean +static inline bool is_arithmetic_format(const struct util_format_description *format_desc) { - boolean arith = false; + bool arith = false; for (unsigned i = 0; i < format_desc->nr_channels; ++i) { arith |= format_desc->channel[i].size != format_desc->channel[0].size; @@ -151,7 +151,7 @@ is_arithmetic_format(const struct util_format_description *format_desc) * to floats for blending, and furthermore has "natural" packed AoS -> * unpacked SoA conversion. */ -static inline boolean +static inline bool format_expands_to_float_soa(const struct util_format_description *format_desc) { if (format_desc->format == PIPE_FORMAT_R11G11B10_FLOAT || @@ -674,10 +674,10 @@ generate_fs_loop(struct gallivm_state *gallivm, * keep. Disabled because it may hide some real bugs in the (depth/stencil) * code since tests tend to take another codepath than real shaders. */ - boolean simple_shader = (shader->info.base.file_count[TGSI_FILE_SAMPLER] == 0 && + 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; - const boolean dual_source_blend = key->blend.rt[0].blend_enable && + const bool dual_source_blend = key->blend.rt[0].blend_enable && util_blend_state_is_dual(&key->blend, 0); const bool post_depth_coverage = shader->info.base.properties[TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE]; @@ -2397,7 +2397,7 @@ generate_unswizzled_blend(struct gallivm_state *gallivm, LLVMValueRef color_ptr, LLVMValueRef stride, unsigned partial_mask, - boolean do_branch) + bool do_branch) { const unsigned alpha_channel = 3; const unsigned block_width = LP_RASTER_BLOCK_SIZE; @@ -2424,11 +2424,11 @@ generate_unswizzled_blend(struct gallivm_state *gallivm, util_format_description(out_format); bool pad_inline = is_arithmetic_format(out_format_desc); - const boolean dual_source_blend = + const bool dual_source_blend = variant->key.blend.rt[0].blend_enable && util_blend_state_is_dual(&variant->key.blend, 0); - const boolean is_1d = variant->key.resource_1d; + const bool is_1d = variant->key.resource_1d; const unsigned num_fullblock_fs = is_1d ? 2 * num_fs : num_fs; LLVMValueRef fpstate = NULL; @@ -2664,7 +2664,7 @@ generate_unswizzled_blend(struct gallivm_state *gallivm, * unpack only with 128bit vectors). * Note: for 16bit sizes really need matching pack conversion code */ - boolean twiddle_after_convert = FALSE; + bool twiddle_after_convert = FALSE; if (!is_1d && dst_channels != 3 && dst_type.width == 8) { twiddle_after_convert = TRUE; } @@ -3133,8 +3133,8 @@ generate_fragment(struct llvmpipe_context *lp, LLVMValueRef fs_out_color[LP_MAX_SAMPLES][PIPE_MAX_COLOR_BUFS][TGSI_NUM_CHANNELS][16 / 4]; LLVMValueRef function; LLVMValueRef facing; - boolean cbuf0_write_all; - const boolean dual_source_blend = key->blend.rt[0].blend_enable && + bool cbuf0_write_all; + const bool dual_source_blend = key->blend.rt[0].blend_enable && util_blend_state_is_dual(&key->blend, 0); assert(lp_native_vector_width / 32 >= 4); @@ -3335,7 +3335,7 @@ generate_fragment(struct llvmpipe_context *lp, LLVMSetInitializer(glob_sample_pos, sample_pos_array); LLVMValueRef color_store[PIPE_MAX_COLOR_BUFS][TGSI_NUM_CHANNELS]; - boolean pixel_center_integer = + bool pixel_center_integer = shader->info.base.properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER]; /* @@ -3485,7 +3485,7 @@ generate_fragment(struct llvmpipe_context *lp, LLVMValueRef sample_stride = NULL; LLVMValueRef index = lp_build_const_int32(gallivm, cbuf); - boolean do_branch = ((key->depth.enabled + bool do_branch = ((key->depth.enabled || key->stencil[0].enabled || key->alpha.enabled) && !shader->info.base.uses_kill); @@ -3773,7 +3773,7 @@ generate_variant(struct llvmpipe_context *lp, * Determine whether we are touching all channels in the color buffer. */ const struct util_format_description *cbuf0_format_desc = NULL; - boolean fullcolormask = FALSE; + bool fullcolormask = FALSE; if (key->nr_cbufs == 1) { cbuf0_format_desc = util_format_description(key->cbuf_format[0]); fullcolormask = util_format_colormask_full(cbuf0_format_desc, @@ -3783,7 +3783,7 @@ generate_variant(struct llvmpipe_context *lp, /* The scissor is ignored here as only tiles inside the scissoring * rectangle will refer to this. */ - const boolean no_kill = + const bool no_kill = fullcolormask && !key->stencil[0].enabled && !key->alpha.enabled && @@ -3857,7 +3857,7 @@ generate_variant(struct llvmpipe_context *lp, /* Determine whether this shader + pipeline state is a candidate for * the linear path. */ - const boolean linear_pipeline = + const bool linear_pipeline = !key->stencil[0].enabled && !key->depth.enabled && !shader->info.base.uses_kill && @@ -4248,7 +4248,7 @@ llvmpipe_set_shader_buffers(struct pipe_context *pipe, util_copy_shader_buffer(&llvmpipe->ssbos[shader][i], buffer); if (buffer && buffer->buffer) { - boolean read_only = !(writable_bitmask & (1 << idx)); + bool read_only = !(writable_bitmask & (1 << idx)); llvmpipe_flush_resource(pipe, buffer->buffer, 0, read_only, false, false, "buffer"); } @@ -4349,7 +4349,7 @@ llvmpipe_set_shader_images(struct pipe_context *pipe, * Return the blend factor equivalent to a destination alpha of one. */ static inline enum pipe_blendfactor -force_dst_alpha_one(enum pipe_blendfactor factor, boolean clamped_zero) +force_dst_alpha_one(enum pipe_blendfactor factor, bool clamped_zero) { switch (factor) { case PIPE_BLENDFACTOR_DST_ALPHA: @@ -4542,7 +4542,7 @@ make_variant_key(struct llvmpipe_context *lp, if (format_desc->swizzle[3] > PIPE_SWIZZLE_W || format_desc->swizzle[3] == format_desc->swizzle[0]) { // Doesn't cover mixed snorm/unorm but can't render to them anyway - boolean clamped_zero = !util_format_is_float(format) && + bool clamped_zero = !util_format_is_float(format) && !util_format_is_snorm(format); blend_rt->rgb_src_factor = force_dst_alpha_one(blend_rt->rgb_src_factor, clamped_zero); diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c index 4a0e858a23f..d7fe88cc754 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c @@ -82,13 +82,13 @@ * performance impact it has. The ultimate purpose of detecting these shaders * is to override with nearest texture filtering. */ -static inline boolean +static inline bool match_aero_minification_shader(const struct tgsi_token *tokens, const struct lp_tgsi_info *info) { struct tgsi_parse_context parse; unsigned coord_mask; - boolean has_quarter_imm; + bool has_quarter_imm; unsigned index, chan; if ((info->base.opcode_count[TGSI_OPCODE_TEX] != 4 && diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c b/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c index ca1c4ccc0cc..e614f73a36b 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c @@ -69,7 +69,7 @@ struct linear_interp { __m128i dadx; __m128i dady; int width; /* rounded up to multiple of 4 */ - boolean is_constant; + bool is_constant; }; /* Organize all the information needed for blending in one place. @@ -252,7 +252,7 @@ fetch_row_xy_clamped(struct nearest_sampler *samp) } -static boolean +static bool init_nearest_sampler(struct nearest_sampler *samp, const struct lp_jit_texture *texture, int x0, int y0, @@ -350,7 +350,7 @@ init_shader(struct shader *shader, /* Linear shader which implements the BLIT_RGBA shader with the * additional constraints imposed by lp_setup_is_blit(). */ -static boolean +static bool blit_rgba_blit(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -402,7 +402,7 @@ blit_rgba_blit(const struct lp_rast_state *state, /* Linear shader which implements the BLIT_RGB1 shader, with the * additional constraints imposed by lp_setup_is_blit(). */ -static boolean +static bool blit_rgb1_blit(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -462,7 +462,7 @@ blit_rgb1_blit(const struct lp_rast_state *state, /* Linear shader variant implementing the BLIT_RGBA shader without * blending. */ -static boolean +static bool blit_rgba(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -501,7 +501,7 @@ blit_rgba(const struct lp_rast_state *state, } -static boolean +static bool blit_rgb1(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -545,7 +545,7 @@ blit_rgb1(const struct lp_rast_state *state, /* Linear shader variant implementing the BLIT_RGBA shader with * one/inv_src_alpha blending. */ -static boolean +static bool blit_rgba_blend_premul(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -584,7 +584,7 @@ blit_rgba_blend_premul(const struct lp_rast_state *state, /* Linear shader which always emits red. Used for debugging. */ -static boolean +static bool linear_red(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -614,7 +614,7 @@ linear_red(const struct lp_rast_state *state, /* Noop linear shader variant, for debugging. */ -static boolean +static bool linear_no_op(const struct lp_rast_state *state, unsigned x, unsigned y, unsigned width, unsigned height, @@ -630,7 +630,7 @@ linear_no_op(const struct lp_rast_state *state, /* Check for ADD/ONE/INV_SRC_ALPHA, ie premultiplied-alpha blending. */ -static boolean +static bool is_one_inv_src_alpha_blend(const struct lp_fragment_shader_variant *variant) { return diff --git a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c index 0b6959e4e88..39ec984c05d 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c +++ b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c @@ -59,7 +59,7 @@ static void * llvmpipe_create_rasterizer_state(struct pipe_context *pipe, const struct pipe_rasterizer_state *rast) { - boolean need_pipeline; + bool need_pipeline; /* Partition rasterizer state into what we want the draw module to * handle, and what we'll look after ourselves. diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.h b/src/gallium/drivers/llvmpipe/lp_state_setup.h index 3199cb5c92e..ef208937396 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_setup.h +++ b/src/gallium/drivers/llvmpipe/lp_state_setup.h @@ -40,7 +40,7 @@ struct lp_setup_variant_key { typedef void (*lp_jit_setup_triangle)(const float (*v0)[4], const float (*v1)[4], const float (*v2)[4], - boolean front_facing, + bool front_facing, float (*a0)[4], float (*dadx)[4], float (*dady)[4], diff --git a/src/gallium/drivers/llvmpipe/lp_state_so.c b/src/gallium/drivers/llvmpipe/lp_state_so.c index 877aec0e281..6e104f14d8f 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_so.c +++ b/src/gallium/drivers/llvmpipe/lp_state_so.c @@ -78,7 +78,7 @@ llvmpipe_set_so_targets(struct pipe_context *pipe, struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); unsigned i; for (i = 0; i < num_targets; i++) { - const boolean append = (offsets[i] == (unsigned)-1); + const bool append = (offsets[i] == (unsigned)-1); /* * Warn if the so target was created in another context. * XXX Not entirely sure if mesa/st may rely on this? diff --git a/src/gallium/drivers/llvmpipe/lp_state_surface.c b/src/gallium/drivers/llvmpipe/lp_state_surface.c index e6df908da03..c4b85f18c52 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_state_surface.c @@ -51,7 +51,7 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe, { struct llvmpipe_context *lp = llvmpipe_context(pipe); - boolean changed = !util_framebuffer_state_equal(&lp->framebuffer, fb); + bool changed = !util_framebuffer_state_equal(&lp->framebuffer, fb); assert(fb->width <= LP_MAX_WIDTH); assert(fb->height <= LP_MAX_HEIGHT); diff --git a/src/gallium/drivers/llvmpipe/lp_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c index 1907926580d..4c280f9da44 100644 --- a/src/gallium/drivers/llvmpipe/lp_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_surface.c @@ -366,7 +366,7 @@ lp_clear_depth_stencil_texture_msaa(struct pipe_context *pipe, const struct pipe_box *box) { struct pipe_transfer *dst_trans; - boolean need_rmw = FALSE; + bool need_rmw = FALSE; if ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) && ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) && diff --git a/src/gallium/drivers/llvmpipe/lp_test.h b/src/gallium/drivers/llvmpipe/lp_test.h index 1fd04d71f6f..f482b46d889 100644 --- a/src/gallium/drivers/llvmpipe/lp_test.h +++ b/src/gallium/drivers/llvmpipe/lp_test.h @@ -58,14 +58,14 @@ void write_tsv_header(FILE *fp); -boolean +bool test_some(unsigned verbose, FILE *fp, unsigned long n); -boolean +bool test_single(unsigned verbose, FILE *fp); -boolean +bool test_all(unsigned verbose, FILE *fp); @@ -124,11 +124,11 @@ void random_vec(struct lp_type type, void *dst); -boolean +bool compare_vec_with_eps(struct lp_type type, const void *res, const void *ref, double eps); -boolean +bool compare_vec(struct lp_type type, const void *res, const void *ref); diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c index 05db2131479..4f8125d6f66 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_arit.c +++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c @@ -412,7 +412,7 @@ flush_denorm_to_zero(float val) /* * Test one LLVM unary arithmetic builder function. */ -static boolean +static bool test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned length) { char test_name[128]; @@ -421,7 +421,7 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned struct gallivm_state *gallivm; LLVMValueRef test_func; unary_func_t test_func_jit; - boolean success = TRUE; + bool success = TRUE; int i, j; float *in, *out; @@ -459,7 +459,7 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned for (i = 0; i < num_vals; ++i) { float testval, ref; double error, precision; - boolean expected_pass = TRUE; + bool expected_pass = TRUE; bool pass; testval = flush_denorm_to_zero(in[i]); @@ -521,10 +521,10 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned } -boolean +bool test_all(unsigned verbose, FILE *fp) { - boolean success = TRUE; + bool success = TRUE; int i; for (i = 0; i < ARRAY_SIZE(unary_tests); ++i) { @@ -541,7 +541,7 @@ test_all(unsigned verbose, FILE *fp) } -boolean +bool test_some(unsigned verbose, FILE *fp, unsigned long n) { @@ -553,7 +553,7 @@ test_some(unsigned verbose, FILE *fp, } -boolean +bool test_single(unsigned verbose, FILE *fp) { return TRUE; diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index daab0ef2d4a..d42c3124b9d 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -75,7 +75,7 @@ write_tsv_row(FILE *fp, const struct pipe_blend_state *blend, struct lp_type type, double cycles, - boolean success) + bool success) { fprintf(fp, "%s\t", success ? "pass" : "fail"); @@ -431,7 +431,7 @@ compute_blend_ref(const struct pipe_blend_state *blend, UTIL_ALIGN_STACK -static boolean +static bool test_one(unsigned verbose, FILE *fp, const struct pipe_blend_state *blend, @@ -441,7 +441,7 @@ test_one(unsigned verbose, struct gallivm_state *gallivm; LLVMValueRef func = NULL; blend_test_ptr_t blend_test_ptr; - boolean success; + bool success; const unsigned n = LP_TEST_NUM_SAMPLES; int64_t cycles[LP_TEST_NUM_SAMPLES]; double cycles_avg = 0.0; @@ -636,7 +636,7 @@ const unsigned num_factors = ARRAY_SIZE(blend_factors); const unsigned num_types = ARRAY_SIZE(blend_types); -boolean +bool test_all(unsigned verbose, FILE *fp) { const unsigned *rgb_func; @@ -647,7 +647,7 @@ test_all(unsigned verbose, FILE *fp) const unsigned *alpha_dst_factor; struct pipe_blend_state blend; const struct lp_type *type; - boolean success = TRUE; + bool success = TRUE; for (rgb_func = blend_funcs; rgb_func < &blend_funcs[num_funcs]; ++rgb_func) { for (alpha_func = blend_funcs; alpha_func < &blend_funcs[num_funcs]; ++alpha_func) { @@ -686,7 +686,7 @@ test_all(unsigned verbose, FILE *fp) } -boolean +bool test_some(unsigned verbose, FILE *fp, unsigned long n) { @@ -698,7 +698,7 @@ test_some(unsigned verbose, FILE *fp, const unsigned *alpha_dst_factor; struct pipe_blend_state blend; const struct lp_type *type; - boolean success = TRUE; + bool success = TRUE; for (unsigned long i = 0; i < n; ++i) { rgb_func = &blend_funcs[rand() % num_funcs]; @@ -734,7 +734,7 @@ test_some(unsigned verbose, FILE *fp, } -boolean +bool test_single(unsigned verbose, FILE *fp) { printf("no test_single()"); diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c index ad95a36fb42..36b1a047678 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_conv.c +++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c @@ -64,7 +64,7 @@ write_tsv_row(FILE *fp, struct lp_type src_type, struct lp_type dst_type, double cycles, - boolean success) + bool success) { fprintf(fp, "%s\t", success ? "pass" : "fail"); @@ -151,7 +151,7 @@ add_conv_test(struct gallivm_state *gallivm, UTIL_ALIGN_STACK -static boolean +static bool test_one(unsigned verbose, FILE *fp, struct lp_type src_type, @@ -161,7 +161,7 @@ test_one(unsigned verbose, struct gallivm_state *gallivm; LLVMValueRef func = NULL; conv_test_ptr_t conv_test_ptr; - boolean success; + bool success; const unsigned n = LP_TEST_NUM_SAMPLES; int64_t cycles[LP_TEST_NUM_SAMPLES]; double cycles_avg = 0.0; @@ -401,12 +401,12 @@ const struct lp_type conv_types[] = { const unsigned num_types = ARRAY_SIZE(conv_types); -boolean +bool test_all(unsigned verbose, FILE *fp) { const struct lp_type *src_type; const struct lp_type *dst_type; - boolean success = TRUE; + bool success = TRUE; int error_count = 0; for (src_type = conv_types; src_type < &conv_types[num_types]; ++src_type) { @@ -428,14 +428,14 @@ test_all(unsigned verbose, FILE *fp) } -boolean +bool test_some(unsigned verbose, FILE *fp, unsigned long n) { const struct lp_type *src_type; const struct lp_type *dst_type; unsigned long i; - boolean success = TRUE; + bool success = TRUE; for (i = 0; i < n; ++i) { src_type = &conv_types[rand() % num_types]; @@ -452,7 +452,7 @@ test_some(unsigned verbose, FILE *fp, } -boolean +bool test_single(unsigned verbose, FILE *fp) { /* float, fixed, sign, norm, width, len */ @@ -461,7 +461,7 @@ test_single(unsigned verbose, FILE *fp) struct lp_type ub8x4_type = { FALSE, FALSE, FALSE, TRUE, 8, 16 }; - boolean success; + bool success; success = test_one(verbose, fp, f32x4_type, ub8x4_type); diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c index f1531879cc9..22d7b74e8d1 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_format.c +++ b/src/gallium/drivers/llvmpipe/lp_test_format.c @@ -60,7 +60,7 @@ write_tsv_header(FILE *fp) static void write_tsv_row(FILE *fp, const struct util_format_description *desc, - boolean success) + bool success) { fprintf(fp, "%s\t", success ? "pass" : "fail"); @@ -134,7 +134,7 @@ add_fetch_rgba_test(struct gallivm_state *gallivm, unsigned verbose, UTIL_ALIGN_STACK -static boolean +static bool test_format_float(unsigned verbose, FILE *fp, const struct util_format_description *desc, unsigned use_cache) @@ -145,8 +145,8 @@ test_format_float(unsigned verbose, FILE *fp, fetch_ptr_t fetch_ptr; alignas(16) uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES]; alignas(16) float unpacked[4]; - boolean first = TRUE; - boolean success = TRUE; + bool first = TRUE; + bool success = TRUE; unsigned i, j, k, l; context = LLVMContextCreate(); @@ -181,7 +181,7 @@ test_format_float(unsigned verbose, FILE *fp, for (i = 0; i < desc->block.height; ++i) { for (j = 0; j < desc->block.width; ++j) { - boolean match = TRUE; + bool match = TRUE; memset(unpacked, 0, sizeof unpacked); @@ -238,7 +238,7 @@ test_format_float(unsigned verbose, FILE *fp, UTIL_ALIGN_STACK -static boolean +static bool test_format_unorm8(unsigned verbose, FILE *fp, const struct util_format_description *desc, unsigned use_cache) @@ -249,8 +249,8 @@ test_format_unorm8(unsigned verbose, FILE *fp, fetch_ptr_t fetch_ptr; alignas(16) uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES]; uint8_t unpacked[4]; - boolean first = TRUE; - boolean success = TRUE; + bool first = TRUE; + bool success = TRUE; unsigned i, j, k, l; context = LLVMContextCreate(); @@ -285,7 +285,7 @@ test_format_unorm8(unsigned verbose, FILE *fp, for (i = 0; i < desc->block.height; ++i) { for (j = 0; j < desc->block.width; ++j) { - boolean match; + bool match; memset(unpacked, 0, sizeof unpacked); @@ -342,12 +342,12 @@ test_format_unorm8(unsigned verbose, FILE *fp, -static boolean +static bool test_one(unsigned verbose, FILE *fp, const struct util_format_description *format_desc, unsigned use_cache) { - boolean success = TRUE; + bool success = TRUE; if (!test_format_float(verbose, fp, format_desc, use_cache)) { success = FALSE; @@ -361,11 +361,11 @@ test_one(unsigned verbose, FILE *fp, } -boolean +bool test_all(unsigned verbose, FILE *fp) { enum pipe_format format; - boolean success = TRUE; + bool success = TRUE; unsigned use_cache; cache_ptr = align_malloc(sizeof(struct lp_build_format_cache), 16); @@ -412,7 +412,7 @@ test_all(unsigned verbose, FILE *fp) } -boolean +bool test_some(unsigned verbose, FILE *fp, unsigned long n) { @@ -420,7 +420,7 @@ test_some(unsigned verbose, FILE *fp, } -boolean +bool test_single(unsigned verbose, FILE *fp) { printf("no test_single()"); diff --git a/src/gallium/drivers/llvmpipe/lp_test_main.c b/src/gallium/drivers/llvmpipe/lp_test_main.c index 9964d420ded..2b4fa4a0054 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_main.c +++ b/src/gallium/drivers/llvmpipe/lp_test_main.c @@ -253,7 +253,7 @@ random_vec(struct lp_type type, void *dst) } -boolean +bool compare_vec_with_eps(struct lp_type type, const void *res, const void *ref, double eps) { unsigned i; @@ -275,7 +275,7 @@ compare_vec_with_eps(struct lp_type type, const void *res, const void *ref, doub } -boolean +bool compare_vec(struct lp_type type, const void *res, const void *ref) { double eps = lp_const_eps(type); @@ -370,8 +370,8 @@ main(int argc, char **argv) FILE *fp = NULL; unsigned long n = 1000; unsigned i; - boolean success; - boolean single = FALSE; + bool success; + bool single = FALSE; unsigned fpstate; fpstate = util_fpstate_get(); diff --git a/src/gallium/drivers/llvmpipe/lp_test_printf.c b/src/gallium/drivers/llvmpipe/lp_test_printf.c index ee9299b1cfa..5430e1f3bae 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_printf.c +++ b/src/gallium/drivers/llvmpipe/lp_test_printf.c @@ -85,7 +85,7 @@ add_printf_test(struct gallivm_state *gallivm) UTIL_ALIGN_STACK -static boolean +static bool test_printf(unsigned verbose, FILE *fp, const struct printf_test_case *testcase) { @@ -93,7 +93,7 @@ test_printf(unsigned verbose, FILE *fp, struct gallivm_state *gallivm; LLVMValueRef test; test_printf_t test_printf_func; - boolean success = TRUE; + bool success = TRUE; context = LLVMContextCreate(); #if LLVM_VERSION_MAJOR == 15 @@ -118,10 +118,10 @@ test_printf(unsigned verbose, FILE *fp, } -boolean +bool test_all(unsigned verbose, FILE *fp) { - boolean success = TRUE; + bool success = TRUE; test_printf(verbose, fp, NULL); @@ -129,7 +129,7 @@ test_all(unsigned verbose, FILE *fp) } -boolean +bool test_some(unsigned verbose, FILE *fp, unsigned long n) { @@ -137,7 +137,7 @@ test_some(unsigned verbose, FILE *fp, } -boolean +bool test_single(unsigned verbose, FILE *fp) { printf("no test_single()"); diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 426a4b77cd0..54054c1c6d8 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -70,10 +70,10 @@ static unsigned id_counter = 0; * Conventional allocation path for non-display textures: * Compute strides and allocate data (unless asked not to). */ -static boolean +static bool llvmpipe_texture_layout(struct llvmpipe_screen *screen, struct llvmpipe_resource *lpr, - boolean allocate) + bool allocate) { struct pipe_resource *pt = &lpr->base; unsigned width = pt->width0; @@ -209,7 +209,7 @@ llvmpipe_can_create_resource(struct pipe_screen *screen, } -static boolean +static bool llvmpipe_displaytarget_layout(struct llvmpipe_screen *screen, struct llvmpipe_resource *lpr, const void *map_front_private) @@ -707,8 +707,8 @@ llvmpipe_transfer_map_ms(struct pipe_context *pipe, * the context if necessary. */ if (!(usage & PIPE_MAP_UNSYNCHRONIZED)) { - boolean read_only = !(usage & PIPE_MAP_WRITE); - boolean do_not_block = !!(usage & PIPE_MAP_DONTBLOCK); + bool read_only = !(usage & PIPE_MAP_WRITE); + bool do_not_block = !!(usage & PIPE_MAP_DONTBLOCK); if (!llvmpipe_flush_resource(pipe, resource, level, read_only, @@ -1163,7 +1163,7 @@ llvmpipe_init_screen_resource_funcs(struct pipe_screen *screen) #ifdef DEBUG /* init linked list for tracking resources */ { - static boolean first_call = TRUE; + static bool first_call = TRUE; if (first_call) { memset(&resource_list, 0, sizeof(resource_list)); list_inithead(&resource_list.list); diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h index 843bce6ce73..07556b9d77e 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.h +++ b/src/gallium/drivers/llvmpipe/lp_texture.h @@ -156,7 +156,7 @@ void llvmpipe_init_screen_resource_funcs(struct pipe_screen *screen); void llvmpipe_init_context_resource_funcs(struct pipe_context *pipe); -static inline boolean +static inline bool llvmpipe_resource_is_texture(const struct pipe_resource *resource) { switch (resource->target) { @@ -178,7 +178,7 @@ llvmpipe_resource_is_texture(const struct pipe_resource *resource) } -static inline boolean +static inline bool llvmpipe_resource_is_1d(const struct pipe_resource *resource) { switch (resource->target) { diff --git a/src/gallium/drivers/nouveau/nv30/nv30_draw.c b/src/gallium/drivers/nouveau/nv30/nv30_draw.c index e76ae93e2e0..d349255e0ea 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_draw.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_draw.c @@ -65,7 +65,7 @@ nv30_render_get_vertex_info(struct vbuf_render *render) return &nv30_render(render)->vertex_info; } -static boolean +static bool nv30_render_allocate_vertices(struct vbuf_render *render, ushort vertex_size, ushort nr_vertices) { diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index 681dc0c7530..069892f74e9 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -132,7 +132,7 @@ static uint32_t r300_depth_clear_cb_value(enum pipe_format format, return uc.us | (uc.us << 16); } -static boolean r300_cbzb_clear_allowed(struct r300_context *r300, +static bool r300_cbzb_clear_allowed(struct r300_context *r300, unsigned clear_buffers) { struct pipe_framebuffer_state *fb = @@ -145,7 +145,7 @@ static boolean r300_cbzb_clear_allowed(struct r300_context *r300, return r300_surface(fb->cbufs[0])->cbzb_allowed; } -static boolean r300_fast_zclear_allowed(struct r300_context *r300, +static bool r300_fast_zclear_allowed(struct r300_context *r300, unsigned clear_buffers) { struct pipe_framebuffer_state *fb = @@ -154,7 +154,7 @@ static boolean r300_fast_zclear_allowed(struct r300_context *r300, return r300_resource(fb->zsbuf->texture)->tex.zmask_dwords[fb->zsbuf->u.tex.level] != 0; } -static boolean r300_hiz_clear_allowed(struct r300_context *r300) +static bool r300_hiz_clear_allowed(struct r300_context *r300) { struct pipe_framebuffer_state *fb = (struct pipe_framebuffer_state*)r300->fb_state.state; @@ -272,7 +272,7 @@ static void r300_clear(struct pipe_context* pipe, /* Use fast Z clear. * The zbuffer must be in micro-tiled mode, otherwise it locks up. */ if (buffers & PIPE_CLEAR_DEPTHSTENCIL) { - boolean zmask_clear, hiz_clear; + bool zmask_clear, hiz_clear; /* If both depth and stencil are present, they must be cleared together. */ if (fb->zsbuf->texture->format == PIPE_FORMAT_S8_UINT_Z24_UNORM && @@ -692,7 +692,7 @@ static void r300_resource_copy_region(struct pipe_context *pipe, pipe_sampler_view_reference(&src_view, NULL); } -static boolean r300_is_simple_msaa_resolve(const struct pipe_blit_info *info) +static bool r300_is_simple_msaa_resolve(const struct pipe_blit_info *info) { unsigned dst_width = u_minify(info->dst.resource->width0, info->dst.level); unsigned dst_height = u_minify(info->dst.resource->height0, info->dst.level); diff --git a/src/gallium/drivers/r300/r300_chipset.h b/src/gallium/drivers/r300/r300_chipset.h index 8e9deb6057c..3d16c678989 100644 --- a/src/gallium/drivers/r300/r300_chipset.h +++ b/src/gallium/drivers/r300/r300_chipset.h @@ -50,13 +50,13 @@ struct r300_capabilities { /* The number of texture units. */ unsigned num_tex_units; /* Whether or not TCL is physically present */ - boolean has_tcl; + bool has_tcl; /* Some chipsets do not have HiZ RAM - other have varying amounts. */ int hiz_ram; /* Some chipsets have zmask ram per pipe some don't. */ int zmask_ram; /* CMASK is for MSAA colorbuffer compression and fast clear. */ - boolean has_cmask; + bool has_cmask; /* Compression mode for ZMASK. */ enum r300_zmask_compression z_compress; /* Whether or not this is RV350 or newer, including all r400 and r500 @@ -65,12 +65,12 @@ struct r300_capabilities { * - Better MACRO_SWITCH in texture tiling * - Half float vertex * - More HyperZ optimizations */ - boolean is_rv350; + bool is_rv350; /* Whether or not this is R400. The differences compared their rv350 * cousins are: * - Extended fragment shader registers * - 3DC texture compression (RGTC2) */ - boolean is_r400; + bool is_r400; /* Whether or not this is an RV515 or newer; R500s have many differences * that require extra consideration, compared to their rv350 cousins: * - Extra bit of width and height on texture sizes @@ -81,13 +81,13 @@ struct r300_capabilities { * - 24-bit depth textures * - Stencil back-face reference value * - Ability to render up to 2^24 - 1 vertices with signed index offset */ - boolean is_r500; + bool is_r500; /* Whether or not the second pixel pipe is accessed with the high bit */ - boolean high_second_pipe; + bool high_second_pipe; /* DXTC texture swizzling. */ - boolean dxtc_swizzle; + bool dxtc_swizzle; /* Whether R500_US_FORMAT0_0 exists (R520-only and depends on DRM). */ - boolean has_us_format; + bool has_us_format; }; void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps); diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 9ca39d5dbbf..0b0fbf0019a 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -152,11 +152,11 @@ do { \ return FALSE; \ } while (0) -static boolean r300_setup_atoms(struct r300_context* r300) +static bool r300_setup_atoms(struct r300_context* r300) { - boolean is_rv350 = r300->screen->caps.is_rv350; - boolean is_r500 = r300->screen->caps.is_r500; - boolean has_tcl = r300->screen->caps.has_tcl; + bool is_rv350 = r300->screen->caps.is_rv350; + bool is_r500 = r300->screen->caps.is_r500; + bool has_tcl = r300->screen->caps.has_tcl; /* Create the actual atom list. * diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 4745dd68e0d..bc7c3cd0952 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -65,9 +65,9 @@ struct r300_atom { /* Upper bound on number of dwords to emit. */ unsigned size; /* Whether this atom should be emitted. */ - boolean dirty; + bool dirty; /* Whether this atom may be emitted with state == NULL. */ - boolean allow_null_state; + bool allow_null_state; }; struct r300_aa_state { @@ -114,9 +114,9 @@ struct r300_dsa_state { uint32_t alpha_function; /* Whether a two-sided stencil is enabled. */ - boolean two_sided; + bool two_sided; /* Whether a fallback should be used for a two-sided stencil ref value. */ - boolean two_sided_stencil_ref; + bool two_sided_stencil_ref; }; struct r300_hyperz_state { @@ -155,7 +155,7 @@ struct r300_rs_state { unsigned cull_mode_index; /* Whether polygon offset is enabled. */ - boolean polygon_offset_enable; + bool polygon_offset_enable; /* This is emitted in the draw function. */ uint32_t color_control; /* R300_GA_COLOR_CONTROL: 0x4278 */ @@ -291,7 +291,7 @@ struct r300_query { * after end_query and flush. */ unsigned num_results; /* if begin has been emitted */ - boolean begin_emitted; + bool begin_emitted; /* The buffer where query results are stored. */ struct pb_buffer *buf; @@ -320,7 +320,7 @@ struct r300_surface { uint32_t cbzb_format; /* ZB_FORMAT. */ /* Whether the CBZB clear is allowed on the surface. */ - boolean cbzb_allowed; + bool cbzb_allowed; unsigned colormask_swizzle; }; @@ -364,17 +364,17 @@ struct r300_texture_desc { /* Whether this texture has non-power-of-two dimensions. * It can be either a regular texture or a rectangle one. */ - boolean is_npot; + bool is_npot; /* This flag says that hardware must use the stride for addressing * instead of the width. */ - boolean uses_stride_addressing; + bool uses_stride_addressing; /* Whether CBZB fast color clear is allowed on the miplevel. */ - boolean cbzb_allowed[R300_MAX_TEXTURE_LEVELS]; + bool cbzb_allowed[R300_MAX_TEXTURE_LEVELS]; /* Zbuffer compression info for each miplevel. */ - boolean zcomp8x8[R300_MAX_TEXTURE_LEVELS]; + bool zcomp8x8[R300_MAX_TEXTURE_LEVELS]; /* If zero, then disable Z compression/HiZ. */ unsigned zmask_dwords[R300_MAX_TEXTURE_LEVELS]; unsigned hiz_dwords[R300_MAX_TEXTURE_LEVELS]; @@ -565,31 +565,31 @@ struct r300_context { /* Flag indicating whether or not the HW is dirty. */ uint32_t dirty_hw; /* Whether polygon offset is enabled. */ - boolean polygon_offset_enabled; + bool polygon_offset_enabled; /* Z buffer bit depth. */ uint32_t zbuffer_bpp; /* Whether rendering is conditional and should be skipped. */ - boolean skip_rendering; + bool skip_rendering; /* The flag above saved by blitter. */ unsigned char blitter_saved_skip_rendering; /* Point sprites texcoord index, 1 bit per texcoord */ int sprite_coord_enable; /* Whether we are drawing points, to disable sprite coord if not */ - boolean is_point; + bool is_point; /* Whether two-sided color selection is enabled (AKA light_twoside). */ - boolean two_sided_color; - boolean flatshade; - boolean clip_halfz; + bool two_sided_color; + bool flatshade; + bool clip_halfz; /* Whether fast color clear is enabled. */ - boolean cbzb_clear; + bool cbzb_clear; /* Whether fragment shader needs to be validated. */ enum r300_fs_validity_status fs_status; /* Framebuffer multi-write. */ - boolean fb_multiwrite; + bool fb_multiwrite; unsigned num_samples; - boolean msaa_enable; - boolean alpha_to_one; - boolean alpha_to_coverage; + bool msaa_enable; + bool alpha_to_one; + bool alpha_to_coverage; void *dsa_decompress_zmask; @@ -606,30 +606,30 @@ struct r300_context { int vs_const_base; /* Vertex array state info */ - boolean vertex_arrays_dirty; - boolean vertex_arrays_indexed; + bool vertex_arrays_dirty; + bool vertex_arrays_indexed; int vertex_arrays_offset; int vertex_arrays_instance_id; - boolean instancing_enabled; + bool instancing_enabled; /* Hyper-Z stats. */ - boolean hyperz_enabled; /* Whether it owns Hyper-Z access. */ + bool hyperz_enabled; /* Whether it owns Hyper-Z access. */ int64_t hyperz_time_of_last_flush; /* Time of the last flush with Z clear. */ unsigned num_z_clears; /* Since the last flush. */ /* ZMask state. */ - boolean zmask_in_use; /* Whether ZMASK is enabled. */ - boolean zmask_decompress; /* Whether ZMASK is being decompressed. */ + bool zmask_in_use; /* Whether ZMASK is enabled. */ + bool zmask_decompress; /* Whether ZMASK is being decompressed. */ struct pipe_surface *locked_zbuffer; /* Unbound zbuffer which still has data in ZMASK. */ /* HiZ state. */ - boolean hiz_in_use; /* Whether HIZ is enabled. */ + bool hiz_in_use; /* Whether HIZ is enabled. */ enum r300_hiz_func hiz_func; /* HiZ function. Can be either MIN or MAX. */ uint32_t hiz_clear_value; /* HiZ clear value. */ /* CMASK state. */ - boolean cmask_access; - boolean cmask_in_use; + bool cmask_access; + bool cmask_in_use; uint32_t color_clear_value; /* RGBA8 or RGBA1010102 */ uint32_t color_clear_value_ar; /* RGBA16F */ uint32_t color_clear_value_gb; /* RGBA16F */ @@ -785,7 +785,7 @@ void r300_update_derived_state(struct r300_context* r300); void r500_dump_rs_block(struct r300_rs_block *rs); -static inline boolean CTX_DBG_ON(struct r300_context * ctx, unsigned flags) +static inline bool CTX_DBG_ON(struct r300_context * ctx, unsigned flags) { return SCREEN_DBG_ON(ctx->screen, flags); } diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 08cd544871e..cb7e5b676fd 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -83,7 +83,7 @@ void r300_emit_dsa_state(struct r300_context* r300, unsigned size, void* state) struct r300_dsa_state* dsa = (struct r300_dsa_state*)state; struct pipe_framebuffer_state* fb = (struct pipe_framebuffer_state*)r300->fb_state.state; - boolean is_r500 = r300->screen->caps.is_r500; + bool is_r500 = r300->screen->caps.is_r500; CS_LOCALS(r300); uint32_t alpha_func = dsa->alpha_function; @@ -895,7 +895,7 @@ void r300_emit_textures_state(struct r300_context *r300, struct r300_texture_sampler_state *texstate; struct r300_resource *tex; unsigned i; - boolean has_us_format = r300->screen->caps.has_us_format; + bool has_us_format = r300->screen->caps.has_us_format; CS_LOCALS(r300); BEGIN_CS(size); @@ -928,7 +928,7 @@ void r300_emit_textures_state(struct r300_context *r300, } void r300_emit_vertex_arrays(struct r300_context* r300, int offset, - boolean indexed, int instance_id) + bool indexed, int instance_id) { struct pipe_vertex_buffer *vbuf = r300->vertex_buffer; struct pipe_vertex_element *velem = r300->velems->velem; @@ -1027,7 +1027,7 @@ void r300_emit_vertex_arrays(struct r300_context* r300, int offset, END_CS; } -void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, boolean indexed) +void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, bool indexed) { CS_LOCALS(r300); @@ -1300,8 +1300,8 @@ void r300_emit_texture_cache_inval(struct r300_context* r300, unsigned size, voi END_CS; } -boolean r300_emit_buffer_validate(struct r300_context *r300, - boolean do_validate_vertex_buffers, +bool r300_emit_buffer_validate(struct r300_context *r300, + bool do_validate_vertex_buffers, struct pipe_resource *index_buffer) { struct pipe_framebuffer_state *fb = @@ -1311,7 +1311,7 @@ boolean r300_emit_buffer_validate(struct r300_context *r300, (struct r300_textures_state*)r300->textures_state.state; struct r300_resource *tex; unsigned i; - boolean flushed = FALSE; + bool flushed = FALSE; validate: if (r300->fb_state.dirty) { diff --git a/src/gallium/drivers/r300/r300_emit.h b/src/gallium/drivers/r300/r300_emit.h index eaa0a6c4ac0..e378c64d51f 100644 --- a/src/gallium/drivers/r300/r300_emit.h +++ b/src/gallium/drivers/r300/r300_emit.h @@ -31,7 +31,7 @@ struct r300_vertex_program_code; uint32_t pack_float24(float f); void r300_emit_vertex_arrays(struct r300_context* r300, int offset, - boolean indexed, int instance_id); + bool indexed, int instance_id); void r300_emit_blend_state(struct r300_context* r300, unsigned size, void* state); @@ -89,7 +89,7 @@ void r300_emit_scissor_state(struct r300_context* r300, void r300_emit_textures_state(struct r300_context *r300, unsigned size, void *state); -void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, boolean indexed); +void r300_emit_vertex_arrays_swtcl(struct r300_context *r300, bool indexed); void r300_emit_vap_invariant_state(struct r300_context *r300, unsigned size, void *state); @@ -125,8 +125,8 @@ unsigned r300_get_num_cs_end_dwords(struct r300_context *r300); /* Emit all dirty state. */ void r300_emit_dirty_state(struct r300_context* r300); -boolean r300_emit_buffer_validate(struct r300_context *r300, - boolean do_validate_vertex_buffers, +bool r300_emit_buffer_validate(struct r300_context *r300, + bool do_validate_vertex_buffers, struct pipe_resource *index_buffer); #endif /* R300_EMIT_H */ diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index 75b164afabe..98fe7607579 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -575,7 +575,7 @@ static void r300_translate_fragment_shader( r300_emit_fs_code_to_buffer(r300, shader); } -boolean r300_pick_fragment_shader(struct r300_context *r300, +bool r300_pick_fragment_shader(struct r300_context *r300, struct r300_fragment_shader* fs, struct r300_fragment_program_external_state *state) { diff --git a/src/gallium/drivers/r300/r300_fs.h b/src/gallium/drivers/r300/r300_fs.h index 30284f3e12f..3d1b14add97 100644 --- a/src/gallium/drivers/r300/r300_fs.h +++ b/src/gallium/drivers/r300/r300_fs.h @@ -37,7 +37,7 @@ struct r300_fragment_shader_code { /* Whether the shader was replaced by a dummy one due to a shader * compilation failure. */ - boolean dummy; + bool dummy; /* Numbers of constants for each type. */ unsigned externals_count; @@ -55,7 +55,7 @@ struct r300_fragment_shader_code { struct r300_fragment_shader_code* next; - boolean write_all; + bool write_all; }; @@ -75,20 +75,20 @@ void r300_shader_read_fs_inputs(struct tgsi_shader_info* info, struct r300_shader_semantics* fs_inputs); /* Return TRUE if the shader was switched and should be re-emitted. */ -boolean r300_pick_fragment_shader(struct r300_context *r300, +bool r300_pick_fragment_shader(struct r300_context *r300, 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); -static inline boolean r300_fragment_shader_writes_depth(struct r300_fragment_shader *fs) +static inline bool r300_fragment_shader_writes_depth(struct r300_fragment_shader *fs) { if (!fs) return FALSE; return (fs->shader->code.writes_depth) ? TRUE : FALSE; } -static inline boolean r300_fragment_shader_writes_all(struct r300_fragment_shader *fs) +static inline bool r300_fragment_shader_writes_all(struct r300_fragment_shader *fs) { if (!fs) return FALSE; diff --git a/src/gallium/drivers/r300/r300_hyperz.c b/src/gallium/drivers/r300/r300_hyperz.c index 7e146dfe57a..eba1ba0028c 100644 --- a/src/gallium/drivers/r300/r300_hyperz.c +++ b/src/gallium/drivers/r300/r300_hyperz.c @@ -68,7 +68,7 @@ static unsigned r300_get_sc_hz_max(struct r300_context *r300) return func >= PIPE_FUNC_GREATER ? R300_SC_HYPERZ_MAX : R300_SC_HYPERZ_MIN; } -static boolean r300_is_hiz_func_valid(struct r300_context *r300) +static bool r300_is_hiz_func_valid(struct r300_context *r300) { struct r300_dsa_state *dsa = r300->dsa_state.state; unsigned func = dsa->dsa.depth_func; @@ -89,13 +89,13 @@ static boolean r300_is_hiz_func_valid(struct r300_context *r300) return TRUE; } -static boolean r300_dsa_stencil_op_not_keep(struct pipe_stencil_state *s) +static bool r300_dsa_stencil_op_not_keep(struct pipe_stencil_state *s) { return s->enabled && (s->fail_op != PIPE_STENCIL_OP_KEEP || s->zfail_op != PIPE_STENCIL_OP_KEEP); } -static boolean r300_hiz_allowed(struct r300_context *r300) +static bool r300_hiz_allowed(struct r300_context *r300) { struct r300_dsa_state *dsa = r300->dsa_state.state; struct r300_screen *r300screen = r300->screen; @@ -218,7 +218,7 @@ static void r300_update_hyperz(struct r300_context* r300) /* The ZTOP state */ /*****************************************************************************/ -static boolean r300_dsa_alpha_test_enabled( +static bool r300_dsa_alpha_test_enabled( struct pipe_depth_stencil_alpha_state *dsa) { /* We are interested only in the cases when alpha testing can kill diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index ba6e3db68bb..7bac33a88a4 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -193,14 +193,14 @@ enum r300_prepare_flags { * \param cs_dwords The number of dwords to reserve in CS. * \return TRUE if the CS was flushed */ -static boolean r300_reserve_cs_dwords(struct r300_context *r300, +static bool r300_reserve_cs_dwords(struct r300_context *r300, enum r300_prepare_flags flags, unsigned cs_dwords) { - boolean flushed = FALSE; - boolean emit_states = flags & PREP_EMIT_STATES; - boolean emit_vertex_arrays = flags & PREP_EMIT_VARRAYS; - boolean emit_vertex_arrays_swtcl = flags & PREP_EMIT_VARRAYS_SWTCL; + bool flushed = FALSE; + bool emit_states = flags & PREP_EMIT_STATES; + bool emit_vertex_arrays = flags & PREP_EMIT_VARRAYS; + bool emit_vertex_arrays_swtcl = flags & PREP_EMIT_VARRAYS_SWTCL; /* Add dirty state, index offset, and AOS. */ if (emit_states) @@ -236,17 +236,17 @@ static boolean r300_reserve_cs_dwords(struct r300_context *r300, * \param instance_id Index of instance to render * \return TRUE if rendering should be skipped */ -static boolean r300_emit_states(struct r300_context *r300, +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) { - boolean emit_states = flags & PREP_EMIT_STATES; - boolean emit_vertex_arrays = flags & PREP_EMIT_VARRAYS; - boolean emit_vertex_arrays_swtcl = flags & PREP_EMIT_VARRAYS_SWTCL; - boolean indexed = flags & PREP_INDEXED; - boolean validate_vbos = flags & PREP_VALIDATE_VBOS; + bool emit_states = flags & PREP_EMIT_STATES; + bool emit_vertex_arrays = flags & PREP_EMIT_VARRAYS; + bool emit_vertex_arrays_swtcl = flags & PREP_EMIT_VARRAYS_SWTCL; + bool indexed = flags & PREP_INDEXED; + bool validate_vbos = flags & PREP_VALIDATE_VBOS; /* Validate buffers and emit dirty state if needed. */ if (emit_states || (emit_vertex_arrays && validate_vbos)) { @@ -299,7 +299,7 @@ static boolean r300_emit_states(struct r300_context *r300, * \param instance_id The instance to render. * \return TRUE if rendering should be skipped */ -static boolean r300_prepare_for_rendering(struct r300_context *r300, +static bool r300_prepare_for_rendering(struct r300_context *r300, enum r300_prepare_flags flags, struct pipe_resource *index_buffer, unsigned cs_dwords, @@ -315,7 +315,7 @@ static boolean r300_prepare_for_rendering(struct r300_context *r300, index_bias, instance_id); } -static boolean immd_is_good_idea(struct r300_context *r300, +static bool immd_is_good_idea(struct r300_context *r300, unsigned count) { if (DBG_ON(r300, DBG_NO_IMMD)) { @@ -405,7 +405,7 @@ static void r300_emit_draw_arrays(struct r300_context *r300, unsigned mode, unsigned count) { - boolean alt_num_verts = count > 65535; + bool alt_num_verts = count > 65535; CS_LOCALS(r300); if (count >= (1 << 24)) { @@ -437,7 +437,7 @@ static void r300_emit_draw_elements(struct r300_context *r300, uint16_t *imm_indices3) { uint32_t count_dwords, offset_dwords; - boolean alt_num_verts = count > 65535; + bool alt_num_verts = count > 65535; CS_LOCALS(r300); if (count >= (1 << 24)) { @@ -596,7 +596,7 @@ static void r300_draw_elements(struct r300_context *r300, struct pipe_resource* orgIndexBuffer = indexBuffer; unsigned start = draw->start; unsigned count = draw->count; - boolean alt_num_verts = r300->screen->caps.is_r500 && + bool alt_num_verts = r300->screen->caps.is_r500 && count > 65536; unsigned short_count; int buffer_offset = 0, index_offset = 0; /* for index bias emulation */ @@ -682,7 +682,7 @@ static void r300_draw_arrays(struct r300_context *r300, const struct pipe_draw_start_count_bias *draw, int instance_id) { - boolean alt_num_verts = r300->screen->caps.is_r500 && + bool alt_num_verts = r300->screen->caps.is_r500 && draw->count > 65536; unsigned start = draw->start; unsigned count = draw->count; @@ -939,7 +939,7 @@ r300_render_get_vertex_info(struct vbuf_render* render) return &r300->vertex_info; } -static boolean r300_render_allocate_vertices(struct vbuf_render* render, +static bool r300_render_allocate_vertices(struct vbuf_render* render, ushort vertex_size, ushort count) { diff --git a/src/gallium/drivers/r300/r300_render_stencilref.c b/src/gallium/drivers/r300/r300_render_stencilref.c index 87d944d2e03..18086c1418a 100644 --- a/src/gallium/drivers/r300/r300_render_stencilref.c +++ b/src/gallium/drivers/r300/r300_render_stencilref.c @@ -46,7 +46,7 @@ struct r300_stencilref_context { ubyte ref_value_front; }; -static boolean r300_stencilref_needed(struct r300_context *r300) +static bool r300_stencilref_needed(struct r300_context *r300) { struct r300_dsa_state *dsa = (struct r300_dsa_state*)r300->dsa_state.state; diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index c7086853a8a..5930dbffdd3 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -124,7 +124,7 @@ static struct disk_cache* r300_get_disk_shader_cache(struct pipe_screen* pscreen static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param) { struct r300_screen* r300screen = r300_screen(pscreen); - boolean is_r500 = r300screen->caps.is_r500; + bool is_r500 = r300screen->caps.is_r500; switch (param) { /* Supported features (boolean caps). */ @@ -252,8 +252,8 @@ static int r300_get_shader_param(struct pipe_screen *pscreen, enum pipe_shader_cap param) { struct r300_screen* r300screen = r300_screen(pscreen); - boolean is_r400 = r300screen->caps.is_r400; - boolean is_r500 = r300screen->caps.is_r500; + bool is_r400 = r300screen->caps.is_r400; + bool is_r500 = r300screen->caps.is_r500; switch (param) { case PIPE_SHADER_CAP_SUPPORTED_IRS: @@ -576,7 +576,7 @@ r300_get_compiler_options(struct pipe_screen *pscreen, * Whether the format matches: * PIPE_FORMAT_?10?10?10?2_UNORM */ -static inline boolean +static inline bool util_format_is_rgba1010102_variant(const struct util_format_description *desc) { static const unsigned size[4] = {10, 10, 10, 2}; @@ -644,22 +644,22 @@ static bool r300_is_format_supported(struct pipe_screen* screen, unsigned usage) { uint32_t retval = 0; - boolean is_r500 = r300_screen(screen)->caps.is_r500; - boolean is_r400 = r300_screen(screen)->caps.is_r400; - boolean is_color2101010 = format == PIPE_FORMAT_R10G10B10A2_UNORM || + 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; - boolean is_ati1n = format == PIPE_FORMAT_RGTC1_UNORM || + bool is_ati1n = format == PIPE_FORMAT_RGTC1_UNORM || format == PIPE_FORMAT_RGTC1_SNORM || format == PIPE_FORMAT_LATC1_UNORM || format == PIPE_FORMAT_LATC1_SNORM; - boolean is_ati2n = format == PIPE_FORMAT_RGTC2_UNORM || + bool is_ati2n = format == PIPE_FORMAT_RGTC2_UNORM || format == PIPE_FORMAT_RGTC2_SNORM || format == PIPE_FORMAT_LATC2_UNORM || format == PIPE_FORMAT_LATC2_SNORM; - boolean is_half_float = format == PIPE_FORMAT_R16_FLOAT || + bool is_half_float = format == PIPE_FORMAT_R16_FLOAT || format == PIPE_FORMAT_R16G16_FLOAT || format == PIPE_FORMAT_R16G16B16_FLOAT || format == PIPE_FORMAT_R16G16B16A16_FLOAT || diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h index c25e49efc72..31d6787851c 100644 --- a/src/gallium/drivers/r300/r300_screen.h +++ b/src/gallium/drivers/r300/r300_screen.h @@ -105,7 +105,7 @@ radeon_winsys(struct pipe_screen *screen) { #define DBG_NO_CMASK (1 << 23) #define DBG_NO_TCL (1 << 25) /*@}*/ -static inline boolean SCREEN_DBG_ON(struct r300_screen * screen, unsigned flags) +static inline bool SCREEN_DBG_ON(struct r300_screen * screen, unsigned flags) { return (screen->debug & flags) ? TRUE : FALSE; } diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index bd1202be031..195322c4afc 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -58,7 +58,7 @@ r300_mark_atom_dirty(r300, &(atom)); \ } -static boolean blend_discard_if_src_alpha_0(unsigned srcRGB, unsigned srcA, +static bool blend_discard_if_src_alpha_0(unsigned srcRGB, unsigned srcA, unsigned dstRGB, unsigned dstA) { /* If the blend equation is ADD or REVERSE_SUBTRACT, @@ -79,7 +79,7 @@ static boolean blend_discard_if_src_alpha_0(unsigned srcRGB, unsigned srcA, dstA == PIPE_BLENDFACTOR_ONE); } -static boolean blend_discard_if_src_alpha_1(unsigned srcRGB, unsigned srcA, +static bool blend_discard_if_src_alpha_1(unsigned srcRGB, unsigned srcA, unsigned dstRGB, unsigned dstA) { /* If the blend equation is ADD or REVERSE_SUBTRACT, @@ -98,7 +98,7 @@ static boolean blend_discard_if_src_alpha_1(unsigned srcRGB, unsigned srcA, dstA == PIPE_BLENDFACTOR_ONE); } -static boolean blend_discard_if_src_color_0(unsigned srcRGB, unsigned srcA, +static bool blend_discard_if_src_color_0(unsigned srcRGB, unsigned srcA, unsigned dstRGB, unsigned dstA) { /* If the blend equation is ADD or REVERSE_SUBTRACT, @@ -113,7 +113,7 @@ static boolean blend_discard_if_src_color_0(unsigned srcRGB, unsigned srcA, (dstA == PIPE_BLENDFACTOR_ONE); } -static boolean blend_discard_if_src_color_1(unsigned srcRGB, unsigned srcA, +static bool blend_discard_if_src_color_1(unsigned srcRGB, unsigned srcA, unsigned dstRGB, unsigned dstA) { /* If the blend equation is ADD or REVERSE_SUBTRACT, @@ -128,7 +128,7 @@ static boolean blend_discard_if_src_color_1(unsigned srcRGB, unsigned srcA, (dstA == PIPE_BLENDFACTOR_ONE); } -static boolean blend_discard_if_src_alpha_color_0(unsigned srcRGB, unsigned srcA, +static bool blend_discard_if_src_alpha_color_0(unsigned srcRGB, unsigned srcA, unsigned dstRGB, unsigned dstA) { /* If the blend equation is ADD or REVERSE_SUBTRACT, @@ -151,7 +151,7 @@ static boolean blend_discard_if_src_alpha_color_0(unsigned srcRGB, unsigned srcA dstA == PIPE_BLENDFACTOR_ONE); } -static boolean blend_discard_if_src_alpha_color_1(unsigned srcRGB, unsigned srcA, +static bool blend_discard_if_src_alpha_color_1(unsigned srcRGB, unsigned srcA, unsigned dstRGB, unsigned dstA) { /* If the blend equation is ADD or REVERSE_SUBTRACT, @@ -274,7 +274,7 @@ static unsigned arra_cmask(unsigned mask) static unsigned blend_read_enable(unsigned eqRGB, unsigned eqA, unsigned dstRGB, unsigned dstA, unsigned srcRGB, unsigned srcA, - boolean src_alpha_optz) + bool src_alpha_optz) { unsigned blend_control = 0; @@ -477,7 +477,7 @@ static void* r300_create_blend_state(struct pipe_context* pipe, }; for (i = 0; i < COLORMASK_NUM_SWIZZLES; i++) { - boolean has_alpha = i != COLORMASK_RGBX && i != COLORMASK_BGRX; + bool has_alpha = i != COLORMASK_RGBX && i != COLORMASK_BGRX; BEGIN_CB(blend->cb_clamp[i], 8); OUT_CB_REG(R300_RB3D_ROPCNTL, rop); @@ -529,8 +529,8 @@ static void r300_bind_blend_state(struct pipe_context* pipe, { struct r300_context* r300 = r300_context(pipe); struct r300_blend_state *blend = (struct r300_blend_state*)state; - boolean last_alpha_to_one = r300->alpha_to_one; - boolean last_alpha_to_coverage = r300->alpha_to_coverage; + bool last_alpha_to_one = r300->alpha_to_one; + bool last_alpha_to_coverage = r300->alpha_to_coverage; UPDATE_STATE(state, r300->blend_state); @@ -679,7 +679,7 @@ static void r300_set_clip_state(struct pipe_context* pipe, static void* r300_create_dsa_state(struct pipe_context* pipe, const struct pipe_depth_stencil_alpha_state* state) { - boolean is_r500 = r300_screen(pipe->screen)->caps.is_r500; + bool is_r500 = r300_screen(pipe->screen)->caps.is_r500; struct r300_dsa_state* dsa = CALLOC_STRUCT(r300_dsa_state); CB_LOCALS; uint32_t alpha_value_fp16 = 0; @@ -907,7 +907,7 @@ r300_set_framebuffer_state(struct pipe_context* pipe, struct pipe_framebuffer_state *current_state = r300->fb_state.state; unsigned max_width, max_height, i; uint32_t zbuffer_bpp = 0; - boolean unlock_zbuffer = FALSE; + bool unlock_zbuffer = FALSE; if (r300->screen->caps.is_r500) { max_width = max_height = 4096; @@ -1164,7 +1164,7 @@ static void* r300_create_rs_state(struct pipe_context* pipe, float point_texcoord_bottom = 0;/* R300_GA_POINT_T0: 0x4204 */ float point_texcoord_right = 1; /* R300_GA_POINT_S1: 0x4208 */ float point_texcoord_top = 0; /* R300_GA_POINT_T1: 0x420c */ - boolean vclamp = !r300_context(pipe)->screen->caps.is_r500; + bool vclamp = !r300_context(pipe)->screen->caps.is_r500; CB_LOCALS; /* Copy rasterizer state. */ @@ -1362,10 +1362,10 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state) struct r300_context* r300 = r300_context(pipe); struct r300_rs_state* rs = (struct r300_rs_state*)state; int last_sprite_coord_enable = r300->sprite_coord_enable; - boolean last_two_sided_color = r300->two_sided_color; - boolean last_msaa_enable = r300->msaa_enable; - boolean last_flatshade = r300->flatshade; - boolean last_clip_halfz = r300->clip_halfz; + bool last_two_sided_color = r300->two_sided_color; + bool last_msaa_enable = r300->msaa_enable; + bool last_flatshade = r300->flatshade; + bool last_clip_halfz = r300->clip_halfz; if (r300->draw && rs) { draw_set_rasterizer_state(r300->draw, &rs->rs_draw, state); @@ -1424,7 +1424,7 @@ static void* { struct r300_context* r300 = r300_context(pipe); struct r300_sampler_state* sampler = CALLOC_STRUCT(r300_sampler_state); - boolean is_r500 = r300->screen->caps.is_r500; + bool is_r500 = r300->screen->caps.is_r500; int lod_bias; sampler->state = *state; @@ -1557,7 +1557,7 @@ static void r300_set_sampler_views(struct pipe_context* pipe, struct r300_resource *texture; unsigned i, real_num_views = 0, view_index = 0; unsigned tex_units = r300->screen->caps.num_tex_units; - boolean dirty_tex = FALSE; + bool dirty_tex = FALSE; assert(start == 0); /* non-zero not handled yet */ @@ -1633,8 +1633,8 @@ r300_create_sampler_view_custom(struct pipe_context *pipe, { struct r300_sampler_view *view = CALLOC_STRUCT(r300_sampler_view); struct r300_resource *tex = r300_resource(texture); - boolean is_r500 = r300_screen(pipe->screen)->caps.is_r500; - boolean dxtc_swizzle = r300_screen(pipe->screen)->caps.dxtc_swizzle; + bool is_r500 = r300_screen(pipe->screen)->caps.is_r500; + bool dxtc_swizzle = r300_screen(pipe->screen)->caps.dxtc_swizzle; if (view) { unsigned hwformat; diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index 67b8d4d63b0..6272f7b2904 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -322,7 +322,7 @@ static void r300_update_rs_block(struct r300_context *r300) void (*rX00_rs_col_write)(struct r300_rs_block*, int, int, enum r300_rs_col_write_type); 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); - boolean any_bcolor_used = vs_outputs->bcolor[0] != ATTR_UNUSED || + bool any_bcolor_used = vs_outputs->bcolor[0] != ATTR_UNUSED || vs_outputs->bcolor[1] != ATTR_UNUSED; int *stream_loc_notcl = r300->stream_loc_notcl; uint32_t stuffing_enable = 0; @@ -494,7 +494,7 @@ static void r300_update_rs_block(struct r300_context *r300) /* Rasterize generics. */ for (i = gen_offset; i < ATTR_GENERIC_COUNT && tex_count < 8; i++) { - boolean sprite_coord = false; + bool sprite_coord = false; if (fs_inputs->generic[i] != ATTR_UNUSED) { sprite_coord = !!(r300->sprite_coord_enable & (1 << i)) && r300->is_point; @@ -598,7 +598,7 @@ static void r300_update_rs_block(struct r300_context *r300) /* Rasterize texcords. */ for (i = gen_offset; i < ATTR_TEXCOORD_COUNT && tex_count < 8; i++) { - boolean sprite_coord = false; + bool sprite_coord = false; if (fs_inputs->texcoord[i] != ATTR_UNUSED) { sprite_coord = !!(r300->sprite_coord_enable & (1 << i)) && r300->is_point; @@ -784,7 +784,7 @@ static void rgba_to_bgra(float color[4]) static uint32_t r300_get_border_color(enum pipe_format format, const float border[4], - boolean is_r500) + bool is_r500) { const struct util_format_description *desc = util_format_description(format); float border_swizzled[4] = {0}; @@ -933,7 +933,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300) unsigned base_level, min_level, level_count, i, j, size; unsigned count = MIN2(state->sampler_view_count, state->sampler_state_count); - boolean has_us_format = r300->screen->caps.has_us_format; + bool has_us_format = r300->screen->caps.has_us_format; /* The KIL opcode fix, see below. */ if (!count && !r300->screen->caps.is_r500) @@ -1186,7 +1186,7 @@ static void r300_validate_fragment_shader(struct r300_context *r300) /* Does Multiwrite need to be changed? */ if (fb->nr_cbufs > 1) { - boolean new_multiwrite = + bool new_multiwrite = r300_fragment_shader_writes_all(r300_fs(r300)); if (r300->fb_multiwrite != new_multiwrite) { diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h index 941834f482e..7d03e7384d0 100644 --- a/src/gallium/drivers/r300/r300_state_inlines.h +++ b/src/gallium/drivers/r300/r300_state_inlines.h @@ -39,7 +39,7 @@ static inline int pack_float_16_6x(float f) { /* Blend state. */ static inline uint32_t r300_translate_blend_function(int blend_func, - boolean clamp) + bool clamp) { switch (blend_func) { case PIPE_BLEND_ADD: @@ -260,7 +260,7 @@ static inline uint32_t r300_translate_wrap(int wrap) } static inline uint32_t r300_translate_tex_filters(int min, int mag, int mip, - boolean is_anisotropic) + bool is_anisotropic) { uint32_t retval = 0; diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index b5b85ffb6fb..aa46627651c 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -100,7 +100,7 @@ static unsigned r300_get_endian_swap(enum pipe_format format) unsigned r300_get_swizzle_combined(const unsigned char *swizzle_format, const unsigned char *swizzle_view, - boolean dxtc_swizzle) + bool dxtc_swizzle) { unsigned i; unsigned char swizzle[4]; @@ -164,13 +164,13 @@ unsigned r300_get_swizzle_combined(const unsigned char *swizzle_format, * makes available X, Y, Z, W, ZERO, and ONE for swizzling. */ uint32_t r300_translate_texformat(enum pipe_format format, const unsigned char *swizzle_view, - boolean is_r500, - boolean dxtc_swizzle) + bool is_r500, + bool dxtc_swizzle) { uint32_t result = 0; const struct util_format_description *desc; int i; - boolean uniform = TRUE; + bool uniform = TRUE; const uint32_t sign_bit[4] = { R300_TX_FORMAT_SIGNED_W, R300_TX_FORMAT_SIGNED_Z, @@ -587,7 +587,7 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format) uint32_t modifier = 0; int i; const struct util_format_description *desc; - boolean uniform_sign; + bool uniform_sign; format = r300_unbyteswap_array_format(format); desc = util_format_description(format); @@ -872,19 +872,19 @@ static uint32_t r300_translate_colormask_swizzle(enum pipe_format format) } } -boolean r300_is_colorbuffer_format_supported(enum pipe_format format) +bool r300_is_colorbuffer_format_supported(enum pipe_format format) { return r300_translate_colorformat(format) != ~0 && r300_translate_out_fmt(format) != ~0 && r300_translate_colormask_swizzle(format) != ~0; } -boolean r300_is_zs_format_supported(enum pipe_format format) +bool r300_is_zs_format_supported(enum pipe_format format) { return r300_translate_zsformat(format) != ~0; } -boolean r300_is_sampler_format_supported(enum pipe_format format) +bool r300_is_sampler_format_supported(enum pipe_format format) { return r300_translate_texformat(format, NULL, TRUE, FALSE) != ~0; } @@ -899,7 +899,7 @@ void r300_texture_setup_format_state(struct r300_screen *screen, { struct pipe_resource *pt = &tex->b; struct r300_texture_desc *desc = &tex->tex; - boolean is_r500 = screen->caps.is_r500; + bool is_r500 = screen->caps.is_r500; unsigned width, height, depth; unsigned txwidth, txheight, txdepth; diff --git a/src/gallium/drivers/r300/r300_texture.h b/src/gallium/drivers/r300/r300_texture.h index fc180f7e0f8..f18794b71a7 100644 --- a/src/gallium/drivers/r300/r300_texture.h +++ b/src/gallium/drivers/r300/r300_texture.h @@ -38,20 +38,20 @@ struct r300_screen; unsigned r300_get_swizzle_combined(const unsigned char *swizzle_format, const unsigned char *swizzle_view, - boolean dxtc_swizzle); + bool dxtc_swizzle); uint32_t r300_translate_texformat(enum pipe_format format, const unsigned char *swizzle_view, - boolean is_r500, - boolean dxtc_swizzle); + bool is_r500, + bool dxtc_swizzle); uint32_t r500_tx_format_msb_bit(enum pipe_format format); -boolean r300_is_colorbuffer_format_supported(enum pipe_format format); +bool r300_is_colorbuffer_format_supported(enum pipe_format format); -boolean r300_is_zs_format_supported(enum pipe_format format); +bool r300_is_zs_format_supported(enum pipe_format format); -boolean r300_is_sampler_format_supported(enum pipe_format format); +bool r300_is_sampler_format_supported(enum pipe_format format); void r300_texture_setup_format_state(struct r300_screen *screen, struct r300_resource *tex, diff --git a/src/gallium/drivers/r300/r300_texture_desc.c b/src/gallium/drivers/r300/r300_texture_desc.c index 60470006c46..6c07625ec94 100644 --- a/src/gallium/drivers/r300/r300_texture_desc.c +++ b/src/gallium/drivers/r300/r300_texture_desc.c @@ -33,7 +33,7 @@ unsigned r300_get_pixel_alignment(enum pipe_format format, unsigned num_samples, enum radeon_bo_layout microtile, enum radeon_bo_layout macrotile, - enum r300_dim dim, boolean is_rs690) + enum r300_dim dim, bool is_rs690) { static const unsigned table[2][5][3][2] = { @@ -80,9 +80,9 @@ unsigned r300_get_pixel_alignment(enum pipe_format format, } /* Return true if macrotiling should be enabled on the miplevel. */ -static boolean r300_texture_macro_switch(struct r300_resource *tex, +static bool r300_texture_macro_switch(struct r300_resource *tex, unsigned level, - boolean rv350_mode, + bool rv350_mode, enum r300_dim dim) { unsigned tile, texdim; @@ -116,7 +116,7 @@ static unsigned r300_texture_get_stride(struct r300_screen *screen, unsigned level) { unsigned tile_width, width, stride; - boolean is_rs690 = (screen->caps.family == CHIP_RS600 || + bool is_rs690 = (screen->caps.family == CHIP_RS600 || screen->caps.family == CHIP_RS690 || screen->caps.family == CHIP_RS740); @@ -150,7 +150,7 @@ static unsigned r300_texture_get_stride(struct r300_screen *screen, static unsigned r300_texture_get_nblocksy(struct r300_resource *tex, unsigned level, - boolean *out_aligned_for_cbzb) + bool *out_aligned_for_cbzb) { unsigned height, tile_height; @@ -211,12 +211,12 @@ unsigned r300_stride_to_width(enum pipe_format format, static void r300_setup_miptree(struct r300_screen *screen, struct r300_resource *tex, - boolean align_for_cbzb) + bool align_for_cbzb) { struct pipe_resource *base = &tex->b; unsigned stride, size, layer_size, nblocksy, i; - boolean rv350_mode = screen->caps.family >= CHIP_R350; - boolean aligned_for_cbzb; + bool rv350_mode = screen->caps.family >= CHIP_R350; + bool aligned_for_cbzb; tex->tex.size_in_bytes = 0; @@ -285,7 +285,7 @@ static void r300_setup_cbzb_flags(struct r300_screen *rscreen, struct r300_resource *tex) { unsigned i, bpp; - boolean first_level_valid; + bool first_level_valid; bpp = util_format_get_blocksizebits(tex->b.format); @@ -468,10 +468,10 @@ static void r300_setup_tiling(struct r300_screen *screen, struct r300_resource *tex) { enum pipe_format format = tex->b.format; - boolean rv350_mode = screen->caps.family >= CHIP_R350; - boolean is_zb = util_format_is_depth_or_stencil(format); - boolean dbg_no_tiling = SCREEN_DBG_ON(screen, DBG_NO_TILING); - boolean force_microtiling = + bool rv350_mode = screen->caps.family >= CHIP_R350; + bool is_zb = util_format_is_depth_or_stencil(format); + bool dbg_no_tiling = SCREEN_DBG_ON(screen, DBG_NO_TILING); + bool force_microtiling = (tex->b.flags & R300_RESOURCE_FORCE_MICROTILING) != 0; if (tex->b.nr_samples > 1) { diff --git a/src/gallium/drivers/r300/r300_texture_desc.h b/src/gallium/drivers/r300/r300_texture_desc.h index b97a5cc2e8b..767335c1b90 100644 --- a/src/gallium/drivers/r300/r300_texture_desc.h +++ b/src/gallium/drivers/r300/r300_texture_desc.h @@ -41,7 +41,7 @@ unsigned r300_get_pixel_alignment(enum pipe_format format, unsigned num_samples, enum radeon_bo_layout microtile, enum radeon_bo_layout macrotile, - enum r300_dim dim, boolean is_rs690); + enum r300_dim dim, bool is_rs690); void r300_texture_desc_init(struct r300_screen *rscreen, struct r300_resource *tex, diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.h b/src/gallium/drivers/r300/r300_tgsi_to_rc.h index 551b4de18d2..4dc3ddca738 100644 --- a/src/gallium/drivers/r300/r300_tgsi_to_rc.h +++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.h @@ -43,7 +43,7 @@ struct tgsi_to_rc { int immediate_offset; /* If an error occurred. */ - boolean error; + bool error; }; void r300_tgsi_to_rc(struct tgsi_to_rc * ttr, const struct tgsi_token * tokens); diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c index e15acac604c..f061e99f2a6 100644 --- a/src/gallium/drivers/r300/r300_transfer.c +++ b/src/gallium/drivers/r300/r300_transfer.c @@ -107,7 +107,7 @@ r300_texture_transfer_map(struct pipe_context *ctx, struct r300_context *r300 = r300_context(ctx); struct r300_resource *tex = r300_resource(texture); struct r300_transfer *trans; - boolean referenced_cs, referenced_hw; + bool referenced_cs, referenced_hw; enum pipe_format format = tex->b.format; char *map; diff --git a/src/gallium/drivers/r300/r300_vs.c b/src/gallium/drivers/r300/r300_vs.c index 394604c1af4..e571acd02b2 100644 --- a/src/gallium/drivers/r300/r300_vs.c +++ b/src/gallium/drivers/r300/r300_vs.c @@ -113,7 +113,7 @@ static void set_vertex_inputs_outputs(struct r300_vertex_program_compiler * c) struct r300_shader_semantics* outputs = &vs->outputs; struct tgsi_shader_info* info = &vs->info; int i, reg = 0; - boolean any_bcolor_used = outputs->bcolor[0] != ATTR_UNUSED || + bool any_bcolor_used = outputs->bcolor[0] != ATTR_UNUSED || outputs->bcolor[1] != ATTR_UNUSED; /* Fill in the input mapping */ diff --git a/src/gallium/drivers/r300/r300_vs.h b/src/gallium/drivers/r300/r300_vs.h index a734e4edd5a..7a89c3ff556 100644 --- a/src/gallium/drivers/r300/r300_vs.h +++ b/src/gallium/drivers/r300/r300_vs.h @@ -41,9 +41,9 @@ struct r300_vertex_shader_code { /* Whether the shader was replaced by a dummy one due to a shader * compilation failure. */ - boolean dummy; + bool dummy; - boolean wpos; + bool wpos; /* Numbers of constants for each type. */ unsigned externals_count; diff --git a/src/gallium/drivers/r300/r300_vs_draw.c b/src/gallium/drivers/r300/r300_vs_draw.c index a94a5c90a72..c2a4db6d1df 100644 --- a/src/gallium/drivers/r300/r300_vs_draw.c +++ b/src/gallium/drivers/r300/r300_vs_draw.c @@ -50,8 +50,8 @@ struct vs_transform_context { struct tgsi_transform_context base; - boolean color_used[2]; - boolean bcolor_used[2]; + bool color_used[2]; + bool bcolor_used[2]; /* Index of the pos output, typically 0. */ unsigned pos_output; @@ -68,11 +68,11 @@ struct vs_transform_context { unsigned out_remap[32]; /* First instruction processed? */ - boolean first_instruction; + bool first_instruction; /* End instruction processed? */ - boolean end_instruction; + bool end_instruction; - boolean temp_used[1024]; + bool temp_used[1024]; }; static void emit_temp(struct tgsi_transform_context *ctx, unsigned reg) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index 5770d070431..8869682a4d4 100644 --- a/src/gallium/drivers/r600/evergreen_compute.c +++ b/src/gallium/drivers/r600/evergreen_compute.c @@ -369,7 +369,7 @@ static const unsigned char *r600_shader_binary_config_start( static void r600_shader_binary_read_config(const struct r600_shader_binary *binary, struct r600_bytecode *bc, uint64_t symbol_offset, - boolean *use_kill) + bool *use_kill) { unsigned i; const unsigned char *config = @@ -403,7 +403,7 @@ static void r600_shader_binary_read_config(const struct r600_shader_binary *bina static unsigned r600_create_shader(struct r600_bytecode *bc, const struct r600_shader_binary *binary, - boolean *use_kill) + bool *use_kill) { assert(binary->code_size % 4 == 0); @@ -430,7 +430,7 @@ static void *evergreen_create_compute_state(struct pipe_context *ctx, #ifdef HAVE_OPENCL const struct pipe_binary_program_header *header; void *p; - boolean use_kill; + bool use_kill; #endif shader->ctx = rctx; @@ -927,7 +927,7 @@ static void evergreen_launch_grid(struct pipe_context *ctx, struct r600_context *rctx = (struct r600_context *)ctx; #ifdef HAVE_OPENCL struct r600_pipe_compute *shader = rctx->cs_shader_state.shader; - boolean use_kill; + bool use_kill; if (shader->ir_type != PIPE_SHADER_IR_TGSI && shader->ir_type != PIPE_SHADER_IR_NIR) { diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index f85c7f04bae..8c860c8ec59 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -1059,7 +1059,7 @@ struct r600_tex_color_info { unsigned fmask; unsigned fmask_slice; uint64_t offset; - boolean export_16bpc; + bool export_16bpc; }; static void evergreen_set_color_surface_buffer(struct r600_context *rctx, @@ -3402,7 +3402,7 @@ void evergreen_update_ps_state(struct pipe_context *ctx, struct r600_pipe_shader unsigned i, exports_ps, num_cout, spi_ps_in_control_0, spi_input_z, spi_ps_in_control_1, db_shader_control = 0; int pos_index = -1, face_index = -1, fixed_pt_position_index = -1; int ninterp = 0; - boolean have_perspective = FALSE, have_linear = FALSE; + bool have_perspective = FALSE, have_linear = FALSE; static const unsigned spi_baryc_enable_bit[6] = { S_0286E0_PERSP_SAMPLE_ENA(1), S_0286E0_PERSP_CENTER_ENA(1), diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index ebbba18ae2f..d37e1884b0b 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -591,7 +591,7 @@ static int check_and_set_bank_swizzle(const struct r600_bytecode *bc, struct alu_bank_swizzle bs; int bank_swizzle[5]; int i, r = 0, forced = 1; - boolean scalar_only = bc->gfx_level == CAYMAN ? false : true; + bool scalar_only = bc->gfx_level == CAYMAN ? false : true; int max_slots = bc->gfx_level == CAYMAN ? 4 : 5; int max_checks = max_slots * 1000; @@ -1443,7 +1443,7 @@ static unsigned r600_bytecode_num_tex_and_vtx_instructions(const struct r600_byt } } -static inline boolean last_inst_was_not_vtx_fetch(struct r600_bytecode *bc, bool use_tc) +static inline bool last_inst_was_not_vtx_fetch(struct r600_bytecode *bc, bool use_tc) { return !((r600_isa_cf(bc->cf_last->op)->flags & CF_FETCH) && bc->cf_last->op != CF_OP_GDS && diff --git a/src/gallium/drivers/r600/r600_asm.h b/src/gallium/drivers/r600/r600_asm.h index 11bd7b95b7b..b9313353a49 100644 --- a/src/gallium/drivers/r600/r600_asm.h +++ b/src/gallium/drivers/r600/r600_asm.h @@ -283,8 +283,8 @@ struct r600_bytecode { struct r600_isa* isa; struct r600_bytecode_output pending_outputs[5]; int n_pending_outputs; - boolean need_wait_ack; /* emit a pending WAIT_ACK prior to control flow */ - boolean precise; + bool need_wait_ack; /* emit a pending WAIT_ACK prior to control flow */ + bool precise; }; /* eg_asm.c */ diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index ce67c1846f0..aeecc226818 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -31,7 +31,7 @@ void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw, - boolean count_draw_in, unsigned num_atomics) + bool count_draw_in, unsigned num_atomics) { /* Flush the DMA IB if it's not empty. */ if (radeon_emitted(&ctx->b.dma.cs, 0)) diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index de79c4ce9ae..20844b8d618 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -169,8 +169,8 @@ struct r600_clip_misc_state { unsigned cc_dist_mask; /* from vertex shader */ unsigned clip_dist_write; /* from vertex shader */ unsigned cull_dist_write; /* from vertex shader */ - boolean clip_disable; /* from vertex shader */ - boolean vs_out_viewport; /* from vertex shader */ + bool clip_disable; /* from vertex shader */ + bool vs_out_viewport; /* from vertex shader */ }; struct r600_alphatest_state { @@ -293,8 +293,8 @@ struct r600_pipe_sampler_view { struct r600_rasterizer_state { struct r600_command_buffer buffer; - boolean flatshade; - boolean two_side; + bool flatshade; + bool two_side; unsigned sprite_coord_enable; unsigned clip_plane_enable; unsigned pa_sc_line_stipple; @@ -388,7 +388,7 @@ struct r600_samplerview_state { uint32_t dirty_mask; uint32_t compressed_depthtex_mask; /* which textures are depth */ uint32_t compressed_colortex_mask; - boolean dirty_buffer_constants; + bool dirty_buffer_constants; }; struct r600_sampler_states { @@ -477,14 +477,14 @@ struct r600_image_state { uint32_t dirty_mask; uint32_t compressed_depthtex_mask; uint32_t compressed_colortex_mask; - boolean dirty_buffer_constants; + bool dirty_buffer_constants; struct r600_image_view views[R600_MAX_IMAGES]; }; /* Used to spill shader temps */ struct r600_scratch_buffer { struct r600_resource *buffer; - boolean dirty; + bool dirty; unsigned size; unsigned item_size; }; @@ -496,7 +496,7 @@ struct r600_context { struct u_suballocator allocator_fetch_shader; /* Hardware info. */ - boolean has_vertex_cache; + bool has_vertex_cache; unsigned default_gprs[EG_NUM_HW_STAGES]; unsigned current_gprs[EG_NUM_HW_STAGES]; unsigned r6xx_num_clause_temp_gprs; @@ -580,7 +580,7 @@ struct r600_context { bool alpha_to_one; bool force_blend_disable; bool gs_tri_strip_adj_fix; - boolean dual_src_blend; + bool dual_src_blend; unsigned zwritemask; unsigned ps_iter_samples; @@ -777,7 +777,7 @@ void r600_context_gfx_flush(void *context, unsigned flags, struct pipe_fence_handle **fence); void r600_begin_new_cs(struct r600_context *ctx); void r600_flush_emit(struct r600_context *ctx); -void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw, boolean count_draw_in, unsigned num_atomics); +void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw, bool count_draw_in, unsigned num_atomics); void r600_emit_pfp_sync_me(struct r600_context *rctx); void r600_cp_dma_copy_buffer(struct r600_context *rctx, struct pipe_resource *dst, uint64_t dst_offset, @@ -847,7 +847,7 @@ unsigned r600_tex_compare(unsigned compare); bool sampler_state_needs_border_color(const struct pipe_sampler_state *state); unsigned r600_get_swizzle_combined(const unsigned char *swizzle_format, const unsigned char *swizzle_view, - boolean vtx); + bool vtx); uint32_t r600_translate_texformat(struct pipe_screen *screen, enum pipe_format format, const unsigned char *swizzle_view, uint32_t *word4_p, uint32_t *yuv_format_p, diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index e1f4d29e9c1..be22e459bcd 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -397,12 +397,12 @@ struct r600_shader_src { unsigned abs; unsigned rel; unsigned kc_bank; - boolean kc_rel; /* true if cache bank is indexed */ + bool kc_rel; /* true if cache bank is indexed */ uint32_t value[4]; }; struct eg_interp { - boolean enabled; + bool enabled; unsigned ij_index; }; diff --git a/src/gallium/drivers/r600/r600_shader.h b/src/gallium/drivers/r600/r600_shader.h index e5940ad6843..75139b87da3 100644 --- a/src/gallium/drivers/r600/r600_shader.h +++ b/src/gallium/drivers/r600/r600_shader.h @@ -75,10 +75,10 @@ struct r600_shader { struct r600_shader_io output[PIPE_MAX_SHADER_OUTPUTS]; struct r600_shader_atomic atomics[8]; unsigned nhwatomic_ranges; - boolean uses_kill; - boolean fs_write_all; - boolean two_side; - boolean needs_scratch_space; + bool uses_kill; + bool fs_write_all; + bool two_side; + bool needs_scratch_space; /* Real number of ps color exports compiled in the bytecode */ unsigned nr_ps_color_exports; unsigned ps_color_export_mask; @@ -87,17 +87,17 @@ struct r600_shader { unsigned cc_dist_mask; unsigned clip_dist_write; unsigned cull_dist_write; - boolean vs_position_window_space; + bool vs_position_window_space; /* flag is set if the shader writes VS_OUT_MISC_VEC (e.g. for PSIZE) */ - boolean vs_out_misc_write; - boolean vs_out_point_size; - boolean vs_out_layer; - boolean vs_out_viewport; - boolean vs_out_edgeflag; - boolean has_txq_cube_array_z_comp; - boolean uses_tex_buffers; - boolean gs_prim_id_input; - boolean gs_tri_strip_adj_fix; + bool vs_out_misc_write; + bool vs_out_point_size; + bool vs_out_layer; + bool vs_out_viewport; + bool vs_out_edgeflag; + bool has_txq_cube_array_z_comp; + bool uses_tex_buffers; + bool gs_prim_id_input; + bool gs_tri_strip_adj_fix; uint8_t ps_conservative_z; /* Size in bytes of a data item in the ring(s) (single vertex data). @@ -117,15 +117,15 @@ struct r600_shader { struct r600_shader_array * arrays; - boolean uses_doubles; - boolean uses_atomics; - boolean uses_images; - boolean uses_helper_invocation; - boolean uses_interpolate_at_sample; + bool uses_doubles; + bool uses_atomics; + bool uses_images; + bool uses_helper_invocation; + bool uses_interpolate_at_sample; uint8_t atomic_base; uint8_t rat_base; uint8_t image_size_const_offset; - boolean disable_sb; + bool disable_sb; }; union r600_shader_key { diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 1ae5a8b41ba..9184f218988 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -2774,7 +2774,7 @@ void *r600_create_decompress_blend(struct r600_context *rctx) void *r600_create_db_flush_dsa(struct r600_context *rctx) { struct pipe_depth_stencil_alpha_state dsa; - boolean quirk = false; + bool quirk = false; if (rctx->b.family == CHIP_RV610 || rctx->b.family == CHIP_RV630 || rctx->b.family == CHIP_RV620 || rctx->b.family == CHIP_RV635) @@ -2846,7 +2846,7 @@ static inline unsigned r600_array_mode(unsigned mode) } } -static boolean r600_dma_copy_tile(struct r600_context *rctx, +static bool r600_dma_copy_tile(struct r600_context *rctx, struct pipe_resource *dst, unsigned dst_level, unsigned dst_x, diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 6c65f4af571..45a53f460dd 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -2713,7 +2713,7 @@ void r600_emit_shader(struct r600_context *rctx, struct r600_atom *a) unsigned r600_get_swizzle_combined(const unsigned char *swizzle_format, const unsigned char *swizzle_view, - boolean vtx) + bool vtx) { unsigned i; unsigned char swizzle[4]; @@ -2773,7 +2773,7 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, struct r600_screen *rscreen = (struct r600_screen *)screen; uint32_t result = 0, word4 = 0, yuv_format = 0; const struct util_format_description *desc; - boolean uniform = TRUE; + bool uniform = TRUE; bool is_srgb_valid = FALSE; const unsigned char swizzle_xxxx[4] = {0, 0, 0, 0}; const unsigned char swizzle_yyyy[4] = {1, 1, 1, 1}; diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h index 26c79a4b86f..cea5ea47ae4 100644 --- a/src/gallium/drivers/softpipe/sp_context.h +++ b/src/gallium/drivers/softpipe/sp_context.h @@ -173,7 +173,7 @@ struct softpipe_context { struct blitter_context *blitter; - boolean dirty_render_cache; + bool dirty_render_cache; struct softpipe_tile_cache *cbuf_cache[PIPE_MAX_COLOR_BUFS]; struct softpipe_tile_cache *zsbuf_cache; diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c index 938a138575e..ffb3f2feb50 100644 --- a/src/gallium/drivers/softpipe/sp_flush.c +++ b/src/gallium/drivers/softpipe/sp_flush.c @@ -111,15 +111,15 @@ softpipe_flush_wrapped(struct pipe_context *pipe, * * TODO: move this logic to an auxiliary library? */ -boolean +bool softpipe_flush_resource(struct pipe_context *pipe, struct pipe_resource *texture, unsigned level, int layer, unsigned flush_flags, - boolean read_only, - boolean cpu_access, - boolean do_not_block) + bool read_only, + bool cpu_access, + bool do_not_block) { unsigned referenced; diff --git a/src/gallium/drivers/softpipe/sp_flush.h b/src/gallium/drivers/softpipe/sp_flush.h index abbc098657c..0919eda7c19 100644 --- a/src/gallium/drivers/softpipe/sp_flush.h +++ b/src/gallium/drivers/softpipe/sp_flush.h @@ -45,15 +45,15 @@ softpipe_flush_wrapped(struct pipe_context *pipe, struct pipe_fence_handle **fence, unsigned flags); -boolean +bool softpipe_flush_resource(struct pipe_context *pipe, struct pipe_resource *texture, unsigned level, int layer, unsigned flush_flags, - boolean read_only, - boolean cpu_access, - boolean do_not_block); + bool read_only, + bool cpu_access, + bool do_not_block); void softpipe_texture_barrier(struct pipe_context *pipe, unsigned flags); void softpipe_memory_barrier(struct pipe_context *pipe, unsigned flags); diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/src/gallium/drivers/softpipe/sp_prim_vbuf.c index 39a4c2e46a6..be8e058f6f7 100644 --- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c +++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c @@ -85,7 +85,7 @@ sp_vbuf_get_vertex_info(struct vbuf_render *vbr) } -static boolean +static bool sp_vbuf_allocate_vertices(struct vbuf_render *vbr, ushort vertex_size, ushort nr_vertices) { @@ -164,7 +164,7 @@ sp_vbuf_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr) const unsigned stride = softpipe->vertex_info.size * sizeof(float); const void *vertex_buffer = cvbr->vertex_buffer; struct setup_context *setup = cvbr->setup; - const boolean flatshade_first = softpipe->rasterizer->flatshade_first; + const bool flatshade_first = softpipe->rasterizer->flatshade_first; unsigned i; switch (cvbr->prim) { @@ -361,7 +361,7 @@ sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) const unsigned stride = softpipe->vertex_info.size * sizeof(float); const void *vertex_buffer = (void *) get_vert(cvbr->vertex_buffer, start, stride); - const boolean flatshade_first = softpipe->rasterizer->flatshade_first; + const bool flatshade_first = softpipe->rasterizer->flatshade_first; unsigned i; switch (cvbr->prim) { diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c index 1a3f92a9105..a1e24782e3f 100644 --- a/src/gallium/drivers/softpipe/sp_quad_blend.c +++ b/src/gallium/drivers/softpipe/sp_quad_blend.c @@ -56,7 +56,7 @@ enum format struct blend_quad_stage { struct quad_stage base; - boolean clamp[PIPE_MAX_COLOR_BUFS]; /**< clamp colors to [0,1]? */ + bool clamp[PIPE_MAX_COLOR_BUFS]; /**< clamp colors to [0,1]? */ enum format base_format[PIPE_MAX_COLOR_BUFS]; enum util_format_type format_type[PIPE_MAX_COLOR_BUFS]; }; @@ -925,7 +925,7 @@ blend_fallback(struct quad_stage *qs, struct softpipe_context *softpipe = qs->softpipe; const struct pipe_blend_state *blend = softpipe->blend; unsigned cbuf; - boolean write_all = + bool write_all = softpipe->fs_variant->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS]; for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++) { @@ -937,9 +937,9 @@ blend_fallback(struct quad_stage *qs, = sp_get_cached_tile(softpipe->cbuf_cache[cbuf], quads[0]->input.x0, quads[0]->input.y0, quads[0]->input.layer); - const boolean clamp = bqs->clamp[cbuf]; + const bool clamp = bqs->clamp[cbuf]; const float *blend_color; - const boolean dual_source_blend = util_blend_state_is_dual(blend, cbuf); + const bool dual_source_blend = util_blend_state_is_dual(blend, cbuf); uint q, i, j; if (clamp) diff --git a/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/src/gallium/drivers/softpipe/sp_quad_depth_test.c index 17caf75dde8..59a04785d6d 100644 --- a/src/gallium/drivers/softpipe/sp_quad_depth_test.c +++ b/src/gallium/drivers/softpipe/sp_quad_depth_test.c @@ -48,7 +48,7 @@ struct depth_data { unsigned bzzzz[TGSI_QUAD_SIZE]; /**< Z values fetched from depth buffer */ unsigned qzzzz[TGSI_QUAD_SIZE]; /**< Z values from the quad */ ubyte stencilVals[TGSI_QUAD_SIZE]; - boolean use_shader_stencil_refs; + bool use_shader_stencil_refs; ubyte shader_stencil_refs[TGSI_QUAD_SIZE]; struct softpipe_cached_tile *tile; float minval, maxval; @@ -533,7 +533,7 @@ apply_stencil_op(struct depth_data *data, * of this function that are specifically for Z16, Z32 and FP Z buffers. * Try to effectively do that with codegen... */ -static boolean +static bool depth_test_quad(struct quad_stage *qs, struct depth_data *data, struct quad_header *quad) @@ -849,9 +849,9 @@ depth_test_quads_fallback(struct quad_stage *qs, { unsigned i, pass = 0; const struct tgsi_shader_info *fsInfo = &qs->softpipe->fs_variant->info; - boolean interp_depth = !fsInfo->writes_z || qs->softpipe->early_depth; - boolean shader_stencil_ref = fsInfo->writes_stencil; - boolean have_zs = !!qs->softpipe->framebuffer.zsbuf; + bool interp_depth = !fsInfo->writes_z || qs->softpipe->early_depth; + bool shader_stencil_ref = fsInfo->writes_stencil; + bool have_zs = !!qs->softpipe->framebuffer.zsbuf; struct depth_data data; unsigned vp_idx = quads[0]->input.viewport_index; @@ -988,23 +988,23 @@ choose_depth_test(struct quad_stage *qs, { const struct tgsi_shader_info *fsInfo = &qs->softpipe->fs_variant->info; - boolean interp_depth = !fsInfo->writes_z || qs->softpipe->early_depth; + bool interp_depth = !fsInfo->writes_z || qs->softpipe->early_depth; - boolean alpha = qs->softpipe->depth_stencil->alpha_enabled; + bool alpha = qs->softpipe->depth_stencil->alpha_enabled; - boolean depth = qs->softpipe->depth_stencil->depth_enabled; + bool depth = qs->softpipe->depth_stencil->depth_enabled; unsigned depthfunc = qs->softpipe->depth_stencil->depth_func; - boolean stencil = qs->softpipe->depth_stencil->stencil[0].enabled; + bool stencil = qs->softpipe->depth_stencil->stencil[0].enabled; - boolean depthwrite = qs->softpipe->depth_stencil->depth_writemask; + bool depthwrite = qs->softpipe->depth_stencil->depth_writemask; - boolean occlusion = qs->softpipe->active_query_count; + bool occlusion = qs->softpipe->active_query_count; - boolean clipped = !qs->softpipe->rasterizer->depth_clip_near; + bool clipped = !qs->softpipe->rasterizer->depth_clip_near; - boolean depth_bounds = qs->softpipe->depth_stencil->depth_bounds_test; + bool depth_bounds = qs->softpipe->depth_stencil->depth_bounds_test; if(!qs->softpipe->framebuffer.zsbuf) depth = depthwrite = stencil = FALSE; diff --git a/src/gallium/drivers/softpipe/sp_quad_fs.c b/src/gallium/drivers/softpipe/sp_quad_fs.c index 735ac0fb80f..2488a600da6 100644 --- a/src/gallium/drivers/softpipe/sp_quad_fs.c +++ b/src/gallium/drivers/softpipe/sp_quad_fs.c @@ -59,7 +59,7 @@ struct quad_shade_stage * Execute fragment shader for the four fragments in the quad. * \return TRUE if quad is alive, FALSE if all four pixels are killed */ -static inline boolean +static inline bool shade_quad(struct quad_stage *qs, struct quad_header *quad) { struct softpipe_context *softpipe = qs->softpipe; diff --git a/src/gallium/drivers/softpipe/sp_quad_pipe.c b/src/gallium/drivers/softpipe/sp_quad_pipe.c index 444509104fe..b11be303f74 100644 --- a/src/gallium/drivers/softpipe/sp_quad_pipe.c +++ b/src/gallium/drivers/softpipe/sp_quad_pipe.c @@ -42,7 +42,7 @@ insert_stage_at_head(struct softpipe_context *sp, struct quad_stage *quad) void sp_build_quad_pipeline(struct softpipe_context *sp) { - boolean early_depth_test = + bool early_depth_test = (sp->depth_stencil->depth_enabled && sp->framebuffer.zsbuf && !sp->depth_stencil->alpha_enabled && diff --git a/src/gallium/drivers/softpipe/sp_query.c b/src/gallium/drivers/softpipe/sp_query.c index 6a6fa4952a0..c98ce15ae6e 100644 --- a/src/gallium/drivers/softpipe/sp_query.c +++ b/src/gallium/drivers/softpipe/sp_query.c @@ -310,11 +310,11 @@ is_result_nonzero(struct pipe_query *q, * Called by rendering function to check rendering is conditional. * \return TRUE if we should render, FALSE if we should skip rendering */ -boolean +bool softpipe_check_render_cond(struct softpipe_context *sp) { struct pipe_context *pipe = &sp->pipe; - boolean b, wait; + bool b, wait; union pipe_query_result result; memset(&result, 0, sizeof(union pipe_query_result)); diff --git a/src/gallium/drivers/softpipe/sp_query.h b/src/gallium/drivers/softpipe/sp_query.h index 8ac766043ae..2ce5261611e 100644 --- a/src/gallium/drivers/softpipe/sp_query.h +++ b/src/gallium/drivers/softpipe/sp_query.h @@ -32,7 +32,7 @@ #ifndef SP_QUERY_H #define SP_QUERY_H -extern boolean +extern bool softpipe_check_render_cond(struct softpipe_context *sp); diff --git a/src/gallium/drivers/softpipe/sp_screen.h b/src/gallium/drivers/softpipe/sp_screen.h index 969fa378ecf..06ac15b09b6 100644 --- a/src/gallium/drivers/softpipe/sp_screen.h +++ b/src/gallium/drivers/softpipe/sp_screen.h @@ -46,7 +46,7 @@ struct softpipe_screen { * this. */ unsigned timestamp; - boolean use_llvm; + bool use_llvm; }; static inline struct softpipe_screen * diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c index 712fe23a11f..850fb0d4989 100644 --- a/src/gallium/drivers/softpipe/sp_setup.c +++ b/src/gallium/drivers/softpipe/sp_setup.c @@ -285,7 +285,7 @@ print_vertex(const struct setup_context *setup, * edge fields (ebot, emaj, etop). * \return FALSE if coords are inf/nan (cull the tri), TRUE otherwise */ -static boolean +static bool setup_sort_vertices(struct setup_context *setup, float det, const float (*v0)[4], @@ -506,9 +506,9 @@ static void setup_fragcoord_coeff(struct setup_context *setup, uint slot) { const struct tgsi_shader_info *fsInfo = &setup->softpipe->fs_variant->info; - boolean origin_lower_left = + bool origin_lower_left = fsInfo->properties[TGSI_PROPERTY_FS_COORD_ORIGIN]; - boolean pixel_center_integer = + bool pixel_center_integer = fsInfo->properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER]; /*X*/ @@ -876,7 +876,7 @@ line_persp_coeff(const struct setup_context *setup, * Compute the setup->coef[] array dadx, dady, a0 values. * Must be called after setup->vmin,vmax are initialized. */ -static boolean +static bool setup_line_coefficients(struct setup_context *setup, const float (*v0)[4], const float (*v1)[4]) @@ -1149,7 +1149,7 @@ sp_setup_point(struct setup_context *setup, = sizeAttr > 0 ? v0[sizeAttr][0] : setup->softpipe->rasterizer->point_size; const float halfSize = 0.5F * size; - const boolean round = (boolean) setup->softpipe->rasterizer->point_smooth; + const bool round = (bool) setup->softpipe->rasterizer->point_smooth; const float x = v0[0][0]; /* Note: data[0] is always position */ const float y = v0[0][1]; const struct sp_setup_info *sinfo = &softpipe->setup_info; diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.h b/src/gallium/drivers/softpipe/sp_tex_sample.h index 2770acac73b..4412a1c62f2 100644 --- a/src/gallium/drivers/softpipe/sp_tex_sample.h +++ b/src/gallium/drivers/softpipe/sp_tex_sample.h @@ -113,9 +113,9 @@ struct sp_sampler_view unsigned xpot; unsigned ypot; - boolean need_swizzle; - boolean pot2d; - boolean need_cube_convert; + bool need_swizzle; + bool pot2d; + bool need_cube_convert; /* these are different per shader type */ struct softpipe_tex_tile_cache *cache; @@ -134,8 +134,8 @@ struct sp_filter_funcs { struct sp_sampler { struct pipe_sampler_state base; - boolean min_mag_equal_repeat_linear; - boolean min_mag_equal; + bool min_mag_equal_repeat_linear; + bool min_mag_equal; unsigned min_img_filter; wrap_nearest_func nearest_texcoord_s; diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c index 30bca75570d..61b8dedfcc4 100644 --- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c @@ -102,7 +102,7 @@ sp_tex_tile_cache_validate_texture(struct softpipe_tex_tile_cache *tc) } } -static boolean +static bool sp_tex_tile_is_compat_view(struct softpipe_tex_tile_cache *tc, struct pipe_sampler_view *view) { diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index 4a89e4c36f7..8eae88effb4 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -51,10 +51,10 @@ * Conventional allocation path for non-display textures: * Use a simple, maximally packed layout. */ -static boolean +static bool softpipe_resource_layout(struct pipe_screen *screen, struct softpipe_resource *spr, - boolean allocate) + bool allocate) { struct pipe_resource *pt = &spr->base; unsigned level; @@ -126,7 +126,7 @@ softpipe_can_create_resource(struct pipe_screen *screen, /** * Texture layout for simple color buffers. */ -static boolean +static bool softpipe_displaytarget_layout(struct pipe_screen *screen, struct softpipe_resource *spr, const void *map_front_private) @@ -395,8 +395,8 @@ softpipe_transfer_map(struct pipe_context *pipe, * context if necessary. */ if (!(usage & PIPE_MAP_UNSYNCHRONIZED)) { - boolean read_only = !(usage & PIPE_MAP_WRITE); - boolean do_not_block = !!(usage & PIPE_MAP_DONTBLOCK); + bool read_only = !(usage & PIPE_MAP_WRITE); + bool do_not_block = !!(usage & PIPE_MAP_DONTBLOCK); if (!softpipe_flush_resource(pipe, resource, level, box->depth > 1 ? -1 : box->z, 0, /* flush_flags */ diff --git a/src/gallium/drivers/softpipe/sp_texture.h b/src/gallium/drivers/softpipe/sp_texture.h index 450c4b1cefc..18870df6c88 100644 --- a/src/gallium/drivers/softpipe/sp_texture.h +++ b/src/gallium/drivers/softpipe/sp_texture.h @@ -62,8 +62,8 @@ struct softpipe_resource /* True if texture images are power-of-two in all dimensions: */ - boolean pot; - boolean userBuffer; + bool pot; + bool userBuffer; unsigned timestamp; }; diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.h b/src/gallium/drivers/softpipe/sp_tile_cache.h index 2c0bafad651..3608b790a23 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.h +++ b/src/gallium/drivers/softpipe/sp_tile_cache.h @@ -93,7 +93,7 @@ struct softpipe_tile_cache uint clear_flags_size; union pipe_color_union clear_color; /**< for color bufs */ uint64_t clear_val; /**< for z+stencil */ - boolean depth_stencil; /**< Is the surface a depth/stencil format? */ + bool depth_stencil; /**< Is the surface a depth/stencil format? */ struct softpipe_cached_tile *tile; /**< scratch tile for clears */ diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h index b95776d8b62..929a1d3adea 100644 --- a/src/gallium/drivers/svga/svga_context.h +++ b/src/gallium/drivers/svga/svga_context.h @@ -134,12 +134,12 @@ struct svga_blend_state { struct { uint8_t writemask; - boolean blend_enable; + bool blend_enable; uint8_t srcblend; uint8_t dstblend; uint8_t blendeq; - boolean separate_alpha_blend_enable; + bool separate_alpha_blend_enable; uint8_t srcblend_alpha; uint8_t dstblend_alpha; uint8_t blendeq_alpha; @@ -274,7 +274,7 @@ struct svga_velems_state { unsigned attrib_puint_to_uscaled; /**< 10_10_10_2 packed uint -> uscaled */ unsigned attrib_puint_to_sscaled; /**< 10_10_10_2 packed uint -> sscaled */ - boolean need_swvfetch; + bool need_swvfetch; SVGA3dElementLayoutId id; /**< VGPU10 */ }; @@ -377,7 +377,7 @@ struct svga_state struct svga_prescale { float translate[4]; float scale[4]; - boolean enabled; + bool enabled; }; struct svga_depthrange { @@ -412,7 +412,7 @@ struct svga_hw_view_state struct svga_sampler_view *v; unsigned min_lod; unsigned max_lod; - boolean dirty; + bool dirty; }; /* Updated by calling svga_update_state( SVGA_STATE_HW_DRAW ) @@ -485,8 +485,8 @@ struct svga_hw_draw_state /* used for rebinding */ unsigned default_constbuf_size[PIPE_SHADER_TYPES]; - boolean rasterizer_discard; /* set if rasterization is disabled */ - boolean has_backed_views; /* set if any of the rtv/dsv is a backed surface view */ + bool rasterizer_discard; /* set if rasterization is disabled */ + bool has_backed_views; /* set if any of the rtv/dsv is a backed surface view */ /* Image Views */ int uavSpliceIndex; @@ -524,14 +524,14 @@ struct svga_hw_draw_state struct svga_sw_state { /* which parts we need */ - boolean need_swvfetch; - boolean need_pipeline; - boolean need_swtnl; + bool need_swvfetch; + bool need_pipeline; + bool need_swtnl; /* Flag to make sure that need sw is on while * updating state within a swtnl call. */ - boolean in_swtnl_draw; + bool in_swtnl_draw; }; @@ -578,15 +578,15 @@ struct svga_context struct u_upload_mgr *tex_upload; struct { - boolean no_swtnl; - boolean force_swtnl; - boolean use_min_mipmap; + bool no_swtnl; + bool force_swtnl; + bool use_min_mipmap; /* incremented for each shader */ unsigned shader_id; - boolean no_line_width; - boolean force_hw_line_stipple; + bool no_line_width; + bool force_hw_line_stipple; /** To report perf/conformance/etc issues to the gallium frontend */ struct util_debug_callback callback; @@ -596,8 +596,8 @@ struct svga_context struct draw_context *draw; struct vbuf_render *backend; unsigned hw_prim; - boolean new_vbuf; - boolean new_vdecl; + bool new_vbuf; + bool new_vdecl; } swtnl; /* Bitmask of blend state objects IDs */ @@ -730,11 +730,11 @@ struct svga_context uint64_t num_generate_mipmap; /**< SVGA_QUERY_NUM_GENERATE_MIPMAP */ uint64_t shader_mem_used; /**< SVGA_QUERY_SHADER_MEM_USED */ - boolean uses_time; /**< os_time_get() calls needed? */ + bool uses_time; /**< os_time_get() calls needed? */ } hud; /** The currently bound stream output targets */ - boolean in_streamout; /* Set if streamout is active */ + bool in_streamout; /* Set if streamout is active */ unsigned num_so_targets; struct svga_winsys_surface *so_surfaces[SVGA3D_DX_MAX_SOTARGETS]; struct pipe_stream_output_target *so_targets[SVGA3D_DX_MAX_SOTARGETS]; @@ -767,11 +767,11 @@ struct svga_context /** Current conditional rendering predicate */ struct { SVGA3dQueryId query_id; - boolean cond; + bool cond; } pred; - boolean render_condition; - boolean disable_rasterizer; /* Set if to disable rasterization */ + bool render_condition; + bool disable_rasterizer; /* Set if to disable rasterization */ uint8_t patch_vertices; struct { @@ -779,7 +779,7 @@ struct svga_context struct svga_vertex_shader *vs; struct svga_tes_shader *tes; unsigned vertices_per_patch; - boolean passthrough; + bool passthrough; } tcs; struct svga_cache_uav cache_uav; @@ -896,7 +896,7 @@ void svga_context_finish(struct svga_context *svga); void svga_hwtnl_flush_retry( struct svga_context *svga ); void svga_hwtnl_flush_buffer( struct svga_context *svga, struct pipe_resource *buffer ); -boolean svga_hwtnl_has_pending_prim(struct svga_hwtnl *); +bool svga_hwtnl_has_pending_prim(struct svga_hwtnl *); void svga_surfaces_flush(struct svga_context *svga); @@ -905,8 +905,8 @@ svga_context_create(struct pipe_screen *screen, void *priv, unsigned flags); void svga_toggle_render_condition(struct svga_context *svga, - boolean render_condition_enabled, - boolean on); + bool render_condition_enabled, + bool on); int svga_define_rasterizer_object(struct svga_context *svga, struct svga_rasterizer_state *, @@ -954,49 +954,49 @@ svga_sws(struct svga_context *svga) return svga_screen(svga->pipe.screen)->sws; } -static inline boolean +static inline bool svga_have_gb_objects(const struct svga_context *svga) { return svga_screen(svga->pipe.screen)->sws->have_gb_objects; } -static inline boolean +static inline bool svga_have_gb_dma(const struct svga_context *svga) { return svga_screen(svga->pipe.screen)->sws->have_gb_dma; } -static inline boolean +static inline bool svga_have_vgpu10(const struct svga_context *svga) { return svga_screen(svga->pipe.screen)->sws->have_vgpu10; } -static inline boolean +static inline bool svga_have_sm4_1(const struct svga_context *svga) { return svga_screen(svga->pipe.screen)->sws->have_sm4_1; } -static inline boolean +static inline bool svga_have_sm5(const struct svga_context *svga) { return svga_screen(svga->pipe.screen)->sws->have_sm5; } -static inline boolean +static inline bool svga_have_gl43(const struct svga_context *svga) { return svga_screen(svga->pipe.screen)->sws->have_gl43; } -static inline boolean +static inline bool svga_need_to_rebind_resources(const struct svga_context *svga) { return svga_screen(svga->pipe.screen)->sws->need_to_rebind_resources; } -static inline boolean +static inline bool svga_rects_equal(const SVGA3dRect *r1, const SVGA3dRect *r2) { return memcmp(r1, r2, sizeof(*r1)) == 0; @@ -1008,7 +1008,7 @@ svga_rects_equal(const SVGA3dRect *r1, const SVGA3dRect *r2) * if the number of sampler states exceeds the SVGA device limit or * the sampler state mapping environment variable is set. */ -static inline boolean +static inline bool svga_use_sampler_state_mapping(const struct svga_context *svga, unsigned num_sampler_states) { @@ -1110,7 +1110,7 @@ svga_retry_exit(struct svga_context *svga) */ #define SVGA_RETRY(_svga, _func) \ do { \ - UNUSED boolean retried; \ + UNUSED bool retried; \ \ SVGA_RETRY_CHECK(_svga, _func, retried); \ } while(0) diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c index 495c5cd17d1..30c1e931fe8 100644 --- a/src/gallium/drivers/svga/svga_draw.c +++ b/src/gallium/drivers/svga/svga_draw.c @@ -86,7 +86,7 @@ svga_hwtnl_destroy(struct svga_hwtnl *hwtnl) void svga_hwtnl_set_flatshade(struct svga_hwtnl *hwtnl, - boolean flatshade, boolean flatshade_first) + bool flatshade, bool flatshade_first) { struct svga_screen *svgascreen = svga_screen(hwtnl->svga->pipe.screen); @@ -157,7 +157,7 @@ svga_hwtnl_vertex_buffers(struct svga_hwtnl *hwtnl, * Determine whether the specified buffer is referred in the primitive queue, * for which no commands have been written yet. */ -boolean +bool svga_hwtnl_is_buffer_referred(struct svga_hwtnl *hwtnl, struct pipe_resource *buffer) { @@ -646,7 +646,7 @@ last_command_was_draw(const struct svga_context *svga) * They are equal if the vertex buffer attributes and the vertex buffer * resources are identical. */ -static boolean +static bool vertex_buffers_equal(unsigned count, SVGA3dVertexBuffer_v2 *pVBufAttr1, struct pipe_resource **pVBuf1, @@ -824,7 +824,7 @@ validate_vertex_buffers(struct svga_hwtnl *hwtnl, SVGA3dVertexBuffer_v2 *pbufAttrs = vbuffer_attrs; struct svga_winsys_surface **pbufHandles = vbuffer_handles; unsigned numVBuf = 0; - boolean emitVBufs = + bool emitVBufs = !svga_sws(svga)->have_index_vertex_buffer_offset_cmd || svga->rebind.flags.vertexbufs; @@ -833,7 +833,7 @@ validate_vertex_buffers(struct svga_hwtnl *hwtnl, * corresponding entries in the device's vertex buffer list. */ for (i = 0; i < num_vbuffers; i++) { - boolean emit = + bool emit = vertex_buffers_equal(1, &vbuffer_attrs[i], &vbuffers[i], @@ -1410,7 +1410,7 @@ done: /** * Return TRUE if there are pending primitives. */ -boolean +bool svga_hwtnl_has_pending_prim(struct svga_hwtnl *hwtnl) { return hwtnl->cmd.prim_count > 0; diff --git a/src/gallium/drivers/svga/svga_draw.h b/src/gallium/drivers/svga/svga_draw.h index 18d8e3e2145..0981da96b7d 100644 --- a/src/gallium/drivers/svga/svga_draw.h +++ b/src/gallium/drivers/svga/svga_draw.h @@ -42,7 +42,7 @@ struct svga_hwtnl *svga_hwtnl_create(struct svga_context *svga); void svga_hwtnl_destroy(struct svga_hwtnl *hwtnl); void svga_hwtnl_set_flatshade(struct svga_hwtnl *hwtnl, - boolean flatshade, boolean flatshade_first); + bool flatshade, bool flatshade_first); void svga_hwtnl_set_fillmode(struct svga_hwtnl *hwtnl, unsigned mode); @@ -69,7 +69,7 @@ svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl, const struct pipe_draw_start_count_bias *draw, unsigned count); -boolean +bool svga_hwtnl_is_buffer_referred(struct svga_hwtnl *hwtnl, struct pipe_resource *buffer); diff --git a/src/gallium/drivers/svga/svga_draw_arrays.c b/src/gallium/drivers/svga/svga_draw_arrays.c index b26f7e16776..ecd83f45241 100644 --- a/src/gallium/drivers/svga/svga_draw_arrays.c +++ b/src/gallium/drivers/svga/svga_draw_arrays.c @@ -78,7 +78,7 @@ fail: } -static boolean +static bool compare(unsigned cached_nr, unsigned nr, unsigned type) { if (type == U_GENERATE_REUSABLE) diff --git a/src/gallium/drivers/svga/svga_draw_private.h b/src/gallium/drivers/svga/svga_draw_private.h index 3b2d4f24f2a..a4801b11af5 100644 --- a/src/gallium/drivers/svga/svga_draw_private.h +++ b/src/gallium/drivers/svga/svga_draw_private.h @@ -196,7 +196,7 @@ struct svga_hwtnl { * Do we need to use the gallium 'indices' helper to render unfilled * triangles? */ -static inline boolean +static inline bool svga_need_unfilled_fallback(const struct svga_hwtnl *hwtnl, enum mesa_prim prim) { diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index c3ee5ae901f..d9e396fe2f9 100644 --- a/src/gallium/drivers/svga/svga_format.c +++ b/src/gallium/drivers/svga/svga_format.c @@ -1470,7 +1470,7 @@ static const struct format_compat_entry format_compats[] = { static void check_format_tables(void) { - static boolean first_call = TRUE; + static bool first_call = TRUE; if (first_call) { unsigned i; @@ -1783,7 +1783,7 @@ svga_format_name(SVGA3dSurfaceFormat format) /** * Is the given SVGA3dSurfaceFormat a signed or unsigned integer color format? */ -boolean +bool svga_format_is_integer(SVGA3dSurfaceFormat format) { switch (format) { @@ -1814,7 +1814,7 @@ svga_format_is_integer(SVGA3dSurfaceFormat format) } } -boolean +bool svga_format_support_gen_mips(enum pipe_format format) { const struct vgpu10_format_entry *entry = svga_format_entry(format); @@ -1897,7 +1897,7 @@ svga_get_texture_datatype(enum pipe_format format) * Given an svga context, return true iff there are currently any integer color * buffers attached to the framebuffer. */ -boolean +bool svga_has_any_integer_cbufs(const struct svga_context *svga) { unsigned i; diff --git a/src/gallium/drivers/svga/svga_format.h b/src/gallium/drivers/svga/svga_format.h index 88f105a471e..9fd6f9bf8f5 100644 --- a/src/gallium/drivers/svga/svga_format.h +++ b/src/gallium/drivers/svga/svga_format.h @@ -92,10 +92,10 @@ svga_format_size(SVGA3dSurfaceFormat format, const char * svga_format_name(SVGA3dSurfaceFormat format); -boolean +bool svga_format_is_integer(SVGA3dSurfaceFormat format); -boolean +bool svga_format_support_gen_mips(enum pipe_format format); enum tgsi_return_type @@ -103,7 +103,7 @@ svga_get_texture_datatype(enum pipe_format format); // XXX: Move this to svga_context? -boolean +bool svga_has_any_integer_cbufs(const struct svga_context *svga); diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c index 45a5de24ede..cd12327dbcb 100644 --- a/src/gallium/drivers/svga/svga_pipe_blit.c +++ b/src/gallium/drivers/svga/svga_pipe_blit.c @@ -777,7 +777,7 @@ try_cpu_copy_region(struct svga_context *svga, * A helper function to resolve a multisampled surface to a single-sampled * surface using SVGA command ResolveCopy. */ -static boolean +static bool try_resolve_copy(struct svga_context *svga, const struct pipe_blit_info *blit) { @@ -816,7 +816,7 @@ try_resolve_copy(struct svga_context *svga, /** * Returns FALSE if the resource does not have data to copy. */ -static boolean +static bool is_texture_valid_to_copy(struct svga_context *svga, struct pipe_resource *resource) { diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c index 810dfd682c2..cdc03c01d04 100644 --- a/src/gallium/drivers/svga/svga_pipe_clear.c +++ b/src/gallium/drivers/svga/svga_pipe_clear.c @@ -89,7 +89,7 @@ clear_buffers_with_quad(struct svga_context *svga, /** * Check if any of the color buffers are integer buffers. */ -static boolean +static bool is_integer_target(struct pipe_framebuffer_state *fb, unsigned buffers) { unsigned i; @@ -110,7 +110,7 @@ is_integer_target(struct pipe_framebuffer_state *fb, unsigned buffers) * by floats. If so, we can use the VGPU10 ClearRenderTargetView command. * Otherwise, we need to clear with a quad. */ -static boolean +static bool ints_fit_in_floats(const union pipe_color_union *color) { const int max = 1 << 24; @@ -130,7 +130,7 @@ try_clear(struct svga_context *svga, { enum pipe_error ret = PIPE_OK; SVGA3dRect rect = { 0, 0, 0, 0 }; - boolean restore_viewport = FALSE; + bool restore_viewport = FALSE; SVGA3dClearFlag flags = 0; struct pipe_framebuffer_state *fb = &svga->curr.framebuffer; union util_color uc = {0}; diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c index 3efb7cef2d3..446c69656ea 100644 --- a/src/gallium/drivers/svga/svga_pipe_draw.c +++ b/src/gallium/drivers/svga/svga_pipe_draw.c @@ -180,7 +180,7 @@ retry_draw_indirect(struct svga_context *svga, * path which breaks the original primitive into sub-primitive at the * restart indexes. */ -static boolean +static bool need_fallback_prim_restart(const struct svga_context *svga, const struct pipe_draw_info *info) { @@ -235,7 +235,7 @@ svga_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info, enum mesa_prim reduced_prim = u_reduced_prim(info->mode); unsigned count = draws[0].count; enum pipe_error ret = 0; - boolean needed_swtnl; + bool needed_swtnl; SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_DRAWVBO); diff --git a/src/gallium/drivers/svga/svga_pipe_query.c b/src/gallium/drivers/svga/svga_pipe_query.c index 904691bee4a..91b2c65c052 100644 --- a/src/gallium/drivers/svga/svga_pipe_query.c +++ b/src/gallium/drivers/svga/svga_pipe_query.c @@ -50,7 +50,7 @@ struct svga_query { SVGA3dQueryType svga_type; /**< SVGA3D_QUERYTYPE_x or unused */ unsigned id; /** Per-context query identifier */ - boolean active; /** TRUE if query is active */ + bool active; /** TRUE if query is active */ struct pipe_fence_handle *fence; @@ -1313,8 +1313,8 @@ svga_set_active_query_state(struct pipe_context *pipe, bool enable) */ void svga_toggle_render_condition(struct svga_context *svga, - boolean render_condition_enabled, - boolean on) + bool render_condition_enabled, + bool on) { SVGA3dQueryId query_id; diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c index 061cd5520ad..82d42c39c28 100644 --- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c +++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c @@ -295,9 +295,9 @@ svga_create_rasterizer_state(struct pipe_context *pipe, int fill_front = templ->fill_front; int fill_back = templ->fill_back; int fill = PIPE_POLYGON_MODE_FILL; - boolean offset_front = util_get_offset(templ, fill_front); - boolean offset_back = util_get_offset(templ, fill_back); - boolean offset = FALSE; + bool offset_front = util_get_offset(templ, fill_front); + bool offset_back = util_get_offset(templ, fill_back); + bool offset = FALSE; switch (templ->cull_face) { case PIPE_FACE_FRONT_AND_BACK: diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c index b3103b5fb96..3dc2a460793 100644 --- a/src/gallium/drivers/svga/svga_pipe_sampler.c +++ b/src/gallium/drivers/svga/svga_pipe_sampler.c @@ -132,8 +132,8 @@ static SVGA3dFilter translate_filter_mode(unsigned img_filter, unsigned min_filter, unsigned mag_filter, - boolean anisotropic, - boolean compare) + bool anisotropic, + bool compare) { SVGA3dFilter mode = 0; @@ -161,7 +161,7 @@ define_sampler_state_object(struct svga_context *svga, const struct pipe_sampler_state *ps) { uint8_t max_aniso = (uint8_t) 255; /* XXX fix me */ - boolean anisotropic; + bool anisotropic; uint8 compare_func; SVGA3dFilter filter; SVGA3dRGBAFloat bcolor; @@ -301,7 +301,7 @@ svga_bind_sampler_states(struct pipe_context *pipe, { struct svga_context *svga = svga_context(pipe); unsigned i; - boolean any_change = FALSE; + bool any_change = FALSE; assert(shader < PIPE_SHADER_TYPES); assert(start + num <= PIPE_MAX_SAMPLERS); @@ -421,7 +421,7 @@ svga_set_sampler_views(struct pipe_context *pipe, unsigned flag_1d = 0; unsigned flag_srgb = 0; uint i; - boolean any_change = FALSE; + bool any_change = FALSE; assert(shader < PIPE_SHADER_TYPES); assert(start + num <= ARRAY_SIZE(svga->curr.sampler_views[shader])); diff --git a/src/gallium/drivers/svga/svga_pipe_streamout.c b/src/gallium/drivers/svga/svga_pipe_streamout.c index 0433febba03..c89dcdb59a2 100644 --- a/src/gallium/drivers/svga/svga_pipe_streamout.c +++ b/src/gallium/drivers/svga/svga_pipe_streamout.c @@ -422,7 +422,7 @@ svga_set_stream_output_targets(struct pipe_context *pipe, struct SVGA3dSoTarget soBindings[SVGA3D_DX_MAX_SOTARGETS]; unsigned i; unsigned num_so_targets; - boolean begin_so_queries = num_targets > 0; + bool begin_so_queries = num_targets > 0; SVGA_DBG(DEBUG_STREAMOUT, "%s num_targets=%d\n", __func__, num_targets); diff --git a/src/gallium/drivers/svga/svga_pipe_vertex.c b/src/gallium/drivers/svga/svga_pipe_vertex.c index 5634f07a02e..59dc63ea707 100644 --- a/src/gallium/drivers/svga/svga_pipe_vertex.c +++ b/src/gallium/drivers/svga/svga_pipe_vertex.c @@ -63,7 +63,7 @@ svga_set_vertex_buffers(struct pipe_context *pipe, * Range adjustment scales and biases values from [0,1] to [-1,1]. * This lets us avoid the swtnl path. */ -static boolean +static bool attrib_needs_range_adjustment(enum pipe_format format) { switch (format) { diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c index c34d510960a..08ddfdf17af 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer.c +++ b/src/gallium/drivers/svga/svga_resource_buffer.c @@ -50,7 +50,7 @@ * do on vgpu10. Staging texture-upload buffers do when they are * supported. */ -static inline boolean +static inline bool svga_buffer_needs_hw_storage(const struct svga_screen *ss, const struct pipe_resource *template) { @@ -80,7 +80,7 @@ svga_buffer_needs_hw_storage(const struct svga_screen *ss, } -static inline boolean +static inline bool need_buf_readback(struct svga_context *svga, struct pipe_transfer *st) { @@ -295,7 +295,7 @@ svga_buffer_transfer_map(struct pipe_context *pipe, map = sbuf->swbuf; } else if (svga_buffer_has_hw_storage(sbuf)) { - boolean retry; + bool retry; map = SVGA_TRY_MAP(svga_buffer_hw_storage_map (svga, sbuf, transfer->usage, &retry), retry); @@ -459,7 +459,7 @@ svga_resource_destroy(struct pipe_screen *screen, */ SVGA_DBG(DEBUG_DMA, "unref sid %p (texture)\n", tex->handle); - boolean to_invalidate = svga_was_texture_rendered_to(tex); + bool to_invalidate = svga_was_texture_rendered_to(tex); svga_screen_surface_destroy(ss, &tex->key, to_invalidate, &tex->handle); /* Destroy the backed surface handle if exists */ diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h b/src/gallium/drivers/svga/svga_resource_buffer.h index 7a4c1add81a..05b7cc1f21d 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer.h +++ b/src/gallium/drivers/svga/svga_resource_buffer.h @@ -89,12 +89,12 @@ struct svga_buffer /** * Whether swbuf was created by the user or not. */ - boolean user; + bool user; /** * Whether swbuf is used for this buffer. */ - boolean use_swbuf; + bool use_swbuf; /** * Creation key for the host surface handle. @@ -186,7 +186,7 @@ struct svga_buffer * * If not set then the rest of the information is null. */ - boolean pending; + bool pending; SVGA3dSurfaceDMAFlags flags; @@ -215,8 +215,8 @@ struct svga_buffer unsigned size; /**< Approximate size in bytes */ - boolean dirty; /**< Need to do a readback before mapping? */ - boolean uav; /* Set if the buffer is bound to a uav */ + bool dirty; /**< Need to do a readback before mapping? */ + bool uav; /* Set if the buffer is bound to a uav */ /** In some cases we try to keep the results of the translate_indices() * function from svga_draw_elements.c @@ -244,7 +244,7 @@ svga_buffer(struct pipe_resource *resource) * Returns TRUE for user buffers. We may * decide to use an alternate upload path for these buffers. */ -static inline boolean +static inline bool svga_buffer_is_user_buffer(struct pipe_resource *buffer) { if (buffer) { @@ -269,7 +269,7 @@ svga_buffer_winsys_screen(struct svga_buffer *sbuf) * Returns whether a buffer has hardware storage that is * visible to the GPU. */ -static inline boolean +static inline bool svga_buffer_has_hw_storage(struct svga_buffer *sbuf) { if (svga_buffer_winsys_screen(sbuf)->have_gb_objects) @@ -285,7 +285,7 @@ svga_buffer_has_hw_storage(struct svga_buffer *sbuf) static inline void * svga_buffer_hw_storage_map(struct svga_context *svga, struct svga_buffer *sbuf, - unsigned flags, boolean *retry) + unsigned flags, bool *retry) { struct svga_winsys_screen *sws = svga_buffer_winsys_screen(sbuf); @@ -293,7 +293,7 @@ svga_buffer_hw_storage_map(struct svga_context *svga, if (sws->have_gb_objects) { struct svga_winsys_context *swc = svga->swc; - boolean rebind; + bool rebind; void *map; if (swc->force_coherent) { @@ -329,7 +329,7 @@ svga_buffer_hw_storage_unmap(struct svga_context *svga, if (sws->have_gb_objects) { struct svga_winsys_context *swc = svga->swc; - boolean rebind; + bool rebind; swc->surface_unmap(swc, sbuf->handle, &rebind); if (rebind) { @@ -351,7 +351,7 @@ svga_set_buffer_rendered_to(struct svga_buffer_surface *bufsurf) } -static inline boolean +static inline bool svga_was_buffer_rendered_to(const struct svga_buffer_surface *bufsurf) { return (bufsurf->surface_state == SVGA_SURFACE_STATE_RENDERED); diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c index 3945934a5ea..aec6504e6b7 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c +++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c @@ -158,7 +158,7 @@ svga_buffer_create_host_surface(struct svga_screen *ss, assert(!sbuf->user); if (!sbuf->handle) { - boolean invalidated; + bool invalidated; sbuf->key.flags = 0; @@ -308,7 +308,7 @@ svga_buffer_recreate_host_surface(struct svga_context *svga, /** * Returns TRUE if the surface bind flags is compatible with the new bind flags. */ -static boolean +static bool compatible_bind_flags(unsigned bind_flags, unsigned tobind_flags) { @@ -857,7 +857,7 @@ svga_buffer_update_hw(struct svga_context *svga, struct svga_buffer *sbuf, if (!svga_buffer_has_hw_storage(sbuf)) { struct svga_screen *ss = svga_screen(sbuf->b.screen); enum pipe_error ret; - boolean retry; + bool retry; void *map; unsigned i; diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index 4ffbe48614a..d024ff3c48c 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -225,7 +225,7 @@ svga_resource_get_handle(struct pipe_screen *screen, /** * Determine if we need to read back a texture image before mapping it. */ -static inline boolean +static inline bool need_tex_readback(struct svga_transfer *st) { if (st->base.usage & PIPE_MAP_READ) @@ -387,7 +387,7 @@ svga_texture_transfer_map_direct(struct svga_context *svga, { SVGA3dSize baseLevelSize; uint8_t *map; - boolean retry, rebind; + bool retry, rebind; unsigned offset, mip_width, mip_height; struct svga_winsys_context *swc = svga->swc; @@ -480,7 +480,7 @@ svga_texture_transfer_map(struct pipe_context *pipe, struct svga_texture *tex = svga_texture(texture); struct svga_transfer *st; struct svga_winsys_surface *surf = tex->handle; - boolean use_direct_map = svga_have_gb_objects(svga) && + bool use_direct_map = svga_have_gb_objects(svga) && (!svga_have_gb_dma(svga) || (usage & PIPE_MAP_WRITE)); void *map = NULL; int64_t begin = svga_get_time(svga); @@ -563,11 +563,11 @@ svga_texture_transfer_map(struct pipe_context *pipe, map = svga_texture_transfer_map_dma(svga, st); } else { - boolean can_use_upload = tex->can_use_upload && + bool can_use_upload = tex->can_use_upload && !(st->base.usage & PIPE_MAP_READ); - boolean was_rendered_to = + bool was_rendered_to = svga_was_texture_rendered_to(svga_texture(texture)); - boolean is_dirty = svga_is_texture_dirty(svga_texture(texture)); + bool is_dirty = svga_is_texture_dirty(svga_texture(texture)); /* If the texture was already rendered to or has pending changes and * upload buffer is supported, then we will use upload buffer to @@ -636,7 +636,7 @@ svga_texture_surface_unmap(struct svga_context *svga, { struct svga_winsys_surface *surf = svga_texture(transfer->resource)->handle; struct svga_winsys_context *swc = svga->swc; - boolean rebind; + bool rebind; assert(surf); @@ -818,7 +818,7 @@ svga_texture_transfer_unmap(struct pipe_context *pipe, /** * Does format store depth values? */ -static inline boolean +static inline bool format_has_depth(enum pipe_format format) { const struct util_format_description *desc = util_format_description(format); @@ -1094,7 +1094,7 @@ svga_texture_create(struct pipe_screen *screen, } SVGA_DBG(DEBUG_DMA, "surface_create for texture\n"); - boolean invalidated; + bool invalidated; tex->handle = svga_screen_surface_create(svgascreen, bindings, tex->b.usage, &invalidated, &tex->key); @@ -1295,7 +1295,7 @@ svga_texture_generate_mipmap(struct pipe_context *pipe, /** * Create a texture upload buffer */ -boolean +bool svga_texture_transfer_map_upload_create(struct svga_context *svga) { svga->tex_upload = u_upload_create(&svga->pipe, TEX_UPLOAD_DEFAULT_SIZE, @@ -1320,7 +1320,7 @@ svga_texture_transfer_map_upload_destroy(struct svga_context *svga) /** * Returns true if this transfer map request can use the upload buffer. */ -boolean +bool svga_texture_transfer_map_can_upload(const struct svga_screen *svgascreen, const struct pipe_resource *texture) { @@ -1499,7 +1499,7 @@ svga_texture_transfer_unmap_upload(struct svga_context *svga, * or not. However, for textures backed by imported svga surfaces that is * not always true, and we have to look at the SVGA3D utilities. */ -boolean +bool svga_texture_device_format_has_alpha(struct pipe_resource *texture) { /* the svga_texture() call below is invalid for PIPE_BUFFER resources */ diff --git a/src/gallium/drivers/svga/svga_resource_texture.h b/src/gallium/drivers/svga/svga_resource_texture.h index 32b42dd0ee7..d60dcdec672 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.h +++ b/src/gallium/drivers/svga/svga_resource_texture.h @@ -55,7 +55,7 @@ struct svga_texture unsigned view_age[SVGA_MAX_TEXTURE_LEVELS]; unsigned age; - boolean views_modified; + bool views_modified; /** * Creation key for the host surface handle. @@ -78,17 +78,17 @@ struct svga_texture * Whether the host side surface is imported and not created by this * driver. */ - boolean imported; + bool imported; /** * Whether texture upload buffer can be used on this texture */ - boolean can_use_upload; + bool can_use_upload; /** * Whether texture is modified. Set if any of the dirty bits is set. */ - boolean modified; + bool modified; unsigned size; /**< Approximate size in bytes */ @@ -136,7 +136,7 @@ struct svga_transfer /* True if guest backed surface is supported and we can directly map * to the surface for this transfer. */ - boolean use_direct_map; + bool use_direct_map; struct { struct pipe_resource *buf; /* points to the upload buffer if this @@ -235,7 +235,7 @@ svga_clear_texture_rendered_to(struct svga_texture *tex) tex->surface_state = SVGA_SURFACE_STATE_UPDATED; } -static inline boolean +static inline bool svga_was_texture_rendered_to(const struct svga_texture *tex) { return (tex->surface_state == SVGA_SURFACE_STATE_RENDERED); @@ -260,7 +260,7 @@ svga_clear_texture_dirty(struct svga_texture *tex) tex->modified = FALSE; } -static inline boolean +static inline bool svga_is_texture_level_dirty(const struct svga_texture *tex, unsigned face, unsigned level) { @@ -268,7 +268,7 @@ svga_is_texture_level_dirty(const struct svga_texture *tex, return !!(tex->dirty[face] & (1 << level)); } -static inline boolean +static inline bool svga_is_texture_dirty(const struct svga_texture *tex) { return tex->modified; @@ -299,13 +299,13 @@ svga_texture_generate_mipmap(struct pipe_context *pipe, unsigned first_layer, unsigned last_layer); -boolean +bool svga_texture_transfer_map_upload_create(struct svga_context *svga); void svga_texture_transfer_map_upload_destroy(struct svga_context *svga); -boolean +bool svga_texture_transfer_map_can_upload(const struct svga_screen *svgascreen, const struct pipe_resource *pt); @@ -317,7 +317,7 @@ void svga_texture_transfer_unmap_upload(struct svga_context *svga, struct svga_transfer *st); -boolean +bool svga_texture_device_format_has_alpha(struct pipe_resource *texture); void * diff --git a/src/gallium/drivers/svga/svga_sampler_view.c b/src/gallium/drivers/svga/svga_sampler_view.c index fecfbbdcbda..b30eaea249a 100644 --- a/src/gallium/drivers/svga/svga_sampler_view.c +++ b/src/gallium/drivers/svga/svga_sampler_view.c @@ -65,7 +65,7 @@ svga_get_tex_sampler_view(struct pipe_context *pipe, SVGA3dSurface1Flags flags = SVGA3D_SURFACE_HINT_TEXTURE; SVGA3dSurfaceFormat format = svga_translate_format(ss, pt->format, PIPE_BIND_SAMPLER_VIEW); - boolean view = TRUE; + bool view = TRUE; assert(pt); assert(min_lod <= max_lod); diff --git a/src/gallium/drivers/svga/svga_sampler_view.h b/src/gallium/drivers/svga/svga_sampler_view.h index b6f548992e1..8adae9aa2ef 100644 --- a/src/gallium/drivers/svga/svga_sampler_view.h +++ b/src/gallium/drivers/svga/svga_sampler_view.h @@ -99,12 +99,12 @@ svga_sampler_view_reference(struct svga_sampler_view **ptr, struct svga_sampler_ *ptr = v; } -boolean +bool svga_check_sampler_view_resource_collision(const struct svga_context *svga, const struct svga_winsys_surface *res, enum pipe_shader_type shader); -boolean +bool svga_check_sampler_framebuffer_resource_collision(struct svga_context *svga, enum pipe_shader_type shader); diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index b11cf8083fe..49e1d700b63 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -137,9 +137,9 @@ get_uint_cap(struct svga_winsys_screen *sws, SVGA3dDevCapIndex cap, /** Helper for querying boolean-valued device cap */ -static boolean +static bool get_bool_cap(struct svga_winsys_screen *sws, SVGA3dDevCapIndex cap, - boolean defaultVal) + bool defaultVal) { SVGA3dDevCapResult result; if (sws->get_cap(sws, cap, &result)) @@ -1161,7 +1161,7 @@ svga_screen_create(struct svga_winsys_screen *sws) */ { - boolean has_df16, has_df24, has_d24s8_int; + bool has_df16, has_df24, has_d24s8_int; SVGA3dSurfaceFormatCaps caps; SVGA3dSurfaceFormatCaps mask; mask.value = 0; diff --git a/src/gallium/drivers/svga/svga_screen.h b/src/gallium/drivers/svga/svga_screen.h index 35884d09453..613a7e65435 100644 --- a/src/gallium/drivers/svga/svga_screen.h +++ b/src/gallium/drivers/svga/svga_screen.h @@ -48,9 +48,9 @@ struct svga_screen SVGA3dHardwareVersion hw_version; /** Device caps */ - boolean haveProvokingVertex; - boolean haveLineStipple, haveLineSmooth; - boolean haveBlendLogicops; + bool haveProvokingVertex; + bool haveLineStipple, haveLineSmooth; + bool haveBlendLogicops; float maxLineWidth, maxLineWidthAA; float maxPointSize; float pointSmoothThreshold; /** Disable point AA for sizes less than this */ diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c index 32306d0f962..a722008b1ee 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.c +++ b/src/gallium/drivers/svga/svga_screen_cache.c @@ -212,7 +212,7 @@ svga_screen_cache_shrink(struct svga_screen *svgascreen, static void svga_screen_cache_add(struct svga_screen *svgascreen, const struct svga_host_surface_cache_key *key, - boolean to_invalidate, + bool to_invalidate, struct svga_winsys_surface **p_handle) { struct svga_host_surface_cache *cache = &svgascreen->cache; @@ -490,12 +490,12 @@ svga_screen_cache_init(struct svga_screen *svgascreen) struct svga_winsys_surface * svga_screen_surface_create(struct svga_screen *svgascreen, unsigned bind_flags, enum pipe_resource_usage usage, - boolean *validated, + bool *validated, struct svga_host_surface_cache_key *key) { struct svga_winsys_screen *sws = svgascreen->sws; struct svga_winsys_surface *handle = NULL; - boolean cachable = SVGA_SURFACE_CACHE_ENABLED && key->cachable; + bool cachable = SVGA_SURFACE_CACHE_ENABLED && key->cachable; SVGA_DBG(DEBUG_CACHE|DEBUG_DMA, "%s sz %dx%dx%d mips %d faces %d arraySize %d cachable %d\n", @@ -614,7 +614,7 @@ svga_screen_surface_create(struct svga_screen *svgascreen, void svga_screen_surface_destroy(struct svga_screen *svgascreen, const struct svga_host_surface_cache_key *key, - boolean to_invalidate, + bool to_invalidate, struct svga_winsys_surface **p_handle) { struct svga_winsys_screen *sws = svgascreen->sws; diff --git a/src/gallium/drivers/svga/svga_screen_cache.h b/src/gallium/drivers/svga/svga_screen_cache.h index 3ce6d4c6dc7..0aaee5a921d 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.h +++ b/src/gallium/drivers/svga/svga_screen_cache.h @@ -148,13 +148,13 @@ svga_screen_cache_init(struct svga_screen *svgascreen); struct svga_winsys_surface * svga_screen_surface_create(struct svga_screen *svgascreen, unsigned bind_flags, enum pipe_resource_usage usage, - boolean *invalidated, + bool *invalidated, struct svga_host_surface_cache_key *key); void svga_screen_surface_destroy(struct svga_screen *svgascreen, const struct svga_host_surface_cache_key *key, - boolean to_invalidate, + bool to_invalidate, struct svga_winsys_surface **handle); void diff --git a/src/gallium/drivers/svga/svga_shader.c b/src/gallium/drivers/svga/svga_shader.c index a956bb66562..4240ac9890d 100644 --- a/src/gallium/drivers/svga/svga_shader.c +++ b/src/gallium/drivers/svga/svga_shader.c @@ -295,7 +295,7 @@ svga_init_shader_key_common(const struct svga_context *svga, * the number of samplers exceeds SVGA limit or the sampler state * mapping env is set. */ - boolean sampler_state_mapping = + bool sampler_state_mapping = svga_use_sampler_state_mapping(svga, svga->curr.num_samplers[shader_type]); key->sampler_state_mapping = diff --git a/src/gallium/drivers/svga/svga_shader.h b/src/gallium/drivers/svga/svga_shader.h index 34573bb01b0..6e216eeee6f 100644 --- a/src/gallium/drivers/svga/svga_shader.h +++ b/src/gallium/drivers/svga/svga_shader.h @@ -230,12 +230,12 @@ struct svga_fs_variant { struct svga_shader_variant base; - boolean uses_flat_interp; /** TRUE if flat interpolation qualifier is + bool uses_flat_interp; /** TRUE if flat interpolation qualifier is * applied to any of the varyings. */ /** Is the color output just a constant value? (fragment shader only) */ - boolean constant_color_output; + bool constant_color_output; /** Bitmask indicating which texture units are doing the shadow * comparison test in the shader rather than the sampler state. @@ -313,24 +313,24 @@ struct svga_shader_info uint64_t generic_inputs_mask; uint64_t generic_outputs_mask; - boolean writes_edgeflag; - boolean writes_layer; - boolean writes_position; - boolean writes_psize; - boolean writes_viewport_index; + bool writes_edgeflag; + bool writes_layer; + bool writes_position; + bool writes_psize; + bool writes_viewport_index; - boolean uses_grid_size; - boolean uses_const_buffers; - boolean uses_hw_atomic; - boolean uses_images; - boolean uses_image_size; - boolean uses_shader_buffers; + bool uses_grid_size; + bool uses_const_buffers; + bool uses_hw_atomic; + bool uses_images; + bool uses_image_size; + bool uses_shader_buffers; unsigned const_buffers_declared; /* bitmask of declared const buffers */ unsigned constbuf0_num_uniforms; /* number of uniforms in constbuf0 */ struct { - boolean color0_writes_all_cbufs; + bool color0_writes_all_cbufs; } fs; struct { @@ -340,13 +340,13 @@ struct svga_shader_info struct { unsigned vertices_out; /* number of vertices in tcs patch */ - boolean writes_tess_factor; + bool writes_tess_factor; } tcs; struct { enum mesa_prim prim_mode; - boolean reads_control_point; - boolean reads_tess_factor; + bool reads_control_point; + bool reads_tess_factor; } tes; }; @@ -450,7 +450,7 @@ struct svga_compute_shader }; -static inline boolean +static inline bool svga_compile_keys_equal(const struct svga_compile_key *a, const struct svga_compile_key *b) { @@ -522,7 +522,7 @@ svga_rebind_shaders(struct svga_context *svga); /** * Check if a shader's bytecode exceeds the device limits. */ -static inline boolean +static inline bool svga_shader_too_large(const struct svga_context *svga, const struct svga_shader_variant *variant) { @@ -567,7 +567,7 @@ svga_shader_type(enum pipe_shader_type shader) /** Does the current VS have stream output? */ -static inline boolean +static inline bool svga_have_vs_streamout(const struct svga_context *svga) { return svga->curr.vs != NULL && svga->curr.vs->base.stream_output != NULL; @@ -575,7 +575,7 @@ svga_have_vs_streamout(const struct svga_context *svga) /** Does the current GS have stream output? */ -static inline boolean +static inline bool svga_have_gs_streamout(const struct svga_context *svga) { return svga->curr.gs != NULL && svga->curr.gs->base.stream_output != NULL; @@ -608,7 +608,7 @@ svga_cs_variant(struct svga_shader_variant *variant) /* Returns TRUE if we are currently using flat shading. */ -static inline boolean +static inline bool svga_is_using_flat_shading(const struct svga_context *svga) { return diff --git a/src/gallium/drivers/svga/svga_state.c b/src/gallium/drivers/svga/svga_state.c index 698f538026e..78dfd73053c 100644 --- a/src/gallium/drivers/svga/svga_state.c +++ b/src/gallium/drivers/svga/svga_state.c @@ -217,9 +217,9 @@ update_state(struct svga_context *svga, uint64_t *state) { #ifdef DEBUG - boolean debug = TRUE; + bool debug = TRUE; #else - boolean debug = FALSE; + bool debug = FALSE; #endif enum pipe_error ret = PIPE_OK; unsigned i; diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c index 55c94dd4a6a..0ee036b5538 100644 --- a/src/gallium/drivers/svga/svga_state_framebuffer.c +++ b/src/gallium/drivers/svga/svga_state_framebuffer.c @@ -56,7 +56,7 @@ emit_fb_vgpu9(struct svga_context *svga) struct svga_screen *svgascreen = svga_screen(svga->pipe.screen); const struct pipe_framebuffer_state *curr = &svga->curr.framebuffer; struct pipe_framebuffer_state *hw = &svga->state.hw_clear.framebuffer; - boolean reemit = svga->rebind.flags.rendertargets; + bool reemit = svga->rebind.flags.rendertargets; unsigned i; enum pipe_error ret; @@ -410,8 +410,8 @@ get_viewport_prescale(struct svga_context *svga, float range_min = 0.0; float range_max = 1.0; float flip = -1.0; - boolean degenerate = FALSE; - boolean invertY = FALSE; + bool degenerate = FALSE; + bool invertY = FALSE; float fb_width = (float) svga->curr.framebuffer.width; float fb_height = (float) svga->curr.framebuffer.height; diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c index fa5ab065615..dc5b1e7e309 100644 --- a/src/gallium/drivers/svga/svga_state_fs.c +++ b/src/gallium/drivers/svga/svga_state_fs.c @@ -206,7 +206,7 @@ make_fs_key(const struct svga_context *svga, * Do some debug checks/warnings here. */ { - static boolean warned = FALSE; + static bool warned = FALSE; unsigned i, n = MAX2(svga->curr.num_sampler_views[shader], svga->curr.num_samplers[shader]); /* Only warn once to prevent too much debug output */ diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c index abb9c3bdbc1..0c14e25fd49 100644 --- a/src/gallium/drivers/svga/svga_state_need_swtnl.c +++ b/src/gallium/drivers/svga/svga_state_need_swtnl.c @@ -60,7 +60,7 @@ struct svga_tracked_state svga_update_need_swvfetch = static enum pipe_error update_need_pipeline(struct svga_context *svga, uint64_t dirty) { - boolean need_pipeline = FALSE; + bool need_pipeline = FALSE; struct svga_vertex_shader *vs = svga->curr.vs; const char *reason = ""; @@ -158,7 +158,7 @@ struct svga_tracked_state svga_update_need_pipeline = static enum pipe_error update_need_swtnl(struct svga_context *svga, uint64_t dirty) { - boolean need_swtnl; + bool need_swtnl; if (svga->debug.no_swtnl) { svga->state.sw.need_swvfetch = FALSE; diff --git a/src/gallium/drivers/svga/svga_state_sampler.c b/src/gallium/drivers/svga/svga_state_sampler.c index 134b492767a..b2dd923e2ab 100644 --- a/src/gallium/drivers/svga/svga_state_sampler.c +++ b/src/gallium/drivers/svga/svga_state_sampler.c @@ -63,7 +63,7 @@ svga_resource_handle(struct pipe_resource *res) * This helper function returns TRUE if the specified resource collides with * any of the resources bound to any of the currently bound sampler views. */ -boolean +bool svga_check_sampler_view_resource_collision(const struct svga_context *svga, const struct svga_winsys_surface *res, enum pipe_shader_type shader) @@ -92,7 +92,7 @@ svga_check_sampler_view_resource_collision(const struct svga_context *svga, * Check if there are any resources that are both bound to a render target * and bound as a shader resource for the given type of shader. */ -boolean +bool svga_check_sampler_framebuffer_resource_collision(struct svga_context *svga, enum pipe_shader_type shader) { @@ -300,7 +300,7 @@ update_sampler_resources(struct svga_context *svga, uint64_t dirty) * shader resource list. */ for (i = 0; i < nviews; i++) { - boolean emit; + bool emit; emit = sampler_views[i] == svga->state.hw_draw.sampler_views[shader][i]; @@ -401,7 +401,7 @@ update_samplers(struct svga_context *svga, uint64_t dirty ) SVGA3dSamplerId ids[PIPE_MAX_SAMPLERS*2]; unsigned i; unsigned nsamplers = 0; - boolean sampler_state_mapping = + bool sampler_state_mapping = svga_use_sampler_state_mapping(svga, count); for (i = 0; i < count; i++) { @@ -598,7 +598,7 @@ update_cs_sampler_resources(struct svga_context *svga, uint64_t dirty) * shader resource list. */ for (i = 0; i < nviews; i++) { - boolean emit; + bool emit; emit = sampler_views[i] == svga->state.hw_draw.sampler_views[shader][i]; diff --git a/src/gallium/drivers/svga/svga_state_tgsi_transform.c b/src/gallium/drivers/svga/svga_state_tgsi_transform.c index dc49f8d833c..f1052729423 100644 --- a/src/gallium/drivers/svga/svga_state_tgsi_transform.c +++ b/src/gallium/drivers/svga/svga_state_tgsi_transform.c @@ -130,7 +130,7 @@ write_vpos(struct svga_context *svga, struct svga_shader *shader) { struct svga_token_key key; - boolean use_existing = FALSE; + bool use_existing = FALSE; struct svga_shader *transform_shader; const struct tgsi_shader_info *info = &shader->tgsi_info; @@ -177,7 +177,7 @@ transform_dynamic_indexing(struct svga_context *svga, struct svga_shader *shader) { struct svga_token_key key; - boolean use_existing = FALSE; + bool use_existing = FALSE; struct svga_shader *transform_shader; const struct tgsi_shader_info *info = &shader->tgsi_info; @@ -406,7 +406,7 @@ add_point_sprite_shader(struct svga_context *svga) } -static boolean +static bool has_dynamic_indexing(const struct tgsi_shader_info *info) { return (info->dim_indirect_files & (1u << TGSI_FILE_CONSTANT)) || diff --git a/src/gallium/drivers/svga/svga_state_tss.c b/src/gallium/drivers/svga/svga_state_tss.c index 75b0ac60f58..c646f23a205 100644 --- a/src/gallium/drivers/svga/svga_state_tss.c +++ b/src/gallium/drivers/svga/svga_state_tss.c @@ -78,7 +78,7 @@ emit_tex_binding_unit(struct svga_context *svga, const struct svga_sampler_state *s, const struct pipe_sampler_view *sv, struct svga_hw_view_state *view, - boolean reemit, + bool reemit, struct bind_queue *queue) { struct pipe_resource *texture = NULL; @@ -142,7 +142,7 @@ static enum pipe_error update_tss_binding(struct svga_context *svga, uint64_t dirty ) { const enum pipe_shader_type shader = PIPE_SHADER_FRAGMENT; - boolean reemit = svga->rebind.flags.texture_samplers; + bool reemit = svga->rebind.flags.texture_samplers; unsigned i; unsigned count = MAX2(svga->curr.num_sampler_views[shader], svga->state.hw_draw.num_views); diff --git a/src/gallium/drivers/svga/svga_state_uav.c b/src/gallium/drivers/svga/svga_state_uav.c index 5a1e7a9b4e1..1ad6eb424ee 100644 --- a/src/gallium/drivers/svga/svga_state_uav.c +++ b/src/gallium/drivers/svga/svga_state_uav.c @@ -61,7 +61,7 @@ svga_uav_cache_init(struct svga_context *svga) * Helper function to compare two image view descriptions. * Return TRUE if they are identical. */ -static boolean +static bool image_view_desc_identical(struct pipe_image_view *img1, struct pipe_image_view *img2) { @@ -85,7 +85,7 @@ image_view_desc_identical(struct pipe_image_view *img1, * Helper function to compare two shader buffer descriptions. * Return TRUE if they are identical. */ -static boolean +static bool shader_buffer_desc_identical(struct pipe_shader_buffer *buf1, struct pipe_shader_buffer *buf2) { @@ -97,7 +97,7 @@ shader_buffer_desc_identical(struct pipe_shader_buffer *buf1, * Helper function to compare two uav cache entry descriptions. * Return TRUE if they are identical. */ -static boolean +static bool uav_desc_identical(enum svga_uav_type uav_type, void *desc, void *uav_desc) { diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index 065476f8959..5b5e94753b7 100644 --- a/src/gallium/drivers/svga/svga_surface.c +++ b/src/gallium/drivers/svga/svga_surface.c @@ -189,13 +189,13 @@ svga_texture_view_surface(struct svga_context *svga, int layer_pick, unsigned num_layers, int zslice_pick, - boolean cacheable, + bool cacheable, struct svga_host_surface_cache_key *key) /* OUT */ { struct svga_screen *ss = svga_screen(svga->pipe.screen); struct svga_winsys_surface *handle = NULL; - boolean invalidated; - boolean needCopyResource; + bool invalidated; + bool needCopyResource; SVGA_DBG(DEBUG_PERF, "svga: Create surface view: layer %d zslice %d mips %d..%d\n", @@ -284,7 +284,7 @@ static struct pipe_surface * svga_create_surface_view(struct pipe_context *pipe, struct pipe_resource *pt, const struct pipe_surface *surf_tmpl, - boolean clone_resource) + bool clone_resource) { struct svga_context *svga = svga_context(pipe); struct svga_texture *tex = svga_texture(pt); @@ -436,7 +436,7 @@ svga_create_surface(struct pipe_context *pipe, struct svga_context *svga = svga_context(pipe); struct pipe_screen *screen = pipe->screen; struct pipe_surface *surf = NULL; - boolean view = FALSE; + bool view = FALSE; SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_CREATESURFACE); @@ -466,7 +466,7 @@ svga_create_surface(struct pipe_context *pipe, */ static struct svga_surface * create_backed_surface_view(struct svga_context *svga, struct svga_surface *s, - boolean clone_resource) + bool clone_resource) { struct svga_texture *tex = svga_texture(s->base.texture); @@ -779,7 +779,7 @@ svga_mark_surfaces_dirty(struct svga_context *svga) */ void svga_propagate_surface(struct svga_context *svga, struct pipe_surface *surf, - boolean reset) + bool reset) { struct svga_surface *s = svga_surface(surf); struct svga_texture *tex = svga_texture(surf->texture); @@ -906,7 +906,7 @@ svga_propagate_rendertargets(struct svga_context *svga) /** * Check if we should call svga_propagate_surface on the surface. */ -boolean +bool svga_surface_needs_propagation(const struct pipe_surface *surf) { const struct svga_surface *s = svga_surface_const(surf); diff --git a/src/gallium/drivers/svga/svga_surface.h b/src/gallium/drivers/svga/svga_surface.h index 1413e3a4b52..e97a392ac23 100644 --- a/src/gallium/drivers/svga/svga_surface.h +++ b/src/gallium/drivers/svga/svga_surface.h @@ -57,7 +57,7 @@ struct svga_surface unsigned real_level; unsigned real_zslice; - boolean dirty; + bool dirty; /* VGPU10 */ SVGA3dRenderTargetViewId view_id; @@ -83,12 +83,12 @@ svga_mark_surfaces_dirty(struct svga_context *svga); extern void svga_propagate_surface(struct svga_context *svga, struct pipe_surface *surf, - boolean reset); + bool reset); void svga_propagate_rendertargets(struct svga_context *svga); -extern boolean +extern bool svga_surface_needs_propagation(const struct pipe_surface *surf); struct svga_winsys_surface * @@ -102,7 +102,7 @@ svga_texture_view_surface(struct svga_context *svga, int layer_pick, unsigned num_layers, int zslice_pick, - boolean cacheable, + bool cacheable, struct svga_host_surface_cache_key *key); /* OUT */ void diff --git a/src/gallium/drivers/svga/svga_swtnl.h b/src/gallium/drivers/svga/svga_swtnl.h index 4a79c8a31fe..0258993944c 100644 --- a/src/gallium/drivers/svga/svga_swtnl.h +++ b/src/gallium/drivers/svga/svga_swtnl.h @@ -33,7 +33,7 @@ struct pipe_context; struct vbuf_render; -boolean svga_init_swtnl( struct svga_context *svga ); +bool svga_init_swtnl( struct svga_context *svga ); void svga_destroy_swtnl( struct svga_context *svga ); diff --git a/src/gallium/drivers/svga/svga_swtnl_backend.c b/src/gallium/drivers/svga/svga_swtnl_backend.c index a697c855d38..07dd4d083c2 100644 --- a/src/gallium/drivers/svga/svga_swtnl_backend.c +++ b/src/gallium/drivers/svga/svga_swtnl_backend.c @@ -56,7 +56,7 @@ svga_vbuf_render_get_vertex_info(struct vbuf_render *render) } -static boolean +static bool svga_vbuf_render_allocate_vertices(struct vbuf_render *render, ushort vertex_size, ushort nr_vertices) @@ -65,8 +65,8 @@ svga_vbuf_render_allocate_vertices(struct vbuf_render *render, struct svga_context *svga = svga_render->svga; struct pipe_screen *screen = svga->pipe.screen; size_t size = (size_t)nr_vertices * (size_t)vertex_size; - boolean new_vbuf = FALSE; - boolean new_ibuf = FALSE; + bool new_vbuf = FALSE; + bool new_ibuf = FALSE; SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_VBUFRENDERALLOCVERT); @@ -218,7 +218,7 @@ svga_vbuf_submit_state(struct svga_vbuf_render *svga_render) SVGA3dVertexDecl vdecl[PIPE_MAX_ATTRIBS]; unsigned i; static const unsigned zero[PIPE_MAX_ATTRIBS] = {0}; - boolean retried; + bool retried; /* if the vdecl or vbuf hasn't changed do nothing */ if (!svga->swtnl.new_vdecl) @@ -288,7 +288,7 @@ svga_vbuf_render_draw_arrays(struct vbuf_render *render, /* instancing will already have been resolved at this point by 'draw' */ const unsigned start_instance = 0; const unsigned instance_count = 1; - boolean retried; + bool retried; SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_VBUFDRAWARRAYS); @@ -320,7 +320,7 @@ svga_vbuf_render_draw_elements(struct vbuf_render *render, struct svga_context *svga = svga_render->svga; int bias = (svga_render->vbuf_offset - svga_render->vdecl_offset) / svga_render->vertex_size; - boolean retried; + bool retried; /* instancing will already have been resolved at this point by 'draw' */ const struct pipe_draw_info info = { .index_size = 2, diff --git a/src/gallium/drivers/svga/svga_swtnl_draw.c b/src/gallium/drivers/svga/svga_swtnl_draw.c index a16d2272201..fdb3726ee85 100644 --- a/src/gallium/drivers/svga/svga_swtnl_draw.c +++ b/src/gallium/drivers/svga/svga_swtnl_draw.c @@ -50,7 +50,7 @@ svga_swtnl_draw_vbo(struct svga_context *svga, ASSERTED unsigned old_num_vertex_buffers; unsigned i; const void *map; - boolean retried; + bool retried; SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_SWTNLDRAWVBO); @@ -153,7 +153,7 @@ svga_swtnl_draw_vbo(struct svga_context *svga, } -boolean +bool svga_init_swtnl(struct svga_context *svga) { struct svga_screen *screen = svga_screen(svga->pipe.screen); diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c index 9c130121265..1ee4611cef8 100644 --- a/src/gallium/drivers/svga/svga_tgsi.c +++ b/src/gallium/drivers/svga/svga_tgsi.c @@ -50,7 +50,7 @@ static char err_buf[128]; -static boolean +static bool svga_shader_expand(struct svga_shader_emitter *emit) { char *new_buf; @@ -75,7 +75,7 @@ svga_shader_expand(struct svga_shader_emitter *emit) } -static inline boolean +static inline bool reserve(struct svga_shader_emitter *emit, unsigned nr_dwords) { if (emit->ptr - emit->buf + nr_dwords * sizeof(unsigned) >= emit->size) { @@ -88,7 +88,7 @@ reserve(struct svga_shader_emitter *emit, unsigned nr_dwords) } -boolean +bool svga_shader_emit_dword(struct svga_shader_emitter * emit, unsigned dword) { if (!reserve(emit, 1)) @@ -100,7 +100,7 @@ svga_shader_emit_dword(struct svga_shader_emitter * emit, unsigned dword) } -boolean +bool svga_shader_emit_dwords(struct svga_shader_emitter * emit, const unsigned *dwords, unsigned nr) { @@ -113,7 +113,7 @@ svga_shader_emit_dwords(struct svga_shader_emitter * emit, } -boolean +bool svga_shader_emit_opcode(struct svga_shader_emitter * emit, unsigned opcode) { SVGA3dShaderInstToken *here; @@ -136,7 +136,7 @@ svga_shader_emit_opcode(struct svga_shader_emitter * emit, unsigned opcode) } -static boolean +static bool svga_shader_emit_header(struct svga_shader_emitter *emit) { SVGA3dShaderVersion header; diff --git a/src/gallium/drivers/svga/svga_tgsi.h b/src/gallium/drivers/svga/svga_tgsi.h index af56bca3cad..451912303cc 100644 --- a/src/gallium/drivers/svga/svga_tgsi.h +++ b/src/gallium/drivers/svga/svga_tgsi.h @@ -74,7 +74,7 @@ svga_tgsi_vgpu10_translate(struct svga_context *svga, const struct svga_compile_key *key, enum pipe_shader_type unit); -boolean svga_shader_verify(const uint32_t *tokens, unsigned nr_tokens); +bool svga_shader_verify(const uint32_t *tokens, unsigned nr_tokens); void svga_tgsi_scan_shader(struct svga_shader *shader); diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c index 5e0f52bd899..9d69faf1fe7 100644 --- a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c +++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c @@ -35,7 +35,7 @@ * Translate TGSI semantic info into SVGA3d semantic info. * This is called for VS outputs and PS inputs only. */ -static boolean +static bool translate_vs_ps_semantic(struct svga_shader_emitter *emit, struct tgsi_declaration_semantic semantic, unsigned *usage, @@ -95,7 +95,7 @@ translate_vs_ps_semantic(struct svga_shader_emitter *emit, * For example, if usage = SVGA3D_DECLUSAGE_TEXCOORD, reg.num = 1, and * index = 3, we'll emit "dcl_texcoord3 v1". */ -static boolean +static bool emit_decl(struct svga_shader_emitter *emit, SVGA3dShaderDestToken reg, unsigned usage, @@ -125,7 +125,7 @@ emit_decl(struct svga_shader_emitter *emit, /** * Emit declaration for PS front/back-face input register. */ -static boolean +static bool emit_vface_decl(struct svga_shader_emitter *emit) { if (!emit->emitted_vface) { @@ -145,7 +145,7 @@ emit_vface_decl(struct svga_shader_emitter *emit) * Emit PS input register to pass depth/fog coordinates. * Note that this always goes into texcoord[0]. */ -static boolean +static bool ps30_input_emit_depth_fog(struct svga_shader_emitter *emit, struct src_register *out) { @@ -174,7 +174,7 @@ ps30_input_emit_depth_fog(struct svga_shader_emitter *emit, * Process a PS input declaration. * We'll emit a declaration like "dcl_texcoord1 v2" */ -static boolean +static bool ps30_input(struct svga_shader_emitter *emit, struct tgsi_declaration_semantic semantic, unsigned idx) @@ -323,7 +323,7 @@ ps30_input(struct svga_shader_emitter *emit, * Note that we don't actually emit a SVGA3DOpDcl for PS outputs. * \idx register index, such as OUT[2] (not semantic index) */ -static boolean +static bool ps30_output(struct svga_shader_emitter *emit, struct tgsi_declaration_semantic semantic, unsigned idx) @@ -387,7 +387,7 @@ ps30_output(struct svga_shader_emitter *emit, * Declare a VS input register. * We still make up the input semantics the same as in 2.0 */ -static boolean +static bool vs30_input(struct svga_shader_emitter *emit, struct tgsi_declaration_semantic semantic, unsigned idx) @@ -419,7 +419,7 @@ vs30_input(struct svga_shader_emitter *emit, /** * Declare VS output for holding depth/fog. */ -static boolean +static bool vs30_output_emit_depth_fog(struct svga_shader_emitter *emit, SVGA3dShaderDestToken *out) { @@ -445,7 +445,7 @@ vs30_output_emit_depth_fog(struct svga_shader_emitter *emit, * VS3.0 outputs have proper declarations and semantic info for * matching against PS inputs. */ -static boolean +static bool vs30_output(struct svga_shader_emitter *emit, struct tgsi_declaration_semantic semantic, unsigned idx) @@ -537,7 +537,7 @@ svga_tgsi_sampler_type(const struct svga_shader_emitter *emit, int idx) } -static boolean +static bool ps30_sampler(struct svga_shader_emitter *emit, unsigned idx) { @@ -557,7 +557,7 @@ ps30_sampler(struct svga_shader_emitter *emit, } -boolean +bool svga_shader_emit_samplers_decl(struct svga_shader_emitter *emit) { unsigned i; @@ -570,7 +570,7 @@ svga_shader_emit_samplers_decl(struct svga_shader_emitter *emit) } -boolean +bool svga_translate_decl_sm30(struct svga_shader_emitter *emit, const struct tgsi_full_declaration *decl) { @@ -579,7 +579,7 @@ svga_translate_decl_sm30(struct svga_shader_emitter *emit, unsigned idx; for (idx = first; idx <= last; idx++) { - boolean ok = TRUE; + bool ok = TRUE; switch (decl->Declaration.File) { case TGSI_FILE_SAMPLER: diff --git a/src/gallium/drivers/svga/svga_tgsi_emit.h b/src/gallium/drivers/svga/svga_tgsi_emit.h index 357d772e7a6..0beb1aebafe 100644 --- a/src/gallium/drivers/svga/svga_tgsi_emit.h +++ b/src/gallium/drivers/svga/svga_tgsi_emit.h @@ -75,8 +75,8 @@ struct svga_shader_emitter int internal_color_idx[2]; /* diffuse, specular */ int internal_color_count; - boolean emitted_vface; - boolean emit_frontface; + bool emitted_vface; + bool emit_frontface; int internal_frontface_idx; int ps30_input_count; @@ -85,14 +85,14 @@ struct svga_shader_emitter int dynamic_branching_level; unsigned num_output_writes; - boolean constant_color_output; + bool constant_color_output; - boolean in_main_func; + bool in_main_func; - boolean created_common_immediate; + bool created_common_immediate; int common_immediate_idx[2]; - boolean created_loop_const; + bool created_loop_const; int loop_const_idx; unsigned inverted_texcoords; /**< bitmask of which texcoords are flipped */ @@ -107,8 +107,8 @@ struct svga_shader_emitter struct src_register input_map[PIPE_MAX_ATTRIBS]; SVGA3dShaderDestToken output_map[PIPE_MAX_ATTRIBS]; - boolean ps_reads_pos; - boolean emitted_depth_fog; + bool ps_reads_pos; + bool emitted_depth_fog; struct src_register ps_true_pos; struct src_register ps_depth_pos; SVGA3dShaderDestToken ps_temp_pos; @@ -142,25 +142,25 @@ struct svga_shader_emitter }; -boolean +bool svga_shader_emit_dword(struct svga_shader_emitter *emit, unsigned dword); -boolean +bool svga_shader_emit_dwords(struct svga_shader_emitter *emit, const unsigned *dwords, unsigned nr); -boolean +bool svga_shader_emit_opcode(struct svga_shader_emitter *emit, unsigned opcode); -boolean +bool svga_shader_emit_instructions(struct svga_shader_emitter *emit, const struct tgsi_token *tokens); -boolean +bool svga_shader_emit_samplers_decl(struct svga_shader_emitter *emit); -boolean +bool svga_translate_decl_sm30(struct svga_shader_emitter *emit, const struct tgsi_full_declaration *decl); @@ -179,7 +179,7 @@ svga_translate_decl_sm30(struct svga_shader_emitter *emit, /** Emit the given SVGA3dShaderInstToken opcode */ -static inline boolean +static inline bool emit_instruction(struct svga_shader_emitter *emit, SVGA3dShaderInstToken opcode) { diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index bb3bf823b0d..98540075ff1 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -35,8 +35,8 @@ #include "svga_context.h" -static boolean emit_vs_postamble( struct svga_shader_emitter *emit ); -static boolean emit_ps_postamble( struct svga_shader_emitter *emit ); +static bool emit_vs_postamble( struct svga_shader_emitter *emit ); +static bool emit_ps_postamble( struct svga_shader_emitter *emit ); static SVGA3dShaderOpCodeType @@ -161,7 +161,7 @@ scalar(struct src_register src, unsigned comp) } -static boolean +static bool svga_arl_needs_adjustment( const struct svga_shader_emitter *emit ) { unsigned i; @@ -317,7 +317,7 @@ reset_temp_regs(struct svga_shader_emitter *emit) /** Emit bytecode for a src_register */ -static boolean +static bool emit_src(struct svga_shader_emitter *emit, const struct src_register src) { if (src.base.relAddr) { @@ -334,7 +334,7 @@ emit_src(struct svga_shader_emitter *emit, const struct src_register src) /** Emit bytecode for a dst_register */ -static boolean +static bool emit_dst(struct svga_shader_emitter *emit, SVGA3dShaderDestToken dest) { assert(dest.reserved0); @@ -344,7 +344,7 @@ emit_dst(struct svga_shader_emitter *emit, SVGA3dShaderDestToken dest) /** Emit bytecode for a 1-operand instruction */ -static boolean +static bool emit_op1(struct svga_shader_emitter *emit, SVGA3dShaderInstToken inst, SVGA3dShaderDestToken dest, @@ -357,7 +357,7 @@ emit_op1(struct svga_shader_emitter *emit, /** Emit bytecode for a 2-operand instruction */ -static boolean +static bool emit_op2(struct svga_shader_emitter *emit, SVGA3dShaderInstToken inst, SVGA3dShaderDestToken dest, @@ -372,7 +372,7 @@ emit_op2(struct svga_shader_emitter *emit, /** Emit bytecode for a 3-operand instruction */ -static boolean +static bool emit_op3(struct svga_shader_emitter *emit, SVGA3dShaderInstToken inst, SVGA3dShaderDestToken dest, @@ -389,7 +389,7 @@ emit_op3(struct svga_shader_emitter *emit, /** Emit bytecode for a 4-operand instruction */ -static boolean +static bool emit_op4(struct svga_shader_emitter *emit, SVGA3dShaderInstToken inst, SVGA3dShaderDestToken dest, @@ -450,7 +450,7 @@ negate(struct src_register src) * important given that several opcodes have constraints in the allowed * swizzles). */ -static boolean +static bool emit_repl(struct svga_shader_emitter *emit, SVGA3dShaderDestToken dst, struct src_register *src0) @@ -484,7 +484,7 @@ emit_repl(struct svga_shader_emitter *emit, /** * Submit/emit an instruction with zero operands. */ -static boolean +static bool submit_op0(struct svga_shader_emitter *emit, SVGA3dShaderInstToken inst, SVGA3dShaderDestToken dest) @@ -497,7 +497,7 @@ submit_op0(struct svga_shader_emitter *emit, /** * Submit/emit an instruction with one operand. */ -static boolean +static bool submit_op1(struct svga_shader_emitter *emit, SVGA3dShaderInstToken inst, SVGA3dShaderDestToken dest, @@ -517,7 +517,7 @@ submit_op1(struct svga_shader_emitter *emit, * The same applies to input registers -- at most a single input * register may be read by any instruction. */ -static boolean +static bool submit_op2(struct svga_shader_emitter *emit, SVGA3dShaderInstToken inst, SVGA3dShaderDestToken dest, @@ -526,7 +526,7 @@ submit_op2(struct svga_shader_emitter *emit, { SVGA3dShaderDestToken temp; SVGA3dShaderRegType type0, type1; - boolean need_temp = FALSE; + bool need_temp = FALSE; temp.value = 0; type0 = SVGA3dShaderGetRegType( src0.base.value ); @@ -566,7 +566,7 @@ submit_op2(struct svga_shader_emitter *emit, * instruction. This function checks for that usage and inserts a * move to temporary if detected. */ -static boolean +static bool submit_op3(struct svga_shader_emitter *emit, SVGA3dShaderInstToken inst, SVGA3dShaderDestToken dest, @@ -576,8 +576,8 @@ submit_op3(struct svga_shader_emitter *emit, { SVGA3dShaderDestToken temp0; SVGA3dShaderDestToken temp1; - boolean need_temp0 = FALSE; - boolean need_temp1 = FALSE; + bool need_temp0 = FALSE; + bool need_temp1 = FALSE; SVGA3dShaderRegType type0, type1, type2; temp0.value = 0; @@ -638,7 +638,7 @@ submit_op3(struct svga_shader_emitter *emit, * instruction. This function checks for that usage and inserts a * move to temporary if detected. */ -static boolean +static bool submit_op4(struct svga_shader_emitter *emit, SVGA3dShaderInstToken inst, SVGA3dShaderDestToken dest, @@ -649,8 +649,8 @@ submit_op4(struct svga_shader_emitter *emit, { SVGA3dShaderDestToken temp0; SVGA3dShaderDestToken temp3; - boolean need_temp0 = FALSE; - boolean need_temp3 = FALSE; + bool need_temp0 = FALSE; + bool need_temp3 = FALSE; SVGA3dShaderRegType type0, type1, type2, type3; temp0.value = 0; @@ -713,7 +713,7 @@ submit_op4(struct svga_shader_emitter *emit, /** * Do the src and dest registers refer to the same register? */ -static boolean +static bool alias_src_dst(struct src_register src, SVGA3dShaderDestToken dst) { @@ -732,7 +732,7 @@ alias_src_dst(struct src_register src, * Helper for emitting SVGA immediate values using the SVGA3DOP_DEF[I] * instructions. */ -static boolean +static bool emit_def_const(struct svga_shader_emitter *emit, SVGA3dShaderConstType type, unsigned idx, float a, float b, float c, float d) @@ -771,7 +771,7 @@ emit_def_const(struct svga_shader_emitter *emit, } -static boolean +static bool create_loop_const( struct svga_shader_emitter *emit ) { unsigned idx = emit->nr_hw_int_const++; @@ -789,7 +789,7 @@ create_loop_const( struct svga_shader_emitter *emit ) return TRUE; } -static boolean +static bool create_arl_consts( struct svga_shader_emitter *emit ) { int i; @@ -846,7 +846,7 @@ get_vface( struct svga_shader_emitter *emit ) * We can swizzle this to produce other useful constants such as * {0, 0, 0, 0}, {1, 1, 1, 1}, etc. */ -static boolean +static bool create_common_immediate( struct svga_shader_emitter *emit ) { unsigned idx = emit->nr_hw_float_const++; @@ -1022,7 +1022,7 @@ get_tex_dimensions( struct svga_shader_emitter *emit, int sampler_num ) } -static boolean +static bool emit_fake_arl(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1048,7 +1048,7 @@ emit_fake_arl(struct svga_shader_emitter *emit, } -static boolean +static bool emit_if(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1079,7 +1079,7 @@ emit_if(struct svga_shader_emitter *emit, } -static boolean +static bool emit_else(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1087,7 +1087,7 @@ emit_else(struct svga_shader_emitter *emit, } -static boolean +static bool emit_endif(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1104,7 +1104,7 @@ emit_endif(struct svga_shader_emitter *emit, * FRC TMP, SRC * SUB DST, SRC, TMP */ -static boolean +static bool emit_floor(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn ) { @@ -1133,7 +1133,7 @@ emit_floor(struct svga_shader_emitter *emit, * FRC TMP, -SRC * ADD DST, SRC, TMP */ -static boolean +static bool emit_ceil(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1162,7 +1162,7 @@ emit_ceil(struct svga_shader_emitter *emit, * RCP TMP.y, SRC1.yyyy * MUL DST.xy, SRC0, TMP */ -static boolean +static bool emit_div(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn ) { @@ -1206,7 +1206,7 @@ emit_div(struct svga_shader_emitter *emit, * MUL TMP, SRC1, SRC2 * ADD DST, TMP.xxxx, TMP.yyyy */ -static boolean +static bool emit_dp2(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn ) { @@ -1237,7 +1237,7 @@ emit_dp2(struct svga_shader_emitter *emit, /** * Sine / Cosine helper function. */ -static boolean +static bool do_emit_sincos(struct svga_shader_emitter *emit, SVGA3dShaderDestToken dst, struct src_register src0) @@ -1252,7 +1252,7 @@ do_emit_sincos(struct svga_shader_emitter *emit, * SCS TMP SRC * MOV DST TMP.yyyy */ -static boolean +static bool emit_sin(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn ) { @@ -1280,7 +1280,7 @@ emit_sin(struct svga_shader_emitter *emit, * SCS TMP SRC * MOV DST TMP.xxxx */ -static boolean +static bool emit_cos(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1306,7 +1306,7 @@ emit_cos(struct svga_shader_emitter *emit, /** * Translate/emit TGSI SSG (Set Sign: -1, 0, +1) instruction. */ -static boolean +static bool emit_ssg(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1347,13 +1347,13 @@ emit_ssg(struct svga_shader_emitter *emit, * Translate/emit the conditional discard instruction (discard if * any of X,Y,Z,W are negative). */ -static boolean +static bool emit_cond_discard(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { const struct tgsi_full_src_register *reg = &insn->Src[0]; struct src_register src0, srcIn; - const boolean special = (reg->Register.Absolute || + const bool special = (reg->Register.Absolute || reg->Register.Negate || reg->Register.Indirect || reg->Register.SwizzleX != 0 || @@ -1391,7 +1391,7 @@ emit_cond_discard(struct svga_shader_emitter *emit, * Translate/emit the unconditional discard instruction (usually found inside * an IF/ELSE/ENDIF block). */ -static boolean +static bool emit_discard(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1413,7 +1413,7 @@ emit_discard(struct svga_shader_emitter *emit, /** * Test if r1 and r2 are the same register. */ -static boolean +static bool same_register(struct src_register r1, struct src_register r2) { return (r1.base.num == r2.base.num && @@ -1432,7 +1432,7 @@ same_register(struct src_register r1, struct src_register r2) * MOV dst, fail * MOV dst, pass, p0 */ -static boolean +static bool emit_conditional(struct svga_shader_emitter *emit, enum pipe_compare_func compare_func, SVGA3dShaderDestToken dst, @@ -1513,7 +1513,7 @@ emit_conditional(struct svga_shader_emitter *emit, * else * dst = 0.0; */ -static boolean +static bool emit_select(struct svga_shader_emitter *emit, enum pipe_compare_func compare_func, SVGA3dShaderDestToken dst, @@ -1554,7 +1554,7 @@ emit_select(struct svga_shader_emitter *emit, /** * Translate/emit a TGSI SEQ, SNE, SLT, SGE, etc. instruction. */ -static boolean +static bool emit_select_op(struct svga_shader_emitter *emit, unsigned compare, const struct tgsi_full_instruction *insn) @@ -1573,7 +1573,7 @@ emit_select_op(struct svga_shader_emitter *emit, * Translate TGSI CMP instruction. Component-wise: * dst = (src0 < 0.0) ? src1 : src2 */ -static boolean +static bool emit_cmp(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1608,7 +1608,7 @@ emit_cmp(struct svga_shader_emitter *emit, /** * Translate/emit 2-operand (coord, sampler) texture instructions. */ -static boolean +static bool emit_tex2(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn, SVGA3dShaderDestToken dst) @@ -1693,7 +1693,7 @@ emit_tex2(struct svga_shader_emitter *emit, /** * Translate/emit 4-operand (coord, ddx, ddy, sampler) texture instructions. */ -static boolean +static bool emit_tex4(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn, SVGA3dShaderDestToken dst ) @@ -1728,7 +1728,7 @@ emit_tex4(struct svga_shader_emitter *emit, * Emit texture swizzle code. We do this here since SVGA samplers don't * directly support swizzles. */ -static boolean +static bool emit_tex_swizzle(struct svga_shader_emitter *emit, SVGA3dShaderDestToken dst, struct src_register src, @@ -1796,7 +1796,7 @@ emit_tex_swizzle(struct svga_shader_emitter *emit, /** * Translate/emit a TGSI texture sample instruction. */ -static boolean +static bool emit_tex(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1811,16 +1811,16 @@ emit_tex(struct svga_shader_emitter *emit, const unsigned unit = src1.base.num; /* check for shadow samplers */ - boolean compare = (emit->key.tex[unit].compare_mode == + bool compare = (emit->key.tex[unit].compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE); /* texture swizzle */ - boolean swizzle = (emit->key.tex[unit].swizzle_r != PIPE_SWIZZLE_X || + 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); - boolean saturate = insn->Instruction.Saturate; + bool saturate = insn->Instruction.Saturate; /* If doing compare processing or tex swizzle or saturation, we need to put * the fetched color into a temporary so it can be used as a source later on. @@ -1921,7 +1921,7 @@ emit_tex(struct svga_shader_emitter *emit, } -static boolean +static bool emit_bgnloop(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1937,7 +1937,7 @@ emit_bgnloop(struct svga_shader_emitter *emit, } -static boolean +static bool emit_endloop(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1952,7 +1952,7 @@ emit_endloop(struct svga_shader_emitter *emit, /** * Translate/emit TGSI BREAK (out of loop) instruction. */ -static boolean +static bool emit_brk(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -1965,7 +1965,7 @@ emit_brk(struct svga_shader_emitter *emit, * Emit simple instruction which operates on one scalar value (not * a vector). Ex: LG2, RCP, RSQ. */ -static boolean +static bool emit_scalar_op1(struct svga_shader_emitter *emit, SVGA3dShaderOpCodeType opcode, const struct tgsi_full_instruction *insn) @@ -1987,7 +1987,7 @@ emit_scalar_op1(struct svga_shader_emitter *emit, * Translate/emit a simple instruction (one which has no special-case * code) such as ADD, MUL, MIN, MAX. */ -static boolean +static bool emit_simple_instruction(struct svga_shader_emitter *emit, SVGA3dShaderOpCodeType opcode, const struct tgsi_full_instruction *insn) @@ -2025,7 +2025,7 @@ emit_simple_instruction(struct svga_shader_emitter *emit, * TGSI_OPCODE_MOVE is only special-cased here to detect the * svga_fragment_shader::constant_color_output case. */ -static boolean +static bool emit_mov(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2053,7 +2053,7 @@ emit_mov(struct svga_shader_emitter *emit, * rcp dst, temp * endif */ -static boolean +static bool emit_sqrt(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2062,7 +2062,7 @@ emit_sqrt(struct svga_shader_emitter *emit, SVGA3dShaderDestToken dst = translate_dst_register(emit, insn, 0); SVGA3dShaderDestToken temp = get_temp(emit); SVGA3dShaderInstToken if_token = inst_token(SVGA3DOP_IFC); - boolean ret = TRUE; + bool ret = TRUE; if_token.control = SVGA3DOPCOMP_EQ; @@ -2114,7 +2114,7 @@ cleanup: /** * Translate/emit TGSI DDX, DDY instructions. */ -static boolean +static bool emit_deriv(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn ) { @@ -2177,7 +2177,7 @@ emit_deriv(struct svga_shader_emitter *emit, * move a value into the special 'address' register. Used to implement * indirect/variable indexing into arrays. */ -static boolean +static bool emit_arl(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2199,7 +2199,7 @@ emit_arl(struct svga_shader_emitter *emit, } -static boolean +static bool emit_pow(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2208,7 +2208,7 @@ emit_pow(struct svga_shader_emitter *emit, emit, &insn->Src[0] ); struct src_register src1 = translate_src_register( emit, &insn->Src[1] ); - boolean need_tmp = FALSE; + bool need_tmp = FALSE; /* POW can only output to a temporary */ if (insn->Dst[0].Register.File != TGSI_FILE_TEMPORARY) @@ -2241,7 +2241,7 @@ emit_pow(struct svga_shader_emitter *emit, /** * Emit a LRP (linear interpolation) instruction. */ -static boolean +static bool submit_lrp(struct svga_shader_emitter *emit, SVGA3dShaderDestToken dst, struct src_register src0, @@ -2249,7 +2249,7 @@ submit_lrp(struct svga_shader_emitter *emit, struct src_register src2) { SVGA3dShaderDestToken tmp; - boolean need_dst_tmp = FALSE; + bool need_dst_tmp = FALSE; /* The dst reg must be a temporary, and not be the same as src0 or src2 */ if (SVGA3dShaderGetRegType(dst.value) != SVGA3DREG_TEMP || @@ -2280,7 +2280,7 @@ submit_lrp(struct svga_shader_emitter *emit, /** * Translate/emit LRP (Linear Interpolation) instruction. */ -static boolean +static bool emit_lrp(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2298,7 +2298,7 @@ emit_lrp(struct svga_shader_emitter *emit, /** * Translate/emit DST (Distance function) instruction. */ -static boolean +static bool emit_dst_insn(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2319,7 +2319,7 @@ emit_dst_insn(struct svga_shader_emitter *emit, emit, &insn->Src[0] ); const struct src_register src1 = translate_src_register( emit, &insn->Src[1] ); - boolean need_tmp = FALSE; + bool need_tmp = FALSE; if (SVGA3dShaderGetRegType(dst.value) != SVGA3DREG_TEMP || alias_src_dst(src0, dst) || @@ -2375,7 +2375,7 @@ emit_dst_insn(struct svga_shader_emitter *emit, } -static boolean +static bool emit_exp(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2443,7 +2443,7 @@ emit_exp(struct svga_shader_emitter *emit, /** * Translate/emit LIT (Lighting helper) instruction. */ -static boolean +static bool emit_lit(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2542,7 +2542,7 @@ emit_lit(struct svga_shader_emitter *emit, } -static boolean +static bool emit_ex2(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2570,7 +2570,7 @@ emit_ex2(struct svga_shader_emitter *emit, } -static boolean +static bool emit_log(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2681,10 +2681,10 @@ emit_log(struct svga_shader_emitter *emit, * We need to truncate toward zero. Ex: trunc(-1.9) = -1 * Different approaches are needed for VS versus PS. */ -static boolean +static bool emit_trunc_round(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn, - boolean round) + bool round) { SVGA3dShaderDestToken dst = translate_dst_register(emit, insn, 0); const struct src_register src0 = @@ -2753,7 +2753,7 @@ emit_trunc_round(struct svga_shader_emitter *emit, /** * Translate/emit "begin subroutine" instruction/marker/label. */ -static boolean +static bool emit_bgnsub(struct svga_shader_emitter *emit, unsigned position, const struct tgsi_full_instruction *insn) @@ -2782,7 +2782,7 @@ emit_bgnsub(struct svga_shader_emitter *emit, /** * Translate/emit subroutine call instruction. */ -static boolean +static bool emit_call(struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn) { @@ -2811,7 +2811,7 @@ emit_call(struct svga_shader_emitter *emit, * Called at the end of the shader. Actually, emit special "fix-up" * code for the vertex/fragment shader. */ -static boolean +static bool emit_end(struct svga_shader_emitter *emit) { if (emit->unit == PIPE_SHADER_VERTEX) { @@ -2826,7 +2826,7 @@ emit_end(struct svga_shader_emitter *emit) /** * Translate any TGSI instruction to SVGA. */ -static boolean +static bool svga_emit_instruction(struct svga_shader_emitter *emit, unsigned position, const struct tgsi_full_instruction *insn) @@ -3011,7 +3011,7 @@ svga_emit_instruction(struct svga_shader_emitter *emit, * Translate/emit a TGSI IMMEDIATE declaration. * An immediate vector is a constant that's hard-coded into the shader. */ -static boolean +static bool svga_emit_immediate(struct svga_shader_emitter *emit, const struct tgsi_full_immediate *imm) { @@ -3037,7 +3037,7 @@ svga_emit_immediate(struct svga_shader_emitter *emit, } -static boolean +static bool make_immediate(struct svga_shader_emitter *emit, float a, float b, float c, float d, struct src_register *out ) @@ -3057,7 +3057,7 @@ make_immediate(struct svga_shader_emitter *emit, /** * Emit special VS instructions at top of shader. */ -static boolean +static bool emit_vs_preamble(struct svga_shader_emitter *emit) { if (!emit->key.vs.need_prescale) { @@ -3073,7 +3073,7 @@ emit_vs_preamble(struct svga_shader_emitter *emit) /** * Emit special PS instructions at top of shader. */ -static boolean +static bool emit_ps_preamble(struct svga_shader_emitter *emit) { if (emit->ps_reads_pos && emit->info.reads_z) { @@ -3113,7 +3113,7 @@ emit_ps_preamble(struct svga_shader_emitter *emit) /** * Emit special PS instructions at end of shader. */ -static boolean +static bool emit_ps_postamble(struct svga_shader_emitter *emit) { unsigned i; @@ -3172,7 +3172,7 @@ emit_ps_postamble(struct svga_shader_emitter *emit) /** * Emit special VS instructions at end of shader. */ -static boolean +static bool emit_vs_postamble(struct svga_shader_emitter *emit) { /* PSIZ output is incredibly fragile and it's very hard to catch @@ -3282,7 +3282,7 @@ emit_vs_postamble(struct svga_shader_emitter *emit) * 3: COLOR = BackColor; * 4: ENDIF */ -static boolean +static bool emit_light_twoside(struct svga_shader_emitter *emit) { struct src_register vface, zero; @@ -3354,7 +3354,7 @@ emit_light_twoside(struct svga_shader_emitter *emit) * 0: SETP_GT TEMP, VFACE, 0 * where TEMP is a fake frontface register */ -static boolean +static bool emit_frontface(struct svga_shader_emitter *emit) { struct src_register vface; @@ -3396,7 +3396,7 @@ emit_frontface(struct svga_shader_emitter *emit) * This is used for drawing point sprites when * pipe_rasterizer_state::sprite_coord_mode == PIPE_SPRITE_COORD_LOWER_LEFT. */ -static boolean +static bool emit_inverted_texcoords(struct svga_shader_emitter *emit) { unsigned inverted_texcoords = emit->inverted_texcoords; @@ -3438,7 +3438,7 @@ emit_inverted_texcoords(struct svga_shader_emitter *emit) * - Change range from [0,1] to [-1,1] (for normalized byte/short attribs). * - Set attrib W component = 1. */ -static boolean +static bool emit_adjusted_vertex_attribs(struct svga_shader_emitter *emit) { unsigned adjust_mask = (emit->key.vs.adjust_attrib_range | @@ -3529,7 +3529,7 @@ emit_adjusted_vertex_attribs(struct svga_shader_emitter *emit) * We could just do this all the time except that we want to conserve * registers whenever possible. */ -static boolean +static bool needs_to_create_common_immediate(const struct svga_shader_emitter *emit) { unsigned i; @@ -3599,21 +3599,21 @@ needs_to_create_common_immediate(const struct svga_shader_emitter *emit) /** * Do we need to create a looping constant? */ -static boolean +static bool needs_to_create_loop_const(const struct svga_shader_emitter *emit) { return (emit->info.opcode_count[TGSI_OPCODE_BGNLOOP] >= 1); } -static boolean +static bool needs_to_create_arl_consts(const struct svga_shader_emitter *emit) { return (emit->num_arl_consts > 0); } -static boolean +static bool pre_parse_add_indirect( struct svga_shader_emitter *emit, int num, int current_arl) { @@ -3636,7 +3636,7 @@ pre_parse_add_indirect( struct svga_shader_emitter *emit, } -static boolean +static bool pre_parse_instruction( struct svga_shader_emitter *emit, const struct tgsi_full_instruction *insn, int current_arl) @@ -3669,7 +3669,7 @@ pre_parse_instruction( struct svga_shader_emitter *emit, } -static boolean +static bool pre_parse_tokens( struct svga_shader_emitter *emit, const struct tgsi_token *tokens ) { @@ -3702,7 +3702,7 @@ pre_parse_tokens( struct svga_shader_emitter *emit, } -static boolean +static bool svga_shader_emit_helpers(struct svga_shader_emitter *emit) { if (needs_to_create_common_immediate( emit )) { @@ -3753,14 +3753,14 @@ svga_shader_emit_helpers(struct svga_shader_emitter *emit) * This is the main entrypoint into the TGSI instruction translater. * Translate TGSI shader tokens into an SVGA shader. */ -boolean +bool svga_shader_emit_instructions(struct svga_shader_emitter *emit, const struct tgsi_token *tokens) { struct tgsi_parse_context parse; const struct tgsi_token *new_tokens = NULL; - boolean ret = TRUE; - boolean helpers_emitted = FALSE; + bool ret = TRUE; + bool helpers_emitted = FALSE; unsigned line_nr = 0; if (emit->unit == PIPE_SHADER_FRAGMENT && emit->key.fs.pstipple) { diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index b7f6f05abf1..643aad9d423 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -207,11 +207,11 @@ struct svga_shader_emitter_v10 unsigned cur_tgsi_token; /**< current tgsi token position */ unsigned inst_start_token; - boolean discard_instruction; /**< throw away current instruction? */ - boolean reemit_instruction; /**< reemit current instruction */ - boolean reemit_tgsi_instruction; /**< reemit current tgsi instruction */ - boolean skip_instruction; /**< skip current instruction */ - boolean use_sampler_state_mapping; /* use sampler state mapping */ + bool discard_instruction; /**< throw away current instruction? */ + bool reemit_instruction; /**< reemit current instruction */ + bool reemit_tgsi_instruction; /**< reemit current tgsi instruction */ + bool skip_instruction; /**< skip current instruction */ + bool use_sampler_state_mapping; /* use sampler state mapping */ enum reemit_mode reemit_rawbuf_instruction; union tgsi_immediate_data immediates[MAX_IMMEDIATE_COUNT][4]; @@ -219,7 +219,7 @@ struct svga_shader_emitter_v10 unsigned num_immediates; /**< Number of immediates emitted */ unsigned common_immediate_pos[20]; /**< literals for common immediates */ unsigned num_common_immediates; - boolean immediates_emitted; + bool immediates_emitted; unsigned num_outputs; /**< include any extra outputs */ /** The first extra output is reserved for @@ -238,7 +238,7 @@ struct svga_shader_emitter_v10 /** Map TGSI temp registers to VGPU10 temp array IDs and indexes */ struct { unsigned arrayId, index; - boolean initialized; + bool initialized; } temp_map[VGPU10_MAX_TEMPS]; /**< arrayId, element */ unsigned initialize_temp_index; @@ -257,7 +257,7 @@ struct svga_shader_emitter_v10 /* Samplers */ unsigned num_samplers; - boolean sampler_view[PIPE_MAX_SAMPLERS]; /**< True if sampler view exists*/ + bool sampler_view[PIPE_MAX_SAMPLERS]; /**< True if sampler view exists*/ ubyte sampler_target[PIPE_MAX_SAMPLERS]; /**< TGSI_TEXTURE_x */ ubyte sampler_return_type[PIPE_MAX_SAMPLERS]; /**< TGSI_RETURN_TYPE_x */ @@ -276,13 +276,13 @@ struct svga_shader_emitter_v10 unsigned max_atomic_counter_index; VGPU10_OPCODE_TYPE cur_atomic_opcode; /* current atomic opcode */ - boolean uav_declared; /* True if uav is declared */ + bool uav_declared; /* True if uav is declared */ /* Index Range declaration */ struct { unsigned start_index; unsigned count; - boolean required; + bool required; unsigned operandType; unsigned size; unsigned dim; @@ -358,7 +358,7 @@ struct svga_shader_emitter_v10 unsigned layer_input_index; /**< TGSI index of layer */ unsigned layer_imm_index; /**< immediate for default layer 0 */ - boolean forceEarlyDepthStencil; /**< true if Early Depth stencil test is enabled */ + bool forceEarlyDepthStencil; /**< true if Early Depth stencil test is enabled */ } fs; /* For geometry shaders only */ @@ -387,8 +387,8 @@ struct svga_shader_emitter_v10 unsigned control_point_out_index; /* control point output register index */ unsigned control_point_tmp_index; /* control point temporary register */ unsigned control_point_out_count; /* control point output count */ - boolean control_point_phase; /* true if in control point phase */ - boolean fork_phase_add_signature; /* true if needs to add signature in fork phase */ + bool control_point_phase; /* true if in control point phase */ + bool fork_phase_add_signature; /* true if needs to add signature in fork phase */ unsigned patch_generic_out_count; /* per-patch generic output count */ unsigned patch_generic_out_index; /* per-patch generic output register index*/ unsigned patch_generic_tmp_index; /* per-patch generic temporary register index*/ @@ -409,8 +409,8 @@ struct svga_shader_emitter_v10 struct { enum mesa_prim prim_mode; enum pipe_tess_spacing spacing; - boolean vertices_order_cw; - boolean point_mode; + bool vertices_order_cw; + bool point_mode; unsigned tesscoord_sys_index; unsigned swizzle_max; unsigned prim_id_index; /* primitive id */ @@ -453,12 +453,12 @@ struct svga_shader_emitter_v10 unsigned clip_plane_const[PIPE_MAX_CLIP_PLANES]; unsigned num_output_writes; - boolean constant_color_output; + bool constant_color_output; - boolean uses_flat_interp; + bool uses_flat_interp; unsigned reserved_token; /* index to the reserved token */ - boolean uses_precise_qualifier; + bool uses_precise_qualifier; /* For all shaders: const reg index for RECT coord scaling */ unsigned texcoord_scale_index[PIPE_MAX_SAMPLERS]; @@ -488,25 +488,25 @@ struct svga_shader_emitter_v10 static void emit_tcs_input_declarations(struct svga_shader_emitter_v10 *emit); static void emit_tcs_output_declarations(struct svga_shader_emitter_v10 *emit); -static boolean emit_temporaries_declaration(struct svga_shader_emitter_v10 *emit); -static boolean emit_constant_declaration(struct svga_shader_emitter_v10 *emit); -static boolean emit_sampler_declarations(struct svga_shader_emitter_v10 *emit); -static boolean emit_resource_declarations(struct svga_shader_emitter_v10 *emit); -static boolean emit_vgpu10_immediates_block(struct svga_shader_emitter_v10 *emit); -static boolean emit_index_range_declaration(struct svga_shader_emitter_v10 *emit); +static bool emit_temporaries_declaration(struct svga_shader_emitter_v10 *emit); +static bool emit_constant_declaration(struct svga_shader_emitter_v10 *emit); +static bool emit_sampler_declarations(struct svga_shader_emitter_v10 *emit); +static bool emit_resource_declarations(struct svga_shader_emitter_v10 *emit); +static bool emit_vgpu10_immediates_block(struct svga_shader_emitter_v10 *emit); +static bool emit_index_range_declaration(struct svga_shader_emitter_v10 *emit); static void emit_image_declarations(struct svga_shader_emitter_v10 *emit); static void emit_shader_buf_declarations(struct svga_shader_emitter_v10 *emit); static void emit_atomic_buf_declarations(struct svga_shader_emitter_v10 *emit); static void emit_temp_prescale_instructions(struct svga_shader_emitter_v10 *emit); -static boolean +static bool emit_post_helpers(struct svga_shader_emitter_v10 *emit); -static boolean +static bool emit_vertex(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst); -static boolean +static bool emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, unsigned inst_number, const struct tgsi_full_instruction *inst); @@ -522,10 +522,10 @@ emit_input_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_4_COMPONENT_SELECTION_MODE selMode, unsigned usageMask, VGPU10_INTERPOLATION_MODE interpMode, - boolean addSignature, + bool addSignature, SVGA3dDXSignatureSemanticName sgnName); -static boolean +static bool emit_rawbuf_instruction(struct svga_shader_emitter_v10 *emit, unsigned inst_number, const struct tgsi_full_instruction *inst); @@ -537,7 +537,7 @@ create_temp_array(struct svga_shader_emitter_v10 *emit, static char err_buf[128]; -static boolean +static bool expand(struct svga_shader_emitter_v10 *emit) { char *new_buf; @@ -592,7 +592,7 @@ free_emitter(struct svga_shader_emitter_v10 *emit) FREE(emit); } -static inline boolean +static inline bool reserve(struct svga_shader_emitter_v10 *emit, unsigned nr_dwords) { @@ -604,7 +604,7 @@ reserve(struct svga_shader_emitter_v10 *emit, return TRUE; } -static boolean +static bool emit_dword(struct svga_shader_emitter_v10 *emit, uint32 dword) { if (!reserve(emit, 1)) @@ -615,7 +615,7 @@ emit_dword(struct svga_shader_emitter_v10 *emit, uint32 dword) return TRUE; } -static boolean +static bool emit_dwords(struct svga_shader_emitter_v10 *emit, const uint32 *dwords, unsigned nr) @@ -1082,7 +1082,7 @@ translate_opcode(enum tgsi_opcode opcode) * \param array is the TGSI_FILE_TEMPORARY register an array? */ static VGPU10_OPERAND_TYPE -translate_register_file(enum tgsi_file_type file, boolean array) +translate_register_file(enum tgsi_file_type file, bool array) { switch (file) { case TGSI_FILE_CONSTANT: @@ -1175,8 +1175,8 @@ static VGPU10OperandToken0 setup_operand0_indexing(struct svga_shader_emitter_v10 *emit, VGPU10OperandToken0 operand0, enum tgsi_file_type file, - boolean indirect, - boolean index2D, bool indirect2D) + bool indirect, + bool index2D, bool indirect2D) { VGPU10_OPERAND_INDEX_REPRESENTATION index0Rep, index1Rep; VGPU10_OPERAND_INDEX_DIMENSION indexDim; @@ -1277,9 +1277,9 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, const enum tgsi_semantic sem_name = emit->info.output_semantic_name[index]; const unsigned sem_index = emit->info.output_semantic_index[index]; unsigned writemask = reg->Register.WriteMask; - const boolean indirect = reg->Register.Indirect; + const bool indirect = reg->Register.Indirect; unsigned tempArrayId = get_temp_array_id(emit, file, index); - boolean index2d = reg->Register.Dimension || tempArrayId > 0; + bool index2d = reg->Register.Dimension || tempArrayId > 0; VGPU10OperandToken0 operand0; if (file == TGSI_FILE_TEMPORARY) { @@ -1528,7 +1528,7 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, * temporary is not used in loop. In these two scenarios, we cannot * determine if temporary is initialized or not. */ -static boolean +static bool need_temp_reg_initialization(struct svga_shader_emitter_v10 *emit, unsigned index) { @@ -1556,19 +1556,19 @@ emit_src_register(struct svga_shader_emitter_v10 *emit, { enum tgsi_file_type file = reg->Register.File; unsigned index = reg->Register.Index; - boolean indirect = reg->Register.Indirect; + bool indirect = reg->Register.Indirect; unsigned tempArrayId = get_temp_array_id(emit, file, index); - boolean index2d = (reg->Register.Dimension || + bool index2d = (reg->Register.Dimension || tempArrayId > 0 || file == TGSI_FILE_CONSTANT); unsigned index2 = tempArrayId > 0 ? tempArrayId : reg->Dimension.Index; - boolean indirect2d = reg->Dimension.Indirect; + bool indirect2d = reg->Dimension.Indirect; unsigned swizzleX = reg->Register.SwizzleX; unsigned swizzleY = reg->Register.SwizzleY; unsigned swizzleZ = reg->Register.SwizzleZ; unsigned swizzleW = reg->Register.SwizzleW; - const boolean absolute = reg->Register.Absolute; - const boolean negate = reg->Register.Negate; + const bool absolute = reg->Register.Absolute; + const bool negate = reg->Register.Negate; VGPU10OperandToken0 operand0; VGPU10OperandToken1 operand1; @@ -2148,7 +2148,7 @@ emit_stream_register(struct svga_shader_emitter_v10 *emit, unsigned index) */ static void emit_opcode_precise(struct svga_shader_emitter_v10 *emit, - unsigned vgpu10_opcode, boolean saturate, boolean precise) + unsigned vgpu10_opcode, bool saturate, bool precise) { VGPU10OpcodeToken0 token0; @@ -2174,7 +2174,7 @@ emit_opcode_precise(struct svga_shader_emitter_v10 *emit, */ static void emit_opcode(struct svga_shader_emitter_v10 *emit, - unsigned vgpu10_opcode, boolean saturate) + unsigned vgpu10_opcode, bool saturate) { emit_opcode_precise(emit, vgpu10_opcode, saturate, FALSE); } @@ -2208,7 +2208,7 @@ emit_opcode_resinfo(struct svga_shader_emitter_v10 *emit, */ static void emit_sample_opcode(struct svga_shader_emitter_v10 *emit, - unsigned vgpu10_opcode, boolean saturate, + unsigned vgpu10_opcode, bool saturate, const int offsets[3]) { VGPU10OpcodeToken0 token0; @@ -2248,7 +2248,7 @@ emit_sample_opcode(struct svga_shader_emitter_v10 *emit, * Otherwise, we'll discard the fragment if the X component is 0. */ static void -emit_discard_opcode(struct svga_shader_emitter_v10 *emit, boolean nonzero) +emit_discard_opcode(struct svga_shader_emitter_v10 *emit, bool nonzero) { VGPU10OpcodeToken0 opcode0; @@ -2533,7 +2533,7 @@ writemask_dst(const struct tgsi_full_dst_register *reg, unsigned mask) /** * Check if the register's swizzle is XXXX, YYYY, ZZZZ, or WWWW. */ -static boolean +static bool same_swizzle_terms(const struct tgsi_full_src_register *reg) { return (reg->Register.SwizzleX == reg->Register.SwizzleY && @@ -2851,7 +2851,7 @@ alloc_system_value_index(struct svga_shader_emitter_v10 *emit, unsigned index) /** * Translate a TGSI immediate value (union tgsi_immediate_data[4]) to VGPU10. */ -static boolean +static bool emit_vgpu10_immediate(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_immediate *imm) { @@ -2868,7 +2868,7 @@ emit_vgpu10_immediate(struct svga_shader_emitter_v10 *emit, * containing all the immediate values previously allocated * with alloc_immediate_4(). */ -static boolean +static bool emit_vgpu10_immediates_block(struct svga_shader_emitter_v10 *emit) { VGPU10OpcodeToken0 token; @@ -2941,7 +2941,7 @@ translate_interpolation(const struct svga_shader_emitter_v10 *emit, * information. The output primitive topology might be changed later. The * final property instructions will be emitted as part of the pre-helper code. */ -static boolean +static bool emit_vgpu10_property(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_property *prop) { @@ -3395,7 +3395,7 @@ emit_hull_shader_declarations(struct svga_shader_emitter_v10 *emit) * A helper function to determine if control point phase is needed. * Returns TRUE if there is control point output. */ -static boolean +static bool needs_control_point_phase(struct svga_shader_emitter_v10 *emit) { unsigned i; @@ -3479,7 +3479,7 @@ emit_control_point_phase_instruction(struct svga_shader_emitter_v10 *emit) /** * Start the hull shader control point phase */ -static boolean +static bool emit_hull_shader_control_point_phase(struct svga_shader_emitter_v10 *emit) { /* If there is no control point output, skip the control point phase. */ @@ -3551,12 +3551,12 @@ emit_hull_shader_control_point_phase(struct svga_shader_emitter_v10 *emit) * do the second pass of the tcs translation and emit * the relevant declarations and instructions for this phase. */ -static boolean +static bool emit_hull_shader_patch_constant_phase(struct svga_shader_emitter_v10 *emit, struct tgsi_parse_context *parse) { unsigned inst_number = 0; - boolean ret = TRUE; + bool ret = TRUE; VGPU10OpcodeToken0 opcode0; emit->skip_instruction = FALSE; @@ -3661,7 +3661,7 @@ emit_compute_shader_declarations(struct svga_shader_emitter_v10 *emit) /** * Emit index range declaration. */ -static boolean +static bool emit_index_range_declaration(struct svga_shader_emitter_v10 *emit) { if (emit->version < 50) @@ -3796,7 +3796,7 @@ emit_input_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_4_COMPONENT_SELECTION_MODE selMode, unsigned usageMask, VGPU10_INTERPOLATION_MODE interpMode, - boolean addSignature, + bool addSignature, SVGA3dDXSignatureSemanticName sgnName) { VGPU10OpcodeToken0 opcode0; @@ -3950,7 +3950,7 @@ emit_output_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPCODE_TYPE type, unsigned index, VGPU10_SYSTEM_NAME name, unsigned writemask, - boolean addSignature, + bool addSignature, SVGA3dDXSignatureSemanticName sgnName) { VGPU10OpcodeToken0 opcode0; @@ -4164,7 +4164,7 @@ emit_fs_output_declarations(struct svga_shader_emitter_v10 *emit) static void emit_vertex_output_declaration(struct svga_shader_emitter_v10 *emit, unsigned index, unsigned writemask, - boolean addSignature) + bool addSignature) { const enum tgsi_semantic semantic_name = emit->info.output_semantic_name[index]; @@ -4855,7 +4855,7 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit, /** * Translate a TGSI declaration to VGPU10. */ -static boolean +static bool emit_vgpu10_declaration(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_declaration *decl) { @@ -5200,7 +5200,7 @@ emit_tcs_input_declarations(struct svga_shader_emitter_v10 *emit) unsigned i; unsigned size = emit->key.tcs.vertices_per_patch; UNUSED unsigned indicesMask = 0; - boolean addSignature = TRUE; + bool addSignature = TRUE; if (!emit->tcs.control_point_phase) addSignature = emit->tcs.fork_phase_add_signature; @@ -5438,7 +5438,7 @@ emit_tes_input_declarations(struct svga_shader_emitter_v10 *emit) /** * Emit all input declarations. */ -static boolean +static bool emit_input_declarations(struct svga_shader_emitter_v10 *emit) { emit->index_range.required = @@ -5478,7 +5478,7 @@ emit_input_declarations(struct svga_shader_emitter_v10 *emit) /** * Emit all output declarations. */ -static boolean +static bool emit_output_declarations(struct svga_shader_emitter_v10 *emit) { emit->index_range.required = @@ -5588,7 +5588,7 @@ create_temp_array(struct svga_shader_emitter_v10 *emit, /** * Emit the declaration for the temporary registers. */ -static boolean +static bool emit_temporaries_declaration(struct svga_shader_emitter_v10 *emit) { unsigned total_temps, reg, i; @@ -5860,7 +5860,7 @@ emit_temporaries_declaration(struct svga_shader_emitter_v10 *emit) } -static boolean +static bool emit_constant_declaration(struct svga_shader_emitter_v10 *emit) { VGPU10OpcodeToken0 opcode0; @@ -6003,7 +6003,7 @@ emit_constant_declaration(struct svga_shader_emitter_v10 *emit) /** * Emit declarations for samplers. */ -static boolean +static bool emit_sampler_declarations(struct svga_shader_emitter_v10 *emit) { unsigned i; @@ -6040,8 +6040,8 @@ emit_sampler_declarations(struct svga_shader_emitter_v10 *emit) static unsigned pipe_texture_to_resource_dimension(enum tgsi_texture_type target, unsigned num_samples, - boolean is_array, - boolean is_uav) + bool is_array, + bool is_uav) { switch (target) { case PIPE_BUFFER: @@ -6084,8 +6084,8 @@ pipe_texture_to_resource_dimension(enum tgsi_texture_type target, static unsigned tgsi_texture_to_resource_dimension(enum tgsi_texture_type target, unsigned num_samples, - boolean is_array, - boolean is_uav) + bool is_array, + bool is_uav) { if (target == TGSI_TEXTURE_2D_MSAA && num_samples < 2) { target = TGSI_TEXTURE_2D; @@ -6143,7 +6143,7 @@ tgsi_texture_to_resource_dimension(enum tgsi_texture_type target, /** * Given a tgsi_return_type, return true iff it is an integer type. */ -static boolean +static bool is_integer_type(enum tgsi_return_type type) { switch (type) { @@ -6168,7 +6168,7 @@ is_integer_type(enum tgsi_return_type type) * sampler view declarations (Ex: DCL SVIEW[n], 2D, UINT) we may * rework this code. */ -static boolean +static bool emit_resource_declarations(struct svga_shader_emitter_v10 *emit) { unsigned i; @@ -6493,7 +6493,7 @@ emit_instruction_opn(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_src_register *src1, const struct tgsi_full_src_register *src2, const struct tgsi_full_src_register *src3, - boolean saturate, bool precise) + bool saturate, bool precise) { begin_emit_instruction(emit); emit_opcode_precise(emit, opcode, saturate, precise); @@ -6972,7 +6972,7 @@ emit_puint_to_sscaled(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_ARL or TGSI_OPCODE_UARL instruction. */ -static boolean +static bool emit_arl_uarl(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7006,7 +7006,7 @@ emit_arl_uarl(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_CAL instruction. */ -static boolean +static bool emit_cal(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7027,7 +7027,7 @@ emit_cal(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_IABS instruction. */ -static boolean +static bool emit_iabs(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7050,7 +7050,7 @@ emit_iabs(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_CMP instruction. */ -static boolean +static bool emit_cmp(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7084,7 +7084,7 @@ emit_cmp(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_DST instruction. */ -static boolean +static bool emit_dst(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7175,7 +7175,7 @@ find_stream_index(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_ENDPRIM (GS only) */ -static boolean +static bool emit_endprim(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7208,7 +7208,7 @@ emit_endprim(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_EX2 (2^x) instruction. */ -static boolean +static bool emit_ex2(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7236,7 +7236,7 @@ emit_ex2(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_EXP instruction. */ -static boolean +static bool emit_exp(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7323,7 +7323,7 @@ emit_exp(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_IF instruction. */ -static boolean +static bool emit_if(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_src_register *src) { @@ -7355,7 +7355,7 @@ emit_if(struct svga_shader_emitter_v10 *emit, * Emit code for conditional discard instruction (discard fragment if any of * the register components are negative). */ -static boolean +static bool emit_cond_discard(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7408,7 +7408,7 @@ emit_cond_discard(struct svga_shader_emitter_v10 *emit, /** * Emit code for the unconditional discard instruction. */ -static boolean +static bool emit_discard(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7427,7 +7427,7 @@ emit_discard(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_LG2 instruction. */ -static boolean +static bool emit_lg2(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7455,7 +7455,7 @@ emit_lg2(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_LIT instruction. */ -static boolean +static bool emit_lit(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7591,7 +7591,7 @@ emit_lit(struct svga_shader_emitter_v10 *emit, /** * Emit Level Of Detail Query (LODQ) instruction. */ -static boolean +static bool emit_lodq(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7615,7 +7615,7 @@ emit_lodq(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_LOG instruction. */ -static boolean +static bool emit_log(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7697,7 +7697,7 @@ emit_log(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_LRP instruction. */ -static boolean +static bool emit_lrp(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7732,7 +7732,7 @@ emit_lrp(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_POW instruction. */ -static boolean +static bool emit_pow(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7778,7 +7778,7 @@ emit_pow(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_RCP (reciprocal) instruction. */ -static boolean +static bool emit_rcp(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7833,7 +7833,7 @@ emit_rcp(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_RSQ instruction. */ -static boolean +static bool emit_rsq(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7874,7 +7874,7 @@ emit_rsq(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_SEQ (Set Equal) instruction. */ -static boolean +static bool emit_seq(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7907,7 +7907,7 @@ emit_seq(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_SGE (Set Greater than or Equal) instruction. */ -static boolean +static bool emit_sge(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7940,7 +7940,7 @@ emit_sge(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_SGT (Set Greater than) instruction. */ -static boolean +static bool emit_sgt(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -7973,7 +7973,7 @@ emit_sgt(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_SIN and TGSI_OPCODE_COS instructions. */ -static boolean +static bool emit_sincos(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8016,7 +8016,7 @@ emit_sincos(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_SLE (Set Less than or Equal) instruction. */ -static boolean +static bool emit_sle(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8049,7 +8049,7 @@ emit_sle(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_SLT (Set Less than) instruction. */ -static boolean +static bool emit_slt(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8082,7 +8082,7 @@ emit_slt(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_SNE (Set Not Equal) instruction. */ -static boolean +static bool emit_sne(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8115,7 +8115,7 @@ emit_sne(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_SSG (Set Sign) instruction. */ -static boolean +static bool emit_ssg(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8162,7 +8162,7 @@ emit_ssg(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_ISSG (Integer Set Sign) instruction. */ -static boolean +static bool emit_issg(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8213,7 +8213,7 @@ emit_comparison(struct svga_shader_emitter_v10 *emit, { struct tgsi_full_src_register immediate; VGPU10OpcodeToken0 opcode0; - boolean swapSrc = FALSE; + bool swapSrc = FALSE; /* Sanity checks for svga vs. gallium enums */ STATIC_ASSERT(SVGA3D_CMP_LESS == (PIPE_FUNC_LESS + 1)); @@ -8390,8 +8390,8 @@ emit_tex_compare_refcoord(struct svga_shader_emitter_v10 *emit, */ struct tex_swizzle_info { - boolean swizzled; - boolean shadow_compare; + bool swizzled; + bool shadow_compare; unsigned unit; enum tgsi_texture_type texture_target; /**< TGSI_TEXTURE_x */ struct tgsi_full_src_register tmp_src; @@ -8412,7 +8412,7 @@ static void begin_tex_swizzle(struct svga_shader_emitter_v10 *emit, unsigned unit, const struct tgsi_full_instruction *inst, - boolean shadow_compare, + bool shadow_compare, struct tex_swizzle_info *swz) { swz->swizzled = (emit->key.tex[unit].swizzle_r != TGSI_SWIZZLE_X || @@ -8503,7 +8503,7 @@ end_tex_swizzle(struct svga_shader_emitter_v10 *emit, unsigned swz_b = emit->key.tex[swz->unit].swizzle_b; unsigned swz_a = emit->key.tex[swz->unit].swizzle_a; unsigned writemask_0 = 0, writemask_1 = 0; - boolean int_tex = is_integer_type(emit->sampler_return_type[swz->unit]); + bool int_tex = is_integer_type(emit->sampler_return_type[swz->unit]); /* Swizzle w/out zero/one terms */ struct tgsi_full_src_register src_swizzled = @@ -8559,7 +8559,7 @@ end_tex_swizzle(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_SAMPLE instruction. */ -static boolean +static bool emit_sample(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8605,13 +8605,13 @@ emit_sample(struct svga_shader_emitter_v10 *emit, * MOV dst, {1,1,1,1}; * \return TRUE if valid, FALSE if invalid. */ -static boolean +static bool is_valid_tex_instruction(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { const unsigned unit = inst->Src[1].Register.Index; const enum tgsi_texture_type target = inst->Texture.Texture; - boolean valid = TRUE; + bool valid = TRUE; if (tgsi_is_shadow_target(target) && is_integer_type(emit->sampler_return_type[unit])) { @@ -8637,7 +8637,7 @@ is_valid_tex_instruction(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_TEX (simple texture lookup) */ -static boolean +static bool emit_tex(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8647,7 +8647,7 @@ emit_tex(struct svga_shader_emitter_v10 *emit, struct tgsi_full_src_register coord; int offsets[3]; struct tex_swizzle_info swz_info; - boolean compare_in_shader; + bool compare_in_shader; /* check that the sampler returns a float */ if (!is_valid_tex_instruction(emit, inst)) @@ -8690,7 +8690,7 @@ emit_tex(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_TG4 (texture lookup for texture gather) */ -static boolean +static bool emit_tg4(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8862,7 +8862,7 @@ emit_tg4(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_TEX2 (texture lookup for shadow cube map arrays) */ -static boolean +static bool emit_tex2(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8872,7 +8872,7 @@ emit_tex2(struct svga_shader_emitter_v10 *emit, int offsets[3]; struct tex_swizzle_info swz_info; VGPU10_OPCODE_TYPE opcode; - boolean compare_in_shader; + bool compare_in_shader; /* check that the sampler returns a float */ if (!is_valid_tex_instruction(emit, inst)) @@ -8915,7 +8915,7 @@ emit_tex2(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_TXP (projective texture) */ -static boolean +static bool emit_txp(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -8930,7 +8930,7 @@ emit_txp(struct svga_shader_emitter_v10 *emit, scalar_src(&inst->Src[0], TGSI_SWIZZLE_W); struct tgsi_full_src_register coord; struct tex_swizzle_info swz_info; - boolean compare_in_shader; + bool compare_in_shader; /* check that the sampler returns a float */ if (!is_valid_tex_instruction(emit, inst)) @@ -8981,7 +8981,7 @@ emit_txp(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_TXD (explicit derivatives) */ -static boolean +static bool emit_txd(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9021,12 +9021,12 @@ emit_txd(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_TXF (texel fetch) */ -static boolean +static bool emit_txf(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { const uint unit = inst->Src[1].Register.Index; - const boolean msaa = tgsi_is_msaa_target(inst->Texture.Texture) + const bool msaa = tgsi_is_msaa_target(inst->Texture.Texture) && emit->key.tex[unit].num_samples > 1; int offsets[3]; struct tex_swizzle_info swz_info; @@ -9075,7 +9075,7 @@ emit_txf(struct svga_shader_emitter_v10 *emit, * Emit code for TGSI_OPCODE_TXL (explicit LOD) or TGSI_OPCODE_TXB (LOD bias) * or TGSI_OPCODE_TXB2 (for cube shadow maps). */ -static boolean +static bool emit_txl_txb(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9133,7 +9133,7 @@ emit_txl_txb(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_TXL2 (explicit LOD) for cubemap array. */ -static boolean +static bool emit_txl2(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9177,7 +9177,7 @@ emit_txl2(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_TXQ (texture query) instruction. */ -static boolean +static bool emit_txq(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9350,7 +9350,7 @@ check_double_dst_writemask(const struct tgsi_full_instruction *inst) /** * Double-precision absolute value. */ -static boolean +static bool emit_dabs(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9372,7 +9372,7 @@ emit_dabs(struct svga_shader_emitter_v10 *emit, /** * Double-precision negation */ -static boolean +static bool emit_dneg(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9393,7 +9393,7 @@ emit_dneg(struct svga_shader_emitter_v10 *emit, /** * SM5 has no DMAD opcode. Implement negation with DMUL/DADD. */ -static boolean +static bool emit_dmad(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9425,7 +9425,7 @@ emit_dmad(struct svga_shader_emitter_v10 *emit, /** * Double precision reciprocal square root */ -static boolean +static bool emit_drsq(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_dst_register *dst, const struct tgsi_full_src_register *src) @@ -9456,7 +9456,7 @@ emit_drsq(struct svga_shader_emitter_v10 *emit, * It will be implemented with DRSQ. * dst = src * DRSQ(src) */ -static boolean +static bool emit_dsqrt(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9525,7 +9525,7 @@ emit_dsqrt(struct svga_shader_emitter_v10 *emit, * tmp = src - frac * dst = src >= 0 ? tmp : (tmp + (frac==0 ? 0 : 1)) */ -static boolean +static bool emit_dtrunc(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9605,7 +9605,7 @@ emit_dtrunc(struct svga_shader_emitter_v10 *emit, } -static boolean +static bool emit_interp_offset(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9644,7 +9644,7 @@ emit_interp_offset(struct svga_shader_emitter_v10 *emit, /** * Emit a simple instruction (like ADD, MUL, MIN, etc). */ -static boolean +static bool emit_simple(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9698,7 +9698,7 @@ emit_simple(struct svga_shader_emitter_v10 *emit, * To get correct location as per glsl from SM5 device, we should * return (31 - index) if returned index is not -1. */ -static boolean +static bool emit_msb(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9766,7 +9766,7 @@ emit_msb(struct svga_shader_emitter_v10 *emit, * Note: SM5 has width & offset range (0-31); * whereas GLSL has width & offset range (0-32) */ -static boolean +static bool emit_bfe(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9837,7 +9837,7 @@ emit_bfe(struct svga_shader_emitter_v10 *emit, * Note: SM5 has width & offset range (0-31); * whereas GLSL has width & offset range (0-32) */ -static boolean +static bool emit_bfi(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9910,7 +9910,7 @@ emit_bfi(struct svga_shader_emitter_v10 *emit, * We only special case the MOV instruction to try to detect constant * color writes in the fragment shader. */ -static boolean +static bool emit_mov(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -9933,7 +9933,7 @@ emit_mov(struct svga_shader_emitter_v10 *emit, * Emit a simple VGPU10 instruction which writes to multiple dest registers, * where TGSI only uses one dest register. */ -static boolean +static bool emit_simple_1dst(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst, unsigned dst_count, @@ -9966,7 +9966,7 @@ emit_simple_1dst(struct svga_shader_emitter_v10 *emit, /** * Emit a vmware specific VGPU10 instruction. */ -static boolean +static bool emit_vmware(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst, VGPU10_VMWARE_OPCODE_TYPE subopcode) @@ -10359,7 +10359,7 @@ emit_load_instruction(struct svga_shader_emitter_v10 *emit, /** * Emit uav / memory load instruction */ -static boolean +static bool emit_load(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -10430,8 +10430,8 @@ emit_store_instruction(struct svga_shader_emitter_v10 *emit, struct tgsi_full_src_register src = inst->Src[1]; struct tgsi_full_src_register four = make_immediate_reg_int(emit, 4); - boolean needLoad = FALSE; - boolean needPerComponentStore = FALSE; + bool needLoad = FALSE; + bool needPerComponentStore = FALSE; unsigned swizzles = 0; /* Resolve the resource address for this resource first */ @@ -10495,7 +10495,7 @@ emit_store_instruction(struct svga_shader_emitter_v10 *emit, src.Register.SwizzleW << 6; } - boolean storeDone = FALSE; + bool storeDone = FALSE; unsigned perComponentWritemask = writemask; unsigned shift = 0; struct tgsi_full_src_register shift_src; @@ -10580,7 +10580,7 @@ emit_store_instruction(struct svga_shader_emitter_v10 *emit, /** * Emit uav / memory store instruction */ -static boolean +static bool emit_store(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -10701,7 +10701,7 @@ emit_atomic_instruction(struct svga_shader_emitter_v10 *emit, /** * Emit atomic instruction */ -static boolean +static bool emit_atomic(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst, VGPU10_OPCODE_TYPE opcode) @@ -10747,7 +10747,7 @@ emit_atomic(struct svga_shader_emitter_v10 *emit, /** * Emit barrier instruction */ -static boolean +static bool emit_barrier(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -10792,7 +10792,7 @@ emit_barrier(struct svga_shader_emitter_v10 *emit, /** * Emit memory barrier instruction */ -static boolean +static bool emit_memory_barrier(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -10848,7 +10848,7 @@ emit_memory_barrier(struct svga_shader_emitter_v10 *emit, /** * Emit code for TGSI_OPCODE_RESQ (image size) instruction. */ -static boolean +static bool emit_resq(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -10884,7 +10884,7 @@ emit_resq(struct svga_shader_emitter_v10 *emit, } -static boolean +static bool emit_instruction(struct svga_shader_emitter_v10 *emit, unsigned inst_number, const struct tgsi_full_instruction *inst) @@ -11193,7 +11193,7 @@ emit_instruction(struct svga_shader_emitter_v10 *emit, /** * Translate a single TGSI instruction to VGPU10. */ -static boolean +static bool emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, unsigned inst_number, const struct tgsi_full_instruction *inst) @@ -11201,7 +11201,7 @@ emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, if (emit->skip_instruction) return TRUE; - boolean ret = TRUE; + bool ret = TRUE; unsigned start_token = emit_get_num_tokens(emit); emit->reemit_tgsi_instruction = FALSE; @@ -11419,7 +11419,7 @@ emit_vertex_instructions(struct svga_shader_emitter_v10 *emit) /** * Translate the TGSI_OPCODE_EMIT GS instruction. */ -static boolean +static bool emit_vertex(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { @@ -12055,7 +12055,7 @@ emit_initialize_temp_instruction(struct svga_shader_emitter_v10 *emit) * Emit any extra/helper declarations/code that we might need between * the declaration section and code section. */ -static boolean +static bool emit_pre_helpers(struct svga_shader_emitter_v10 *emit) { /* Properties */ @@ -12327,7 +12327,7 @@ emit_broadcast_color_instructions(struct svga_shader_emitter_v10 *emit, * For vertex shaders this means emitting the extra code to apply the * prescale scale/translation. */ -static boolean +static bool emit_post_helpers(struct svga_shader_emitter_v10 *emit) { if (emit->unit == PIPE_SHADER_VERTEX) { @@ -12375,12 +12375,12 @@ emit_post_helpers(struct svga_shader_emitter_v10 *emit) /** * Reemit rawbuf instruction */ -static boolean +static bool emit_rawbuf_instruction(struct svga_shader_emitter_v10 *emit, unsigned inst_number, const struct tgsi_full_instruction *inst) { - boolean ret; + bool ret; /* For all the rawbuf references in this instruction, * load the rawbuf reference and assign to the designated temporary. @@ -12462,13 +12462,13 @@ emit_rawbuf_instruction(struct svga_shader_emitter_v10 *emit, /** * Translate the TGSI tokens into VGPU10 tokens. */ -static boolean +static bool emit_vgpu10_instructions(struct svga_shader_emitter_v10 *emit, const struct tgsi_token *tokens) { struct tgsi_parse_context parse; - boolean ret = TRUE; - boolean pre_helpers_emitted = FALSE; + bool ret = TRUE; + bool pre_helpers_emitted = FALSE; unsigned inst_number = 0; tgsi_parse_init(&parse, tokens); @@ -12552,7 +12552,7 @@ done: /** * Emit the first VGPU10 shader tokens. */ -static boolean +static bool emit_vgpu10_header(struct svga_shader_emitter_v10 *emit) { VGPU10ProgramToken ptoken; @@ -12618,7 +12618,7 @@ emit_vgpu10_header(struct svga_shader_emitter_v10 *emit) } -static boolean +static bool emit_vgpu10_tail(struct svga_shader_emitter_v10 *emit) { VGPU10ProgramToken *tokens; diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h index 29590adfa22..630cb20030f 100644 --- a/src/gallium/drivers/svga/svga_winsys.h +++ b/src/gallium/drivers/svga/svga_winsys.h @@ -410,8 +410,8 @@ struct svga_winsys_context ** BEGIN new functions for guest-backed surfaces. **/ - boolean have_gb_objects; - boolean force_coherent; + bool have_gb_objects; + bool force_coherent; /** * Map a guest-backed surface. @@ -430,8 +430,8 @@ struct svga_winsys_context void * (*surface_map)(struct svga_winsys_context *swc, struct svga_winsys_surface *surface, - unsigned flags, boolean *retry, - boolean *rebind); + unsigned flags, bool *retry, + bool *rebind); /** * Unmap a guest-backed surface. @@ -441,7 +441,7 @@ struct svga_winsys_context void (*surface_unmap)(struct svga_winsys_context *swc, struct svga_winsys_surface *surface, - boolean *rebind); + bool *rebind); /** * Create and define a DX GB shader that resides in the device COTable. @@ -508,7 +508,7 @@ struct svga_winsys_screen int (*get_fd)(struct svga_winsys_screen *sws); - boolean + bool (*get_cap)(struct svga_winsys_screen *sws, SVGA3dDevCapIndex index, SVGA3dDevCapResult *result); @@ -587,7 +587,7 @@ struct svga_winsys_screen * Get a winsys_handle from a surface. * Used to implement pipe_screen::resource_get_handle. */ - boolean + bool (*surface_get_handle)(struct svga_winsys_screen *sws, struct svga_winsys_surface *surface, unsigned stride, @@ -596,7 +596,7 @@ struct svga_winsys_screen /** * Whether this surface is sitting in a validate list */ - boolean + bool (*surface_is_flushed)(struct svga_winsys_screen *sws, struct svga_winsys_surface *surface); @@ -614,7 +614,7 @@ struct svga_winsys_screen * and format can be created. * \Return TRUE if OK, FALSE if too large. */ - boolean + bool (*surface_can_create)(struct svga_winsys_screen *sws, SVGA3dSurfaceFormat format, SVGA3dSize size, @@ -695,7 +695,7 @@ struct svga_winsys_screen */ int (*fence_get_fd)( struct svga_winsys_screen *sws, struct pipe_fence_handle *fence, - boolean duplicate ); + bool duplicate ); /** * Create a fence using the given file descriptor @@ -803,30 +803,30 @@ struct svga_winsys_screen (*host_log)(struct svga_winsys_screen *sws, const char *message); /** Have VGPU v10 hardware? */ - boolean have_vgpu10; + bool have_vgpu10; /** Have SM4_1 hardware? */ - boolean have_sm4_1; + bool have_sm4_1; /** Have SM5 hardware? */ - boolean have_sm5; + bool have_sm5; /** To rebind resources at the beginning of a new command buffer */ - boolean need_to_rebind_resources; + bool need_to_rebind_resources; - boolean have_generate_mipmap_cmd; - boolean have_set_predication_cmd; - boolean have_transfer_from_buffer_cmd; - boolean have_fence_fd; - boolean have_intra_surface_copy; - boolean have_constant_buffer_offset_cmd; - boolean have_index_vertex_buffer_offset_cmd; + bool have_generate_mipmap_cmd; + bool have_set_predication_cmd; + bool have_transfer_from_buffer_cmd; + bool have_fence_fd; + bool have_intra_surface_copy; + bool have_constant_buffer_offset_cmd; + bool have_index_vertex_buffer_offset_cmd; /* Have rasterizer state v2 command support */ - boolean have_rasterizer_state_v2_cmd; + bool have_rasterizer_state_v2_cmd; /** Have GL43 capable device */ - boolean have_gl43; + bool have_gl43; /** SVGA device_id version we're running on */ uint16_t device_id; diff --git a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c index 55bcdb8e253..89e18735cf5 100644 --- a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c +++ b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c @@ -44,7 +44,7 @@ struct dump_info { uint32 version; - boolean is_ps; + bool is_ps; int indent; }; @@ -273,7 +273,7 @@ static void dump_idata( struct sh_idata idata ) _debug_printf( "%d, %d, %d, %d", idata.xyzw[0], idata.xyzw[1], idata.xyzw[2], idata.xyzw[3] ); } -static void dump_bdata( boolean bdata ) +static void dump_bdata( bool bdata ) { _debug_printf( bdata ? "TRUE" : "FALSE" ); } @@ -533,7 +533,7 @@ dump_inst(struct dump_info *di, const struct sh_opcode_info *info) { struct dump_op dop; - boolean not_first_arg = FALSE; + bool not_first_arg = FALSE; uint i; assert(info->num_dst <= 1); @@ -569,7 +569,7 @@ svga_shader_dump( unsigned dwords, unsigned do_binary ) { - boolean finished = FALSE; + bool finished = FALSE; struct dump_info di; di.version = *assem++; diff --git a/src/gallium/drivers/virgl/virgl_context.h b/src/gallium/drivers/virgl/virgl_context.h index 3b6ee900214..a360afc4cb7 100644 --- a/src/gallium/drivers/virgl/virgl_context.h +++ b/src/gallium/drivers/virgl/virgl_context.h @@ -88,7 +88,7 @@ struct virgl_context { struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS]; unsigned num_vertex_buffers; - boolean vertex_array_dirty; + bool vertex_array_dirty; struct virgl_rasterizer_state rs_state; struct virgl_so_target so_targets[PIPE_MAX_SO_BUFFERS]; diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c index 284c1eb0f77..106a3e4a1b9 100644 --- a/src/gallium/drivers/virgl/virgl_encode.c +++ b/src/gallium/drivers/virgl/virgl_encode.c @@ -1220,7 +1220,7 @@ int virgl_encoder_end_query(struct virgl_context *ctx, } int virgl_encoder_get_query_result(struct virgl_context *ctx, - uint32_t handle, boolean wait) + uint32_t handle, bool wait) { virgl_encoder_write_cmd_dword(ctx, VIRGL_CMD0(VIRGL_CCMD_GET_QUERY_RESULT, 0, 2)); virgl_encoder_write_dword(ctx->cbuf, handle); @@ -1229,7 +1229,7 @@ int virgl_encoder_get_query_result(struct virgl_context *ctx, } int virgl_encoder_render_condition(struct virgl_context *ctx, - uint32_t handle, boolean condition, + uint32_t handle, bool condition, enum pipe_render_cond_flag mode) { virgl_encoder_write_cmd_dword(ctx, VIRGL_CMD0(VIRGL_CCMD_SET_RENDER_CONDITION, 0, VIRGL_RENDER_CONDITION_SIZE)); @@ -1472,7 +1472,7 @@ int virgl_encode_tweak(struct virgl_context *ctx, enum vrend_tweak_type tweak, u int virgl_encode_get_query_result_qbo(struct virgl_context *ctx, uint32_t handle, - struct virgl_resource *res, boolean wait, + struct virgl_resource *res, bool wait, uint32_t result_type, uint32_t offset, uint32_t index) diff --git a/src/gallium/drivers/virgl/virgl_encode.h b/src/gallium/drivers/virgl/virgl_encode.h index 8789a3a811a..94595de3aa6 100644 --- a/src/gallium/drivers/virgl/virgl_encode.h +++ b/src/gallium/drivers/virgl/virgl_encode.h @@ -249,10 +249,10 @@ int virgl_encoder_begin_query(struct virgl_context *ctx, int virgl_encoder_end_query(struct virgl_context *ctx, uint32_t handle); int virgl_encoder_get_query_result(struct virgl_context *ctx, - uint32_t handle, boolean wait); + uint32_t handle, bool wait); int virgl_encoder_render_condition(struct virgl_context *ctx, - uint32_t handle, boolean condition, + uint32_t handle, bool condition, enum pipe_render_cond_flag mode); int virgl_encoder_set_sub_ctx(struct virgl_context *ctx, uint32_t sub_ctx_id); @@ -292,7 +292,7 @@ int virgl_encode_host_debug_flagstring(struct virgl_context *ctx, int virgl_encode_get_query_result_qbo(struct virgl_context *ctx, uint32_t handle, - struct virgl_resource *res, boolean wait, + struct virgl_resource *res, bool wait, uint32_t result_type, uint32_t offset, uint32_t index); diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index 34f860cc5c7..5d4ba3dbc3e 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -754,7 +754,7 @@ virgl_is_format_supported( struct pipe_screen *screen, int i; union virgl_caps *caps = &vscreen->caps.caps; - boolean may_emulate_bgra = (caps->v2.capability_bits & + bool may_emulate_bgra = (caps->v2.capability_bits & VIRGL_CAP_APP_TWEAK_SUPPORT) && vscreen->tweak_gles_emulate_bgra; diff --git a/src/gallium/drivers/virgl/virgl_winsys.h b/src/gallium/drivers/virgl/virgl_winsys.h index 7e43b965962..b68fec72745 100644 --- a/src/gallium/drivers/virgl/virgl_winsys.h +++ b/src/gallium/drivers/virgl/virgl_winsys.h @@ -81,7 +81,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); - boolean (*resource_is_busy)(struct virgl_winsys *vws, + bool (*resource_is_busy)(struct virgl_winsys *vws, struct virgl_hw_res *res); struct virgl_hw_res *(*resource_create_from_handle)(struct virgl_winsys *vws, @@ -100,7 +100,7 @@ struct virgl_winsys { const uint32_t *plane_strides, const uint32_t *plane_offsets); - boolean (*resource_get_handle)(struct virgl_winsys *vws, + bool (*resource_get_handle)(struct virgl_winsys *vws, struct virgl_hw_res *res, uint32_t stride, struct winsys_handle *whandle); @@ -111,11 +111,11 @@ struct virgl_winsys { struct virgl_cmd_buf *(*cmd_buf_create)(struct virgl_winsys *ws, uint32_t size); void (*cmd_buf_destroy)(struct virgl_cmd_buf *buf); - void (*emit_res)(struct virgl_winsys *vws, struct virgl_cmd_buf *buf, struct virgl_hw_res *res, boolean write_buffer); + void (*emit_res)(struct virgl_winsys *vws, struct virgl_cmd_buf *buf, struct virgl_hw_res *res, bool write_buffer); int (*submit_cmd)(struct virgl_winsys *vws, struct virgl_cmd_buf *buf, struct pipe_fence_handle **fence); - boolean (*res_is_referenced)(struct virgl_winsys *vws, + bool (*res_is_referenced)(struct virgl_winsys *vws, struct virgl_cmd_buf *buf, struct virgl_hw_res *res); diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 85731d9b0b4..2cacb9af6e0 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -2411,7 +2411,7 @@ zink_resource_copy_box_intersects(struct zink_resource *res, unsigned level, con return true; struct pipe_box *b = res->obj->copies[level].data; unsigned num_boxes = util_dynarray_num_elements(&res->obj->copies[level], struct pipe_box); - boolean (*intersect)(const struct pipe_box *, const struct pipe_box *); + bool (*intersect)(const struct pipe_box *, const struct pipe_box *); /* determine intersection function based on dimensionality */ switch (res->base.b.target) { case PIPE_BUFFER: diff --git a/src/gallium/frontends/d3d10umd/Draw.cpp b/src/gallium/frontends/d3d10umd/Draw.cpp index bf1b0427508..5bfda0fc30e 100644 --- a/src/gallium/frontends/d3d10umd/Draw.cpp +++ b/src/gallium/frontends/d3d10umd/Draw.cpp @@ -66,7 +66,7 @@ ResolveState(Device *pDevice) pDevice->bound_vs->state.tokens) { Shader *gs = pDevice->bound_empty_gs; Shader *vs = pDevice->bound_vs; - boolean remapped = FALSE; + bool remapped = FALSE; struct pipe_context *pipe = pDevice->pipe; if (!gs->output_resolved) { for (unsigned i = 0; i < gs->state.stream_output.num_outputs; ++i) { diff --git a/src/gallium/frontends/d3d10umd/Query.cpp b/src/gallium/frontends/d3d10umd/Query.cpp index 50e35af0428..a4aea7e0b3c 100644 --- a/src/gallium/frontends/d3d10umd/Query.cpp +++ b/src/gallium/frontends/d3d10umd/Query.cpp @@ -244,12 +244,12 @@ QueryGetData(D3D10DDI_HDEVICE hDevice, // IN return; } - boolean wait = !!(Flags & D3D10_DDI_GET_DATA_DO_NOT_FLUSH); + bool wait = !!(Flags & D3D10_DDI_GET_DATA_DO_NOT_FLUSH); union pipe_query_result result; memset(&result, 0, sizeof result); - boolean ret; + bool ret; if (state) { ret = pipe->get_query_result(pipe, state, wait, &result); @@ -386,7 +386,7 @@ CheckPredicate(Device *pDevice) union pipe_query_result result; memset(&result, 0, sizeof result); - boolean ret; + bool ret; ret = pipe->get_query_result(pipe, query, TRUE, &result); assert(ret == TRUE); if (!ret) { diff --git a/src/gallium/frontends/d3d10umd/Shader.cpp b/src/gallium/frontends/d3d10umd/Shader.cpp index 867f4772305..8e0c6d42308 100644 --- a/src/gallium/frontends/d3d10umd/Shader.cpp +++ b/src/gallium/frontends/d3d10umd/Shader.cpp @@ -842,7 +842,7 @@ CreateGeometryShaderWithStreamOutput( Shader *pShader = CastShader(hShader); int total_components[PIPE_MAX_SO_BUFFERS] = {0}; unsigned num_holes = 0; - boolean all_slot_zero = TRUE; + bool all_slot_zero = TRUE; pShader->type = PIPE_SHADER_GEOMETRY; diff --git a/src/gallium/frontends/d3d10umd/ShaderParse.c b/src/gallium/frontends/d3d10umd/ShaderParse.c index 1995d381880..0c43af5013d 100644 --- a/src/gallium/frontends/d3d10umd/ShaderParse.c +++ b/src/gallium/frontends/d3d10umd/ShaderParse.c @@ -281,14 +281,14 @@ parse_operand_index(const unsigned **curr, } } -boolean +bool Shader_parse_opcode(struct Shader_parser *parser, struct Shader_opcode *opcode) { const unsigned *curr = parser->curr; const struct dx10_opcode_info *info; unsigned length; - boolean opcode_is_extended; + bool opcode_is_extended; unsigned i; if (curr >= parser->code + parser->header.size) { @@ -450,7 +450,7 @@ Shader_parse_opcode(struct Shader_parser *parser, /* Source operands. */ for (i = 0; i < info->num_src; i++) { - boolean extended; + bool extended; D3D10_SB_OPERAND_NUM_COMPONENTS num_components; extended = DECODE_IS_D3D10_SB_OPERAND_EXTENDED(*curr); diff --git a/src/gallium/frontends/d3d10umd/ShaderParse.h b/src/gallium/frontends/d3d10umd/ShaderParse.h index df95536f2b5..a9500ffd062 100644 --- a/src/gallium/frontends/d3d10umd/ShaderParse.h +++ b/src/gallium/frontends/d3d10umd/ShaderParse.h @@ -138,7 +138,7 @@ struct Shader_opcode { D3D10_SB_NAME dcl_siv_name; D3D10_SB_RESOURCE_RETURN_TYPE dcl_resource_ret_type[4]; - boolean saturate; + bool saturate; struct { int u:4; @@ -160,7 +160,7 @@ void Shader_parse_init(struct Shader_parser *parser, const unsigned *code); -boolean +bool Shader_parse_opcode(struct Shader_parser *parser, struct Shader_opcode *opcode); diff --git a/src/gallium/frontends/d3d10umd/ShaderTGSI.c b/src/gallium/frontends/d3d10umd/ShaderTGSI.c index f4ff4b99856..438f6bca49d 100644 --- a/src/gallium/frontends/d3d10umd/ShaderTGSI.c +++ b/src/gallium/frontends/d3d10umd/ShaderTGSI.c @@ -217,10 +217,10 @@ struct Shader_xlate { uint indexable_temp_offsets[SHADER_MAX_INDEXABLE_TEMPS]; struct { - boolean declared; + bool declared; uint writemask; uint siv_name; - boolean overloaded; + bool overloaded; struct ureg_src reg; } inputs[SHADER_MAX_INPUTS]; @@ -815,7 +815,7 @@ translate_indexable_temp(struct Shader_xlate *sx, static struct ureg_dst translate_dst_operand(struct Shader_xlate *sx, const struct Shader_dst_operand *operand, - boolean saturate) + bool saturate) { struct ureg_dst reg; unsigned writemask = @@ -1128,7 +1128,7 @@ texture_dim_from_tgsi_target(unsigned tgsi_target) } } -static boolean +static bool operand_is_scalar(const struct Shader_src_operand *operand) { return operand->swizzle[0] == operand->swizzle[1] && @@ -1247,8 +1247,8 @@ Shader_tgsi_translate(const unsigned *code, struct Shader_opcode opcode; const struct tgsi_token *tokens = NULL; uint nr_tokens; - boolean shader_dumped = FALSE; - boolean inside_sub = FALSE; + bool shader_dumped = FALSE; + bool inside_sub = FALSE; uint i, j; memset(&sx, 0, sizeof sx); diff --git a/src/gallium/frontends/d3d10umd/State.h b/src/gallium/frontends/d3d10umd/State.h index fb90073db3c..3b52c4543b0 100644 --- a/src/gallium/frontends/d3d10umd/State.h +++ b/src/gallium/frontends/d3d10umd/State.h @@ -58,7 +58,7 @@ struct Shader uint type; struct pipe_shader_state state; unsigned output_mapping[PIPE_MAX_SHADER_OUTPUTS]; - boolean output_resolved; + bool output_resolved; }; struct Query; diff --git a/src/gallium/frontends/glx/xlib/glx_api.c b/src/gallium/frontends/glx/xlib/glx_api.c index 63163a8c523..dd10b52302b 100644 --- a/src/gallium/frontends/glx/xlib/glx_api.c +++ b/src/gallium/frontends/glx/xlib/glx_api.c @@ -1176,7 +1176,7 @@ glXMakeContextCurrent( Display *dpy, GLXDrawable draw, { GLXContext glxCtx = ctx; GLXContext current = GetCurrentContext(); - static boolean firsttime = 1, no_rast = 0; + static bool firsttime = 1, no_rast = 0; if (firsttime) { no_rast = getenv("SP_NO_RAST") != NULL; @@ -1420,7 +1420,7 @@ PUBLIC void glXSwapBuffers( Display *dpy, GLXDrawable drawable ) { XMesaBuffer buffer = XMesaFindBuffer( dpy, drawable ); - static boolean firsttime = 1, no_rast = 0; + static bool firsttime = 1, no_rast = 0; if (firsttime) { no_rast = getenv("SP_NO_RAST") != NULL; diff --git a/src/gallium/frontends/glx/xlib/xm_api.c b/src/gallium/frontends/glx/xlib/xm_api.c index 63c5518eae5..7825a7095b9 100644 --- a/src/gallium/frontends/glx/xlib/xm_api.c +++ b/src/gallium/frontends/glx/xlib/xm_api.c @@ -398,7 +398,7 @@ xmesa_get_window_size(Display *dpy, XMesaBuffer b, static GLuint choose_pixel_format(XMesaVisual v) { - boolean native_byte_order = (host_byte_order() == + bool native_byte_order = (host_byte_order() == ImageByteOrder(v->display)); if ( GET_REDMASK(v) == 0x0000ff diff --git a/src/gallium/frontends/hgl/hgl.c b/src/gallium/frontends/hgl/hgl.c index 7fd5745d90f..a8e57d6e770 100644 --- a/src/gallium/frontends/hgl/hgl.c +++ b/src/gallium/frontends/hgl/hgl.c @@ -177,7 +177,7 @@ hgl_st_framebuffer_validate(struct st_context *st, || (buffer->height != buffer->newHeight); if (resized || newMask) { - boolean ret; + bool ret; TRACE("%s: resize event. old: %d x %d; new: %d x %d\n", __func__, buffer->width, buffer->height, buffer->newWidth, buffer->newHeight); diff --git a/src/gallium/frontends/nine/adapter9.c b/src/gallium/frontends/nine/adapter9.c index c95a271af76..7d4ebfd64d4 100644 --- a/src/gallium/frontends/nine/adapter9.c +++ b/src/gallium/frontends/nine/adapter9.c @@ -172,10 +172,10 @@ NineAdapter9_GetAdapterIdentifier( struct NineAdapter9 *This, return D3D_OK; } -static inline boolean +static inline bool backbuffer_format( D3DFORMAT dfmt, D3DFORMAT bfmt, - boolean win ) + bool win ) { if (dfmt == D3DFMT_A2R10G10B10 && win) { return FALSE; } @@ -233,9 +233,9 @@ NineAdapter9_CheckDeviceType( struct NineAdapter9 *This, return D3D_OK; } -static inline boolean +static inline bool display_format( D3DFORMAT fmt, - boolean win ) + bool win ) { /* http://msdn.microsoft.com/en-us/library/bb172558(v=VS.85).aspx#BackBuffer_or_Display_Formats */ static const D3DFORMAT allowed[] = { @@ -254,7 +254,7 @@ display_format( D3DFORMAT fmt, return FALSE; } -static inline boolean +static inline bool adapter_format( D3DFORMAT fmt ) { /* Formats that are compatible to display_format (modulo alpha bits) */ @@ -287,7 +287,7 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This, enum pipe_format pf; enum pipe_texture_target target; unsigned bind = 0; - boolean srgb; + bool srgb; /* Check adapter format. */ diff --git a/src/gallium/frontends/nine/basetexture9.h b/src/gallium/frontends/nine/basetexture9.h index f4902c8313b..6f11e004a07 100644 --- a/src/gallium/frontends/nine/basetexture9.h +++ b/src/gallium/frontends/nine/basetexture9.h @@ -41,18 +41,18 @@ struct NineBaseTexture9 int16_t bind_count; /* to Device9->state.texture */ - boolean shadow; - boolean fetch4_compatible; + bool shadow; + bool fetch4_compatible; uint8_t pstype; /* 0: 2D, 1: 1D, 2: CUBE, 3: 3D */ - boolean dirty_mip; + bool dirty_mip; D3DTEXTUREFILTERTYPE mipfilter; unsigned level_count; /* Specific to managed textures */ struct { - boolean dirty; + bool dirty; DWORD lod; DWORD lod_resident; } managed; diff --git a/src/gallium/frontends/nine/buffer9.h b/src/gallium/frontends/nine/buffer9.h index 7d679700afb..7777f8c5732 100644 --- a/src/gallium/frontends/nine/buffer9.h +++ b/src/gallium/frontends/nine/buffer9.h @@ -58,14 +58,14 @@ struct NineBuffer9 int16_t bind_count; /* to Device9->state.stream */ /* Whether only discard and nooverwrite were used so far * for this buffer. Allows some optimization. */ - boolean discard_nooverwrite_only; - boolean need_sync_if_nooverwrite; + bool discard_nooverwrite_only; + bool need_sync_if_nooverwrite; struct nine_subbuffer *buf; /* Specific to managed buffers */ struct { void *data; - boolean dirty; + bool dirty; struct pipe_box dirty_box; /* region in the resource to update */ struct pipe_box upload_pending_regions; /* region with uploads pending */ struct list_head list; /* for update_buffers */ diff --git a/src/gallium/frontends/nine/device9.c b/src/gallium/frontends/nine/device9.c index b8e2b99f4ad..d33d3f1a5d1 100644 --- a/src/gallium/frontends/nine/device9.c +++ b/src/gallium/frontends/nine/device9.c @@ -132,7 +132,7 @@ nine_resource_create_with_retry( struct NineDevice9 *This, } void -NineDevice9_SetDefaultState( struct NineDevice9 *This, boolean is_reset ) +NineDevice9_SetDefaultState( struct NineDevice9 *This, bool is_reset ) { struct NineSurface9 *refSurf = NULL; @@ -179,7 +179,7 @@ NineDevice9_ctor( struct NineDevice9 *This, IDirect3D9 *pD3D9, ID3DPresentGroup *pPresentationGroup, struct d3dadapter9_context *pCTX, - boolean ex, + bool ex, D3DDISPLAYMODEEX *pFullscreenDisplayMode, int minorVersionNum ) { @@ -1696,9 +1696,9 @@ NineDevice9_StretchRect( struct NineDevice9 *This, struct NineSurface9 *dst = NineSurface9(pDestSurface); struct NineSurface9 *src = NineSurface9(pSourceSurface); struct pipe_resource *dst_res, *src_res; - boolean zs; + bool zs; struct pipe_blit_info blit; - boolean scaled, clamped, ms, flip_x = FALSE, flip_y = FALSE; + bool scaled, clamped, ms, flip_x = FALSE, flip_y = FALSE; DBG("This=%p pSourceSurface=%p pSourceRect=%p pDestSurface=%p " "pDestRect=%p Filter=%u\n", @@ -4318,7 +4318,7 @@ NineDevice9_new( struct pipe_screen *pScreen, IDirect3D9 *pD3D9, ID3DPresentGroup *pPresentationGroup, struct d3dadapter9_context *pCTX, - boolean ex, + bool ex, D3DDISPLAYMODEEX *pFullscreenDisplayMode, struct NineDevice9 **ppOut, int minorVersionNum ) diff --git a/src/gallium/frontends/nine/device9.h b/src/gallium/frontends/nine/device9.h index 8d9ac60bace..69a8eb71c5d 100644 --- a/src/gallium/frontends/nine/device9.h +++ b/src/gallium/frontends/nine/device9.h @@ -49,8 +49,8 @@ struct NineStateBlock9; struct NineDevice9 { struct NineUnknown base; - boolean ex; - boolean may_swvp; + bool ex; + bool may_swvp; /* G3D context */ struct pipe_screen *screen; @@ -88,8 +88,8 @@ struct NineDevice9 struct list_head managed_buffers; struct list_head managed_textures; - boolean is_recording; - boolean in_scene; + bool is_recording; + bool in_scene; unsigned end_scene_since_present; uint16_t vs_const_size; @@ -122,29 +122,29 @@ struct NineDevice9 POINT hotspot; /* -1, -1 if no cursor image set */ POINT pos; BOOL visible; - boolean software; + bool software; void *hw_upload_temp; } cursor; struct { - boolean user_sw_vbufs; - boolean window_space_position_support; - boolean disabling_depth_clipping_support; - boolean vs_integer; - boolean ps_integer; - boolean offset_units_unscaled; - boolean alpha_test_emulation; - boolean always_output_pointsize; - boolean emulate_ucp; - boolean shader_emulate_features; + bool user_sw_vbufs; + bool window_space_position_support; + bool disabling_depth_clipping_support; + bool vs_integer; + bool ps_integer; + bool offset_units_unscaled; + bool alpha_test_emulation; + bool always_output_pointsize; + bool emulate_ucp; + bool shader_emulate_features; } driver_caps; struct { - boolean buggy_barycentrics; + bool buggy_barycentrics; } driver_bugs; struct { - boolean dynamic_texture_workaround; + bool dynamic_texture_workaround; } workarounds; struct u_upload_mgr *vertex_uploader; @@ -164,9 +164,9 @@ struct NineDevice9 long long available_texture_limit; /* software vertex processing */ - boolean swvp; + bool swvp; /* pure device */ - boolean pure; + bool pure; unsigned frame_count; /* It's ok if we overflow */ @@ -188,7 +188,7 @@ NineDevice9_new( struct pipe_screen *pScreen, IDirect3D9 *pD3D9, ID3DPresentGroup *pPresentationGroup, struct d3dadapter9_context *pCTX, - boolean ex, + bool ex, D3DDISPLAYMODEEX *pFullscreenDisplayMode, struct NineDevice9 **ppOut, int minorVersionNum ); @@ -203,7 +203,7 @@ NineDevice9_ctor( struct NineDevice9 *This, IDirect3D9 *pD3D9, ID3DPresentGroup *pPresentationGroup, struct d3dadapter9_context *pCTX, - boolean ex, + bool ex, D3DDISPLAYMODEEX *pFullscreenDisplayMode, int minorVersionNum ); @@ -217,7 +217,7 @@ nine_resource_create_with_retry( struct NineDevice9 *This, const struct pipe_resource *templat ); void -NineDevice9_SetDefaultState( struct NineDevice9 *This, boolean is_reset ); +NineDevice9_SetDefaultState( struct NineDevice9 *This, bool is_reset ); struct pipe_screen * NineDevice9_GetScreen( struct NineDevice9 *This ); diff --git a/src/gallium/frontends/nine/guid.c b/src/gallium/frontends/nine/guid.c index 5e63d2f6629..de1be8d4c3a 100644 --- a/src/gallium/frontends/nine/guid.c +++ b/src/gallium/frontends/nine/guid.c @@ -48,7 +48,7 @@ const GUID IID_IDirect3DVertexShader9 = { 0xEFC5557E, 0x6265, 0x4613, { 0x8A, 0x const GUID IID_IDirect3DVolume9 = { 0x24F416E6, 0x1F67, 0x4AA7, { 0xB8, 0x8E, 0xD3, 0x3F, 0x6F, 0x31, 0x28, 0xA1 } }; const GUID IID_IDirect3DVolumeTexture9 = { 0x2518526C, 0xE789, 0x4111, { 0xA7, 0xB9, 0x47, 0xEF, 0x32, 0x8D, 0x13, 0xE6 } }; -boolean +bool GUID_equal( const GUID *a, const GUID *b ) { diff --git a/src/gallium/frontends/nine/guid.h b/src/gallium/frontends/nine/guid.h index af8f081bfb5..ed616986215 100644 --- a/src/gallium/frontends/nine/guid.h +++ b/src/gallium/frontends/nine/guid.h @@ -29,7 +29,7 @@ extern const GUID IID_ID3D9Adapter; -boolean +bool GUID_equal( const GUID *a, const GUID *b ); diff --git a/src/gallium/frontends/nine/iunknown.h b/src/gallium/frontends/nine/iunknown.h index 20ad191cf44..98e63e87830 100644 --- a/src/gallium/frontends/nine/iunknown.h +++ b/src/gallium/frontends/nine/iunknown.h @@ -47,7 +47,7 @@ struct NineUnknown int32_t refs; /* external reference count */ int32_t bind; /* internal bind count */ - boolean forward; /* whether to forward references to the container */ + bool forward; /* whether to forward references to the container */ /* container: for surfaces and volumes only. * Can be a texture, a volume texture or a swapchain. diff --git a/src/gallium/frontends/nine/nine_debug.c b/src/gallium/frontends/nine/nine_debug.c index f3a6a945025..e61c4b192d9 100644 --- a/src/gallium/frontends/nine/nine_debug.c +++ b/src/gallium/frontends/nine/nine_debug.c @@ -63,7 +63,7 @@ _nine_debug_printf( unsigned long flag, const char *fmt, ... ) { - static boolean first = TRUE; + static bool first = TRUE; static unsigned long dbg_flags = DBG_ERROR | DBG_WARN; unsigned long tid = 0; diff --git a/src/gallium/frontends/nine/nine_debug.h b/src/gallium/frontends/nine/nine_debug.h index c47e81d36b3..8512895abf9 100644 --- a/src/gallium/frontends/nine/nine_debug.h +++ b/src/gallium/frontends/nine/nine_debug.h @@ -38,7 +38,7 @@ _nine_debug_printf( unsigned long flag, #define WARN(fmt, ...) _nine_debug_printf(DBG_WARN, __func__, fmt, ## __VA_ARGS__) #define WARN_ONCE(fmt, ...) \ do { \ - static boolean once = TRUE; \ + static bool once = TRUE; \ if (once) { \ once = FALSE; \ _nine_debug_printf(DBG_WARN, __func__, fmt, ## __VA_ARGS__); \ diff --git a/src/gallium/frontends/nine/nine_ff.c b/src/gallium/frontends/nine/nine_ff.c index 16607f0558a..d2ac4fcb280 100644 --- a/src/gallium/frontends/nine/nine_ff.c +++ b/src/gallium/frontends/nine/nine_ff.c @@ -171,7 +171,7 @@ static bool nine_ff_fvf_key_comp(const void *key1, const void *key2) static void nine_ff_prune_vs(struct NineDevice9 *); static void nine_ff_prune_ps(struct NineDevice9 *); -static void nine_ureg_tgsi_dump(struct ureg_program *ureg, boolean override) +static void nine_ureg_tgsi_dump(struct ureg_program *ureg, bool override) { if (debug_get_bool_option("NINE_FF_DUMP", FALSE) || override) { const struct tgsi_token *toks = ureg_get_tokens(ureg, NULL); @@ -343,9 +343,9 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs) struct ureg_dst AR; unsigned i, c; unsigned label[32], l = 0; - boolean need_aNrm = key->lighting || key->passthrough & (1 << NINE_DECLUSAGE_NORMAL); - boolean has_aNrm; - boolean need_aVtx = key->lighting || key->fog_mode || key->pointscale || key->ucp; + bool need_aNrm = key->lighting || key->passthrough & (1 << NINE_DECLUSAGE_NORMAL); + bool has_aNrm; + bool need_aVtx = key->lighting || key->fog_mode || key->pointscale || key->ucp; const unsigned texcoord_sn = get_texcoord_sn(device->screen); vs->ureg = ureg; @@ -1210,7 +1210,7 @@ static uint8_t ps_d3dtop_args_mask(D3DTEXTUREOP top) } } -static inline boolean +static inline bool is_MOV_no_op(struct ureg_dst dst, struct ureg_src src) { return !dst.WriteMask || @@ -1611,8 +1611,8 @@ nine_ff_get_vs(struct NineDevice9 *device) struct vs_build_ctx bld; struct nine_ff_vs_key key; unsigned s, i; - boolean has_indexes = false; - boolean has_weights = false; + bool has_indexes = false; + bool has_weights = false; int8_t input_texture_coord[8]; assert(sizeof(key) <= sizeof(key.value32)); @@ -2125,7 +2125,7 @@ nine_ff_update(struct NineDevice9 *device) } -boolean +bool nine_ff_init(struct NineDevice9 *device) { device->ff.ht_vs = _mesa_hash_table_create(NULL, nine_ff_vs_key_hash, diff --git a/src/gallium/frontends/nine/nine_ff.h b/src/gallium/frontends/nine/nine_ff.h index 65baabd4ba7..302e9eafc89 100644 --- a/src/gallium/frontends/nine/nine_ff.h +++ b/src/gallium/frontends/nine/nine_ff.h @@ -5,7 +5,7 @@ #include "device9.h" #include "vertexdeclaration9.h" -boolean nine_ff_init(struct NineDevice9 *); +bool nine_ff_init(struct NineDevice9 *); void nine_ff_fini(struct NineDevice9 *); void nine_ff_update(struct NineDevice9 *); diff --git a/src/gallium/frontends/nine/nine_pdata.h b/src/gallium/frontends/nine/nine_pdata.h index 928424f83d6..ffca3a80788 100644 --- a/src/gallium/frontends/nine/nine_pdata.h +++ b/src/gallium/frontends/nine/nine_pdata.h @@ -6,7 +6,7 @@ struct pheader { - boolean unknown; + bool unknown; GUID guid; DWORD size; }; diff --git a/src/gallium/frontends/nine/nine_pipe.h b/src/gallium/frontends/nine/nine_pipe.h index 5c5ad2a5cdd..00c629bd8cc 100644 --- a/src/gallium/frontends/nine/nine_pipe.h +++ b/src/gallium/frontends/nine/nine_pipe.h @@ -98,7 +98,7 @@ fit_rect_format_inclusive(enum pipe_format format, RECT *rect, int width, int he rect->bottom = MIN2(rect->bottom, height); } -static inline boolean +static inline bool rect_to_pipe_box_clamp(struct pipe_box *dst, const RECT *src) { rect_to_pipe_box(dst, src); @@ -112,7 +112,7 @@ rect_to_pipe_box_clamp(struct pipe_box *dst, const RECT *src) return FALSE; } -static inline boolean +static inline bool rect_to_pipe_box_flip(struct pipe_box *dst, const RECT *src) { rect_to_pipe_box(dst, src); @@ -135,7 +135,7 @@ rect_to_pipe_box_xy_only(struct pipe_box *dst, const RECT *src) dst->height = src->bottom - src->top; } -static inline boolean +static inline bool rect_to_pipe_box_xy_only_clamp(struct pipe_box *dst, const RECT *src) { rect_to_pipe_box_xy_only(dst, src); @@ -181,7 +181,7 @@ pipe_to_d3d9_format(enum pipe_format format) return nine_pipe_to_d3d9_format_map[format]; } -static inline boolean +static inline bool fetch4_compatible_format( D3DFORMAT fmt ) { /* Basically formats with only red channel are allowed (with some exceptions) */ @@ -204,7 +204,7 @@ fetch4_compatible_format( D3DFORMAT fmt ) } /* ATI1 and ATI2 are not officially compressed in d3d9 */ -static inline boolean +static inline bool compressed_format( D3DFORMAT fmt ) { switch (fmt) { @@ -220,7 +220,7 @@ compressed_format( D3DFORMAT fmt ) return FALSE; } -static inline boolean +static inline bool depth_stencil_format( D3DFORMAT fmt ) { static const D3DFORMAT allowed[] = { @@ -316,8 +316,8 @@ d3d9_to_pipe_format_checked(struct pipe_screen *screen, enum pipe_texture_target target, unsigned sample_count, unsigned bindings, - boolean srgb, - boolean bypass_check) + bool srgb, + bool bypass_check) { enum pipe_format result; diff --git a/src/gallium/frontends/nine/nine_quirk.c b/src/gallium/frontends/nine/nine_quirk.c index 267436b14de..f439c832b6c 100644 --- a/src/gallium/frontends/nine/nine_quirk.c +++ b/src/gallium/frontends/nine/nine_quirk.c @@ -34,10 +34,10 @@ static const struct debug_named_value nine_quirk_table[] = { DEBUG_NAMED_VALUE_END }; -boolean +bool _nine_get_quirk( unsigned quirk ) { - static boolean first = TRUE; + static bool first = TRUE; static unsigned long flags = 0; if (first) { diff --git a/src/gallium/frontends/nine/nine_quirk.h b/src/gallium/frontends/nine/nine_quirk.h index 9c082dd9f93..f1587fe4a4b 100644 --- a/src/gallium/frontends/nine/nine_quirk.h +++ b/src/gallium/frontends/nine/nine_quirk.h @@ -25,7 +25,7 @@ #include "pipe/p_compiler.h" -boolean +bool _nine_get_quirk( unsigned quirk ); #define QUIRK(q) (_nine_get_quirk(QUIRK_##q)) diff --git a/src/gallium/frontends/nine/nine_shader.c b/src/gallium/frontends/nine/nine_shader.c index 5b2c234a8ff..6691540babf 100644 --- a/src/gallium/frontends/nine/nine_shader.c +++ b/src/gallium/frontends/nine/nine_shader.c @@ -450,15 +450,15 @@ struct shader_translator unsigned num_consti_allowed; unsigned num_constb_allowed; - boolean native_integers; - boolean inline_subroutines; - boolean want_texcoord; - boolean shift_wpos; - boolean wpos_is_sysval; - boolean face_is_sysval_integer; - boolean mul_zero_wins; - boolean always_output_pointsize; - boolean no_vs_window_space; + bool native_integers; + bool inline_subroutines; + bool want_texcoord; + bool shift_wpos; + bool wpos_is_sysval; + bool face_is_sysval_integer; + bool mul_zero_wins; + bool always_output_pointsize; + bool no_vs_window_space; unsigned texcoord_sn; struct sm1_instruction insn; /* current instruction */ @@ -498,8 +498,8 @@ struct shader_translator unsigned cond_depth; unsigned loop_labels[NINE_MAX_LOOP_DEPTH]; unsigned cond_labels[NINE_MAX_COND_DEPTH]; - boolean loop_or_rep[NINE_MAX_LOOP_DEPTH]; /* true: loop, false: rep */ - boolean predicated_activated; + bool loop_or_rep[NINE_MAX_LOOP_DEPTH]; /* true: loop, false: rep */ + bool predicated_activated; unsigned *inst_labels; /* LABEL op */ unsigned num_inst_labels; @@ -513,12 +513,12 @@ struct shader_translator struct sm1_local_const *lconstb; unsigned num_lconstb; - boolean slots_used[NINE_MAX_CONST_ALL_VS]; + bool slots_used[NINE_MAX_CONST_ALL_VS]; unsigned *slot_map; unsigned num_slots; - boolean indirect_const_access; - boolean failure; + bool indirect_const_access; + bool failure; struct nine_vs_output_info output_info[16]; int num_outputs; @@ -663,7 +663,7 @@ static struct ureg_src nine_special_constant_src(struct shader_translator *tx, i return src; } -static boolean +static bool tx_lconstf(struct shader_translator *tx, struct ureg_src *src, INT index) { INT i; @@ -680,7 +680,7 @@ tx_lconstf(struct shader_translator *tx, struct ureg_src *src, INT index) } return FALSE; } -static boolean +static bool tx_lconsti(struct shader_translator *tx, struct ureg_src *src, INT index) { int i; @@ -697,7 +697,7 @@ tx_lconsti(struct shader_translator *tx, struct ureg_src *src, INT index) } return FALSE; } -static boolean +static bool tx_lconstb(struct shader_translator *tx, struct ureg_src *src, INT index) { int i; @@ -898,7 +898,7 @@ TEX_with_ps1x_projection(struct shader_translator *tx, struct ureg_dst dst, { unsigned dim = 1 + ((tx->info->projected >> (2 * idx)) & 3); struct ureg_dst tmp; - boolean shadow = !!(tx->info->sampler_mask_shadow & (1 << idx)); + bool shadow = !!(tx->info->sampler_mask_shadow & (1 << idx)); /* dim == 1: no projection * Looks like must be disabled when it makes no @@ -946,7 +946,7 @@ tx_endloop(struct shader_translator *tx) } static struct ureg_dst -tx_get_loopctr(struct shader_translator *tx, boolean loop_or_rep) +tx_get_loopctr(struct shader_translator *tx, bool loop_or_rep) { const unsigned l = tx->loop_depth - 1; @@ -2092,7 +2092,7 @@ sm1_to_nine_declusage(struct sm1_semantic *dcl) static void sm1_declusage_to_tgsi(struct tgsi_declaration_semantic *sem, - boolean tc, + bool tc, struct sm1_semantic *dcl) { BYTE index = dcl->usage_idx; @@ -2223,7 +2223,7 @@ d3dstt_to_tgsi_tex_shadow(BYTE sampler_type) static inline unsigned ps1x_sampler_type(const struct nine_shader_info *info, unsigned stage) { - boolean shadow = !!(info->sampler_mask_shadow & (1 << stage)); + bool shadow = !!(info->sampler_mask_shadow & (1 << stage)); switch ((info->sampler_ps1xtypes >> (stage * 2)) & 0x3) { case 1: return shadow ? TGSI_TEXTURE_SHADOW1D : TGSI_TEXTURE_1D; case 0: return shadow ? TGSI_TEXTURE_SHADOW2D : TGSI_TEXTURE_2D; @@ -2279,8 +2279,8 @@ nine_tgsi_to_interp_mode(struct tgsi_declaration_semantic *sem) DECL_SPECIAL(DCL) { struct ureg_program *ureg = tx->ureg; - boolean is_input; - boolean is_sampler; + bool is_input; + bool is_sampler; struct tgsi_declaration_semantic tgsi; struct sm1_semantic sem; sm1_read_semantic(tx, &sem); @@ -3316,7 +3316,7 @@ TOKEN_JUMP(struct shader_translator *tx) } } -static inline boolean +static inline bool sm1_parse_eof(struct shader_translator *tx) { return TOKEN_PEEK(tx) == NINED3DSP_END; @@ -3964,11 +3964,11 @@ static const struct debug_named_value nine_shader_debug_options[] = { DEBUG_NAMED_VALUE_END /* must be last */ }; -static inline boolean +static inline bool nine_shader_get_debug_flag(uint64_t flag) { static uint64_t flags = 0; - static boolean first_run = TRUE; + static bool first_run = TRUE; if (unlikely(first_run)) { first_run = FALSE; diff --git a/src/gallium/frontends/nine/nine_shader.h b/src/gallium/frontends/nine/nine_shader.h index 80308465545..489ede9f1ff 100644 --- a/src/gallium/frontends/nine/nine_shader.h +++ b/src/gallium/frontends/nine/nine_shader.h @@ -58,8 +58,8 @@ struct nine_shader_info uint16_t input_map[PIPE_MAX_ATTRIBS]; /* VS input -> NINE_DECLUSAGE_x */ uint8_t num_inputs; /* there may be unused inputs (NINE_DECLUSAGE_NONE) */ - boolean position_t; /* out, true if VP writes pre-transformed position */ - boolean point_size; /* out, true if VP writes point size */ + bool position_t; /* out, true if VP writes pre-transformed position */ + bool point_size; /* out, true if VP writes point size */ float point_size_min; float point_size_max; @@ -77,14 +77,14 @@ struct nine_shader_info uint16_t fetch4; uint8_t alpha_test_emulation; uint8_t clip_plane_emulation; - boolean emulate_features; + bool emulate_features; unsigned const_i_base; /* in vec4 (16 byte) units */ unsigned const_b_base; /* in vec4 (16 byte) units */ unsigned const_used_size; - boolean int_slots_used[NINE_MAX_CONST_I]; - boolean bool_slots_used[NINE_MAX_CONST_B]; + bool int_slots_used[NINE_MAX_CONST_I]; + bool bool_slots_used[NINE_MAX_CONST_B]; unsigned const_float_slots; unsigned const_int_slots; @@ -97,13 +97,13 @@ struct nine_shader_info struct { struct nine_shader_constant_combination* c_combination; - boolean (*int_const_added)[NINE_MAX_CONST_I]; - boolean (*bool_const_added)[NINE_MAX_CONST_B]; + bool (*int_const_added)[NINE_MAX_CONST_I]; + bool (*bool_const_added)[NINE_MAX_CONST_B]; } add_constants_defs; - boolean swvp_on; + bool swvp_on; - boolean process_vertices; + bool process_vertices; struct NineVertexDeclaration9 *vdecl_out; struct pipe_stream_output_info so; }; @@ -152,7 +152,7 @@ nine_shader_variant_get(struct nine_shader_variant *list, return NULL; } -static inline boolean +static inline bool nine_shader_variant_add(struct nine_shader_variant *list, uint64_t key, void *cso, unsigned *const_ranges, @@ -205,7 +205,7 @@ nine_shader_variant_so_get(struct nine_shader_variant_so *list, return NULL; } -static inline boolean +static inline bool nine_shader_variant_so_add(struct nine_shader_variant_so *list, struct NineVertexDeclaration9 *vdecl, struct pipe_stream_output_info *so, void *cso) @@ -255,14 +255,14 @@ struct nine_shader_constant_combination static inline uint8_t nine_shader_constant_combination_key(struct nine_shader_constant_combination **list, - boolean *int_slots_used, - boolean *bool_slots_used, + bool *int_slots_used, + bool *bool_slots_used, int *const_i, BOOL *const_b) { int i; uint8_t index = 0; - boolean match; + bool match; struct nine_shader_constant_combination **next_allocate = list, *current = *list; assert(int_slots_used); diff --git a/src/gallium/frontends/nine/nine_state.c b/src/gallium/frontends/nine/nine_state.c index 6d49bdccf17..475477afa69 100644 --- a/src/gallium/frontends/nine/nine_state.c +++ b/src/gallium/frontends/nine/nine_state.c @@ -977,10 +977,10 @@ update_vertex_buffers(struct NineDevice9 *device) context->changed.vtxbuf = 0; } -static inline boolean +static inline bool update_sampler_derived(struct nine_context *context, unsigned s) { - boolean changed = FALSE; + bool changed = FALSE; if (context->samp[s][NINED3DSAMP_SHADOW] != context->texture[s].shadow) { changed = TRUE; @@ -1017,7 +1017,7 @@ update_textures_and_samplers(struct NineDevice9 *device) struct pipe_context *pipe = context->pipe; struct pipe_sampler_view *view[NINE_MAX_SAMPLERS]; unsigned num_textures = 0; - boolean commit_samplers; + bool commit_samplers; uint16_t sampler_mask = context->ps ? context->ps->sampler_mask : device->ff.ps->sampler_mask; @@ -2067,7 +2067,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_clip_plane, } CSMT_ITEM_NO_WAIT(nine_context_set_swvp, - ARG_VAL(boolean, swvp)) + ARG_VAL(bool, swvp)) { struct nine_context *context = &device->context; @@ -2701,13 +2701,13 @@ CSMT_ITEM_NO_WAIT_WITH_COUNTER(nine_context_end_query, (void) context->pipe->end_query(context->pipe, query); } -boolean +bool nine_context_get_query_result(struct NineDevice9 *device, struct pipe_query *query, - unsigned *counter, boolean flush, boolean wait, + unsigned *counter, bool flush, bool wait, union pipe_query_result *result) { struct pipe_context *pipe; - boolean ret; + bool ret; if (wait) nine_csmt_process(device); @@ -2910,7 +2910,7 @@ void nine_state_restore_non_cso(struct NineDevice9 *device) void nine_state_set_defaults(struct NineDevice9 *device, const D3DCAPS9 *caps, - boolean is_reset) + bool is_reset) { struct nine_state *state = &device->state; struct nine_context *context = &device->context; @@ -3642,7 +3642,7 @@ nine_state_resize_transform(struct nine_ff_state *ff_state, unsigned N) D3DMATRIX * nine_state_access_transform(struct nine_ff_state *ff_state, D3DTRANSFORMSTATETYPE t, - boolean alloc) + bool alloc) { unsigned index; diff --git a/src/gallium/frontends/nine/nine_state.h b/src/gallium/frontends/nine/nine_state.h index 6a4b7d44f81..b1fc90ed0e4 100644 --- a/src/gallium/frontends/nine/nine_state.h +++ b/src/gallium/frontends/nine/nine_state.h @@ -318,14 +318,14 @@ struct nine_context { uint16_t enabled_samplers_mask_ps; int dummy_vbo_bound_at; /* -1 = not bound , >= 0 = bound index */ - boolean vbo_bound_done; + bool vbo_bound_done; - boolean inline_constants; + bool inline_constants; struct nine_ff_state ff; /* software vertex processing */ - boolean swvp; + bool swvp; uint32_t commit; struct { @@ -514,7 +514,7 @@ nine_context_set_clip_plane(struct NineDevice9 *device, void nine_context_set_swvp(struct NineDevice9 *device, - boolean swvp); + bool swvp); void nine_context_apply_stateblock(struct NineDevice9 *device, @@ -620,9 +620,9 @@ nine_context_begin_query(struct NineDevice9 *device, unsigned *counter, struct p void nine_context_end_query(struct NineDevice9 *device, unsigned *counter, struct pipe_query *query); -boolean +bool nine_context_get_query_result(struct NineDevice9 *device, struct pipe_query *query, - unsigned *counter, boolean flush, boolean wait, + unsigned *counter, bool flush, bool wait, union pipe_query_result *result); void @@ -630,7 +630,7 @@ nine_context_pipe_flush(struct NineDevice9 *device); void nine_state_restore_non_cso(struct NineDevice9 *device); void nine_state_set_defaults(struct NineDevice9 *, const D3DCAPS9 *, - boolean is_reset); + bool is_reset); void nine_device_state_clear(struct NineDevice9 *); void nine_context_clear(struct NineDevice9 *); void nine_context_update_state(struct NineDevice9 *); @@ -652,7 +652,7 @@ nine_state_resize_transform(struct nine_ff_state *ff_state, unsigned N); */ D3DMATRIX * nine_state_access_transform(struct nine_ff_state *, D3DTRANSFORMSTATETYPE, - boolean alloc); + bool alloc); HRESULT nine_state_set_light(struct nine_ff_state *, DWORD, const D3DLIGHT9 *); diff --git a/src/gallium/frontends/nine/pixelshader9.h b/src/gallium/frontends/nine/pixelshader9.h index 7388342f1d5..daf74ff41da 100644 --- a/src/gallium/frontends/nine/pixelshader9.h +++ b/src/gallium/frontends/nine/pixelshader9.h @@ -47,8 +47,8 @@ struct NinePixelShader9 uint16_t sampler_mask; uint8_t rt_mask; - boolean int_slots_used[NINE_MAX_CONST_I]; - boolean bool_slots_used[NINE_MAX_CONST_B]; + bool int_slots_used[NINE_MAX_CONST_I]; + bool bool_slots_used[NINE_MAX_CONST_B]; unsigned const_int_slots; unsigned const_bool_slots; diff --git a/src/gallium/frontends/nine/query9.c b/src/gallium/frontends/nine/query9.c index d98db9eba7e..8058c6d577c 100644 --- a/src/gallium/frontends/nine/query9.c +++ b/src/gallium/frontends/nine/query9.c @@ -206,7 +206,7 @@ NineQuery9_GetData( struct NineQuery9 *This, DWORD dwGetDataFlags ) { struct NineDevice9 *device = This->base.device; - boolean ok, wait_query_result = FALSE; + bool ok, wait_query_result = FALSE; union pipe_query_result presult; union nine_query_result nresult; diff --git a/src/gallium/frontends/nine/query9.h b/src/gallium/frontends/nine/query9.h index cc6c717390d..50188d448da 100644 --- a/src/gallium/frontends/nine/query9.h +++ b/src/gallium/frontends/nine/query9.h @@ -39,7 +39,7 @@ struct NineQuery9 DWORD result_size; D3DQUERYTYPE type; enum nine_query_state state; - boolean instant; /* true if D3DISSUE_BEGIN is not needed / invalid */ + bool instant; /* true if D3DISSUE_BEGIN is not needed / invalid */ unsigned counter; /* Number of pending Begin/End (0 if internal multithreading off) */ }; static inline struct NineQuery9 * diff --git a/src/gallium/frontends/nine/stateblock9.c b/src/gallium/frontends/nine/stateblock9.c index c7bdc86e9d0..b708c9dfa32 100644 --- a/src/gallium/frontends/nine/stateblock9.c +++ b/src/gallium/frontends/nine/stateblock9.c @@ -109,7 +109,7 @@ NineStateBlock9_dtor( struct NineStateBlock9 *This ) static void NineStateBlock9_BindBuffer( struct NineDevice9 *device, - boolean applyToDevice, + bool applyToDevice, struct NineBuffer9 **slot, struct NineBuffer9 *buf ) { @@ -121,7 +121,7 @@ NineStateBlock9_BindBuffer( struct NineDevice9 *device, static void NineStateBlock9_BindTexture( struct NineDevice9 *device, - boolean applyToDevice, + bool applyToDevice, struct NineBaseTexture9 **slot, struct NineBaseTexture9 *tex ) { @@ -140,7 +140,7 @@ nine_state_copy_common(struct NineDevice9 *device, struct nine_state *dst, struct nine_state *src, struct nine_state *mask, /* aliases either src or dst */ - const boolean apply, + const bool apply, struct nine_range_pool *pool) { unsigned i, s; @@ -391,7 +391,7 @@ nine_state_copy_common_all(struct NineDevice9 *device, struct nine_state *dst, struct nine_state *src, struct nine_state *help, - const boolean apply, + const bool apply, struct nine_range_pool *pool, const int MaxStreams) { diff --git a/src/gallium/frontends/nine/surface9.h b/src/gallium/frontends/nine/surface9.h index 9dc6576d546..a88ad8d8612 100644 --- a/src/gallium/frontends/nine/surface9.h +++ b/src/gallium/frontends/nine/surface9.h @@ -134,7 +134,7 @@ void NineSurface9_CopyDefaultToMem( struct NineSurface9 *This, struct NineSurface9 *From ); -static inline boolean +static inline bool NineSurface9_IsOffscreenPlain (struct NineSurface9 *This ) { return This->base.usage == 0 && !This->texture; diff --git a/src/gallium/frontends/nine/vertexdeclaration9.c b/src/gallium/frontends/nine/vertexdeclaration9.c index 602c2f3ad4b..5f6bccb7af7 100644 --- a/src/gallium/frontends/nine/vertexdeclaration9.c +++ b/src/gallium/frontends/nine/vertexdeclaration9.c @@ -90,7 +90,7 @@ static inline unsigned decltype_size(BYTE type) * simple lookup table won't work in that case. Let's just wait * with making this more generic until we need it. */ -static inline boolean +static inline bool nine_d3ddeclusage_check(unsigned usage, unsigned usage_idx) { switch (usage) { diff --git a/src/gallium/frontends/nine/vertexshader9.h b/src/gallium/frontends/nine/vertexshader9.h index 8642df0c716..f109a06f6cc 100644 --- a/src/gallium/frontends/nine/vertexshader9.h +++ b/src/gallium/frontends/nine/vertexshader9.h @@ -51,14 +51,14 @@ struct NineVertexShader9 uint8_t sampler_mask; - boolean position_t; /* if true, disable vport transform */ - boolean point_size; /* if true, set rasterizer.point_size_per_vertex to 1 */ - boolean swvp_only; + bool position_t; /* if true, disable vport transform */ + bool point_size; /* if true, set rasterizer.point_size_per_vertex to 1 */ + bool swvp_only; struct nine_lconstf lconstf; - boolean int_slots_used[NINE_MAX_CONST_I]; - boolean bool_slots_used[NINE_MAX_CONST_B]; + bool int_slots_used[NINE_MAX_CONST_I]; + bool bool_slots_used[NINE_MAX_CONST_B]; unsigned const_int_slots; unsigned const_bool_slots; diff --git a/src/gallium/frontends/osmesa/osmesa.c b/src/gallium/frontends/osmesa/osmesa.c index b215889f347..2b84308804a 100644 --- a/src/gallium/frontends/osmesa/osmesa.c +++ b/src/gallium/frontends/osmesa/osmesa.c @@ -99,7 +99,7 @@ struct osmesa_context { struct st_context *st; - boolean ever_used; /*< Has this context ever been current? */ + bool ever_used; /*< Has this context ever been current? */ struct osmesa_buffer *current_buffer; @@ -782,7 +782,7 @@ OSMesaMakeCurrent(OSMesaContext osmesa, void *buffer, GLenum type, if (!osmesa->ever_used) { /* one-time init, just postprocessing for now */ - boolean any_pp_enabled = FALSE; + bool any_pp_enabled = FALSE; unsigned i; for (i = 0; i < ARRAY_SIZE(osmesa->pp_enabled); i++) { diff --git a/src/gallium/frontends/vdpau/ftab.c b/src/gallium/frontends/vdpau/ftab.c index 31786229bc5..a4e234594a0 100644 --- a/src/gallium/frontends/vdpau/ftab.c +++ b/src/gallium/frontends/vdpau/ftab.c @@ -115,7 +115,7 @@ static void* ftab_driver[4] = &vlVdpOutputSurfaceDMABuf /* VDP_FUNC_ID_OUTPUT_SURFACE_DMA_BUF */ }; -boolean vlGetFuncFTAB(VdpFuncId function_id, void **func) +bool vlGetFuncFTAB(VdpFuncId function_id, void **func) { assert(func); *func = NULL; diff --git a/src/gallium/frontends/vdpau/htab.c b/src/gallium/frontends/vdpau/htab.c index f55fa471a4e..9bd27912bfa 100644 --- a/src/gallium/frontends/vdpau/htab.c +++ b/src/gallium/frontends/vdpau/htab.c @@ -33,9 +33,9 @@ static struct handle_table *htab = NULL; static simple_mtx_t htab_lock = SIMPLE_MTX_INITIALIZER; -boolean vlCreateHTAB(void) +bool vlCreateHTAB(void) { - boolean ret; + bool ret; /* Make sure handle table handles match VDPAU handles. */ assert(sizeof(unsigned) <= sizeof(vlHandle)); diff --git a/src/gallium/frontends/vdpau/vdpau_private.h b/src/gallium/frontends/vdpau/vdpau_private.h index 1f68e5d5af1..5bbb63b2cc6 100644 --- a/src/gallium/frontends/vdpau/vdpau_private.h +++ b/src/gallium/frontends/vdpau/vdpau_private.h @@ -473,13 +473,13 @@ typedef struct typedef uint32_t vlHandle; -boolean vlCreateHTAB(void); +bool vlCreateHTAB(void); void vlDestroyHTAB(void); vlHandle vlAddDataHTAB(void *data); void* vlGetDataHTAB(vlHandle handle); void vlRemoveDataHTAB(vlHandle handle); -boolean vlGetFuncFTAB(VdpFuncId function_id, void **func); +bool vlGetFuncFTAB(VdpFuncId function_id, void **func); /* Public functions */ VdpDeviceCreateX11 vdp_imp_device_create_x11; diff --git a/src/gallium/frontends/wgl/stw_device.c b/src/gallium/frontends/wgl/stw_device.c index ecbf08f8fef..9cbd6c1ae75 100644 --- a/src/gallium/frontends/wgl/stw_device.c +++ b/src/gallium/frontends/wgl/stw_device.c @@ -129,7 +129,7 @@ stw_get_config_xml(void) return driGetOptionsXml(gallium_driconf, ARRAY_SIZE(gallium_driconf)); } -boolean +bool stw_init(const struct stw_winsys *stw_winsys) { static struct stw_device stw_dev_storage; @@ -179,7 +179,7 @@ error1: return FALSE; } -boolean +bool stw_init_screen(HDC hdc) { EnterCriticalSection(&stw_dev->screen_mutex); @@ -204,7 +204,7 @@ stw_get_device(void) return stw_dev; } -boolean +bool stw_init_thread(void) { return stw_tls_init_thread(); diff --git a/src/gallium/frontends/wgl/stw_device.h b/src/gallium/frontends/wgl/stw_device.h index 49d5a80dc2c..385f9c32eb3 100644 --- a/src/gallium/frontends/wgl/stw_device.h +++ b/src/gallium/frontends/wgl/stw_device.h @@ -96,7 +96,7 @@ struct stw_device extern struct stw_device *stw_dev; -boolean +bool stw_init_screen(HDC hdc); struct stw_device * diff --git a/src/gallium/frontends/wgl/stw_ext_pbuffer.c b/src/gallium/frontends/wgl/stw_ext_pbuffer.c index e1db194452f..f3bb5f16cdf 100644 --- a/src/gallium/frontends/wgl/stw_ext_pbuffer.c +++ b/src/gallium/frontends/wgl/stw_ext_pbuffer.c @@ -70,7 +70,7 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) struct stw_framebuffer * stw_pbuffer_create(const struct stw_pixelformat_info *pfi, int iWidth, int iHeight, struct pipe_frontend_screen *fscreen) { - static boolean first = TRUE; + static bool first = TRUE; /* * Implement pbuffers through invisible windows diff --git a/src/gallium/frontends/wgl/stw_ext_pixelformat.c b/src/gallium/frontends/wgl/stw_ext_pixelformat.c index aee39b2974f..97d4223cd2d 100644 --- a/src/gallium/frontends/wgl/stw_ext_pixelformat.c +++ b/src/gallium/frontends/wgl/stw_ext_pixelformat.c @@ -48,7 +48,7 @@ #include "stw_pixelformat.h" -static boolean +static bool stw_query_attrib(HDC hdc, int iPixelFormat, int iLayerPlane, int attrib, int *pvalue) { uint count; @@ -442,7 +442,7 @@ wglChoosePixelFormatARB(HDC hdc, const int *piAttribIList, */ if (count > 1) { uint n = count; - boolean swapped; + bool swapped; do { swapped = FALSE; diff --git a/src/gallium/frontends/wgl/stw_ext_rendertexture.c b/src/gallium/frontends/wgl/stw_ext_rendertexture.c index 10d0b285f02..f99edb1d971 100644 --- a/src/gallium/frontends/wgl/stw_ext_rendertexture.c +++ b/src/gallium/frontends/wgl/stw_ext_rendertexture.c @@ -107,7 +107,7 @@ wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuffer) struct stw_context *curctx = stw_current_context(); struct stw_framebuffer *fb, *old_fb, *old_fbRead; GLenum texFormat, srcBuffer, target; - boolean retVal; + bool retVal; const struct stw_pixelformat_info *pfiSave; /* diff --git a/src/gallium/frontends/wgl/stw_framebuffer.c b/src/gallium/frontends/wgl/stw_framebuffer.c index 474fc55bd29..b1b21f57797 100644 --- a/src/gallium/frontends/wgl/stw_framebuffer.c +++ b/src/gallium/frontends/wgl/stw_framebuffer.c @@ -534,7 +534,7 @@ DrvSetPixelFormat(HDC hdc, LONG iPixelFormat) * SetPixelFormat must be called only once. However ignore * pbuffers, for which the framebuffer object is created first. */ - boolean bPbuffer = fb->owner == STW_FRAMEBUFFER_PBUFFER; + bool bPbuffer = fb->owner == STW_FRAMEBUFFER_PBUFFER; stw_framebuffer_unlock( fb ); diff --git a/src/gallium/frontends/wgl/stw_framebuffer.h b/src/gallium/frontends/wgl/stw_framebuffer.h index 0a5e7b0f009..01ec4ee72d4 100644 --- a/src/gallium/frontends/wgl/stw_framebuffer.h +++ b/src/gallium/frontends/wgl/stw_framebuffer.h @@ -100,9 +100,9 @@ struct stw_framebuffer /* FIXME: Make this work for multiple contexts bound to the same framebuffer */ - boolean must_resize; + bool must_resize; - boolean minimized; /**< Is the window currently minimized? */ + bool minimized; /**< Is the window currently minimized? */ unsigned width; unsigned height; @@ -111,7 +111,7 @@ struct stw_framebuffer unsigned textureFormat; /**< WGL_NO_TEXTURE or WGL_TEXTURE_RGB[A]_ARB */ unsigned textureTarget; /**< WGL_NO_TEXTURE or WGL_TEXTURE_1D/2D/ CUBE_MAP_ARB */ - boolean textureMipmap; /**< TRUE/FALSE */ + bool textureMipmap; /**< TRUE/FALSE */ /** WGL_ARB_render_texture - set with wglSetPbufferAttribARB() */ unsigned textureLevel; unsigned textureFace; /**< [0..6] */ diff --git a/src/gallium/frontends/wgl/stw_pixelformat.c b/src/gallium/frontends/wgl/stw_pixelformat.c index 73073e636e4..01a2d9cf93d 100644 --- a/src/gallium/frontends/wgl/stw_pixelformat.c +++ b/src/gallium/frontends/wgl/stw_pixelformat.c @@ -108,7 +108,7 @@ stw_pf_depth_stencil[] = { }; -static const boolean +static const bool stw_pf_doublebuffer[] = { FALSE, TRUE, @@ -133,12 +133,12 @@ stw_pf_multisample[] = { static void stw_pixelformat_add(struct stw_device *stw_dev, - boolean extended, + bool extended, const struct stw_pf_color_info *color, const struct stw_pf_depth_info *depth, unsigned accum, - boolean doublebuffer, - boolean gdi, + bool doublebuffer, + bool gdi, unsigned samples) { struct stw_pixelformat_info *pfi; @@ -238,7 +238,7 @@ stw_pixelformat_add(struct stw_device *stw_dev, */ static unsigned add_color_format_variants(const struct stw_pf_color_info *color_formats, - unsigned num_color_formats, boolean extended) + unsigned num_color_formats, bool extended) { struct pipe_screen *screen = stw_dev->screen; unsigned cfmt, ms, db, ds, acc, f; diff --git a/src/gallium/frontends/wgl/stw_pixelformat.h b/src/gallium/frontends/wgl/stw_pixelformat.h index d7a0d4c38d3..a53a6b61074 100644 --- a/src/gallium/frontends/wgl/stw_pixelformat.h +++ b/src/gallium/frontends/wgl/stw_pixelformat.h @@ -49,8 +49,8 @@ struct stw_pixelformat_info struct st_visual stvis; /** WGL_ARB_render_texture */ - boolean bindToTextureRGB; - boolean bindToTextureRGBA; + bool bindToTextureRGB; + bool bindToTextureRGBA; int iPixelFormat; }; diff --git a/src/gallium/frontends/wgl/stw_tls.c b/src/gallium/frontends/wgl/stw_tls.c index 29a588366ec..d0a71b502c7 100644 --- a/src/gallium/frontends/wgl/stw_tls.c +++ b/src/gallium/frontends/wgl/stw_tls.c @@ -57,7 +57,7 @@ static struct stw_tls_data * stw_tls_lookup_pending_data(DWORD dwThreadId); -boolean +bool stw_tls_init(void) { tlsIndex = TlsAlloc(); @@ -175,7 +175,7 @@ stw_tls_data_destroy(struct stw_tls_data *data) free(data); } -boolean +bool stw_tls_init_thread(void) { struct stw_tls_data *data; diff --git a/src/gallium/frontends/wgl/stw_tls.h b/src/gallium/frontends/wgl/stw_tls.h index 07cfe3168d9..970ac4caf89 100644 --- a/src/gallium/frontends/wgl/stw_tls.h +++ b/src/gallium/frontends/wgl/stw_tls.h @@ -39,10 +39,10 @@ struct stw_tls_data struct stw_tls_data *next; }; -boolean +bool stw_tls_init(void); -boolean +bool stw_tls_init_thread(void); void diff --git a/src/gallium/frontends/wgl/stw_winsys.h b/src/gallium/frontends/wgl/stw_winsys.h index e46137d3cbb..1e84675be6a 100644 --- a/src/gallium/frontends/wgl/stw_winsys.h +++ b/src/gallium/frontends/wgl/stw_winsys.h @@ -51,7 +51,7 @@ struct stw_winsys_framebuffer (*destroy)(struct stw_winsys_framebuffer *fb, struct pipe_context *context); - boolean + bool (*present)(struct stw_winsys_framebuffer *fb, int interval); @@ -85,7 +85,7 @@ struct stw_winsys * * @sa GLCBPRESENTBUFFERSDATA::AdapterLuid; */ - boolean + bool (*get_adapter_luid)( struct pipe_screen *screen, HDC hDC, LUID *pAdapterLuid ); @@ -142,10 +142,10 @@ struct stw_winsys (*get_name)(void); }; -boolean +bool stw_init(const struct stw_winsys *stw_winsys); -boolean +bool stw_init_thread(void); void diff --git a/src/gallium/frontends/xa/xa_composite.c b/src/gallium/frontends/xa/xa_composite.c index fde8abce462..9761ee383a2 100644 --- a/src/gallium/frontends/xa/xa_composite.c +++ b/src/gallium/frontends/xa/xa_composite.c @@ -99,7 +99,7 @@ xa_convert_blend_for_luminance(unsigned factor) return factor; } -static boolean +static bool blend_for_op(struct xa_composite_blend *blend, enum xa_composite_op op, struct xa_picture *src_pic, @@ -109,7 +109,7 @@ blend_for_op(struct xa_composite_blend *blend, const int num_blends = sizeof(xa_blends)/sizeof(struct xa_composite_blend); int i; - boolean supported = FALSE; + bool supported = FALSE; /* * our default in case something goes wrong @@ -173,7 +173,7 @@ xa_repeat_to_gallium(int mode) return PIPE_TEX_WRAP_REPEAT; } -static inline boolean +static inline bool xa_filter_to_gallium(int xrender_filter, int *out_filter) { @@ -208,7 +208,7 @@ xa_is_filter_accelerated(struct xa_picture *pic) * * \returns TRUE if accelerated, FALSE otherwise. */ -static boolean +static bool xa_src_pict_is_accelerated(const union xa_source_pict *src_pic) { if (!src_pic) @@ -276,8 +276,8 @@ static unsigned int picture_format_fixups(struct xa_picture *src_pic, int mask) { - boolean set_alpha = FALSE; - boolean swizzle = FALSE; + bool set_alpha = FALSE; + bool swizzle = FALSE; unsigned ret = 0; struct xa_surface *src = src_pic->srf; enum xa_formats src_hw_format, src_pic_format; @@ -343,10 +343,10 @@ xa_src_in_mask(float src[4], const float mask[4]) * to upload the solid color and also the solid color itself used as an input * to the fragment shader. */ -static boolean +static bool xa_handle_src_pict(struct xa_context *ctx, const union xa_source_pict *src_pict, - boolean is_mask) + bool is_mask) { float solid_color[4]; diff --git a/src/gallium/frontends/xa/xa_context.c b/src/gallium/frontends/xa/xa_context.c index 9601e6d7f6a..ab6b77d0b40 100644 --- a/src/gallium/frontends/xa/xa_context.c +++ b/src/gallium/frontends/xa/xa_context.c @@ -383,7 +383,7 @@ xa_fence_wait(struct xa_fence *fence, uint64_t timeout) if (fence->pipe_fence) { struct pipe_screen *screen = fence->xa->screen; - boolean timed_out; + bool timed_out; timed_out = !screen->fence_finish(screen, NULL, fence->pipe_fence, timeout); if (timed_out) diff --git a/src/gallium/frontends/xa/xa_renderer.c b/src/gallium/frontends/xa/xa_renderer.c index fd6654bab75..99ddd32c51a 100644 --- a/src/gallium/frontends/xa/xa_renderer.c +++ b/src/gallium/frontends/xa/xa_renderer.c @@ -45,7 +45,7 @@ void renderer_set_constants(struct xa_context *r, int shader_type, const float *params, int param_bytes); -static inline boolean +static inline bool is_affine(const float *matrix) { return floatIsZero(matrix[2]) && floatIsZero(matrix[5]) diff --git a/src/gallium/frontends/xa/xa_tgsi.c b/src/gallium/frontends/xa/xa_tgsi.c index 48d7599583a..04c26cbd33d 100644 --- a/src/gallium/frontends/xa/xa_tgsi.c +++ b/src/gallium/frontends/xa/xa_tgsi.c @@ -108,7 +108,7 @@ src_in_mask(struct ureg_program *ureg, struct ureg_dst dst, struct ureg_src src, struct ureg_src mask, - unsigned mask_luminance, boolean component_alpha) + unsigned mask_luminance, bool component_alpha) { if (mask_luminance) if (component_alpha) { @@ -145,11 +145,11 @@ create_vs(struct pipe_context *pipe, unsigned vs_traits) struct ureg_src src; struct ureg_dst dst; struct ureg_src const0, const1; - boolean is_composite = (vs_traits & VS_COMPOSITE) != 0; - boolean has_mask = (vs_traits & VS_MASK) != 0; - boolean is_yuv = (vs_traits & VS_YUV) != 0; - boolean is_src_src = (vs_traits & VS_SRC_SRC) != 0; - boolean is_mask_src = (vs_traits & VS_MASK_SRC) != 0; + bool is_composite = (vs_traits & VS_COMPOSITE) != 0; + bool has_mask = (vs_traits & VS_MASK) != 0; + bool is_yuv = (vs_traits & VS_YUV) != 0; + bool is_src_src = (vs_traits & VS_SRC_SRC) != 0; + bool is_mask_src = (vs_traits & VS_MASK_SRC) != 0; unsigned input_slot = 0; ureg = ureg_create(PIPE_SHADER_VERTEX); @@ -259,7 +259,7 @@ xrender_tex(struct ureg_program *ureg, struct ureg_src coords, struct ureg_src sampler, const struct ureg_src *imm0, - boolean repeat_none, boolean swizzle, boolean set_alpha) + bool repeat_none, bool swizzle, bool set_alpha) { if (repeat_none) { struct ureg_dst tmp0 = ureg_DECL_temporary(ureg); @@ -315,8 +315,8 @@ static void read_input(struct ureg_program *ureg, struct ureg_dst dst, const struct ureg_src *imm0, - boolean repeat_none, boolean swizzle, boolean set_alpha, - boolean is_src, unsigned *cur_constant, unsigned *cur_sampler) + bool repeat_none, bool swizzle, bool set_alpha, + bool is_src, unsigned *cur_constant, unsigned *cur_sampler) { struct ureg_src input, sampler; @@ -356,7 +356,7 @@ create_fs(struct pipe_context *pipe, unsigned fs_traits) unsigned dst_luminance = (fs_traits & FS_DST_LUMINANCE) != 0; unsigned is_src_src = (fs_traits & FS_SRC_SRC) != 0; unsigned is_mask_src = (fs_traits & FS_MASK_SRC) != 0; - boolean component_alpha = (fs_traits & FS_CA) != 0; + bool component_alpha = (fs_traits & FS_CA) != 0; unsigned cur_sampler = 0; unsigned cur_constant = 0; diff --git a/src/gallium/frontends/xa/xa_tracker.c b/src/gallium/frontends/xa/xa_tracker.c index 70c565982f3..ad798740531 100644 --- a/src/gallium/frontends/xa/xa_tracker.c +++ b/src/gallium/frontends/xa/xa_tracker.c @@ -555,7 +555,7 @@ xa_surface_handle(struct xa_surface *srf, struct winsys_handle whandle; struct pipe_screen *screen = srf->xa->screen; - boolean res; + bool res; memset(&whandle, 0, sizeof(whandle)); whandle.type = handle_type(type); diff --git a/src/gallium/targets/wgl/wgl.c b/src/gallium/targets/wgl/wgl.c index da44e146488..c55f727f71c 100644 --- a/src/gallium/targets/wgl/wgl.c +++ b/src/gallium/targets/wgl/wgl.c @@ -64,13 +64,13 @@ #endif #ifdef GALLIUM_LLVMPIPE -static boolean use_llvmpipe = FALSE; +static bool use_llvmpipe = FALSE; #endif #ifdef GALLIUM_D3D12 -static boolean use_d3d12 = FALSE; +static bool use_d3d12 = FALSE; #endif #ifdef GALLIUM_ZINK -static boolean use_zink = FALSE; +static bool use_zink = FALSE; #endif static const char *created_driver_name = NULL; @@ -207,7 +207,7 @@ wgl_present(struct pipe_screen *screen, #if WINVER >= 0xA00 -static boolean +static bool wgl_get_adapter_luid(struct pipe_screen* screen, HDC hDC, LUID* adapter_luid) diff --git a/src/gallium/tests/unit/translate_test.c b/src/gallium/tests/unit/translate_test.c index 717b7532044..a5916f8df00 100644 --- a/src/gallium/tests/unit/translate_test.c +++ b/src/gallium/tests/unit/translate_test.c @@ -173,7 +173,7 @@ int main(int argc, char** argv) unsigned fail = 0; unsigned used_generic = 0; unsigned input_normalized = 0; - boolean input_is_float = FALSE; + bool input_is_float = FALSE; if (!fetch_rgba || !input_format_pack->pack_rgba_float diff --git a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp index b3ba21cc1db..4e1b013b178 100644 --- a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp +++ b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp @@ -149,7 +149,7 @@ d3d12_wgl_framebuffer_resize(stw_winsys_framebuffer *fb, } } -static boolean +static bool d3d12_wgl_framebuffer_present(stw_winsys_framebuffer *fb, int interval) { auto framebuffer = d3d12_wgl_framebuffer(fb); diff --git a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer_xbox.cpp b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer_xbox.cpp index e286155794e..b916f937eb6 100644 --- a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer_xbox.cpp +++ b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer_xbox.cpp @@ -164,7 +164,7 @@ d3d12_wgl_framebuffer_resize(stw_winsys_framebuffer *fb, framebuffer->pformat = templ->format; } -static boolean +static bool d3d12_wgl_framebuffer_present(stw_winsys_framebuffer *fb, int interval) { auto framebuffer = d3d12_wgl_framebuffer(fb); diff --git a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c index b754a066a9e..81e82ffd014 100644 --- a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c +++ b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c @@ -151,7 +151,7 @@ static enum pipe_error fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, struct fenced_buffer *fenced_buf, const struct pb_desc *desc, - boolean wait); + bool wait); /** * Dump the fenced buffer list. * @@ -253,7 +253,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) { @@ -307,7 +307,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); @@ -333,7 +333,7 @@ fenced_buffer_finish_locked(struct fenced_manager *fenced_mgr, * Remove from the fenced list */ - boolean destroyed; + bool destroyed; destroyed = fenced_buffer_remove_locked(fenced_mgr, fenced_buf); @@ -357,15 +357,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; @@ -432,7 +432,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, const struct pb_desc *desc) @@ -454,7 +454,7 @@ static enum pipe_error fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, struct fenced_buffer *fenced_buf, const struct pb_desc *desc, - boolean wait) + bool wait) { assert(!fenced_buf->buffer); @@ -659,7 +659,7 @@ fenced_buffer_fence(struct pb_buffer *buf, assert(fenced_buf->validation_flags); if (fenced_buf->fence) { - boolean destroyed; + bool destroyed; destroyed = fenced_buffer_remove_locked(fenced_mgr, fenced_buf); assert(!destroyed); (void) destroyed; diff --git a/src/gallium/winsys/svga/drm/vmw_buffer.c b/src/gallium/winsys/svga/drm/vmw_buffer.c index 6c235a9a486..8528b40b3e6 100644 --- a/src/gallium/winsys/svga/drm/vmw_buffer.c +++ b/src/gallium/winsys/svga/drm/vmw_buffer.c @@ -277,7 +277,7 @@ vmw_gmr_bufmgr_create(struct vmw_winsys_screen *vws) } -boolean +bool vmw_gmr_bufmgr_region_ptr(struct pb_buffer *buf, struct SVGAGuestPtr *ptr) { diff --git a/src/gallium/winsys/svga/drm/vmw_buffer.h b/src/gallium/winsys/svga/drm/vmw_buffer.h index 99ffca2de05..4068ace37cb 100644 --- a/src/gallium/winsys/svga/drm/vmw_buffer.h +++ b/src/gallium/winsys/svga/drm/vmw_buffer.h @@ -90,7 +90,7 @@ vmw_svga_winsys_buffer_unmap(struct svga_winsys_screen *sws, struct pb_manager * vmw_gmr_bufmgr_create(struct vmw_winsys_screen *vws); -boolean +bool vmw_gmr_bufmgr_region_ptr(struct pb_buffer *buf, struct SVGAGuestPtr *ptr); diff --git a/src/gallium/winsys/svga/drm/vmw_context.c b/src/gallium/winsys/svga/drm/vmw_context.c index da7506e7797..ff4abc19fae 100644 --- a/src/gallium/winsys/svga/drm/vmw_context.c +++ b/src/gallium/winsys/svga/drm/vmw_context.c @@ -69,7 +69,7 @@ struct vmw_buffer_relocation { struct pb_buffer *buffer; - boolean is_mob; + bool is_mob; uint32 offset; union { @@ -88,7 +88,7 @@ struct vmw_ctx_validate_item { struct vmw_svga_winsys_surface *vsurf; struct vmw_svga_winsys_shader *vshader; }; - boolean referenced; + bool referenced; }; struct vmw_svga_winsys_context @@ -99,7 +99,7 @@ struct vmw_svga_winsys_context struct hash_table *hash; #ifdef DEBUG - boolean must_flush; + bool must_flush; struct debug_stack_frame must_flush_stack[VMW_MUST_FLUSH_STACK]; struct debug_flush_ctx *fctx; #endif @@ -150,7 +150,7 @@ struct vmw_svga_winsys_context * ran out of command space, but because a substantial ammount of GMR was * referred. */ - boolean preemptive_flush; + bool preemptive_flush; }; @@ -366,14 +366,14 @@ vmw_swc_context_relocation(struct svga_winsys_context *swc, *cid = swc->cid; } -static boolean +static bool vmw_swc_add_validate_buffer(struct vmw_svga_winsys_context *vswc, struct pb_buffer *pb_buf, unsigned flags) { ASSERTED enum pipe_error ret; unsigned translated_flags; - boolean already_present; + bool already_present; translated_flags = vmw_translate_to_pb_flags(flags); ret = pb_validate_add_buffer(vswc->validate, pb_buf, translated_flags, diff --git a/src/gallium/winsys/svga/drm/vmw_fence.c b/src/gallium/winsys/svga/drm/vmw_fence.c index 3dc3f53ca27..fb94fbfef26 100644 --- a/src/gallium/winsys/svga/drm/vmw_fence.c +++ b/src/gallium/winsys/svga/drm/vmw_fence.c @@ -61,7 +61,7 @@ struct vmw_fence int32_t signalled; uint32_t seqno; int32_t fence_fd; - boolean imported; /* TRUE if imported from another process */ + bool imported; /* TRUE if imported from another process */ }; /** @@ -71,7 +71,7 @@ struct vmw_fence * @ops: Pointer to a struct pb_fence_ops. * */ -static inline boolean +static inline bool vmw_fence_seq_is_signaled(uint32_t seq, uint32_t last, uint32_t cur) { return (cur - last <= cur - seq); @@ -125,7 +125,7 @@ void vmw_fences_signal(struct pb_fence_ops *fence_ops, uint32_t signaled, uint32_t emitted, - boolean has_emitted) + bool has_emitted) { struct vmw_fence_ops *ops = NULL; struct vmw_fence *fence, *n; diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h index 75439c58a34..4b7561ff64a 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen.h +++ b/src/gallium/winsys/svga/drm/vmw_screen.h @@ -58,7 +58,7 @@ struct pb_manager; struct vmw_region; struct vmw_cap_3d { - boolean has_cap; + bool has_cap; SVGA3dDevCapResult result; }; @@ -74,15 +74,15 @@ struct vmw_winsys_screen uint64_t max_mob_memory; uint64_t max_surface_memory; uint64_t max_texture_size; - boolean have_drm_2_6; - boolean have_drm_2_9; + bool have_drm_2_6; + bool have_drm_2_9; uint32_t drm_execbuf_version; - boolean have_drm_2_15; - boolean have_drm_2_16; - boolean have_drm_2_17; - boolean have_drm_2_18; - boolean have_drm_2_19; - boolean have_drm_2_20; + bool have_drm_2_15; + bool have_drm_2_16; + bool have_drm_2_17; + bool have_drm_2_18; + bool have_drm_2_19; + bool have_drm_2_20; } ioctl; struct { @@ -121,8 +121,8 @@ struct vmw_winsys_screen cnd_t cs_cond; mtx_t cs_mutex; - boolean force_coherent; - boolean cache_maps; + bool force_coherent; + bool cache_maps; }; @@ -141,7 +141,7 @@ vmw_ioctl_context_create(struct vmw_winsys_screen *vws); uint32 vmw_ioctl_extended_context_create(struct vmw_winsys_screen *vws, - boolean vgpu10); + bool vgpu10); void vmw_ioctl_context_destroy(struct vmw_winsys_screen *vws, @@ -229,20 +229,20 @@ vmw_ioctl_shader_destroy(struct vmw_winsys_screen *vws, uint32 shid); int vmw_ioctl_syncforcpu(struct vmw_region *region, - boolean dont_block, - boolean readonly, - boolean allow_cs); + bool dont_block, + bool readonly, + bool allow_cs); void vmw_ioctl_releasefromcpu(struct vmw_region *region, - boolean readonly, - boolean allow_cs); + bool readonly, + bool allow_cs); /* Initialize parts of vmw_winsys_screen at startup: */ -boolean vmw_ioctl_init(struct vmw_winsys_screen *vws); -boolean vmw_pools_init(struct vmw_winsys_screen *vws); -boolean vmw_query_pools_init(struct vmw_winsys_screen *vws); -boolean vmw_mob_pools_init(struct vmw_winsys_screen *vws); -boolean vmw_winsys_screen_init_svga(struct vmw_winsys_screen *vws); +bool vmw_ioctl_init(struct vmw_winsys_screen *vws); +bool vmw_pools_init(struct vmw_winsys_screen *vws); +bool vmw_query_pools_init(struct vmw_winsys_screen *vws); +bool vmw_mob_pools_init(struct vmw_winsys_screen *vws); +bool vmw_winsys_screen_init_svga(struct vmw_winsys_screen *vws); void vmw_ioctl_cleanup(struct vmw_winsys_screen *vws); void vmw_pools_cleanup(struct vmw_winsys_screen *vws); @@ -259,7 +259,7 @@ void vmw_fences_signal(struct pb_fence_ops *fence_ops, uint32_t signaled, uint32_t emitted, - boolean has_emitted); + bool has_emitted); struct svga_winsys_gb_shader * vmw_svga_winsys_shader_create(struct svga_winsys_screen *sws, diff --git a/src/gallium/winsys/svga/drm/vmw_screen_dri.c b/src/gallium/winsys/svga/drm/vmw_screen_dri.c index 0a6e586e013..cf151bec0e4 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_dri.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_dri.c @@ -59,7 +59,7 @@ static struct svga_winsys_surface * vmw_drm_gb_surface_from_handle(struct svga_winsys_screen *sws, struct winsys_handle *whandle, SVGA3dSurfaceFormat *format); -static boolean +static bool vmw_drm_surface_get_handle(struct svga_winsys_screen *sws, struct svga_winsys_surface *surface, unsigned stride, @@ -68,7 +68,7 @@ vmw_drm_surface_get_handle(struct svga_winsys_screen *sws, static struct dri1_api_version drm_required = { 2, 1, 0 }; static struct dri1_api_version drm_compat = { 2, 0, 0 }; -static boolean +static bool vmw_dri1_check_version(const struct dri1_api_version *cur, const struct dri1_api_version *required, const struct dri1_api_version *compat, @@ -321,7 +321,7 @@ out_mip: return NULL; } -static boolean +static bool vmw_drm_surface_get_handle(struct svga_winsys_screen *sws, struct svga_winsys_surface *surface, unsigned stride, diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c index cc0a1e3eb46..e1f01856ac6 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c @@ -100,7 +100,7 @@ vmw_ioctl_context_create(struct vmw_winsys_screen *vws) uint32 vmw_ioctl_extended_context_create(struct vmw_winsys_screen *vws, - boolean vgpu10) + bool vgpu10) { union drm_vmw_extended_context_arg c_arg; int ret; @@ -349,7 +349,7 @@ static int vmw_ioctl_surface_req(const struct vmw_winsys_screen *vws, const struct winsys_handle *whandle, struct drm_vmw_surface_arg *req, - boolean *needs_unref) + bool *needs_unref) { int ret; @@ -413,7 +413,7 @@ vmw_ioctl_gb_surface_ref(struct vmw_winsys_screen *vws, struct vmw_region **p_region) { struct vmw_region *region = NULL; - boolean needs_unref = FALSE; + bool needs_unref = FALSE; int ret; assert(p_region != NULL); @@ -519,9 +519,9 @@ vmw_ioctl_command(struct vmw_winsys_screen *vws, int32_t cid, #ifdef DEBUG { - static boolean firsttime = TRUE; - static boolean debug = FALSE; - static boolean skip = FALSE; + static bool firsttime = TRUE; + static bool debug = FALSE; + static bool skip = FALSE; if (firsttime) { debug = debug_get_bool_option("SVGA_DUMP_CMD", FALSE); skip = debug_get_bool_option("SVGA_SKIP_CMD", FALSE); @@ -735,9 +735,9 @@ vmw_ioctl_region_unmap(struct vmw_region *region) */ int vmw_ioctl_syncforcpu(struct vmw_region *region, - boolean dont_block, - boolean readonly, - boolean allow_cs) + bool dont_block, + bool readonly, + bool allow_cs) { struct drm_vmw_synccpu_arg arg; @@ -764,8 +764,8 @@ vmw_ioctl_syncforcpu(struct vmw_region *region, */ void vmw_ioctl_releasefromcpu(struct vmw_region *region, - boolean readonly, - boolean allow_cs) + bool readonly, + bool allow_cs) { struct drm_vmw_synccpu_arg arg; @@ -970,7 +970,7 @@ vmw_ioctl_parse_caps(struct vmw_winsys_screen *vws, return 0; } -boolean +bool vmw_ioctl_init(struct vmw_winsys_screen *vws) { struct drm_vmw_getparam_arg gp_arg; @@ -979,8 +979,8 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) int ret; uint32_t *cap_buffer; drmVersionPtr version; - boolean drm_gb_capable; - boolean have_drm_2_5; + bool drm_gb_capable; + bool have_drm_2_5; const char *getenv_val; VMW_FUNC; diff --git a/src/gallium/winsys/svga/drm/vmw_screen_pools.c b/src/gallium/winsys/svga/drm/vmw_screen_pools.c index 29cdc69e285..7b1171184e4 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_pools.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_pools.c @@ -82,7 +82,7 @@ vmw_pools_cleanup(struct vmw_winsys_screen *vws) * query slabs, it should be easily fixable by allocating them out * of a buffer cache. */ -boolean +bool vmw_query_pools_init(struct vmw_winsys_screen *vws) { struct pb_desc desc; @@ -117,7 +117,7 @@ vmw_query_pools_init(struct vmw_winsys_screen *vws) * Typically this pool should be created on demand when we * detect that the app will be using MOB buffers. */ -boolean +bool vmw_mob_pools_init(struct vmw_winsys_screen *vws) { struct pb_desc desc; @@ -169,7 +169,7 @@ vmw_mob_pools_init(struct vmw_winsys_screen *vws) * * @vws: Pointer to a struct vmw_winsys_screen. */ -boolean +bool vmw_pools_init(struct vmw_winsys_screen *vws) { struct pb_desc desc; diff --git a/src/gallium/winsys/svga/drm/vmw_screen_svga.c b/src/gallium/winsys/svga/drm/vmw_screen_svga.c index b36b42e7f87..a9289238999 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_svga.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_svga.c @@ -445,7 +445,7 @@ vmw_svga_winsys_fence_finish(struct svga_winsys_screen *sws, static int vmw_svga_winsys_fence_get_fd(struct svga_winsys_screen *sws, struct pipe_fence_handle *fence, - boolean duplicate) + bool duplicate) { if (duplicate) return os_dupfd_cloexec(vmw_fence_get_fd(fence)); @@ -630,7 +630,7 @@ no_surface: return NULL; } -static boolean +static bool vmw_svga_winsys_surface_can_create(struct svga_winsys_screen *sws, SVGA3dSurfaceFormat format, SVGA3dSize size, @@ -654,7 +654,7 @@ vmw_svga_winsys_surface_can_create(struct svga_winsys_screen *sws, } -static boolean +static bool vmw_svga_winsys_surface_is_flushed(struct svga_winsys_screen *sws, struct svga_winsys_surface *surface) { @@ -697,7 +697,7 @@ vmw_svga_winsys_get_hw_version(struct svga_winsys_screen *sws) } -static boolean +static bool vmw_svga_winsys_get_cap(struct svga_winsys_screen *sws, SVGA3dDevCapIndex index, SVGA3dDevCapResult *result) @@ -883,7 +883,7 @@ vmw_svga_winsys_get_fd(struct svga_winsys_screen *sws) return vws->ioctl.drm_fd; } -boolean +bool vmw_winsys_screen_init_svga(struct vmw_winsys_screen *vws) { vws->base.destroy = vmw_svga_winsys_destroy; diff --git a/src/gallium/winsys/svga/drm/vmw_surface.c b/src/gallium/winsys/svga/drm/vmw_surface.c index 3aa4eef00bc..163822e9706 100644 --- a/src/gallium/winsys/svga/drm/vmw_surface.c +++ b/src/gallium/winsys/svga/drm/vmw_surface.c @@ -102,8 +102,8 @@ out_unlock: void * vmw_svga_winsys_surface_map(struct svga_winsys_context *swc, struct svga_winsys_surface *srf, - unsigned flags, boolean *retry, - boolean *rebind) + unsigned flags, bool *retry, + bool *rebind) { struct vmw_svga_winsys_surface *vsrf = vmw_svga_winsys_surface(srf); void *data = NULL; @@ -228,7 +228,7 @@ out_unlock: void vmw_svga_winsys_surface_unmap(struct svga_winsys_context *swc, struct svga_winsys_surface *srf, - boolean *rebind) + bool *rebind) { struct vmw_svga_winsys_surface *vsrf = vmw_svga_winsys_surface(srf); mtx_lock(&vsrf->mutex); diff --git a/src/gallium/winsys/svga/drm/vmw_surface.h b/src/gallium/winsys/svga/drm/vmw_surface.h index bfa1bd8fb00..d7acce7dc6a 100644 --- a/src/gallium/winsys/svga/drm/vmw_surface.h +++ b/src/gallium/winsys/svga/drm/vmw_surface.h @@ -62,9 +62,9 @@ struct vmw_svga_winsys_surface uint32_t mapcount; /* Number of mappers */ uint32_t map_mode; /* PIPE_MAP_[READ|WRITE] */ void *data; /* Pointer to data if mapcount != 0*/ - boolean shared; /* Shared surface. Never discard */ + bool shared; /* Shared surface. Never discard */ uint32_t size; /* Size of backing buffer */ - boolean rebind; /* Surface needs a rebind after next unmap */ + bool rebind; /* Surface needs a rebind after next unmap */ }; @@ -89,12 +89,12 @@ vmw_svga_winsys_surface_reference(struct vmw_svga_winsys_surface **pdst, void * vmw_svga_winsys_surface_map(struct svga_winsys_context *swc, struct svga_winsys_surface *srf, - unsigned flags, boolean *retry, - boolean *rebind); + unsigned flags, bool *retry, + bool *rebind); void vmw_svga_winsys_surface_unmap(struct svga_winsys_context *swc, struct svga_winsys_surface *srf, - boolean *rebind); + bool *rebind); void vmw_svga_winsys_surface_init(struct svga_winsys_screen *sws, diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index 55f9ab82279..4088cd28186 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -60,7 +60,7 @@ #define cache_entry_container_res(ptr) \ (struct virgl_hw_res*)((char*)ptr - offsetof(struct virgl_hw_res, cache_entry)) -static inline boolean can_cache_resource(uint32_t bind) +static inline bool can_cache_resource(uint32_t bind) { return bind == VIRGL_BIND_CONSTANT_BUFFER || bind == VIRGL_BIND_INDEX_BUFFER || @@ -103,7 +103,7 @@ static void virgl_hw_res_destroy(struct virgl_drm_winsys *qdws, FREE(res); } -static boolean virgl_drm_resource_is_busy(struct virgl_winsys *vws, +static bool virgl_drm_resource_is_busy(struct virgl_winsys *vws, struct virgl_hw_res *res) { struct virgl_drm_winsys *vdws = virgl_drm_winsys(vws); @@ -628,7 +628,7 @@ virgl_drm_winsys_resource_set_type(struct virgl_winsys *qws, mtx_unlock(&qdws->bo_handles_mutex); } -static boolean virgl_drm_winsys_resource_get_handle(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) @@ -746,7 +746,7 @@ static void virgl_drm_free_res_list(struct virgl_drm_cmd_buf *cbuf) FREE(cbuf->res_bo); } -static boolean virgl_drm_lookup_res(struct virgl_drm_cmd_buf *cbuf, +static bool virgl_drm_lookup_res(struct virgl_drm_cmd_buf *cbuf, struct virgl_hw_res *res) { unsigned hash = res->res_handle & (sizeof(cbuf->is_handle_added)-1); @@ -825,11 +825,11 @@ static void virgl_drm_clear_res_list(struct virgl_drm_cmd_buf *cbuf) static void virgl_drm_emit_res(struct virgl_winsys *qws, struct virgl_cmd_buf *_cbuf, - struct virgl_hw_res *res, boolean write_buf) + struct virgl_hw_res *res, bool write_buf) { struct virgl_drm_winsys *qdws = virgl_drm_winsys(qws); struct virgl_drm_cmd_buf *cbuf = virgl_drm_cmd_buf(_cbuf); - boolean already_in_list = virgl_drm_lookup_res(cbuf, res); + bool already_in_list = virgl_drm_lookup_res(cbuf, res); if (write_buf) cbuf->base.buf[cbuf->base.cdw++] = res->res_handle; @@ -838,7 +838,7 @@ static void virgl_drm_emit_res(struct virgl_winsys *qws, virgl_drm_add_res(qdws, cbuf, res); } -static boolean virgl_drm_res_is_ref(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) { @@ -1299,7 +1299,7 @@ static void virgl_drm_screen_destroy(struct pipe_screen *pscreen) { struct virgl_screen *screen = virgl_screen(pscreen); - boolean destroy; + bool destroy; simple_mtx_lock(&virgl_screen_mutex); destroy = --screen->refcnt == 0; diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c index 2047ba76c05..9f1f07e5fb6 100644 --- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c +++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c @@ -41,7 +41,7 @@ static void *virgl_vtest_resource_map(struct virgl_winsys *vws, static void virgl_vtest_resource_unmap(struct virgl_winsys *vws, struct virgl_hw_res *res); -static inline boolean can_cache_resource_with_bind(uint32_t bind) +static inline bool can_cache_resource_with_bind(uint32_t bind) { return bind == VIRGL_BIND_CONSTANT_BUFFER || bind == VIRGL_BIND_INDEX_BUFFER || @@ -187,7 +187,7 @@ static void virgl_hw_res_destroy(struct virgl_vtest_winsys *vtws, FREE(res); } -static boolean virgl_vtest_resource_is_busy(struct virgl_winsys *vws, +static bool virgl_vtest_resource_is_busy(struct virgl_winsys *vws, struct virgl_hw_res *res) { struct virgl_vtest_winsys *vtws = virgl_vtest_winsys(vws); @@ -414,7 +414,7 @@ alloc: return res; } -static boolean virgl_vtest_lookup_res(struct virgl_vtest_cmd_buf *cbuf, +static bool virgl_vtest_lookup_res(struct virgl_vtest_cmd_buf *cbuf, struct virgl_hw_res *res) { unsigned hash = res->res_handle & (sizeof(cbuf->is_handle_added)-1); @@ -555,11 +555,11 @@ static int virgl_vtest_winsys_submit_cmd(struct virgl_winsys *vws, static void virgl_vtest_emit_res(struct virgl_winsys *vws, struct virgl_cmd_buf *_cbuf, - struct virgl_hw_res *res, boolean write_buf) + struct virgl_hw_res *res, bool write_buf) { struct virgl_vtest_winsys *vtws = virgl_vtest_winsys(vws); struct virgl_vtest_cmd_buf *cbuf = virgl_vtest_cmd_buf(_cbuf); - boolean already_in_list = virgl_vtest_lookup_res(cbuf, res); + bool already_in_list = virgl_vtest_lookup_res(cbuf, res); if (write_buf) cbuf->base.buf[cbuf->base.cdw++] = res->res_handle; @@ -567,7 +567,7 @@ static void virgl_vtest_emit_res(struct virgl_winsys *vws, virgl_vtest_add_res(vtws, cbuf, res); } -static boolean virgl_vtest_res_is_ref(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) { diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c index cfabfe8cb5a..5602d23c02e 100644 --- a/src/mesa/main/condrender.c +++ b/src/mesa/main/condrender.c @@ -47,7 +47,7 @@ BeginConditionalRender(struct gl_context *ctx, struct gl_query_object *q, struct st_context *st = st_context(ctx); uint m; /* Don't invert the condition for rendering by default */ - boolean inverted = FALSE; + bool inverted = FALSE; st_flush_bitmap_cache(st); diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 42cbc20bbb5..1db563e6597 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1186,7 +1186,7 @@ do_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) &fb->Attachment[BUFFER_STENCIL]; GLuint i; enum pipe_format first_format = PIPE_FORMAT_NONE; - boolean mixed_formats = + bool mixed_formats = screen->get_param(screen, PIPE_CAP_MIXED_COLORBUFFER_FORMATS) != 0; if (depth->Type && stencil->Type && depth->Type != stencil->Type) { diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index dd3f68cf13d..77c38bf48d5 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2576,15 +2576,15 @@ struct gl_renderbuffer /** * Used only when hardware accumulation buffers are not supported. */ - boolean software; + bool software; void *data; bool use_readpix_cache; /* Inputs from Driver.RenderTexture, don't use directly. */ - boolean is_rtt; /**< whether Driver.RenderTexture was called */ + bool is_rtt; /**< whether Driver.RenderTexture was called */ unsigned rtt_face, rtt_slice; - boolean rtt_layered; /**< whether glFramebufferTexture was called */ + bool rtt_layered; /**< whether glFramebufferTexture was called */ unsigned rtt_nr_samples; /**< from FramebufferTexture2DMultisampleEXT */ }; diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index 8bf5bf1006c..d0ac91a6114 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -277,10 +277,10 @@ end_query(struct gl_context *ctx, struct gl_query_object *q) } -static boolean +static bool get_query_result(struct pipe_context *pipe, struct gl_query_object *q, - boolean wait) + bool wait) { union pipe_query_result data; diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index e99cb7e28ba..28d78b091e9 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -576,7 +576,7 @@ _mesa_update_renderbuffer_surface(struct gl_context *ctx, * the format). Check rb->Format instead of rb->texture->format * to determine if the rb is sRGB-capable. */ - boolean enable_srgb = ctx->Color.sRGBEnabled && + bool enable_srgb = ctx->Color.sRGBEnabled && _mesa_is_format_srgb(rb->Format); enum pipe_format format = resource->format; diff --git a/src/mesa/state_tracker/st_atifs_to_nir.c b/src/mesa/state_tracker/st_atifs_to_nir.c index a40af78f7bf..b2ee11bac74 100644 --- a/src/mesa/state_tracker/st_atifs_to_nir.c +++ b/src/mesa/state_tracker/st_atifs_to_nir.c @@ -51,7 +51,7 @@ struct st_translate { bool regs_written[MAX_NUM_PASSES_ATI][MAX_NUM_FRAGMENT_REGISTERS_ATI]; - boolean error; + bool error; }; static nir_ssa_def * diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 1f72ab0dab4..5d175d93289 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -737,7 +737,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z, const unsigned fb_height = _mesa_geometric_height(ctx->DrawBuffer); GLfloat x0, y0, x1, y1; ASSERTED GLsizei maxSize; - boolean normalized = sv[0]->texture->target == PIPE_TEXTURE_2D || + bool normalized = sv[0]->texture->target == PIPE_TEXTURE_2D || (sv[0]->texture->target == PIPE_TEXTURE_RECT && st->lower_rect_tex); unsigned cso_state_mask; diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index 5c2738d057d..8e93aaf0340 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -67,7 +67,7 @@ */ #define ALWAYS_READPIXELS_CACHE false -static boolean +static bool needs_integer_signed_unsigned_conversion(const struct gl_context *ctx, GLenum format, GLenum type) { diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 207e3638788..fd6c4224509 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -183,7 +183,7 @@ create_dst_texture(struct gl_context *ctx, return screen->resource_create(screen, &dst_templ); } -static boolean +static bool copy_to_staging_dest(struct gl_context * ctx, struct pipe_resource *dst, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLint depth, @@ -200,7 +200,7 @@ copy_to_staging_dest(struct gl_context * ctx, struct pipe_resource *dst, unsigned dims; struct pipe_transfer *tex_xfer; ubyte *map = NULL; - boolean done = FALSE; + bool done = FALSE; pixels = _mesa_map_pbo_dest(ctx, &ctx->Pack, pixels); @@ -923,7 +923,7 @@ guess_base_level_size(GLenum target, * \param stObj the texture object we're going to allocate memory for. * \param stImage describes the incoming image which we need to store. */ -static boolean +static bool allocate_full_mipmap(const struct gl_texture_object *stObj, const struct gl_texture_image *stImage) { @@ -2600,7 +2600,7 @@ st_GetTexSubImage(struct gl_context * ctx, enum pipe_texture_target pipe_target; struct pipe_blit_info blit; unsigned bind; - boolean done = FALSE; + bool done = FALSE; assert(!_mesa_is_format_etc2(texImage->TexFormat) && !_mesa_is_format_astc_2d(texImage->TexFormat) && @@ -3394,7 +3394,7 @@ st_texture_storage(struct gl_context *ctx, * choose 4x here. */ enum pipe_texture_target ptarget = gl_target_to_pipe(texObj->Target); - boolean found = FALSE; + bool found = FALSE; if (ctx->Const.MaxSamples > 1 && num_samples == 1) { /* don't try num_samples = 1 with drivers that support real msaa */ diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index 031ba1070a3..bbe76a0c7b6 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -140,44 +140,44 @@ struct st_context GLboolean clamp_frag_color_in_shader; GLboolean clamp_vert_color_in_shader; - boolean has_stencil_export; /**< can do shader stencil export? */ - boolean has_time_elapsed; - boolean has_etc1; - boolean has_etc2; - boolean transcode_etc; - boolean transcode_astc; - boolean has_astc_2d_ldr; - boolean has_astc_5x5_ldr; - boolean astc_void_extents_need_denorm_flush; - boolean has_s3tc; - boolean has_rgtc; - boolean has_latc; - boolean has_bptc; - boolean prefer_blit_based_texture_transfer; - boolean allow_compute_based_texture_transfer; - boolean force_compute_based_texture_transfer; - boolean force_specialized_compute_transfer; - boolean force_persample_in_shader; - boolean has_shareable_shaders; - boolean has_half_float_packing; - boolean has_multi_draw_indirect; - boolean has_indirect_partial_stride; - boolean has_occlusion_query; - boolean has_single_pipe_stat; - boolean has_pipeline_stat; - boolean has_indep_blend_enable; - boolean has_indep_blend_func; - boolean needs_rgb_dst_alpha_override; - boolean can_dither; - boolean can_bind_const_buffer_as_vertex; - boolean lower_flatshade; - boolean lower_alpha_test; - boolean lower_point_size; - boolean lower_two_sided_color; - boolean lower_ucp; - boolean prefer_real_buffer_in_constbuf0; - boolean has_conditional_render; - boolean lower_rect_tex; + bool has_stencil_export; /**< can do shader stencil export? */ + bool has_time_elapsed; + bool has_etc1; + bool has_etc2; + bool transcode_etc; + bool transcode_astc; + bool has_astc_2d_ldr; + bool has_astc_5x5_ldr; + bool astc_void_extents_need_denorm_flush; + bool has_s3tc; + bool has_rgtc; + bool has_latc; + bool has_bptc; + bool prefer_blit_based_texture_transfer; + bool allow_compute_based_texture_transfer; + bool force_compute_based_texture_transfer; + bool force_specialized_compute_transfer; + bool force_persample_in_shader; + bool has_shareable_shaders; + bool has_half_float_packing; + bool has_multi_draw_indirect; + bool has_indirect_partial_stride; + bool has_occlusion_query; + bool has_single_pipe_stat; + bool has_pipeline_stat; + bool has_indep_blend_enable; + bool has_indep_blend_func; + bool needs_rgb_dst_alpha_override; + bool can_dither; + bool can_bind_const_buffer_as_vertex; + bool lower_flatshade; + bool lower_alpha_test; + bool lower_point_size; + bool lower_two_sided_color; + bool lower_ucp; + bool prefer_real_buffer_in_constbuf0; + bool has_conditional_render; + bool lower_rect_tex; /* There are consequences for drivers wanting to call st_finalize_nir * twice, once before shader caching and once after lowering for shader @@ -188,29 +188,29 @@ struct st_context * called before the result is stored in the shader cache. If lowering for * shader variants is invoked, the functions will be called again. */ - boolean allow_st_finalize_nir_twice; + bool allow_st_finalize_nir_twice; /** * If a shader can be created when we get its source. * This means it has only 1 variant, not counting glBitmap and * glDrawPixels. */ - boolean shader_has_one_variant[MESA_SHADER_STAGES]; + bool shader_has_one_variant[MESA_SHADER_STAGES]; - boolean needs_texcoord_semantic; - boolean apply_texture_swizzle_to_border_color; - boolean use_format_with_border_color; - boolean alpha_border_color_is_not_w; - boolean emulate_gl_clamp; + bool needs_texcoord_semantic; + bool apply_texture_swizzle_to_border_color; + bool use_format_with_border_color; + bool alpha_border_color_is_not_w; + bool emulate_gl_clamp; - boolean draw_needs_minmax_index; - boolean has_hw_atomics; + bool draw_needs_minmax_index; + bool has_hw_atomics; - boolean validate_all_dirty_states; - boolean can_null_texture; + bool validate_all_dirty_states; + bool can_null_texture; /* driver supports scissored clears */ - boolean can_scissor_clear; + bool can_scissor_clear; /* Some state is contained in constant objects. * Other state is just parameter values. @@ -237,7 +237,7 @@ struct st_context struct pipe_viewport_state viewport[PIPE_MAX_VIEWPORTS]; struct { unsigned num; - boolean include; + bool include; struct pipe_scissor_state rects[PIPE_MAX_WINDOW_RECTANGLES]; } window_rects; diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 2e5e6fa8462..6dcd5db202f 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -1140,7 +1140,7 @@ find_supported_format(struct pipe_screen *screen, unsigned sample_count, unsigned storage_sample_count, unsigned bindings, - boolean allow_dxt) + bool allow_dxt) { uint i; for (i = 0; formats[i]; i++) { diff --git a/src/mesa/state_tracker/st_interop.c b/src/mesa/state_tracker/st_interop.c index c7a73278164..599f604abec 100644 --- a/src/mesa/state_tracker/st_interop.c +++ b/src/mesa/state_tracker/st_interop.c @@ -246,7 +246,7 @@ st_interop_export_object(struct st_context *st, struct pipe_resource *res = NULL; struct winsys_handle whandle; unsigned usage; - boolean success; + bool success; bool need_export_dmabuf = true; /* There is no version 0, thus we do not support it */ diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 947288b6b55..a6587d94410 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -340,7 +340,7 @@ st_framebuffer_update_attachments(struct gl_framebuffer *stfb) * renderbuffer). The window system code determines the format. */ static struct gl_renderbuffer * -st_new_renderbuffer_fb(enum pipe_format format, unsigned samples, boolean sw) +st_new_renderbuffer_fb(enum pipe_format format, unsigned samples, bool sw) { struct gl_renderbuffer *rb; diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index 8df383c4bc8..eb15f861e21 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -237,7 +237,7 @@ struct st_common_variant_key bool clamp_color; /** lower glPointSize to gl_PointSize */ - boolean export_point_size; + bool export_point_size; /* for user-defined clip-planes */ uint8_t lower_ucp; diff --git a/src/mesa/state_tracker/st_sampler_view.c b/src/mesa/state_tracker/st_sampler_view.c index e3304217b4d..3e8e0afe6ed 100644 --- a/src/mesa/state_tracker/st_sampler_view.c +++ b/src/mesa/state_tracker/st_sampler_view.c @@ -310,7 +310,7 @@ st_delete_texture_sampler_views(struct st_context *st, * * \param texObj the st texture object, */ -ASSERTED static boolean +ASSERTED static bool check_sampler_swizzle(const struct st_context *st, const struct gl_texture_object *texObj, const struct pipe_sampler_view *sv, diff --git a/src/util/u_debug_refcnt.c b/src/util/u_debug_refcnt.c index 2413dcdeafd..6b1de06e20f 100644 --- a/src/util/u_debug_refcnt.c +++ b/src/util/u_debug_refcnt.c @@ -62,11 +62,11 @@ static unsigned serials_last; /** * Return a small integer serial number for the given pointer. */ -static boolean +static bool debug_serial(void *p, unsigned *pserial) { unsigned serial; - boolean found = TRUE; + bool found = TRUE; simple_mtx_lock(&serials_mutex); if (!serials_hash) @@ -150,7 +150,7 @@ debug_reference_slowpath(const struct pipe_reference *p, unsigned i; unsigned refcnt = p->count; unsigned serial; - boolean existing = debug_serial((void *) p, &serial); + bool existing = debug_serial((void *) p, &serial); debug_backtrace_capture(frames, 1, STACK_LEN);