From 05b840521ab3e621d1664cd91d839914ddabd0db Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Thu, 22 Jun 2023 23:58:38 +0800 Subject: [PATCH] treewide: Replace the usage of TRUE/FALSE with true/false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this is a separate patch as it's won't affect the code style Signed-off-by: Yonggang Luo Acked-by: David Heidelberg Acked-by: Marek Olšák Acked-by: Erik Faye-Lund Part-of: --- src/c11/impl/threads_win32.c | 4 +- src/egl/drivers/wgl/egl_wgl.c | 2 +- src/freedreno/perfcntrs/fdperf.c | 4 +- src/gallium/auxiliary/cso_cache/cso_context.c | 10 +- src/gallium/auxiliary/draw/draw_context.c | 30 +- src/gallium/auxiliary/draw/draw_gs.c | 6 +- src/gallium/auxiliary/draw/draw_gs_tmp.h | 2 +- src/gallium/auxiliary/draw/draw_llvm.c | 42 +- src/gallium/auxiliary/draw/draw_mesh_prim.c | 2 +- src/gallium/auxiliary/draw/draw_pipe.c | 10 +- src/gallium/auxiliary/draw/draw_pipe_aaline.c | 28 +- .../auxiliary/draw/draw_pipe_aapoint.c | 34 +- src/gallium/auxiliary/draw/draw_pipe_clip.c | 6 +- .../auxiliary/draw/draw_pipe_pstipple.c | 26 +- src/gallium/auxiliary/draw/draw_pipe_util.c | 6 +- .../auxiliary/draw/draw_pipe_validate.c | 58 +- .../auxiliary/draw/draw_pipe_wide_line.c | 8 +- .../auxiliary/draw/draw_pipe_wide_point.c | 8 +- .../auxiliary/draw/draw_prim_assembler.c | 10 +- src/gallium/auxiliary/draw/draw_pt.c | 18 +- .../auxiliary/draw/draw_pt_fetch_shade_emit.c | 6 +- .../draw/draw_pt_fetch_shade_pipeline.c | 22 +- .../draw/draw_pt_fetch_shade_pipeline_llvm.c | 24 +- .../auxiliary/draw/draw_pt_mesh_pipeline.c | 2 +- src/gallium/auxiliary/draw/draw_pt_so_emit.c | 10 +- src/gallium/auxiliary/draw/draw_so_emit_tmp.h | 2 +- src/gallium/auxiliary/draw/draw_tess.c | 8 +- src/gallium/auxiliary/draw/draw_vs.c | 14 +- src/gallium/auxiliary/gallivm/lp_bld_arit.c | 22 +- .../auxiliary/gallivm/lp_bld_arit_overflow.c | 2 +- src/gallium/auxiliary/gallivm/lp_bld_const.c | 4 +- src/gallium/auxiliary/gallivm/lp_bld_conv.c | 30 +- .../auxiliary/gallivm/lp_bld_debug.cpp | 4 +- .../auxiliary/gallivm/lp_bld_format_aos.c | 32 +- .../auxiliary/gallivm/lp_bld_format_s3tc.c | 34 +- .../auxiliary/gallivm/lp_bld_format_soa.c | 18 +- .../auxiliary/gallivm/lp_bld_format_yuv.c | 6 +- src/gallium/auxiliary/gallivm/lp_bld_gather.c | 10 +- src/gallium/auxiliary/gallivm/lp_bld_init.c | 24 +- .../auxiliary/gallivm/lp_bld_ir_common.c | 16 +- .../auxiliary/gallivm/lp_bld_jit_types.c | 48 +- src/gallium/auxiliary/gallivm/lp_bld_logic.c | 4 +- src/gallium/auxiliary/gallivm/lp_bld_nir.c | 2 +- .../auxiliary/gallivm/lp_bld_nir_soa.c | 8 +- src/gallium/auxiliary/gallivm/lp_bld_pack.c | 18 +- src/gallium/auxiliary/gallivm/lp_bld_sample.c | 22 +- src/gallium/auxiliary/gallivm/lp_bld_sample.h | 8 +- .../auxiliary/gallivm/lp_bld_sample_aos.c | 12 +- .../auxiliary/gallivm/lp_bld_sample_soa.c | 62 +- .../auxiliary/gallivm/lp_bld_swizzle.c | 6 +- src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 12 +- .../auxiliary/gallivm/lp_bld_tgsi_action.c | 2 +- .../auxiliary/gallivm/lp_bld_tgsi_aos.c | 88 +-- .../auxiliary/gallivm/lp_bld_tgsi_info.c | 42 +- .../auxiliary/gallivm/lp_bld_tgsi_soa.c | 66 +- src/gallium/auxiliary/gallivm/lp_bld_type.c | 24 +- src/gallium/auxiliary/gallivm/lp_bld_type.h | 38 +- src/gallium/auxiliary/hud/font.c | 10 +- src/gallium/auxiliary/hud/hud_cpu.c | 32 +- src/gallium/auxiliary/hud/hud_driver_query.c | 20 +- src/gallium/auxiliary/hud/hud_nic.c | 4 +- src/gallium/auxiliary/pipebuffer/pb_buffer.h | 10 +- .../auxiliary/pipebuffer/pb_buffer_fenced.c | 34 +- .../auxiliary/pipebuffer/pb_bufmgr_debug.c | 4 +- .../auxiliary/pipebuffer/pb_validate.c | 4 +- .../auxiliary/postprocess/pp_celshade.c | 2 +- src/gallium/auxiliary/postprocess/pp_colors.c | 6 +- src/gallium/auxiliary/postprocess/pp_init.c | 2 +- src/gallium/auxiliary/postprocess/pp_mlaa.c | 6 +- .../auxiliary/postprocess/pp_program.c | 2 +- src/gallium/auxiliary/postprocess/pp_run.c | 4 +- src/gallium/auxiliary/renderonly/renderonly.h | 4 +- .../target-helpers/inline_debug_helper.h | 2 +- src/gallium/auxiliary/tgsi/tgsi_aa_point.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_dump.c | 18 +- .../auxiliary/tgsi/tgsi_dynamic_indexing.c | 8 +- src/gallium/auxiliary/tgsi/tgsi_exec.c | 20 +- src/gallium/auxiliary/tgsi/tgsi_iterate.c | 6 +- src/gallium/auxiliary/tgsi/tgsi_sanity.c | 44 +- src/gallium/auxiliary/tgsi/tgsi_scan.c | 50 +- src/gallium/auxiliary/tgsi/tgsi_text.c | 300 ++++----- src/gallium/auxiliary/tgsi/tgsi_transform.c | 8 +- src/gallium/auxiliary/tgsi/tgsi_transform.h | 2 +- src/gallium/auxiliary/tgsi/tgsi_ureg.c | 34 +- src/gallium/auxiliary/tgsi/tgsi_ureg.h | 8 +- src/gallium/auxiliary/tgsi/tgsi_util.c | 4 +- .../auxiliary/translate/translate_generic.c | 196 +++--- .../auxiliary/translate/translate_sse.c | 70 +-- src/gallium/auxiliary/util/u_bitmask.c | 18 +- src/gallium/auxiliary/util/u_box.h | 4 +- src/gallium/auxiliary/util/u_debug_flush.c | 32 +- src/gallium/auxiliary/util/u_dump_state.c | 18 +- src/gallium/auxiliary/util/u_framebuffer.c | 18 +- src/gallium/auxiliary/util/u_gen_mipmap.c | 8 +- src/gallium/auxiliary/util/u_inlines.h | 4 +- src/gallium/auxiliary/util/u_prim.h | 4 +- src/gallium/auxiliary/util/u_prim_restart.c | 10 +- src/gallium/auxiliary/util/u_pstipple.c | 2 +- src/gallium/auxiliary/util/u_resource.h | 4 +- src/gallium/auxiliary/util/u_simple_shaders.c | 2 +- src/gallium/auxiliary/util/u_split_prim.h | 18 +- src/gallium/auxiliary/util/u_surface.c | 24 +- src/gallium/auxiliary/util/u_tests.c | 4 +- src/gallium/auxiliary/util/u_tile.h | 6 +- src/gallium/auxiliary/util/u_upload_mgr.c | 6 +- src/gallium/auxiliary/util/u_vbuf.c | 18 +- src/gallium/drivers/crocus/crocus_formats.c | 2 +- src/gallium/drivers/d3d12/d3d12_context.cpp | 12 +- src/gallium/drivers/d3d12/d3d12_draw.cpp | 2 +- src/gallium/drivers/d3d12/d3d12_fence.h | 2 +- .../drivers/d3d12/d3d12_pipeline_state.cpp | 2 +- src/gallium/drivers/d3d12/d3d12_video_dec.cpp | 4 +- .../d3d12_video_encoder_nalu_writer_h264.cpp | 16 +- .../d3d12_video_encoder_nalu_writer_hevc.cpp | 10 +- .../drivers/d3d12/d3d12_video_proc.cpp | 4 +- src/gallium/drivers/i915/i915_prim_vbuf.c | 4 +- src/gallium/drivers/llvmpipe/lp_bld_blend.c | 18 +- .../drivers/llvmpipe/lp_bld_blend_aos.c | 8 +- src/gallium/drivers/llvmpipe/lp_bld_depth.c | 18 +- src/gallium/drivers/llvmpipe/lp_bld_interp.c | 8 +- src/gallium/drivers/llvmpipe/lp_context.c | 6 +- src/gallium/drivers/llvmpipe/lp_flush.c | 4 +- src/gallium/drivers/llvmpipe/lp_linear.c | 6 +- .../drivers/llvmpipe/lp_linear_fastpath.c | 16 +- .../drivers/llvmpipe/lp_linear_interp.c | 4 +- src/gallium/drivers/llvmpipe/lp_linear_priv.h | 2 +- .../drivers/llvmpipe/lp_linear_sampler.c | 40 +- src/gallium/drivers/llvmpipe/lp_query.c | 4 +- src/gallium/drivers/llvmpipe/lp_rast.c | 8 +- src/gallium/drivers/llvmpipe/lp_rast_debug.c | 12 +- src/gallium/drivers/llvmpipe/lp_scene.c | 26 +- src/gallium/drivers/llvmpipe/lp_scene.h | 14 +- src/gallium/drivers/llvmpipe/lp_screen.c | 4 +- src/gallium/drivers/llvmpipe/lp_setup.c | 76 +-- .../drivers/llvmpipe/lp_setup_analysis.c | 28 +- src/gallium/drivers/llvmpipe/lp_setup_line.c | 12 +- src/gallium/drivers/llvmpipe/lp_setup_point.c | 20 +- src/gallium/drivers/llvmpipe/lp_setup_rect.c | 38 +- src/gallium/drivers/llvmpipe/lp_setup_tri.c | 26 +- src/gallium/drivers/llvmpipe/lp_setup_vbuf.c | 6 +- src/gallium/drivers/llvmpipe/lp_state_cs.c | 28 +- .../drivers/llvmpipe/lp_state_derived.c | 10 +- src/gallium/drivers/llvmpipe/lp_state_fs.c | 74 +-- .../drivers/llvmpipe/lp_state_fs_analysis.c | 14 +- .../drivers/llvmpipe/lp_state_fs_linear.c | 32 +- .../llvmpipe/lp_state_fs_linear_llvm.c | 8 +- src/gallium/drivers/llvmpipe/lp_state_gs.c | 2 +- src/gallium/drivers/llvmpipe/lp_surface.c | 16 +- src/gallium/drivers/llvmpipe/lp_test_arit.c | 14 +- src/gallium/drivers/llvmpipe/lp_test_blend.c | 42 +- src/gallium/drivers/llvmpipe/lp_test_conv.c | 96 +-- src/gallium/drivers/llvmpipe/lp_test_format.c | 46 +- src/gallium/drivers/llvmpipe/lp_test_main.c | 8 +- src/gallium/drivers/llvmpipe/lp_test_printf.c | 6 +- src/gallium/drivers/llvmpipe/lp_texture.c | 18 +- src/gallium/drivers/llvmpipe/lp_texture.h | 12 +- .../drivers/nouveau/nv50/nv50_surface.c | 2 +- src/gallium/drivers/r300/r300_blit.c | 34 +- src/gallium/drivers/r300/r300_chipset.c | 24 +- src/gallium/drivers/r300/r300_context.c | 26 +- src/gallium/drivers/r300/r300_context.h | 2 +- src/gallium/drivers/r300/r300_emit.c | 22 +- src/gallium/drivers/r300/r300_flush.c | 14 +- src/gallium/drivers/r300/r300_fs.c | 24 +- src/gallium/drivers/r300/r300_fs.h | 8 +- src/gallium/drivers/r300/r300_hyperz.c | 24 +- src/gallium/drivers/r300/r300_query.c | 8 +- src/gallium/drivers/r300/r300_render.c | 22 +- src/gallium/drivers/r300/r300_screen.c | 10 +- src/gallium/drivers/r300/r300_screen.h | 2 +- src/gallium/drivers/r300/r300_screen_buffer.c | 2 +- src/gallium/drivers/r300/r300_state.c | 44 +- src/gallium/drivers/r300/r300_state_derived.c | 6 +- src/gallium/drivers/r300/r300_texture.c | 12 +- src/gallium/drivers/r300/r300_texture_desc.c | 14 +- src/gallium/drivers/r300/r300_tgsi_to_rc.c | 12 +- src/gallium/drivers/r300/r300_transfer.c | 2 +- src/gallium/drivers/r300/r300_vs.c | 12 +- src/gallium/drivers/r300/r300_vs_draw.c | 20 +- .../drivers/r600/evergreen_hw_context.c | 2 +- src/gallium/drivers/r600/evergreen_state.c | 28 +- src/gallium/drivers/r600/r600_blit.c | 2 +- src/gallium/drivers/r600/r600_hw_context.c | 2 +- src/gallium/drivers/r600/r600_pipe.c | 8 +- src/gallium/drivers/r600/r600_state.c | 14 +- src/gallium/drivers/r600/r600_state_common.c | 54 +- .../drivers/radeonsi/radeon_vcn_enc_1_2.c | 10 +- src/gallium/drivers/softpipe/sp_clear.c | 2 +- src/gallium/drivers/softpipe/sp_context.c | 2 +- src/gallium/drivers/softpipe/sp_draw_arrays.c | 2 +- src/gallium/drivers/softpipe/sp_fence.c | 2 +- src/gallium/drivers/softpipe/sp_flush.c | 8 +- src/gallium/drivers/softpipe/sp_fs_exec.c | 4 +- .../drivers/softpipe/sp_quad_depth_test.c | 10 +- src/gallium/drivers/softpipe/sp_quad_fs.c | 2 +- src/gallium/drivers/softpipe/sp_query.c | 4 +- src/gallium/drivers/softpipe/sp_setup.c | 10 +- src/gallium/drivers/softpipe/sp_tex_sample.c | 6 +- .../drivers/softpipe/sp_tex_tile_cache.c | 2 +- src/gallium/drivers/softpipe/sp_texture.c | 14 +- .../drivers/svga/include/svga_overlay.h | 4 +- src/gallium/drivers/svga/svga_context.c | 36 +- src/gallium/drivers/svga/svga_context.h | 2 +- src/gallium/drivers/svga/svga_draw.c | 26 +- src/gallium/drivers/svga/svga_draw_private.h | 2 +- src/gallium/drivers/svga/svga_format.c | 12 +- src/gallium/drivers/svga/svga_image_view.c | 2 +- src/gallium/drivers/svga/svga_pipe_blend.c | 34 +- src/gallium/drivers/svga/svga_pipe_blit.c | 20 +- src/gallium/drivers/svga/svga_pipe_clear.c | 12 +- src/gallium/drivers/svga/svga_pipe_draw.c | 6 +- src/gallium/drivers/svga/svga_pipe_query.c | 12 +- .../drivers/svga/svga_pipe_rasterizer.c | 8 +- src/gallium/drivers/svga/svga_pipe_sampler.c | 10 +- .../drivers/svga/svga_pipe_streamout.c | 10 +- src/gallium/drivers/svga/svga_pipe_vertex.c | 10 +- .../drivers/svga/svga_resource_buffer.c | 20 +- .../drivers/svga/svga_resource_buffer.h | 8 +- .../svga/svga_resource_buffer_upload.c | 28 +- .../drivers/svga/svga_resource_texture.c | 30 +- .../drivers/svga/svga_resource_texture.h | 4 +- src/gallium/drivers/svga/svga_sampler_view.c | 10 +- src/gallium/drivers/svga/svga_screen.c | 50 +- src/gallium/drivers/svga/svga_screen_cache.c | 4 +- src/gallium/drivers/svga/svga_shader.c | 6 +- src/gallium/drivers/svga/svga_shader.h | 8 +- src/gallium/drivers/svga/svga_shader_buffer.c | 4 +- src/gallium/drivers/svga/svga_state.c | 4 +- src/gallium/drivers/svga/svga_state_cs.c | 2 +- .../drivers/svga/svga_state_framebuffer.c | 26 +- src/gallium/drivers/svga/svga_state_fs.c | 10 +- src/gallium/drivers/svga/svga_state_gs.c | 2 +- .../drivers/svga/svga_state_need_swtnl.c | 18 +- src/gallium/drivers/svga/svga_state_rss.c | 16 +- src/gallium/drivers/svga/svga_state_sampler.c | 16 +- .../drivers/svga/svga_state_tgsi_transform.c | 10 +- src/gallium/drivers/svga/svga_state_ts.c | 8 +- src/gallium/drivers/svga/svga_state_tss.c | 10 +- src/gallium/drivers/svga/svga_state_uav.c | 12 +- src/gallium/drivers/svga/svga_state_vs.c | 4 +- src/gallium/drivers/svga/svga_surface.c | 28 +- src/gallium/drivers/svga/svga_swtnl_backend.c | 26 +- src/gallium/drivers/svga/svga_swtnl_draw.c | 14 +- src/gallium/drivers/svga/svga_swtnl_state.c | 2 +- src/gallium/drivers/svga/svga_tgsi.c | 28 +- .../drivers/svga/svga_tgsi_decl_sm30.c | 84 +-- src/gallium/drivers/svga/svga_tgsi_insn.c | 454 +++++++------- src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 570 +++++++++--------- src/gallium/drivers/svga/svgadump/svga_dump.c | 2 +- .../drivers/svga/svgadump/svga_shader_dump.c | 10 +- src/gallium/drivers/virgl/virgl_context.c | 26 +- src/gallium/drivers/virgl/virgl_encode.c | 6 +- src/gallium/drivers/virgl/virgl_screen.c | 2 +- src/gallium/drivers/virgl/virgl_streamout.c | 2 +- src/gallium/frontends/d3d10umd/D3DKMT.cpp | 6 +- src/gallium/frontends/d3d10umd/Device.cpp | 2 +- src/gallium/frontends/d3d10umd/Draw.cpp | 10 +- src/gallium/frontends/d3d10umd/DxgiFns.cpp | 2 +- .../frontends/d3d10umd/InputAssembly.cpp | 10 +- .../frontends/d3d10umd/OutputMerger.cpp | 12 +- src/gallium/frontends/d3d10umd/Query.cpp | 18 +- src/gallium/frontends/d3d10umd/Resource.cpp | 6 +- src/gallium/frontends/d3d10umd/Shader.cpp | 18 +- src/gallium/frontends/d3d10umd/ShaderParse.c | 8 +- src/gallium/frontends/d3d10umd/ShaderTGSI.c | 38 +- src/gallium/frontends/glx/xlib/xm_api.c | 2 +- src/gallium/frontends/glx/xlib/xm_st.c | 2 +- src/gallium/frontends/hgl/hgl.c | 2 +- src/gallium/frontends/nine/adapter9.c | 48 +- src/gallium/frontends/nine/basetexture9.c | 14 +- src/gallium/frontends/nine/buffer9.c | 14 +- src/gallium/frontends/nine/cubetexture9.c | 6 +- src/gallium/frontends/nine/device9.c | 68 +-- src/gallium/frontends/nine/device9ex.c | 2 +- src/gallium/frontends/nine/guid.c | 8 +- src/gallium/frontends/nine/iunknown.c | 2 +- src/gallium/frontends/nine/nine_csmt_helper.h | 2 +- src/gallium/frontends/nine/nine_debug.c | 4 +- src/gallium/frontends/nine/nine_debug.h | 8 +- src/gallium/frontends/nine/nine_ff.c | 18 +- src/gallium/frontends/nine/nine_pipe.c | 2 +- src/gallium/frontends/nine/nine_pipe.h | 26 +- src/gallium/frontends/nine/nine_queue.c | 2 +- src/gallium/frontends/nine/nine_quirk.c | 4 +- src/gallium/frontends/nine/nine_shader.c | 72 +-- src/gallium/frontends/nine/nine_shader.h | 14 +- src/gallium/frontends/nine/nine_state.c | 154 ++--- src/gallium/frontends/nine/query9.c | 6 +- src/gallium/frontends/nine/stateblock9.c | 12 +- src/gallium/frontends/nine/surface9.c | 10 +- src/gallium/frontends/nine/swapchain9.c | 40 +- src/gallium/frontends/nine/texture9.c | 6 +- src/gallium/frontends/nine/threadpool.c | 4 +- .../frontends/nine/vertexdeclaration9.c | 6 +- src/gallium/frontends/nine/volume9.c | 8 +- src/gallium/frontends/nine/volumetexture9.c | 4 +- src/gallium/frontends/omx/bellagio/vid_enc.c | 2 +- src/gallium/frontends/omx/tizonia/h264eprc.c | 2 +- src/gallium/frontends/osmesa/osmesa.c | 12 +- src/gallium/frontends/vdpau/mixer.c | 10 +- src/gallium/frontends/wgl/stw_context.c | 44 +- src/gallium/frontends/wgl/stw_device.c | 6 +- src/gallium/frontends/wgl/stw_ext_context.c | 4 +- src/gallium/frontends/wgl/stw_ext_pbuffer.c | 32 +- .../frontends/wgl/stw_ext_pixelformat.c | 142 ++--- .../frontends/wgl/stw_ext_rendertexture.c | 26 +- .../frontends/wgl/stw_ext_swapinterval.c | 4 +- src/gallium/frontends/wgl/stw_framebuffer.c | 28 +- src/gallium/frontends/wgl/stw_gdishim.c | 4 +- src/gallium/frontends/wgl/stw_pixelformat.c | 16 +- src/gallium/frontends/wgl/stw_st.c | 2 +- src/gallium/frontends/wgl/stw_tls.c | 10 +- src/gallium/frontends/xa/xa_composite.c | 36 +- src/gallium/frontends/xa/xa_context.c | 2 +- src/gallium/frontends/xa/xa_priv.h | 4 +- src/gallium/targets/d3d10sw/tests/tri.cpp | 2 +- src/gallium/targets/d3dadapter9/drm.c | 10 +- src/gallium/targets/libgl-gdi/stw_wgl.c | 14 +- src/gallium/targets/wgl/wgl.c | 14 +- src/gallium/tests/trivial/quad-tex.c | 2 +- src/gallium/tests/trivial/tri.c | 4 +- src/gallium/tests/unit/translate_test.c | 2 +- .../winsys/svga/drm/pb_buffer_simple_fenced.c | 26 +- src/gallium/winsys/svga/drm/vmw_buffer.c | 10 +- src/gallium/winsys/svga/drm/vmw_context.c | 28 +- src/gallium/winsys/svga/drm/vmw_screen.c | 6 +- src/gallium/winsys/svga/drm/vmw_screen_dri.c | 16 +- .../winsys/svga/drm/vmw_screen_ioctl.c | 62 +- .../winsys/svga/drm/vmw_screen_pools.c | 16 +- src/gallium/winsys/svga/drm/vmw_screen_svga.c | 12 +- src/gallium/winsys/svga/drm/vmw_surface.c | 22 +- .../winsys/virgl/drm/virgl_drm_winsys.c | 24 +- .../winsys/virgl/vtest/virgl_vtest_winsys.c | 16 +- src/glx/windows/wgl.c | 4 +- src/glx/windows/windows_drawable.c | 2 +- src/glx/windows/windowsgl.c | 10 +- src/intel/tools/imgui/imgui_impl_gtk3.cpp | 6 +- src/mesa/main/blit.c | 2 +- src/mesa/main/condrender.c | 12 +- src/mesa/main/fbobject.c | 4 +- src/mesa/main/performance_monitor.c | 8 +- src/mesa/main/queryobj.c | 12 +- src/mesa/main/renderbuffer.c | 2 +- src/mesa/state_tracker/st_atom_clip.c | 4 +- src/mesa/state_tracker/st_cb_bitmap.c | 2 +- src/mesa/state_tracker/st_cb_drawpixels.c | 6 +- src/mesa/state_tracker/st_cb_readpixels.c | 8 +- src/mesa/state_tracker/st_cb_texture.c | 42 +- src/mesa/state_tracker/st_context.c | 2 +- src/mesa/state_tracker/st_draw.c | 4 +- src/mesa/state_tracker/st_extensions.c | 2 +- src/microsoft/clc/compute_test.cpp | 2 +- src/microsoft/vulkan/dzn_cmd_buffer.c | 6 +- src/microsoft/vulkan/dzn_device.c | 2 +- src/microsoft/vulkan/dzn_meta.c | 6 +- src/microsoft/vulkan/dzn_sync.c | 4 +- src/util/os_misc.c | 4 +- src/util/u_debug_refcnt.c | 4 +- src/util/u_debug_symbol.c | 14 +- src/vulkan/wsi/wsi_common_win32.cpp | 2 +- 360 files changed, 3461 insertions(+), 3461 deletions(-) diff --git a/src/c11/impl/threads_win32.c b/src/c11/impl/threads_win32.c index eb818d96967..1b8df33dff1 100644 --- a/src/c11/impl/threads_win32.c +++ b/src/c11/impl/threads_win32.c @@ -106,7 +106,7 @@ static BOOL CALLBACK impl_call_once_callback(PINIT_ONCE InitOnce, PVOID Paramete struct impl_call_once_param *param = (struct impl_call_once_param*)Parameter; (param->func)(); ((void)InitOnce); ((void)Context); // suppress warning - return TRUE; + return true; } static struct impl_tss_dtor_entry { @@ -338,7 +338,7 @@ thrd_current(void) if (state->thrd.handle == NULL) { if (!DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), - &(state->thrd.handle), 0, FALSE, DUPLICATE_SAME_ACCESS)) + &(state->thrd.handle), 0, false, DUPLICATE_SAME_ACCESS)) { abort(); } diff --git a/src/egl/drivers/wgl/egl_wgl.c b/src/egl/drivers/wgl/egl_wgl.c index bc8027be189..17c8357d351 100644 --- a/src/egl/drivers/wgl/egl_wgl.c +++ b/src/egl/drivers/wgl/egl_wgl.c @@ -1004,7 +1004,7 @@ wgl_create_sync_khr(_EGLDisplay *disp, EGLenum type, const EGLAttrib *attrib_lis break; case EGL_SYNC_REUSABLE_KHR: - wgl_sync->event = CreateEvent(NULL, TRUE, FALSE, NULL); + wgl_sync->event = CreateEvent(NULL, true, false, NULL); if (!wgl_sync->event) { _eglError(EGL_BAD_ALLOC, "eglCreateSyncKHR"); free(wgl_sync); diff --git a/src/freedreno/perfcntrs/fdperf.c b/src/freedreno/perfcntrs/fdperf.c index c296eeee8ab..f1ca0c5d14c 100644 --- a/src/freedreno/perfcntrs/fdperf.c +++ b/src/freedreno/perfcntrs/fdperf.c @@ -573,7 +573,7 @@ counter_dialog(void) dialog = newwin(dh, dw, (h - dh) / 2, (w - dw) / 2); box(dialog, 0, 0); wrefresh(dialog); - keypad(dialog, TRUE); + keypad(dialog, true); while (true) { int max = MIN2(dh - 2, group->group->num_countables); @@ -660,7 +660,7 @@ main_ui(void) cbreak(); wtimeout(mainwin, options.refresh_ms); noecho(); - keypad(mainwin, TRUE); + keypad(mainwin, true); curs_set(0); start_color(); init_pair(COLOR_GROUP_HEADER, COLOR_WHITE, COLOR_GREEN); diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 9702ab6a0d1..3e86def31c5 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -312,11 +312,11 @@ cso_create_context(struct pipe_context *pipe, unsigned flags) if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_GEOMETRY, PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) { - ctx->has_geometry_shader = TRUE; + ctx->has_geometry_shader = true; } if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_TESS_CTRL, PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) { - ctx->has_tessellation = TRUE; + ctx->has_tessellation = true; } if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_COMPUTE, PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) { @@ -325,16 +325,16 @@ cso_create_context(struct pipe_context *pipe, unsigned flags) PIPE_SHADER_CAP_SUPPORTED_IRS); if (supported_irs & ((1 << PIPE_SHADER_IR_TGSI) | (1 << PIPE_SHADER_IR_NIR))) { - ctx->has_compute_shader = TRUE; + ctx->has_compute_shader = true; } } if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_MESH, PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) { - ctx->has_task_mesh_shader = TRUE; + ctx->has_task_mesh_shader = true; } if (pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS) != 0) { - ctx->has_streamout = TRUE; + ctx->has_streamout = true; } if (pipe->screen->get_param(pipe->screen, diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 1df934c906c..9ddf91b4f7c 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -57,9 +57,9 @@ bool draw_get_option_use_llvm(void) { #ifdef DRAW_LLVM_AVAILABLE - return debug_get_bool_option("DRAW_USE_LLVM", TRUE); + return debug_get_bool_option("DRAW_USE_LLVM", true); #else - return FALSE; + return false; #endif } @@ -106,7 +106,7 @@ err_out: struct draw_context * draw_create(struct pipe_context *pipe) { - return draw_create_context(pipe, NULL, TRUE); + return draw_create_context(pipe, NULL, true); } @@ -115,7 +115,7 @@ struct draw_context * draw_create_with_llvm_context(struct pipe_context *pipe, void *context) { - return draw_create_context(pipe, context, TRUE); + return draw_create_context(pipe, context, true); } #endif @@ -126,7 +126,7 @@ draw_create_with_llvm_context(struct pipe_context *pipe, struct draw_context * draw_create_no_llvm(struct pipe_context *pipe) { - return draw_create_context(pipe, NULL, FALSE); + return draw_create_context(pipe, NULL, false); } @@ -145,30 +145,30 @@ draw_init(struct draw_context *draw) ASSIGN_4V(draw->plane[3], 0, 1, 0, 1); ASSIGN_4V(draw->plane[4], 0, 0, 1, 1); /* yes these are correct */ ASSIGN_4V(draw->plane[5], 0, 0, -1, 1); /* mesa's a bit wonky */ - draw->clip_xy = TRUE; - draw->clip_z = TRUE; + draw->clip_xy = true; + draw->clip_z = true; draw->pt.user.planes = (float (*) [DRAW_TOTAL_CLIP_PLANES][4]) &(draw->plane[0]); draw->pt.user.eltMax = ~0; if (!draw_pipeline_init(draw)) - return FALSE; + return false; if (!draw_pt_init(draw)) - return FALSE; + return false; if (!draw_vs_init(draw)) - return FALSE; + return false; if (!draw_gs_init(draw)) - return FALSE; + return false; draw->quads_always_flatshade_last = !draw->pipe->screen->get_param( draw->pipe->screen, PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION); draw->floating_point_depth = false; - return TRUE; + return true; } @@ -852,13 +852,13 @@ void draw_do_flush(struct draw_context *draw, unsigned flags) if (!draw->suspend_flushing) { assert(!draw->flushing); /* catch inadvertant recursion */ - draw->flushing = TRUE; + draw->flushing = true; draw_pipeline_flush(draw, flags); draw_pt_flush(draw, flags); - draw->flushing = FALSE; + draw->flushing = false; } } @@ -1269,7 +1269,7 @@ draw_will_inject_frontface(const struct draw_context *draw) const struct pipe_rasterizer_state *rast = draw->rasterizer; if (reduced_prim != MESA_PRIM_TRIANGLES) { - return FALSE; + return false; } return (rast && diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index 1957ae5ac28..fb07656c518 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/src/gallium/auxiliary/draw/draw_gs.c @@ -687,7 +687,7 @@ draw_geometry_shader_run(struct draw_geometry_shader *shader, /* Update prim_info: */ for (int i = 0; i < shader->num_vertex_streams; i++) { - output_prims[i].linear = TRUE; + output_prims[i].linear = true; output_prims[i].elts = NULL; output_prims[i].start = 0; output_prims[i].count = shader->stream[i].emitted_vertices; @@ -744,7 +744,7 @@ draw_gs_init(struct draw_context *draw) MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector), 16); if (!draw->gs.tgsi.machine->Primitives[i] || !draw->gs.tgsi.machine->PrimitiveOffsets[i]) - return FALSE; + return false; memset(draw->gs.tgsi.machine->Primitives[i], 0, MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector)); memset(draw->gs.tgsi.machine->PrimitiveOffsets[i], 0, @@ -752,7 +752,7 @@ draw_gs_init(struct draw_context *draw) } } - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/draw/draw_gs_tmp.h b/src/gallium/auxiliary/draw/draw_gs_tmp.h index 9e6e1d761e1..3923a8f4f19 100644 --- a/src/gallium/auxiliary/draw/draw_gs_tmp.h +++ b/src/gallium/auxiliary/draw/draw_gs_tmp.h @@ -9,7 +9,7 @@ const unsigned prim = input_prims->prim; \ const unsigned prim_flags = input_prims->flags; \ const unsigned count = input_prims->count; \ - const bool quads_flatshade_last = FALSE; \ + const bool quads_flatshade_last = false; \ const bool last_vertex_last = !gs->draw->rasterizer->flatshade_first; \ do { \ switch (prim) { \ diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 9c05ea5e21b..4e8b0011dc7 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -681,7 +681,7 @@ fetch_instanced(struct gallivm_state *gallivm, aos = lp_build_fetch_rgba_aos(gallivm, format_desc, lp_float32_vec4_type(), - FALSE, + false, map_ptr, stride, zero, zero, NULL); @@ -752,7 +752,7 @@ fetch_vector(struct gallivm_state *gallivm, } lp_build_fetch_rgba_soa(gallivm, format_desc, - fetch_type, FALSE, map_ptr, offset, + fetch_type, false, map_ptr, offset, blduivec.zero, blduivec.zero, NULL, inputs); @@ -1275,7 +1275,7 @@ generate_clipmask(struct draw_llvm *llvm, int i; i = plane_idx - 6; - *have_clipdist = TRUE; + *have_clipdist = true; if (i < 4) { clipdist = LLVMBuildLoad2(builder, vec_type, outputs[cd[0]][i], ""); } else { @@ -1482,7 +1482,7 @@ draw_gs_llvm_emit_vertex(const struct lp_build_gs_iface *gs_base, outputs, clipmask, gs_info->num_outputs, gs_type, -1, - FALSE); + false); lp_build_endif(&if_ctx); } @@ -1604,7 +1604,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) LLVMValueRef variant_func; const unsigned pos = draw->vs.position_output; const unsigned cv = draw->vs.clipvertex_output; - bool have_clipdist = FALSE; + bool have_clipdist = false; struct lp_bld_tgsi_system_values system_values; memset(&system_values, 0, sizeof(system_values)); @@ -1686,9 +1686,9 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) LLVMPositionBuilderAtEnd(builder, block); memset(&vs_type, 0, sizeof vs_type); - vs_type.floating = TRUE; /* floating point values */ - vs_type.sign = TRUE; /* values are signed */ - vs_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */ + vs_type.floating = true; /* floating point values */ + vs_type.sign = true; /* values are signed */ + vs_type.norm = false; /* values are not limited to [0,1] or [-1,1] */ vs_type.width = 32; /* 32-bit float */ vs_type.length = vector_length; @@ -1890,8 +1890,8 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) LLVMPointerType(LLVMInt8TypeInContext(context), 0), ""); tmp = lp_build_gather(gallivm, vs_type.length, - 32, bld.type, TRUE, - fetch_elts, tmp, FALSE); + 32, bld.type, true, + fetch_elts, tmp, false); LLVMBuildStore(builder, tmp, index_store); } lp_build_else(&if_ctx); @@ -2039,7 +2039,7 @@ draw_llvm_make_variant_key(struct draw_llvm *llvm, char *store) key->bypass_viewport = llvm->draw->bypass_viewport; key->clip_halfz = llvm->draw->rasterizer->clip_halfz; /* XXX assumes edgeflag output not at 0 */ - key->need_edgeflags = (llvm->draw->vs.edgeflag_output ? TRUE : FALSE); + key->need_edgeflags = (llvm->draw->vs.edgeflag_output ? true : false); key->ucp_enable = llvm->draw->rasterizer->clip_plane_enable; key->has_gs_or_tes = llvm->draw->gs.geometry_shader != NULL || llvm->draw->tes.tess_eval_shader != NULL; key->num_outputs = draw_total_vs_outputs(llvm->draw); @@ -2404,9 +2404,9 @@ draw_gs_llvm_generate(struct draw_llvm *llvm, lp_build_context_init(&bld, gallivm, lp_type_int(32)); memset(&gs_type, 0, sizeof gs_type); - gs_type.floating = TRUE; /* floating point values */ - gs_type.sign = TRUE; /* values are signed */ - gs_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */ + gs_type.floating = true; /* floating point values */ + gs_type.sign = true; /* values are signed */ + gs_type.norm = false; /* values are not limited to [0,1] or [-1,1] */ gs_type.width = 32; /* 32-bit float */ gs_type.length = vector_length; @@ -2972,9 +2972,9 @@ draw_tcs_llvm_generate(struct draw_llvm *llvm, lp_build_context_init(&bld, gallivm, lp_type_int(32)); memset(&tcs_type, 0, sizeof tcs_type); - tcs_type.floating = TRUE; /* floating point values */ - tcs_type.sign = TRUE; /* values are signed */ - tcs_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */ + tcs_type.floating = true; /* floating point values */ + tcs_type.sign = true; /* values are signed */ + tcs_type.norm = false; /* values are not limited to [0,1] or [-1,1] */ tcs_type.width = 32; /* 32-bit float */ tcs_type.length = vector_length; @@ -3545,9 +3545,9 @@ draw_tes_llvm_generate(struct draw_llvm *llvm, lp_build_context_init(&bld, gallivm, lp_type_int(32)); memset(&tes_type, 0, sizeof tes_type); - tes_type.floating = TRUE; /* floating point values */ - tes_type.sign = TRUE; /* values are signed */ - tes_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */ + tes_type.floating = true; /* floating point values */ + tes_type.sign = true; /* values are signed */ + tes_type.norm = false; /* values are not limited to [0,1] or [-1,1] */ tes_type.width = 32; /* 32-bit float */ tes_type.length = vector_length; @@ -3643,7 +3643,7 @@ draw_tes_llvm_generate(struct draw_llvm *llvm, lp_int_type(tes_type), 0); convert_to_aos(gallivm, variant->vertex_header_type, io, NULL, outputs, clipmask, - draw_total_tes_outputs(llvm->draw), tes_type, primid_slot, FALSE); + draw_total_tes_outputs(llvm->draw), tes_type, primid_slot, false); } lp_build_loop_end_cond(&lp_loop, num_tess_coord, step, LLVMIntUGE); lp_bld_llvm_sampler_soa_destroy(sampler); diff --git a/src/gallium/auxiliary/draw/draw_mesh_prim.c b/src/gallium/auxiliary/draw/draw_mesh_prim.c index 6670b0e09ad..f4ff70271b6 100644 --- a/src/gallium/auxiliary/draw/draw_mesh_prim.c +++ b/src/gallium/auxiliary/draw/draw_mesh_prim.c @@ -198,7 +198,7 @@ draw_mesh_prim_run(struct draw_context *draw, asmblr->per_prim = per_prim_inputs; asmblr->cull_prim_idx = cull_prim_idx; - output_prims->linear = TRUE; + output_prims->linear = true; output_prims->elts = NULL; output_prims->start = 0; output_prims->prim = input_prims->prim; diff --git a/src/gallium/auxiliary/draw/draw_pipe.c b/src/gallium/auxiliary/draw/draw_pipe.c index ced23d8ec82..067c8189e74 100644 --- a/src/gallium/auxiliary/draw/draw_pipe.c +++ b/src/gallium/auxiliary/draw/draw_pipe.c @@ -64,16 +64,16 @@ draw_pipeline_init(struct draw_context *draw) !draw->pipeline.cull || !draw->pipeline.user_cull || !draw->pipeline.validate) - return FALSE; + return false; /* these defaults are oriented toward the needs of softpipe */ draw->pipeline.wide_point_threshold = 1000000.0f; /* infinity */ draw->pipeline.wide_line_threshold = 1.0f; - draw->pipeline.wide_point_sprites = FALSE; - draw->pipeline.line_stipple = TRUE; - draw->pipeline.point_sprite = TRUE; + draw->pipeline.wide_point_sprites = false; + draw->pipeline.line_stipple = true; + draw->pipeline.point_sprite = true; - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c index c0f7c6e0e0b..9720faa200e 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c @@ -359,14 +359,14 @@ generate_aaline_fs_nir(struct aaline_stage *aaline) aaline_fs = *orig_fs; /* copy to init */ aaline_fs.ir.nir = nir_shader_clone(NULL, orig_fs->ir.nir); if (!aaline_fs.ir.nir) - return FALSE; + return false; nir_lower_aaline_fs(aaline_fs.ir.nir, &aaline->fs->generic_attrib, NULL, NULL); aaline->fs->aaline_fs = aaline->driver_create_fs_state(pipe, &aaline_fs); if (aaline->fs->aaline_fs == NULL) - return FALSE; + return false; - return TRUE; + return true; } /** @@ -382,17 +382,17 @@ bind_aaline_fragment_shader(struct aaline_stage *aaline) if (!aaline->fs->aaline_fs) { if (aaline->fs->state.type == PIPE_SHADER_IR_NIR) { if (!generate_aaline_fs_nir(aaline)) - return FALSE; + return false; } else if (!generate_aaline_fs(aaline)) - return FALSE; + return false; } - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; aaline->driver_bind_fs_state(pipe, aaline->fs->aaline_fs); - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; - return TRUE; + return true; } @@ -527,13 +527,13 @@ aaline_first_line(struct draw_stage *stage, struct prim_header *header) draw_aaline_prepare_outputs(draw, draw->pipeline.aaline); - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; /* Disable triangle culling, stippling, unfilled mode etc. */ r = draw_get_rasterizer_no_cull(draw, rast); pipe->bind_rasterizer_state(pipe, r); - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; /* now really draw first line */ stage->line = aaline_line; @@ -552,7 +552,7 @@ aaline_flush(struct draw_stage *stage, unsigned flags) stage->next->flush(stage->next, flags); /* restore original frag shader */ - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; aaline->driver_bind_fs_state(pipe, aaline->fs ? aaline->fs->driver_fs : NULL); /* restore original rasterizer state */ @@ -560,7 +560,7 @@ aaline_flush(struct draw_stage *stage, unsigned flags) pipe->bind_rasterizer_state(pipe, draw->rast_handle); } - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; draw_remove_extra_vertex_attribs(draw); } @@ -743,7 +743,7 @@ draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe) */ aaline = draw_aaline_stage(draw); if (!aaline) - return FALSE; + return false; /* save original driver functions */ aaline->driver_create_fs_state = pipe->create_fs_state; @@ -759,5 +759,5 @@ draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe) */ draw->pipeline.aaline = &aaline->stage; - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c index 0c7be92e16f..14fbb842026 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c +++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c @@ -246,7 +246,7 @@ aa_transform_prolog(struct tgsi_transform_context *ctx) /* KILL_IF -tmp0.yyyy; # if -tmp0.y < 0, KILL */ tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, tmp0, - TGSI_SWIZZLE_Y, TRUE); + TGSI_SWIZZLE_Y, true); /* compute coverage factor = (1-d)/(1-k) */ @@ -401,11 +401,11 @@ generate_aapoint_fs(struct aapoint_stage *aapoint) aapoint->fs->generic_attrib = transform.maxGeneric + 1; FREE((void *)aapoint_fs.tokens); - return TRUE; + return true; fail: FREE((void *)aapoint_fs.tokens); - return FALSE; + return false; } @@ -419,17 +419,17 @@ generate_aapoint_fs_nir(struct aapoint_stage *aapoint) aapoint_fs = *orig_fs; /* copy to init */ aapoint_fs.ir.nir = nir_shader_clone(NULL, orig_fs->ir.nir); if (!aapoint_fs.ir.nir) - return FALSE; + return false; nir_lower_aapoint_fs(aapoint_fs.ir.nir, &aapoint->fs->generic_attrib, aapoint->bool_type); aapoint->fs->aapoint_fs = aapoint->driver_create_fs_state(pipe, &aapoint_fs); if (aapoint->fs->aapoint_fs == NULL) goto fail; - return TRUE; + return true; fail: - return FALSE; + return false; } @@ -446,16 +446,16 @@ bind_aapoint_fragment_shader(struct aapoint_stage *aapoint) if (!aapoint->fs->aapoint_fs) { if (aapoint->fs->state.type == PIPE_SHADER_IR_NIR) { if (!generate_aapoint_fs_nir(aapoint)) - return FALSE; + return false; } else if (!generate_aapoint_fs(aapoint)) - return FALSE; + return false; } - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; aapoint->driver_bind_fs_state(pipe, aapoint->fs->aapoint_fs); - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; - return TRUE; + return true; } @@ -590,13 +590,13 @@ aapoint_first_point(struct draw_stage *stage, struct prim_header *header) draw_aapoint_prepare_outputs(draw, draw->pipeline.aapoint); - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; /* Disable triangle culling, stippling, unfilled mode etc. */ r = draw_get_rasterizer_no_cull(draw, rast); pipe->bind_rasterizer_state(pipe, r); - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; /* now really draw first point */ stage->point = aapoint_point; @@ -615,7 +615,7 @@ aapoint_flush(struct draw_stage *stage, unsigned flags) stage->next->flush(stage->next, flags); /* restore original frag shader */ - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; aapoint->driver_bind_fs_state(pipe, aapoint->fs ? aapoint->fs->driver_fs : NULL); /* restore original rasterizer state */ @@ -623,7 +623,7 @@ aapoint_flush(struct draw_stage *stage, unsigned flags) pipe->bind_rasterizer_state(pipe, draw->rast_handle); } - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; draw_remove_extra_vertex_attribs(draw); } @@ -809,7 +809,7 @@ draw_install_aapoint_stage(struct draw_context *draw, */ aapoint = draw_aapoint_stage(draw, bool_type); if (!aapoint) - return FALSE; + return false; /* save original driver functions */ aapoint->driver_create_fs_state = pipe->create_fs_state; @@ -823,5 +823,5 @@ draw_install_aapoint_stage(struct draw_context *draw, draw->pipeline.aapoint = &aapoint->stage; - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/draw/draw_pipe_clip.c b/src/gallium/auxiliary/draw/draw_pipe_clip.c index 107df628ad8..9f0f9b315c6 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_clip.c +++ b/src/gallium/auxiliary/draw/draw_pipe_clip.c @@ -484,13 +484,13 @@ do_clip_tri(struct draw_stage *stage, */ if (is_user_clip_plane) { /* we want to see an edge along the clip plane */ - *new_edge = TRUE; - new_vert->edgeflag = TRUE; + *new_edge = true; + new_vert->edgeflag = true; } else { /* we don't want to see an edge along the frustum clip plane */ *new_edge = *edge_prev; - new_vert->edgeflag = FALSE; + new_vert->edgeflag = false; } } else { diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c index dec2a26e791..1dd40918cab 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c @@ -143,7 +143,7 @@ generate_pstip_fs(struct pstip_stage *pstip) 0, wincoord_file); if (pstip_fs.tokens == NULL) - return FALSE; + return false; } else { pstip_fs.ir.nir = nir_shader_clone(NULL, orig_fs->ir.nir); nir_lower_pstipple_fs(pstip_fs.ir.nir, @@ -158,9 +158,9 @@ generate_pstip_fs(struct pstip_stage *pstip) FREE((void *)pstip_fs.tokens); if (!pstip->fs->pstip_fs) - return FALSE; + return false; - return TRUE; + return true; } @@ -174,12 +174,12 @@ bind_pstip_fragment_shader(struct pstip_stage *pstip) struct draw_context *draw = pstip->stage.draw; if (!pstip->fs->pstip_fs && !generate_pstip_fs(pstip)) - return FALSE; + return false; - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; pstip->driver_bind_fs_state(pstip->pipe, pstip->fs->pstip_fs); - draw->suspend_flushing = FALSE; - return TRUE; + draw->suspend_flushing = false; + return true; } @@ -220,7 +220,7 @@ pstip_first_tri(struct draw_stage *stage, struct prim_header *header) assert(num_samplers <= PIPE_MAX_SAMPLERS); - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; pstip->driver_bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0, num_samplers, pstip->state.samplers); @@ -229,7 +229,7 @@ pstip_first_tri(struct draw_stage *stage, struct prim_header *header) num_sampler_views, 0, false, pstip->state.sampler_views); - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; /* now really draw first triangle */ stage->tri = draw_pipe_passthrough_tri; @@ -248,7 +248,7 @@ pstip_flush(struct draw_stage *stage, unsigned flags) stage->next->flush(stage->next, flags); /* restore original frag shader, texture, sampler state */ - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; pstip->driver_bind_fs_state(pipe, pstip->fs ? pstip->fs->driver_fs : NULL); pstip->driver_bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0, @@ -259,7 +259,7 @@ pstip_flush(struct draw_stage *stage, unsigned flags) pstip->num_sampler_views, 0, false, pstip->state.sampler_views); - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; } @@ -513,11 +513,11 @@ draw_install_pstipple_stage(struct draw_context *draw, pipe->set_sampler_views = pstip_set_sampler_views; pipe->set_polygon_stipple = pstip_set_polygon_stipple; - return TRUE; + return true; fail: if (pstip) pstip->stage.destroy(&pstip->stage); - return FALSE; + return false; } diff --git a/src/gallium/auxiliary/draw/draw_pipe_util.c b/src/gallium/auxiliary/draw/draw_pipe_util.c index 01c4cbb623d..91ed2ddfe9f 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_util.c +++ b/src/gallium/auxiliary/draw/draw_pipe_util.c @@ -76,19 +76,19 @@ draw_alloc_temp_verts(struct draw_stage *stage, unsigned nr) ubyte *store = (ubyte *) MALLOC(MAX_VERTEX_SIZE * nr + DRAW_EXTRA_VERTICES_PADDING); if (!store) - return FALSE; + return false; stage->tmp = (struct vertex_header **) MALLOC(sizeof(struct vertex_header *) * nr); if (stage->tmp == NULL) { FREE(store); - return FALSE; + return false; } for (unsigned i = 0; i < nr; i++) stage->tmp[i] = (struct vertex_header *)(store + i * MAX_VERTEX_SIZE); } - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/draw/draw_pipe_validate.c b/src/gallium/auxiliary/draw/draw_pipe_validate.c index d0236b20241..d53f27ca342 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_validate.c +++ b/src/gallium/auxiliary/draw/draw_pipe_validate.c @@ -66,60 +66,60 @@ draw_need_pipeline(const struct draw_context *draw, if (reduced_prim == MESA_PRIM_LINES) { /* line stipple */ if (rasterizer->line_stipple_enable && draw->pipeline.line_stipple) - return TRUE; + return true; /* wide lines */ if (roundf(rasterizer->line_width) > draw->pipeline.wide_line_threshold) - return TRUE; + return true; /* AA lines */ if ((!rasterizer->multisample && rasterizer->line_smooth) && draw->pipeline.aaline) - return TRUE; + return true; if (draw_current_shader_num_written_culldistances(draw)) - return TRUE; + return true; } else if (reduced_prim == MESA_PRIM_POINTS) { /* large points */ if (rasterizer->point_size > draw->pipeline.wide_point_threshold) - return TRUE; + return true; /* sprite points */ if (rasterizer->point_quad_rasterization && draw->pipeline.wide_point_sprites) - return TRUE; + return true; /* AA points */ if ((!rasterizer->multisample && rasterizer->point_smooth) && draw->pipeline.aapoint) - return TRUE; + return true; /* point sprites */ if (rasterizer->sprite_coord_enable && draw->pipeline.point_sprite) - return TRUE; + return true; if (draw_current_shader_num_written_culldistances(draw)) - return TRUE; + return true; } else if (reduced_prim == MESA_PRIM_TRIANGLES) { /* polygon stipple */ if (rasterizer->poly_stipple_enable && draw->pipeline.pstipple) - return TRUE; + return true; /* unfilled polygons */ if (rasterizer->fill_front != PIPE_POLYGON_MODE_FILL || rasterizer->fill_back != PIPE_POLYGON_MODE_FILL) - return TRUE; + return true; /* polygon offset */ if (rasterizer->offset_point || rasterizer->offset_line || rasterizer->offset_tri) - return TRUE; + return true; /* two-side lighting */ if (rasterizer->light_twoside) - return TRUE; + return true; if (draw_current_shader_num_written_culldistances(draw)) - return TRUE; + return true; } /* polygon cull - this is difficult - hardware can cull just fine @@ -131,7 +131,7 @@ draw_need_pipeline(const struct draw_context *draw, return TRUE; */ - return FALSE; + return false; } @@ -144,8 +144,8 @@ validate_pipeline(struct draw_stage *stage) { struct draw_context *draw = stage->draw; struct draw_stage *next = draw->pipeline.rasterize; - bool need_det = FALSE; - bool precalc_flat = FALSE; + bool need_det = false; + bool precalc_flat = false; bool wide_lines, wide_points; const struct pipe_rasterizer_state *rast = draw->rasterizer; @@ -161,15 +161,15 @@ validate_pipeline(struct draw_stage *stage) /* drawing large/sprite points (but not AA points)? */ if (rast->sprite_coord_enable && draw->pipeline.point_sprite) - wide_points = TRUE; + wide_points = true; else if ((!rast->multisample && rast->point_smooth) && draw->pipeline.aapoint) - wide_points = FALSE; + wide_points = false; else if (rast->point_size > draw->pipeline.wide_point_threshold) - wide_points = TRUE; + wide_points = true; else if (rast->point_quad_rasterization && draw->pipeline.wide_point_sprites) - wide_points = TRUE; + wide_points = true; else - wide_points = FALSE; + wide_points = false; /* * NOTE: we build up the pipeline in end-to-start order. @@ -181,7 +181,7 @@ validate_pipeline(struct draw_stage *stage) if ((!rast->multisample && rast->line_smooth) && draw->pipeline.aaline) { draw->pipeline.aaline->next = next; next = draw->pipeline.aaline; - precalc_flat = TRUE; + precalc_flat = true; } if ((!rast->multisample && rast->point_smooth) && draw->pipeline.aapoint) { @@ -192,7 +192,7 @@ validate_pipeline(struct draw_stage *stage) if (wide_lines) { draw->pipeline.wide_line->next = next; next = draw->pipeline.wide_line; - precalc_flat = TRUE; + precalc_flat = true; } if (wide_points) { @@ -203,7 +203,7 @@ validate_pipeline(struct draw_stage *stage) if (rast->line_stipple_enable && draw->pipeline.line_stipple) { draw->pipeline.stipple->next = next; next = draw->pipeline.stipple; - precalc_flat = TRUE; /* only needed for lines really */ + precalc_flat = true; /* only needed for lines really */ } if (rast->poly_stipple_enable @@ -216,8 +216,8 @@ validate_pipeline(struct draw_stage *stage) rast->fill_back != PIPE_POLYGON_MODE_FILL) { draw->pipeline.unfilled->next = next; next = draw->pipeline.unfilled; - precalc_flat = TRUE; /* only needed for triangles really */ - need_det = TRUE; + precalc_flat = true; /* only needed for triangles really */ + need_det = true; } if (precalc_flat) { @@ -234,13 +234,13 @@ validate_pipeline(struct draw_stage *stage) rast->offset_tri) { draw->pipeline.offset->next = next; next = draw->pipeline.offset; - need_det = TRUE; + need_det = true; } if (rast->light_twoside) { draw->pipeline.twoside->next = next; next = draw->pipeline.twoside; - need_det = TRUE; + need_det = true; } /* Always run the cull stage as we calculate determinant there diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c index cfcbbecd4f1..baf2f5fb7a2 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c +++ b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c @@ -147,9 +147,9 @@ wideline_first_line(struct draw_stage *stage, /* Disable triangle culling, stippling, unfilled mode etc. */ r = draw_get_rasterizer_no_cull(draw, rast); - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; pipe->bind_rasterizer_state(pipe, r); - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; stage->line = wideline_line; @@ -168,9 +168,9 @@ wideline_flush(struct draw_stage *stage, unsigned flags) /* restore original rasterizer state */ if (draw->rast_handle) { - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; pipe->bind_rasterizer_state(pipe, draw->rast_handle); - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; } } diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c index 6cf486d530e..d8254d4701a 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c +++ b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c @@ -215,9 +215,9 @@ widepoint_first_point(struct draw_stage *stage, /* Disable triangle culling, stippling, unfilled mode etc. */ r = draw_get_rasterizer_no_cull(draw, rast); - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; pipe->bind_rasterizer_state(pipe, r); - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; /* XXX we won't know the real size if it's computed by the vertex shader! */ if ((rast->point_size > draw->pipeline.wide_point_threshold) || @@ -286,9 +286,9 @@ widepoint_flush(struct draw_stage *stage, unsigned flags) /* restore original rasterizer state */ if (draw->rast_handle) { - draw->suspend_flushing = TRUE; + draw->suspend_flushing = true; pipe->bind_rasterizer_state(pipe, draw->rast_handle); - draw->suspend_flushing = FALSE; + draw->suspend_flushing = false; } } diff --git a/src/gallium/auxiliary/draw/draw_prim_assembler.c b/src/gallium/auxiliary/draw/draw_prim_assembler.c index 2c48a4155f8..069b4f76773 100644 --- a/src/gallium/auxiliary/draw/draw_prim_assembler.c +++ b/src/gallium/auxiliary/draw/draw_prim_assembler.c @@ -67,9 +67,9 @@ needs_primid(const struct draw_context *draw) else if (tes) return !tes->info.uses_primid; else - return TRUE; + return true; } - return FALSE; + return false; } @@ -80,13 +80,13 @@ draw_prim_assembler_is_required(const struct draw_context *draw, { /* viewport index requires primitive boundaries to get correct vertex */ if (draw_current_shader_uses_viewport_index(draw)) - return TRUE; + return true; switch (prim_info->prim) { case MESA_PRIM_LINES_ADJACENCY: case MESA_PRIM_LINE_STRIP_ADJACENCY: case MESA_PRIM_TRIANGLES_ADJACENCY: case MESA_PRIM_TRIANGLE_STRIP_ADJACENCY: - return TRUE; + return true; default: return needs_primid(draw); } @@ -285,7 +285,7 @@ draw_prim_assembler_run(struct draw_context *draw, asmblr->needs_primid = needs_primid(asmblr->draw); asmblr->num_prims = 0; - output_prims->linear = TRUE; + output_prims->linear = true; output_prims->elts = NULL; output_prims->start = 0; output_prims->prim = assembled_prim; diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index cf834d759ed..ae3f543504c 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -44,8 +44,8 @@ #include "util/u_draw.h" -DEBUG_GET_ONCE_BOOL_OPTION(draw_fse, "DRAW_FSE", FALSE) -DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", FALSE) +DEBUG_GET_ONCE_BOOL_OPTION(draw_fse, "DRAW_FSE", false) +DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", false) /* Overall we split things into: @@ -129,7 +129,7 @@ draw_pt_arrays(struct draw_context *draw, if (draw->pt.rebind_parameters) { /* update constants, viewport dims, clip planes, etc */ middle->bind_parameters(middle); - draw->pt.rebind_parameters = FALSE; + draw->pt.rebind_parameters = false; } for (unsigned i = 0; i < num_draws; i++) { @@ -164,7 +164,7 @@ draw_pt_arrays(struct draw_context *draw, draw->pt.user.drawid++; } - return TRUE; + return true; } @@ -182,7 +182,7 @@ draw_pt_flush(struct draw_context *draw, unsigned flags) } if (flags & DRAW_FLUSH_PARAMETER_CHANGE) { - draw->pt.rebind_parameters = TRUE; + draw->pt.rebind_parameters = true; } } @@ -195,15 +195,15 @@ draw_pt_init(struct draw_context *draw) draw->pt.front.vsplit = draw_pt_vsplit(draw); if (!draw->pt.front.vsplit) - return FALSE; + return false; draw->pt.middle.fetch_shade_emit = draw_pt_middle_fse(draw); if (!draw->pt.middle.fetch_shade_emit) - return FALSE; + return false; draw->pt.middle.general = draw_pt_fetch_pipeline_or_emit(draw); if (!draw->pt.middle.general) - return FALSE; + return false; #ifdef DRAW_LLVM_AVAILABLE if (draw->llvm) { @@ -212,7 +212,7 @@ draw_pt_init(struct draw_context *draw) } #endif - return TRUE; + return true; } 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 1f2ecf3af82..08b10e576f3 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c @@ -313,11 +313,11 @@ fse_run_linear_elts(struct draw_pt_middle_end *middle, if (!draw->render->allocate_vertices(draw->render, (ushort) fse->key.output_stride, (ushort) count)) - return FALSE; + return false; hw_verts = draw->render->map_vertices(draw->render); if (!hw_verts) - return FALSE; + return false; /* Single routine to fetch vertices, run shader and emit HW verts. * Clipping is done elsewhere -- either by the API or on hardware, @@ -331,7 +331,7 @@ fse_run_linear_elts(struct draw_pt_middle_end *middle, draw->render->release_vertices(draw->render); - return TRUE; + return true; } 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 60ac9f32ff0..1ca4b07cd67 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -120,9 +120,9 @@ fetch_pipeline_prepare(struct draw_pt_middle_end *middle, draw->guard_band_xy, draw->bypass_viewport, draw->rasterizer->clip_halfz, - (draw->vs.edgeflag_output ? TRUE : FALSE)); + (draw->vs.edgeflag_output ? true : false)); - draw_pt_so_emit_prepare(fpme->so_emit, FALSE); + draw_pt_so_emit_prepare(fpme->so_emit, false); if (!(opt & PT_PIPELINE)) { draw_pt_emit_prepare(fpme->emit, gs_out_prim, max_vertices); @@ -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; - bool free_prim_info = FALSE; + bool free_prim_info = false; unsigned opt = fpme->opt; int num_vertex_streams = 1; @@ -315,7 +315,7 @@ fetch_pipeline_generic(struct draw_pt_middle_end *middle, FREE(vert_info->verts); vert_info = &ia_vert_info; prim_info = &ia_prim_info; - free_prim_info = TRUE; + free_prim_info = true; } } } @@ -386,12 +386,12 @@ fetch_pipeline_run(struct draw_pt_middle_end *middle, struct draw_fetch_info fetch_info; struct draw_prim_info prim_info; - fetch_info.linear = FALSE; + fetch_info.linear = false; fetch_info.start = 0; fetch_info.elts = fetch_elts; fetch_info.count = fetch_count; - prim_info.linear = FALSE; + prim_info.linear = false; prim_info.start = 0; prim_info.count = draw_count; prim_info.elts = draw_elts; @@ -414,12 +414,12 @@ fetch_pipeline_linear_run(struct draw_pt_middle_end *middle, struct draw_fetch_info fetch_info; struct draw_prim_info prim_info; - fetch_info.linear = TRUE; + fetch_info.linear = true; fetch_info.start = start; fetch_info.count = count; fetch_info.elts = NULL; - prim_info.linear = TRUE; + prim_info.linear = true; prim_info.start = 0; prim_info.count = count; prim_info.elts = NULL; @@ -444,12 +444,12 @@ fetch_pipeline_linear_run_elts(struct draw_pt_middle_end *middle, struct draw_fetch_info fetch_info; struct draw_prim_info prim_info; - fetch_info.linear = TRUE; + fetch_info.linear = true; fetch_info.start = start; fetch_info.count = count; fetch_info.elts = NULL; - prim_info.linear = FALSE; + prim_info.linear = false; prim_info.start = 0; prim_info.count = draw_count; prim_info.elts = draw_elts; @@ -460,7 +460,7 @@ fetch_pipeline_linear_run_elts(struct draw_pt_middle_end *middle, fetch_pipeline_generic(middle, &fetch_info, &prim_info); - return TRUE; + return true; } 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 950fc4fe7eb..1650fa1e2bd 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 @@ -305,7 +305,7 @@ llvm_middle_end_prepare(struct draw_pt_middle_end *middle, draw->guard_band_xy, draw->bypass_viewport, draw->rasterizer->clip_halfz, - (draw->vs.edgeflag_output ? TRUE : FALSE)); + (draw->vs.edgeflag_output ? true : false)); draw_pt_so_emit_prepare(fpme->so_emit, (gs == NULL && tes == NULL)); @@ -511,7 +511,7 @@ 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; - bool free_prim_info = FALSE; + bool free_prim_info = false; unsigned opt = fpme->opt; bool clipped = 0; ushort *tes_elts_out = NULL; @@ -607,7 +607,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle, FREE(vert_info->verts); vert_info = &tes_vert_info; prim_info = &tes_prim_info; - free_prim_info = TRUE; + free_prim_info = true; /* * pt emit can only handle ushort number of vertices (see @@ -641,7 +641,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle, } vert_info = &gs_vert_info[0]; prim_info = &gs_prim_info[0]; - free_prim_info = FALSE; + free_prim_info = false; /* * pt emit can only handle ushort number of vertices (see * render->allocate_vertices). @@ -666,7 +666,7 @@ llvm_pipeline_generic(struct draw_pt_middle_end *middle, } vert_info = &ia_vert_info; prim_info = &ia_prim_info; - free_prim_info = TRUE; + free_prim_info = true; } } } @@ -739,12 +739,12 @@ llvm_middle_end_run(struct draw_pt_middle_end *middle, struct draw_fetch_info fetch_info; struct draw_prim_info prim_info; - fetch_info.linear = FALSE; + fetch_info.linear = false; fetch_info.start = 0; fetch_info.elts = fetch_elts; fetch_info.count = fetch_count; - prim_info.linear = FALSE; + prim_info.linear = false; prim_info.start = 0; prim_info.count = draw_count; prim_info.elts = draw_elts; @@ -767,12 +767,12 @@ llvm_middle_end_linear_run(struct draw_pt_middle_end *middle, struct draw_fetch_info fetch_info; struct draw_prim_info prim_info; - fetch_info.linear = TRUE; + fetch_info.linear = true; fetch_info.start = start; fetch_info.count = count; fetch_info.elts = NULL; - prim_info.linear = TRUE; + prim_info.linear = true; prim_info.start = 0; prim_info.count = count; prim_info.elts = NULL; @@ -797,12 +797,12 @@ llvm_middle_end_linear_run_elts(struct draw_pt_middle_end *middle, struct draw_fetch_info fetch_info; struct draw_prim_info prim_info; - fetch_info.linear = TRUE; + fetch_info.linear = true; fetch_info.start = start; fetch_info.count = count; fetch_info.elts = NULL; - prim_info.linear = FALSE; + prim_info.linear = false; prim_info.start = 0; prim_info.count = draw_count; prim_info.elts = draw_elts; @@ -813,7 +813,7 @@ llvm_middle_end_linear_run_elts(struct draw_pt_middle_end *middle, llvm_pipeline_generic(middle, &fetch_info, &prim_info); - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/draw/draw_pt_mesh_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_mesh_pipeline.c index 378759573a7..95ffd851524 100644 --- a/src/gallium/auxiliary/draw/draw_pt_mesh_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_mesh_pipeline.c @@ -80,7 +80,7 @@ mesh_middle_end_prepare(struct draw_pt_middle_end *middle, draw->guard_band_xy, draw->bypass_viewport, draw->rasterizer->clip_halfz, - FALSE); + false); draw_pt_so_emit_prepare(mpme->so_emit, false); diff --git a/src/gallium/auxiliary/draw/draw_pt_so_emit.c b/src/gallium/auxiliary/draw/draw_pt_so_emit.c index 3a58d8f5567..cef6b007676 100644 --- a/src/gallium/auxiliary/draw/draw_pt_so_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_so_emit.c @@ -80,9 +80,9 @@ draw_has_so(const struct draw_context *draw) const struct pipe_stream_output_info *state = draw_so_info(draw); if (state && state->num_outputs > 0) - return TRUE; + return true; - return FALSE; + return false; } void @@ -98,10 +98,10 @@ draw_pt_so_emit_prepare(struct pt_so_emit *emit, bool use_pre_clip_pos) /* if we have a state with outputs make sure we have * buffers to output to */ if (emit->has_so) { - bool 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; + has_valid_buffer = true; break; } } @@ -191,7 +191,7 @@ so_emit_prim(struct pt_so_emit *so, continue; unsigned ob = state->output[slot].output_buffer; - buffer_written[ob] = TRUE; + buffer_written[ob] = true; float *buffer = (float *)((char *)draw->so.targets[ob]->mapping + draw->so.targets[ob]->target.buffer_offset + diff --git a/src/gallium/auxiliary/draw/draw_so_emit_tmp.h b/src/gallium/auxiliary/draw/draw_so_emit_tmp.h index adb5e69107a..8abda74e87f 100644 --- a/src/gallium/auxiliary/draw/draw_so_emit_tmp.h +++ b/src/gallium/auxiliary/draw/draw_so_emit_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 bool quads_flatshade_last = FALSE; \ + const bool quads_flatshade_last = false; \ const bool last_vertex_last = !so->draw->rasterizer->flatshade_first; \ do { \ switch (prim) { \ diff --git a/src/gallium/auxiliary/draw/draw_tess.c b/src/gallium/auxiliary/draw/draw_tess.c index 565867226d6..b93acc199c7 100644 --- a/src/gallium/auxiliary/draw/draw_tess.c +++ b/src/gallium/auxiliary/draw/draw_tess.c @@ -66,7 +66,7 @@ llvm_fetch_tcs_input(struct draw_tess_ctrl_shader *shader, for (i = 0; i < num_vertices; i++) { const float (*input)[4]; int vertex_idx = prim_id * num_vertices + i; - if (input_prim_info->linear == FALSE) + if (input_prim_info->linear == false) vertex_idx = input_prim_info->elts[vertex_idx]; #if DEBUG_INPUTS debug_printf("%d) tcs vertex index = %d (prim idx = %d)\n", @@ -175,7 +175,7 @@ int draw_tess_ctrl_shader_run(struct draw_tess_ctrl_shader *shader, shader->input_vertex_stride = input_stride; shader->input_info = input_info; - output_prims->linear = TRUE; + output_prims->linear = true; output_prims->start = 0; output_prims->elts = NULL; output_prims->count = 0; @@ -230,7 +230,7 @@ llvm_fetch_tes_input(struct draw_tess_eval_shader *shader, const float (*input)[4]; int vertex_idx = prim_id * num_vertices + i; - if (input_prim_info->linear == FALSE) + if (input_prim_info->linear == false) vertex_idx = input_prim_info->elts[vertex_idx]; #if DEBUG_INPUTS debug_printf("%d) tes vertex index = %d (prim idx = %d)\n", @@ -336,7 +336,7 @@ int draw_tess_eval_shader_run(struct draw_tess_eval_shader *shader, output_verts->count = 0; output_verts->verts = NULL; - output_prims->linear = FALSE; + output_prims->linear = false; output_prims->start = 0; output_prims->elts = NULL; output_prims->count = 0; diff --git a/src/gallium/auxiliary/draw/draw_vs.c b/src/gallium/auxiliary/draw/draw_vs.c index 7f42bf1c6e5..bbeca737d3a 100644 --- a/src/gallium/auxiliary/draw/draw_vs.c +++ b/src/gallium/auxiliary/draw/draw_vs.c @@ -51,7 +51,7 @@ #include "nir/nir_to_tgsi.h" -DEBUG_GET_ONCE_BOOL_OPTION(gallium_dump_vs, "GALLIUM_DUMP_VS", FALSE) +DEBUG_GET_ONCE_BOOL_OPTION(gallium_dump_vs, "GALLIUM_DUMP_VS", false) struct draw_vertex_shader * @@ -91,7 +91,7 @@ draw_create_vertex_shader(struct draw_context *draw, #endif if (vs) { - bool found_clipvertex = FALSE; + bool found_clipvertex = false; vs->position_output = -1; for (unsigned i = 0; i < vs->info.num_outputs; i++) { if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_POSITION && @@ -102,7 +102,7 @@ draw_create_vertex_shader(struct draw_context *draw, vs->edgeflag_output = i; } else if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_CLIPVERTEX && vs->info.output_semantic_index[i] == 0) { - found_clipvertex = TRUE; + found_clipvertex = true; vs->clipvertex_output = i; } else if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_VIEWPORT_INDEX) { vs->viewport_index_output = i; @@ -166,18 +166,18 @@ draw_vs_init(struct draw_context *draw) if (!draw->llvm) { draw->vs.tgsi.machine = tgsi_exec_machine_create(PIPE_SHADER_VERTEX); if (!draw->vs.tgsi.machine) - return FALSE; + return false; } draw->vs.emit_cache = translate_cache_create(); if (!draw->vs.emit_cache) - return FALSE; + return false; draw->vs.fetch_cache = translate_cache_create(); if (!draw->vs.fetch_cache) - return FALSE; + return false; - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 203e94f0b67..d0264e42c9f 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -1273,7 +1273,7 @@ lp_build_div(struct lp_build_context *bld, return bld->undef; /* fast rcp is disabled (just uses div), so makes no sense to try that */ - if (FALSE && + if (false && ((util_get_cpu_caps()->has_sse && type.width == 32 && type.length == 4) || (util_get_cpu_caps()->has_avx && type.width == 32 && type.length == 8)) && type.floating) @@ -1861,16 +1861,16 @@ arch_rounding_available(const struct lp_type type) (type.length == 1 || type.width*type.length == 128)) || (util_get_cpu_caps()->has_avx && type.width*type.length == 256) || (util_get_cpu_caps()->has_avx512f && type.width*type.length == 512)) - return TRUE; + return true; else if ((util_get_cpu_caps()->has_altivec && (type.width == 32 && type.length == 4))) - return TRUE; + return true; else if (util_get_cpu_caps()->has_neon) - return TRUE; + return true; else if (util_get_cpu_caps()->family == CPU_S390X) - return TRUE; + return true; - return FALSE; + return false; } enum lp_build_round_mode @@ -2644,7 +2644,7 @@ lp_build_rcp(struct lp_build_context *bld, * particular uses that require less workarounds. */ - if (FALSE && ((util_get_cpu_caps()->has_sse && type.width == 32 && type.length == 4) || + if (false && ((util_get_cpu_caps()->has_sse && type.width == 32 && type.length == 4) || (util_get_cpu_caps()->has_avx && type.width == 32 && type.length == 8))){ const unsigned num_iterations = 0; LLVMValueRef res; @@ -3035,7 +3035,7 @@ lp_build_sin(struct lp_build_context *bld, return lp_build_intrinsic(builder, intrinsic, vec_type, args, 1, 0); } - return lp_build_sin_or_cos(bld, a, FALSE); + return lp_build_sin_or_cos(bld, a, false); } @@ -3057,7 +3057,7 @@ lp_build_cos(struct lp_build_context *bld, return lp_build_intrinsic(builder, intrinsic, vec_type, args, 1, 0); } - return lp_build_sin_or_cos(bld, a, TRUE); + return lp_build_sin_or_cos(bld, a, true); } @@ -3535,7 +3535,7 @@ lp_build_log2(struct lp_build_context *bld, LLVMValueRef x) { LLVMValueRef res; - lp_build_log2_approx(bld, x, NULL, NULL, &res, FALSE); + lp_build_log2_approx(bld, x, NULL, NULL, &res, false); return res; } @@ -3550,7 +3550,7 @@ lp_build_log2_safe(struct lp_build_context *bld, LLVMValueRef x) { LLVMValueRef res; - lp_build_log2_approx(bld, x, NULL, NULL, &res, TRUE); + lp_build_log2_approx(bld, x, NULL, NULL, &res, true); return res; } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c b/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c index 976eceef36f..ff5d020259e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c @@ -86,7 +86,7 @@ build_binary_int_overflow(struct gallivm_state *gallivm, oelems[0] = type_ref; oelems[1] = LLVMInt1TypeInContext(gallivm->context); - otype = LLVMStructTypeInContext(gallivm->context, oelems, 2, FALSE); + otype = LLVMStructTypeInContext(gallivm->context, oelems, 2, false); oresult = lp_build_intrinsic_binary(builder, intr_str, otype, a, b); if (ofbit) { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_const.c b/src/gallium/auxiliary/gallivm/lp_bld_const.c index 3c1423ac78f..f94bf2f4edd 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_const.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_const.c @@ -455,9 +455,9 @@ lp_build_const_string(struct gallivm_state *gallivm, unsigned len = strlen(str) + 1; LLVMTypeRef i8 = LLVMInt8TypeInContext(gallivm->context); LLVMValueRef string = LLVMAddGlobal(gallivm->module, LLVMArrayType(i8, len), ""); - LLVMSetGlobalConstant(string, TRUE); + LLVMSetGlobalConstant(string, true); LLVMSetLinkage(string, LLVMInternalLinkage); - LLVMSetInitializer(string, LLVMConstStringInContext(gallivm->context, str, len, TRUE)); + LLVMSetInitializer(string, LLVMConstStringInContext(gallivm->context, str, len, true)); string = LLVMConstBitCast(string, LLVMPointerType(i8, 0)); return string; } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_conv.c b/src/gallium/auxiliary/gallivm/lp_bld_conv.c index 69494ed22aa..890d0a9bbdd 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_conv.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_conv.c @@ -273,7 +273,7 @@ lp_build_clamped_float_to_unsigned_norm(struct gallivm_state *gallivm, assert(src_type.floating); assert(dst_width <= src_type.width); - src_type.sign = FALSE; + src_type.sign = false; mantissa = lp_mantissa(src_type); @@ -860,7 +860,7 @@ lp_build_conv(struct gallivm_state *gallivm, dst_type.width, tmp[i]); } - tmp_type.floating = FALSE; + tmp_type.floating = false; } else { double dst_scale = lp_const_scale(dst_type); @@ -885,12 +885,12 @@ lp_build_conv(struct gallivm_state *gallivm, for(i = 0; i < num_tmps; ++i) { tmp[i] = lp_build_iround(&bld, tmp[i]); } - tmp_type.floating = FALSE; + tmp_type.floating = false; } else { LLVMTypeRef tmp_vec_type; - tmp_type.floating = FALSE; + tmp_type.floating = false; tmp_vec_type = lp_build_vec_type(gallivm, tmp_type); for(i = 0; i < num_tmps; ++i) { #if 0 @@ -971,15 +971,15 @@ lp_build_conv(struct gallivm_state *gallivm, dst_type, tmp[i]); } - tmp_type.floating = TRUE; + tmp_type.floating = true; } else { double src_scale = lp_const_scale(src_type); LLVMTypeRef tmp_vec_type; /* Use an equally sized integer for intermediate computations */ - tmp_type.floating = TRUE; - tmp_type.sign = TRUE; + tmp_type.floating = true; + tmp_type.sign = true; tmp_vec_type = lp_build_vec_type(gallivm, tmp_type); for(i = 0; i < num_tmps; ++i) { #if 0 @@ -1083,15 +1083,15 @@ lp_build_conv_mask(struct gallivm_state *gallivm, * We assume all values are 0 or -1 */ - src_type.floating = FALSE; - src_type.fixed = FALSE; - src_type.sign = TRUE; - src_type.norm = FALSE; + src_type.floating = false; + src_type.fixed = false; + src_type.sign = true; + src_type.norm = false; - dst_type.floating = FALSE; - dst_type.fixed = FALSE; - dst_type.sign = TRUE; - dst_type.norm = FALSE; + dst_type.floating = false; + dst_type.fixed = false; + dst_type.sign = true; + dst_type.norm = false; /* * Truncate or expand bit width diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index f70024b1620..2918d385017 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -226,7 +226,7 @@ lp_profile(LLVMValueRef func, const void *code) { #if defined(__linux__) && defined(PROFILE) static std::ofstream perf_asm_file; - static bool first_time = TRUE; + static bool first_time = true; static FILE *perf_map_file = NULL; if (first_time) { /* @@ -243,7 +243,7 @@ lp_profile(LLVMValueRef func, const void *code) snprintf(filename, sizeof filename, "/tmp/perf-%llu.map.asm", (unsigned long long)pid); perf_asm_file.open(filename); } - first_time = FALSE; + first_time = false; } if (perf_map_file) { const char *symbol = LLVMGetValueName(func); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c index 6cd062de175..ed9c0ba520b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c @@ -112,7 +112,7 @@ format_matches_type(const struct util_format_description *desc, desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB || desc->block.width != 1 || desc->block.height != 1) { - return FALSE; + return false; } if (type.floating) { @@ -127,18 +127,18 @@ format_matches_type(const struct util_format_description *desc, for (chan = 0; chan < desc->nr_channels; ++chan) { if (desc->channel[chan].size != type.width) { - return FALSE; + return false; } if (desc->channel[chan].type != UTIL_FORMAT_TYPE_VOID) { if (desc->channel[chan].type != chan_type || desc->channel[chan].normalized != type.norm) { - return FALSE; + return false; } } } - return TRUE; + return true; } /* @@ -257,8 +257,8 @@ lp_build_unpack_arith_rgba_aos(struct gallivm_state *gallivm, ""); /* Initialize vector constants */ - normalized = FALSE; - needs_uitofp = FALSE; + normalized = false; + needs_uitofp = false; /* Loop over 4 color components */ for (i = 0; i < 4; ++i) { @@ -276,7 +276,7 @@ lp_build_unpack_arith_rgba_aos(struct gallivm_state *gallivm, assert(desc->channel[i].type == UTIL_FORMAT_TYPE_UNSIGNED); if (bits == 32) { - needs_uitofp = TRUE; + needs_uitofp = true; } shifts[i] = lp_build_const_int32(gallivm, shift); @@ -284,7 +284,7 @@ lp_build_unpack_arith_rgba_aos(struct gallivm_state *gallivm, if (desc->channel[i].normalized) { scales[i] = lp_build_const_float(gallivm, 1.0 / mask); - normalized = TRUE; + normalized = true; } else scales[i] = lp_build_const_float(gallivm, 1.0); @@ -397,7 +397,7 @@ lp_build_pack_rgba_aos(struct gallivm_state *gallivm, LLVMGetUndef(LLVMVectorType(LLVMFloatTypeInContext(gallivm->context), 4)), LLVMConstVector(swizzles, 4), ""); - normalized = FALSE; + normalized = false; for (i = 0; i < 4; ++i) { unsigned bits = desc->channel[i].size; unsigned shift = desc->channel[i].shift; @@ -416,7 +416,7 @@ lp_build_pack_rgba_aos(struct gallivm_state *gallivm, if (desc->channel[i].normalized) { scales[i] = lp_build_const_float(gallivm, mask); - normalized = TRUE; + normalized = true; } else scales[i] = lp_build_const_float(gallivm, 1.0); @@ -513,7 +513,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm, fetch_type = lp_type_uint(type.width*4); packed = lp_build_gather(gallivm, type.length/4, format_desc->block.bits, fetch_type, - aligned, base_ptr, offset, TRUE); + aligned, base_ptr, offset, true); assert(format_desc->block.bits <= vec_len); (void) vec_len; /* silence unused var warning for non-debug build */ @@ -549,7 +549,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm, packed = lp_build_gather(gallivm, type.length/4, format_desc->block.bits, fetch_type, - aligned, base_ptr, offset, TRUE); + aligned, base_ptr, offset, true); assert(format_desc->block.bits * type.length / 4 <= type.width * type.length); @@ -640,7 +640,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm, packed = lp_build_gather_elem(gallivm, num_pixels, format_desc->block.bits, 32, aligned, - base_ptr, offset, k, FALSE); + base_ptr, offset, k, false); tmps[k] = lp_build_unpack_arith_rgba_aos(gallivm, format_desc, @@ -711,7 +711,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm, memset(&tmp_type, 0, sizeof tmp_type); tmp_type.width = 8; tmp_type.length = num_pixels * 4; - tmp_type.norm = TRUE; + tmp_type.norm = true; tmp = lp_build_fetch_subsampled_rgba_aos(gallivm, format_desc, @@ -738,7 +738,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm, memset(&tmp_type, 0, sizeof tmp_type); tmp_type.width = 8; tmp_type.length = num_pixels * 4; - tmp_type.norm = TRUE; + tmp_type.norm = true; tmp = lp_build_fetch_s3tc_rgba_aos(gallivm, format_desc, @@ -766,7 +766,7 @@ lp_build_fetch_rgba_aos(struct gallivm_state *gallivm, memset(&tmp_type, 0, sizeof tmp_type); tmp_type.width = 8; tmp_type.length = num_pixels * 4; - tmp_type.norm = TRUE; + tmp_type.norm = true; tmp_type.sign = (format_desc->format == PIPE_FORMAT_RGTC1_SNORM || format_desc->format == PIPE_FORMAT_RGTC2_SNORM || format_desc->format == PIPE_FORMAT_LATC1_SNORM || diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c index 996fca4b250..a3ac235a5fe 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c @@ -245,8 +245,8 @@ lp_build_gather_s3tc(struct gallivm_state *gallivm, for (i = 0; i < length; ++i) { elems[i] = lp_build_gather_elem(gallivm, length, - block_bits, block_bits, TRUE, - base_ptr, offsets, i, FALSE); + block_bits, block_bits, true, + base_ptr, offsets, i, false); elems[i] = LLVMBuildBitCast(builder, elems[i], type32dxt, ""); } if (length == 1) { @@ -523,7 +523,7 @@ lp_build_lerp23(struct lp_build_context *bld, assert(!type.floating && !type.fixed && !type.norm && type.width == 8); lp_build_context_init(&bld2, gallivm, i16_type); - bld2.type.sign = TRUE; + bld2.type.sign = true; x = lp_build_const_int_vec(gallivm, bld->type, 255*1/3); /* FIXME: use native avx256 unpack/pack */ @@ -653,7 +653,7 @@ s3tc_dxt1_full_to_rgba_aos(struct gallivm_state *gallivm, LLVMValueRef v0_lo, v0_hi, v1_lo, v1_hi, addlo, addhi; lp_build_context_init(&bld2, gallivm, i16_type); - bld2.type.sign = TRUE; + bld2.type.sign = true; /* * This isn't as expensive as it looks (the unpack is the same as @@ -678,11 +678,11 @@ s3tc_dxt1_full_to_rgba_aos(struct gallivm_state *gallivm, /* select between colors2/3 */ /* signed compare is faster saves some xors */ - type.sign = TRUE; + type.sign = true; sel_mask = lp_build_compare(gallivm, type, PIPE_FUNC_GREATER, col0, col1); color2 = lp_build_select(&bld32, sel_mask, color2, color2_2); color3 = lp_build_select(&bld32, sel_mask, color3, color3_2); - type.sign = FALSE; + type.sign = false; if (format == PIPE_FORMAT_DXT1_RGBA || format == PIPE_FORMAT_DXT1_SRGBA) { @@ -853,7 +853,7 @@ lp_build_lerpdxta(struct gallivm_state *gallivm, memset(&type16, 0, sizeof type16); type16.width = 16; type16.length = 2*n; - type16.sign = TRUE; + type16.sign = true; memset(&type8, 0, sizeof type8); type8.width = 8; type8.length = 4*n; @@ -991,7 +991,7 @@ s3tc_dxt5_alpha_channel(struct gallivm_state *gallivm, } /* signed compare is faster saves some xors */ - type.sign = TRUE; + type.sign = true; /* alpha0 > alpha1 selection */ sel_mask = lp_build_compare(gallivm, type, PIPE_FUNC_GREATER, alpha0, alpha1); @@ -1226,7 +1226,7 @@ lp_build_lerp23_single(struct lp_build_context *bld, assert(!type.floating && !type.fixed && !type.norm && type.width == 8); lp_build_context_init(&bld2, gallivm, i16_type); - bld2.type.sign = TRUE; + bld2.type.sign = true; /* weights 256/3, 256*2/3, with correct rounding */ elems[0] = elems[1] = elems[2] = elems[3] = @@ -1274,7 +1274,7 @@ s3tc_decode_block_dxt1(struct gallivm_state *gallivm, memset(&type32, 0, sizeof type32); type32.width = 32; type32.length = 4; - type32.sign = TRUE; + type32.sign = true; memset(&type8, 0, sizeof type8); type8.width = 8; @@ -1567,7 +1567,7 @@ lp_build_lerpdxta_block(struct gallivm_state *gallivm, memset(&type16, 0, sizeof type16); type16.width = 16; type16.length = 8; - type16.sign = TRUE; + type16.sign = true; lp_build_context_init(&bld, gallivm, type16); /* @@ -1686,10 +1686,10 @@ s3tc_decode_block_dxt5(struct gallivm_state *gallivm, alpha0 = LLVMBuildShuffleVector(builder, alpha0, alpha0, shuffle1, ""); alpha1 = LLVMBuildShuffleVector(builder, alpha1, alpha1, shuffle1, ""); - type16.sign = TRUE; + type16.sign = true; sel_mask = lp_build_compare(gallivm, type16, PIPE_FUNC_GREATER, alpha0, alpha1); - type16.sign = FALSE; + type16.sign = false; sel_mask = LLVMBuildBitCast(builder, sel_mask, bld8.vec_type, ""); if (!util_get_cpu_caps()->has_ssse3) { @@ -1718,9 +1718,9 @@ s3tc_decode_block_dxt5(struct gallivm_state *gallivm, tmp1 = LLVMBuildLShr(builder, acode, lp_build_const_int_vec(gallivm, type32, 6), ""); /* use signed pack doesn't matter and otherwise need sse41 */ - type32.sign = type16.sign = TRUE; + type32.sign = type16.sign = true; acode = lp_build_pack2(gallivm, type32, type16, tmp0, tmp1); - type32.sign = type16.sign = FALSE; + type32.sign = type16.sign = false; /* now have 8x6bit in 8x16bit, 01, 45, 89, ..., 23, 67, ... */ acode0 = LLVMBuildAnd(builder, acode, lp_build_const_int_vec(gallivm, type16, 0x7), ""); @@ -2344,8 +2344,8 @@ lp_build_gather_rgtc(struct gallivm_state *gallivm, for (i = 0; i < length; ++i) { elems[i] = lp_build_gather_elem(gallivm, length, - block_bits, block_bits, TRUE, - base_ptr, offsets, i, FALSE); + block_bits, block_bits, true, + base_ptr, offsets, i, false); elems[i] = LLVMBuildBitCast(builder, elems[i], type32dxt, ""); } if (length == 1) { diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c index e6ddae8ab3d..e64fc93c481 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c @@ -322,11 +322,11 @@ 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]; - bool srgb_chan = FALSE; + bool srgb_chan = false; if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB && format_desc->swizzle[3] != chan) { - srgb_chan = TRUE; + srgb_chan = true; } inputs[chan] = lp_build_extract_soa_chan(&bld, @@ -457,7 +457,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm, format_desc->block.bits, fetch_type, aligned, - base_ptr, offset, FALSE); + base_ptr, offset, false); /* * convert texels to float rgba @@ -610,7 +610,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm, packed[i] = lp_build_gather(gallivm, gather_type.length, format_desc->block.bits, fetch_type, aligned, - base_ptr, offsetr, FALSE); + base_ptr, offsetr, false); if (fp64) { struct lp_type conv_type = type; conv_type.width *= 2; @@ -663,7 +663,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm, output[i] = lp_build_extract_soa_chan(&bld, blockbits, - FALSE, + false, chan_desc, dst[vec_nr]); } @@ -693,7 +693,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm, packed = lp_build_gather(gallivm, type.length, format_desc->block.bits, fetch_type, aligned, - base_ptr, offset, FALSE); + base_ptr, offset, false); if (format == PIPE_FORMAT_R11G11B10_FLOAT) { lp_build_r11g11b10_to_float(gallivm, packed, rgba_out); } @@ -721,14 +721,14 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm, LLVMValueRef s_offset = lp_build_const_int_vec(gallivm, type, 4); offset = LLVMBuildAdd(builder, offset, s_offset, ""); packed = lp_build_gather(gallivm, type.length, 32, fetch_type, - aligned, base_ptr, offset, FALSE); + aligned, base_ptr, offset, false); packed = LLVMBuildAnd(builder, packed, lp_build_const_int_vec(gallivm, type, mask), ""); } else { assert (format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT); packed = lp_build_gather(gallivm, type.length, 32, fetch_type, - aligned, base_ptr, offset, TRUE); + aligned, base_ptr, offset, true); packed = LLVMBuildBitCast(builder, packed, lp_build_vec_type(gallivm, type), ""); } @@ -773,7 +773,7 @@ lp_build_fetch_rgba_soa(struct gallivm_state *gallivm, memset(&tmp_type, 0, sizeof tmp_type); tmp_type.width = 8; tmp_type.length = type.length * 4; - tmp_type.norm = TRUE; + tmp_type.norm = true; tmp_type.sign = is_signed; packed = lp_build_fetch_rgba_aos(gallivm, flinear_desc, tmp_type, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c b/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c index 066cb54a68c..5cc46af4747 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c @@ -235,7 +235,7 @@ yuv_to_rgb_soa(struct gallivm_state *gallivm, LLVMValueRef cvg; memset(&type, 0, sizeof type); - type.sign = TRUE; + type.sign = true; type.width = 32; type.length = n; @@ -322,7 +322,7 @@ rgb_to_rgba_aos(struct gallivm_state *gallivm, LLVMValueRef rgba; memset(&type, 0, sizeof type); - type.sign = TRUE; + type.sign = true; type.width = 32; type.length = n; @@ -498,7 +498,7 @@ lp_build_fetch_subsampled_rgba_aos(struct gallivm_state *gallivm, assert(format_desc->block.height == 1); fetch_type = lp_type_uint(32); - packed = lp_build_gather(gallivm, n, 32, fetch_type, TRUE, base_ptr, offset, FALSE); + packed = lp_build_gather(gallivm, n, 32, fetch_type, true, base_ptr, offset, false); (void)j; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_gather.c b/src/gallium/auxiliary/gallivm/lp_bld_gather.c index 361054c9dff..ef99751659d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_gather.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_gather.c @@ -450,7 +450,7 @@ lp_build_gather(struct gallivm_state *gallivm, if (((src_width % 32) == 0) && ((src_width % dst_type.width) == 0) && (dst_type.length > 1)) { /* use vector fetch (if dst_type is vector) */ - vec_fetch = TRUE; + vec_fetch = true; if (dst_type.floating) { fetch_type = lp_type_float_vec(dst_type.width, src_width); } else { @@ -463,7 +463,7 @@ lp_build_gather(struct gallivm_state *gallivm, fetch_dst_type.length = dst_type.length; } else { /* use scalar fetch */ - vec_fetch = FALSE; + vec_fetch = false; if (dst_type.floating && ((src_width == 32) || (src_width == 64))) { fetch_type = lp_type_float(src_width); } else { @@ -508,7 +508,7 @@ lp_build_gather(struct gallivm_state *gallivm, LLVMValueRef elems[LP_MAX_VECTOR_WIDTH / 8]; unsigned i; - bool vec_zext = FALSE; + bool vec_zext = false; struct lp_type res_type, gather_res_type; LLVMTypeRef res_t, gather_res_t; @@ -530,11 +530,11 @@ lp_build_gather(struct gallivm_state *gallivm, * (We're not trying that with other bit widths as that might not be * easier, in particular with 8 bit values at least with only sse2.) */ - assert(vec_fetch == FALSE); + assert(vec_fetch == false); gather_res_type.width /= 2; fetch_dst_type = fetch_type; src_type = lp_build_vec_type(gallivm, fetch_type); - vec_zext = TRUE; + vec_zext = true; } res_t = lp_build_vec_type(gallivm, res_type); gather_res_t = lp_build_vec_type(gallivm, gather_res_type); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index bf53843bb76..4d18786c23f 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 bool gallivm_initialized = FALSE; +static bool gallivm_initialized = false; unsigned lp_native_vector_width; @@ -121,7 +121,7 @@ create_pass_manager(struct gallivm_state *gallivm) gallivm->passmgr = LLVMCreateFunctionPassManagerForModule(gallivm->module); if (!gallivm->passmgr) - return FALSE; + return false; #if GALLIVM_HAVE_CORO == 1 gallivm->cgpassmgr = LLVMCreatePassManager(); @@ -191,7 +191,7 @@ create_pass_manager(struct gallivm_state *gallivm) LLVMAddCoroCleanupPass(gallivm->passmgr); #endif #endif - return TRUE; + return true; } /** @@ -316,10 +316,10 @@ init_gallivm_engine(struct gallivm_state *gallivm) free(engine_data_layout); } - return TRUE; + return true; fail: - return FALSE; + return false; } @@ -335,7 +335,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name, assert(!gallivm->module); if (!lp_build_init()) - return FALSE; + return false; gallivm->context = context; gallivm->cache = cache; @@ -404,7 +404,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name, gallivm->target = LLVMCreateTargetData(layout); if (!gallivm->target) { - return FALSE; + return false; } } @@ -412,12 +412,12 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name, goto fail; lp_build_coro_declare_malloc_hooks(gallivm); - return TRUE; + return true; fail: gallivm_free_ir(gallivm); gallivm_free_code(gallivm); - return FALSE; + return false; } unsigned @@ -438,7 +438,7 @@ lp_build_init(void) { lp_build_init_native_width(); if (gallivm_initialized) - return TRUE; + return true; /* LLVMLinkIn* are no-ops at runtime. They just ensure the respective @@ -475,9 +475,9 @@ lp_build_init(void) } #endif - gallivm_initialized = TRUE; + gallivm_initialized = true; - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c index cac7f0d424c..17212874152 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c @@ -58,9 +58,9 @@ mask_has_loop(struct lp_exec_mask *mask) for (i = mask->function_stack_size - 1; i >= 0; --i) { const struct function_ctx *ctx = &mask->function_stack[i]; if (ctx->loop_stack_size > 0) - return TRUE; + return true; } - return FALSE; + return false; } /* @@ -76,9 +76,9 @@ mask_has_switch(struct lp_exec_mask *mask) for (i = mask->function_stack_size - 1; i >= 0; --i) { const struct function_ctx *ctx = &mask->function_stack[i]; if (ctx->switch_stack_size > 0) - return TRUE; + return true; } - return FALSE; + return false; } /* @@ -94,9 +94,9 @@ mask_has_cond(struct lp_exec_mask *mask) for (i = mask->function_stack_size - 1; i >= 0; --i) { const struct function_ctx *ctx = &mask->function_stack[i]; if (ctx->cond_stack_size > 0) - return TRUE; + return true; } - return FALSE; + return false; } void lp_exec_mask_update(struct lp_exec_mask *mask) @@ -173,8 +173,8 @@ lp_exec_mask_function_init(struct lp_exec_mask *mask, int function_idx) void lp_exec_mask_init(struct lp_exec_mask *mask, struct lp_build_context *bld) { mask->bld = bld; - mask->has_mask = FALSE; - mask->ret_in_main = FALSE; + mask->has_mask = false; + mask->ret_in_main = false; /* For the main function */ mask->function_stack_size = 1; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c index cf4381febf7..64445149cde 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c @@ -393,17 +393,17 @@ lp_build_llvm_texture_member(struct gallivm_state *gallivm, _index, #_name, _emit_load, out_type ); \ } -LP_BUILD_LLVM_TEXTURE_MEMBER(width, LP_JIT_TEXTURE_WIDTH, TRUE) -LP_BUILD_LLVM_TEXTURE_MEMBER(height, LP_JIT_TEXTURE_HEIGHT, TRUE) -LP_BUILD_LLVM_TEXTURE_MEMBER(depth, LP_JIT_TEXTURE_DEPTH, TRUE) -LP_BUILD_LLVM_TEXTURE_MEMBER(first_level, LP_JIT_TEXTURE_FIRST_LEVEL, TRUE) -LP_BUILD_LLVM_TEXTURE_MEMBER(last_level, LP_JIT_TEXTURE_LAST_LEVEL, TRUE) -LP_BUILD_LLVM_TEXTURE_MEMBER(base_ptr, LP_JIT_TEXTURE_BASE, TRUE) -LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(row_stride, LP_JIT_TEXTURE_ROW_STRIDE, FALSE) -LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(img_stride, LP_JIT_TEXTURE_IMG_STRIDE, FALSE) -LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(mip_offsets, LP_JIT_TEXTURE_MIP_OFFSETS, FALSE) -LP_BUILD_LLVM_TEXTURE_MEMBER(num_samples, LP_JIT_TEXTURE_NUM_SAMPLES, TRUE) -LP_BUILD_LLVM_TEXTURE_MEMBER(sample_stride, LP_JIT_TEXTURE_SAMPLE_STRIDE, TRUE) +LP_BUILD_LLVM_TEXTURE_MEMBER(width, LP_JIT_TEXTURE_WIDTH, true) +LP_BUILD_LLVM_TEXTURE_MEMBER(height, LP_JIT_TEXTURE_HEIGHT, true) +LP_BUILD_LLVM_TEXTURE_MEMBER(depth, LP_JIT_TEXTURE_DEPTH, true) +LP_BUILD_LLVM_TEXTURE_MEMBER(first_level, LP_JIT_TEXTURE_FIRST_LEVEL, true) +LP_BUILD_LLVM_TEXTURE_MEMBER(last_level, LP_JIT_TEXTURE_LAST_LEVEL, true) +LP_BUILD_LLVM_TEXTURE_MEMBER(base_ptr, LP_JIT_TEXTURE_BASE, true) +LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(row_stride, LP_JIT_TEXTURE_ROW_STRIDE, false) +LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(img_stride, LP_JIT_TEXTURE_IMG_STRIDE, false) +LP_BUILD_LLVM_TEXTURE_MEMBER_OUTTYPE(mip_offsets, LP_JIT_TEXTURE_MIP_OFFSETS, false) +LP_BUILD_LLVM_TEXTURE_MEMBER(num_samples, LP_JIT_TEXTURE_NUM_SAMPLES, true) +LP_BUILD_LLVM_TEXTURE_MEMBER(sample_stride, LP_JIT_TEXTURE_SAMPLE_STRIDE, true) /** * Fetch the specified member of the lp_jit_sampler structure. @@ -465,11 +465,11 @@ lp_build_llvm_sampler_member(struct gallivm_state *gallivm, } -LP_BUILD_LLVM_SAMPLER_MEMBER(min_lod, LP_JIT_SAMPLER_MIN_LOD, TRUE) -LP_BUILD_LLVM_SAMPLER_MEMBER(max_lod, LP_JIT_SAMPLER_MAX_LOD, TRUE) -LP_BUILD_LLVM_SAMPLER_MEMBER(lod_bias, LP_JIT_SAMPLER_LOD_BIAS, TRUE) -LP_BUILD_LLVM_SAMPLER_MEMBER(border_color, LP_JIT_SAMPLER_BORDER_COLOR, FALSE) -LP_BUILD_LLVM_SAMPLER_MEMBER(max_aniso, LP_JIT_SAMPLER_MAX_ANISO, TRUE) +LP_BUILD_LLVM_SAMPLER_MEMBER(min_lod, LP_JIT_SAMPLER_MIN_LOD, true) +LP_BUILD_LLVM_SAMPLER_MEMBER(max_lod, LP_JIT_SAMPLER_MAX_LOD, true) +LP_BUILD_LLVM_SAMPLER_MEMBER(lod_bias, LP_JIT_SAMPLER_LOD_BIAS, true) +LP_BUILD_LLVM_SAMPLER_MEMBER(border_color, LP_JIT_SAMPLER_BORDER_COLOR, false) +LP_BUILD_LLVM_SAMPLER_MEMBER(max_aniso, LP_JIT_SAMPLER_MAX_ANISO, true) /** * Fetch the specified member of the lp_jit_image structure. @@ -559,14 +559,14 @@ lp_build_llvm_image_member(struct gallivm_state *gallivm, _index, #_name, _emit_load ); \ } -LP_BUILD_LLVM_IMAGE_MEMBER(width, LP_JIT_IMAGE_WIDTH, TRUE) -LP_BUILD_LLVM_IMAGE_MEMBER(height, LP_JIT_IMAGE_HEIGHT, TRUE) -LP_BUILD_LLVM_IMAGE_MEMBER(depth, LP_JIT_IMAGE_DEPTH, TRUE) -LP_BUILD_LLVM_IMAGE_MEMBER(base_ptr, LP_JIT_IMAGE_BASE, TRUE) -LP_BUILD_LLVM_IMAGE_MEMBER_OUTTYPE(row_stride, LP_JIT_IMAGE_ROW_STRIDE, TRUE) -LP_BUILD_LLVM_IMAGE_MEMBER_OUTTYPE(img_stride, LP_JIT_IMAGE_IMG_STRIDE, TRUE) -LP_BUILD_LLVM_IMAGE_MEMBER(num_samples, LP_JIT_IMAGE_NUM_SAMPLES, TRUE) -LP_BUILD_LLVM_IMAGE_MEMBER(sample_stride, LP_JIT_IMAGE_SAMPLE_STRIDE, TRUE) +LP_BUILD_LLVM_IMAGE_MEMBER(width, LP_JIT_IMAGE_WIDTH, true) +LP_BUILD_LLVM_IMAGE_MEMBER(height, LP_JIT_IMAGE_HEIGHT, true) +LP_BUILD_LLVM_IMAGE_MEMBER(depth, LP_JIT_IMAGE_DEPTH, true) +LP_BUILD_LLVM_IMAGE_MEMBER(base_ptr, LP_JIT_IMAGE_BASE, true) +LP_BUILD_LLVM_IMAGE_MEMBER_OUTTYPE(row_stride, LP_JIT_IMAGE_ROW_STRIDE, true) +LP_BUILD_LLVM_IMAGE_MEMBER_OUTTYPE(img_stride, LP_JIT_IMAGE_IMG_STRIDE, true) +LP_BUILD_LLVM_IMAGE_MEMBER(num_samples, LP_JIT_IMAGE_NUM_SAMPLES, true) +LP_BUILD_LLVM_IMAGE_MEMBER(sample_stride, LP_JIT_IMAGE_SAMPLE_STRIDE, true) void lp_build_jit_fill_sampler_dynamic_state(struct lp_sampler_dynamic_state *state) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_logic.c b/src/gallium/auxiliary/gallivm/lp_bld_logic.c index 0e75aeb0895..1aa775f6e4a 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_logic.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_logic.c @@ -207,7 +207,7 @@ lp_build_compare(struct gallivm_state *gallivm, } #endif - return lp_build_compare_ext(gallivm, type, func, a, b, FALSE); + return lp_build_compare_ext(gallivm, type, func, a, b, false); } /** @@ -224,7 +224,7 @@ lp_build_cmp_ordered(struct lp_build_context *bld, LLVMValueRef a, LLVMValueRef b) { - return lp_build_compare_ext(bld->gallivm, bld->type, func, a, b, TRUE); + return lp_build_compare_ext(bld->gallivm, bld->type, func, a, b, true); } /** diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index e8ed0a13ba4..dded75c84e4 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -2301,7 +2301,7 @@ visit_txs(struct lp_build_nir_context *bld_base, nir_tex_instr *instr) params.target = glsl_sampler_to_pipe(instr->sampler_dim, instr->is_array); params.texture_unit = instr->texture_index; params.explicit_lod = explicit_lod; - params.is_sviewinfo = TRUE; + params.is_sviewinfo = true; params.sizes_out = sizes_out; params.samples_only = (instr->op == nir_texop_texture_samples); params.texture_unit_offset = texture_unit_offset; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c index a93668159f7..355d02337ad 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c @@ -504,14 +504,14 @@ static void emit_load_var(struct lp_build_nir_context *bld_base, LLVMValueRef attrib_index_val = lp_build_add(&bld_base->uint_bld, indir_index, lp_build_const_int_vec(gallivm, bld_base->uint_bld.type, comp_loc)); LLVMValueRef index_vec = get_soa_array_offsets(&bld_base->uint_bld, attrib_index_val, 4, idx, - TRUE); + true); LLVMValueRef index_vec2 = NULL; LLVMTypeRef scalar_type = LLVMFloatTypeInContext(gallivm->context); LLVMValueRef inputs_array = LLVMBuildBitCast(gallivm->builder, bld->inputs_array, LLVMPointerType(scalar_type, 0), ""); if (bit_size == 64) index_vec2 = get_soa_array_offsets(&bld_base->uint_bld, - indir_index, 4, idx + 1, TRUE); + indir_index, 4, idx + 1, true); /* Gather values from the input register array */ result[i] = build_gather(bld_base, &bld_base->base, scalar_type, inputs_array, index_vec, NULL, index_vec2); @@ -869,7 +869,7 @@ static LLVMValueRef emit_load_reg(struct lp_build_nir_context *bld_base, indirect_val = lp_build_min(uint_bld, indirect_val, max_index); reg_storage = LLVMBuildBitCast(builder, reg_storage, LLVMPointerType(reg_bld->elem_type, 0), ""); for (unsigned i = 0; i < nc; i++) { - LLVMValueRef indirect_offset = get_soa_array_offsets(uint_bld, indirect_val, nc, i, TRUE); + LLVMValueRef indirect_offset = get_soa_array_offsets(uint_bld, indirect_val, nc, i, true); vals[i] = build_gather(bld_base, reg_bld, reg_bld->elem_type, reg_storage, indirect_offset, NULL, NULL); } } else { @@ -904,7 +904,7 @@ static void emit_store_reg(struct lp_build_nir_context *bld_base, for (unsigned i = 0; i < nc; i++) { if (!(writemask & (1 << i))) continue; - LLVMValueRef indirect_offset = get_soa_array_offsets(uint_bld, indirect_val, nc, i, TRUE); + LLVMValueRef indirect_offset = get_soa_array_offsets(uint_bld, indirect_val, nc, i, true); dst[i] = LLVMBuildBitCast(builder, dst[i], reg_bld->vec_type, ""); emit_mask_scatter(bld, reg_storage, indirect_offset, dst[i], &bld->exec_mask); } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_pack.c b/src/gallium/auxiliary/gallivm/lp_bld_pack.c index ec147275a62..bb392e88555 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; - bool swap_intrinsic_operands = FALSE; + bool swap_intrinsic_operands = false; switch(src_type.width) { case 32: @@ -607,7 +607,7 @@ lp_build_pack2(struct gallivm_state *gallivm, intrinsic = "llvm.ppc.altivec.vpkuwus"; } #if UTIL_ARCH_LITTLE_ENDIAN - swap_intrinsic_operands = TRUE; + swap_intrinsic_operands = true; #endif } break; @@ -618,7 +618,7 @@ lp_build_pack2(struct gallivm_state *gallivm, } else if (util_get_cpu_caps()->has_altivec) { intrinsic = "llvm.ppc.altivec.vpkshss"; #if UTIL_ARCH_LITTLE_ENDIAN - swap_intrinsic_operands = TRUE; + swap_intrinsic_operands = true; #endif } } else { @@ -627,7 +627,7 @@ lp_build_pack2(struct gallivm_state *gallivm, } else if (util_get_cpu_caps()->has_altivec) { intrinsic = "llvm.ppc.altivec.vpkshus"; #if UTIL_ARCH_LITTLE_ENDIAN - swap_intrinsic_operands = TRUE; + swap_intrinsic_operands = true; #endif } } @@ -789,7 +789,7 @@ lp_build_packs2(struct gallivm_state *gallivm, assert(src_type.width == dst_type.width * 2); assert(src_type.length * 2 == dst_type.length); - clamp = TRUE; + clamp = true; /* All X86 SSE non-interleaved pack instructions take signed inputs and * saturate them, so no need to clamp for those cases. */ @@ -797,7 +797,7 @@ lp_build_packs2(struct gallivm_state *gallivm, src_type.width * src_type.length >= 128 && src_type.sign && (src_type.width == 32 || src_type.width == 16)) - clamp = FALSE; + clamp = false; if(clamp) { struct lp_build_context bld; @@ -923,7 +923,7 @@ lp_build_resize(struct gallivm_state *gallivm, /* * Register width remains constant -- use vector packing intrinsics */ - tmp[0] = lp_build_pack(gallivm, src_type, dst_type, TRUE, src, num_srcs); + tmp[0] = lp_build_pack(gallivm, src_type, dst_type, true, src, num_srcs); } else { if (src_type.width / dst_type.width > num_srcs) { @@ -943,7 +943,7 @@ lp_build_resize(struct gallivm_state *gallivm, } num_srcs *= size_ratio; src_type.length = new_length; - tmp[0] = lp_build_pack(gallivm, src_type, dst_type, TRUE, tmp, num_srcs); + tmp[0] = lp_build_pack(gallivm, src_type, dst_type, true, tmp, num_srcs); } else { /* @@ -957,7 +957,7 @@ lp_build_resize(struct gallivm_state *gallivm, dst_type.length = dst_type.length / size_ratio; for (i = 0; i < size_ratio; i++) { - tmp[i] = lp_build_pack(gallivm, src_type, dst_type, TRUE, + tmp[i] = lp_build_pack(gallivm, src_type, dst_type, true, &src[i*num_pack_srcs], num_pack_srcs); } tmp[0] = lp_build_concat(gallivm, tmp, dst_type, size_ratio); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index a0852292237..949f8290e24 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c @@ -71,21 +71,21 @@ lp_sampler_wrap_mode_uses_border_color(enum pipe_tex_wrap mode, case PIPE_TEX_WRAP_CLAMP_TO_EDGE: case PIPE_TEX_WRAP_MIRROR_REPEAT: case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE: - return FALSE; + return false; case PIPE_TEX_WRAP_CLAMP: case PIPE_TEX_WRAP_MIRROR_CLAMP: if (min_img_filter == PIPE_TEX_FILTER_NEAREST && mag_img_filter == PIPE_TEX_FILTER_NEAREST) { - return FALSE; + return false; } else { - return TRUE; + return true; } case PIPE_TEX_WRAP_CLAMP_TO_BORDER: case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER: - return TRUE; + return true; default: assert(0 && "unexpected wrap mode"); - return FALSE; + return false; } } @@ -273,7 +273,7 @@ lp_build_pmin(struct lp_build_sample_context *bld, const unsigned num_quads = length / 4; const bool pmin_per_quad = pmin_bld->type.length != length; - int_size = lp_build_minify(int_size_bld, bld->int_size, first_level, TRUE); + 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); max_aniso = lp_build_broadcast_scalar(coord_bld, max_aniso); max_aniso = lp_build_mul(coord_bld, max_aniso, max_aniso); @@ -381,7 +381,7 @@ lp_build_rho(struct lp_build_sample_context *bld, */ LLVMValueRef int_size = - lp_build_minify(int_size_bld, bld->int_size, first_level, TRUE); + lp_build_minify(int_size_bld, bld->int_size, first_level, true); LLVMValueRef float_size = lp_build_int_to_float(float_size_bld, int_size); if (derivs) { @@ -1386,7 +1386,7 @@ lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld, if (bld->num_mips == 1) { ilevel_vec = lp_build_broadcast_scalar(&bld->int_size_bld, ilevel); *out_size = lp_build_minify(&bld->int_size_bld, bld->int_size, - ilevel_vec, TRUE); + ilevel_vec, true); *out_size = lp_build_scale_view_dims(&bld->int_size_bld, *out_size, bld->int_tex_blocksize, bld->int_tex_blocksize_log2, @@ -1442,7 +1442,7 @@ lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld, bld4.type, ilevel, indexi); - tmp[i] = lp_build_minify(&bld4, int_size_vec, ileveli, TRUE); + tmp[i] = lp_build_minify(&bld4, int_size_vec, ileveli, true); tmp[i] = lp_build_scale_view_dims(&bld4, tmp[i], int_tex_blocksize_vec, int_tex_blocksize_log2_vec, @@ -1483,7 +1483,7 @@ lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld, lp_build_broadcast_scalar(&bld->int_coord_bld, bld->int_view_blocksize); *out_size = lp_build_minify(&bld->int_coord_bld, int_size_vec, - ilevel, FALSE); + ilevel, false); *out_size = lp_build_scale_view_dims(&bld->int_coord_bld, *out_size, int_tex_blocksize_vec, @@ -1499,7 +1499,7 @@ lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld, ilevel, indexi); tmp[i] = bld->int_size; tmp[i] = lp_build_minify(&bld->int_size_in_bld, tmp[i], - ilevel1, TRUE); + ilevel1, true); tmp[i] = lp_build_scale_view_dims(&bld->int_size_in_bld, tmp[i], bld->int_tex_blocksize, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h index 7c839034be6..b710853de4b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h @@ -505,9 +505,9 @@ lp_is_simple_wrap_mode(unsigned mode) switch (mode) { case PIPE_TEX_WRAP_REPEAT: case PIPE_TEX_WRAP_CLAMP_TO_EDGE: - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -562,9 +562,9 @@ has_layer_coord(enum pipe_texture_target tex) /* cube is not layered but 3rd coord (after cube mapping) behaves the same */ case PIPE_TEXTURE_CUBE: case PIPE_TEXTURE_CUBE_ARRAY: - return TRUE; + return true; default: - return FALSE; + return false; } } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c index ed430051fc6..d31760ae7e4 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c @@ -409,8 +409,8 @@ lp_build_sample_fetch_image_nearest(struct lp_build_sample_context *bld, bld->texel_type.length, bld->format_desc->block.bits, fetch_type, - TRUE, - data_ptr, offset, TRUE); + true, + data_ptr, offset, true); rgba8 = LLVMBuildBitCast(builder, rgba8, u8n_vec_type, ""); } @@ -418,7 +418,7 @@ lp_build_sample_fetch_image_nearest(struct lp_build_sample_context *bld, rgba8 = lp_build_fetch_rgba_aos(bld->gallivm, bld->format_desc, u8n.type, - TRUE, + true, data_ptr, offset, x_subcoord, y_subcoord, @@ -662,8 +662,8 @@ lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld, bld->texel_type.length, bld->format_desc->block.bits, fetch_type, - TRUE, - data_ptr, offset[k][j][i], TRUE); + true, + data_ptr, offset[k][j][i], true); rgba8 = LLVMBuildBitCast(builder, rgba8, u8n_vec_type, ""); } @@ -671,7 +671,7 @@ lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld, rgba8 = lp_build_fetch_rgba_aos(bld->gallivm, bld->format_desc, u8n.type, - TRUE, + true, data_ptr, offset[k][j][i], x_subcoord[i], y_subcoord[j], diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index 7fae38c1434..1701913daf1 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -159,7 +159,7 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld, lp_build_fetch_rgba_soa(bld->gallivm, bld->format_desc, - bld->texel_type, TRUE, + bld->texel_type, true, data_ptr, offset, i, j, bld->cache, @@ -393,7 +393,7 @@ lp_build_sample_wrap_linear(struct lp_build_sample_context *bld, case PIPE_TEX_WRAP_CLAMP_TO_EDGE: { struct lp_build_context abs_coord_bld = bld->coord_bld; - abs_coord_bld.type.sign = FALSE; + abs_coord_bld.type.sign = false; if (bld->static_sampler_state->normalized_coords) { /* mul by tex size */ @@ -465,7 +465,7 @@ lp_build_sample_wrap_linear(struct lp_build_sample_context *bld, } if (!is_gather) { /* compute mirror function */ - coord = lp_build_coord_mirror(bld, coord, TRUE); + coord = lp_build_coord_mirror(bld, coord, true); /* scale coord to length */ coord = lp_build_mul(coord_bld, coord, length_f); @@ -499,7 +499,7 @@ lp_build_sample_wrap_linear(struct lp_build_sample_context *bld, * For GL4 gather with per-sample offsets we'd need to the mirroring * per coord too. */ - coord = lp_build_coord_mirror(bld, coord, FALSE); + coord = lp_build_coord_mirror(bld, coord, false); coord = lp_build_mul(coord_bld, coord, length_f); /* @@ -556,7 +556,7 @@ lp_build_sample_wrap_linear(struct lp_build_sample_context *bld, case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE: { struct lp_build_context abs_coord_bld = bld->coord_bld; - abs_coord_bld.type.sign = FALSE; + abs_coord_bld.type.sign = false; if (bld->static_sampler_state->normalized_coords) { /* scale coord to length */ @@ -752,7 +752,7 @@ lp_build_sample_wrap_nearest(struct lp_build_sample_context *bld, coord = lp_build_add(coord_bld, coord, offset); } /* compute mirror function */ - coord = lp_build_coord_mirror(bld, coord, TRUE); + coord = lp_build_coord_mirror(bld, coord, true); /* scale coord to length */ assert(bld->static_sampler_state->normalized_coords); @@ -784,7 +784,7 @@ lp_build_sample_wrap_nearest(struct lp_build_sample_context *bld, */ { struct lp_build_context abs_coord_bld = *int_coord_bld; - abs_coord_bld.type.sign = FALSE; + abs_coord_bld.type.sign = false; /* clamp to [0, length - 1] */ icoord = lp_build_min(&abs_coord_bld, icoord, length_minus_one); } @@ -1861,7 +1861,7 @@ lp_build_sample_mipmap(struct lp_build_sample_context *bld, data_ptr1, mipoff1, coords, offsets, colors1); } else { - lp_build_sample_image_linear(bld, FALSE, size1, NULL, + lp_build_sample_image_linear(bld, false, size1, NULL, row_stride1_vec, img_stride1_vec, data_ptr1, mipoff1, coords, offsets, colors1); @@ -1933,7 +1933,7 @@ lp_build_sample_mipmap_both(struct lp_build_sample_context *bld, mipoff0 = lp_build_get_mip_offsets(bld, ilevel0); } - lp_build_sample_image_linear(bld, FALSE, size0, linear_mask, + lp_build_sample_image_linear(bld, false, size0, linear_mask, row_stride0_vec, img_stride0_vec, data_ptr0, mipoff0, coords, offsets, colors0); @@ -1977,7 +1977,7 @@ lp_build_sample_mipmap_both(struct lp_build_sample_context *bld, mipoff1 = lp_build_get_mip_offsets(bld, ilevel1); } - lp_build_sample_image_linear(bld, FALSE, size1, linear_mask, + lp_build_sample_image_linear(bld, false, size1, linear_mask, row_stride1_vec, img_stride1_vec, data_ptr1, mipoff1, coords, offsets, colors1); @@ -2369,7 +2369,7 @@ lp_build_sample_aniso(struct lp_build_sample_context *bld, LLVMValueRef weights = lp_build_gather(gallivm, coord_bld->type.length, coord_bld->type.width, lp_elem_type(coord_bld->type), - TRUE, filter_table, q, TRUE); + true, filter_table, q, true); /* * Mask off the weights here which should ensure no-op for loops @@ -2567,13 +2567,13 @@ lp_build_sample_common(struct lp_build_sample_context *bld, LLVMValueRef layer = lp_build_iround(&bld->coord_bld, coords[3]); LLVMValueRef six = lp_build_const_int_vec(bld->gallivm, bld->int_coord_type, 6); layer = lp_build_mul(&bld->int_coord_bld, layer, six); - coords[3] = lp_build_layer_coord(bld, texture_index, TRUE, layer, NULL); + coords[3] = lp_build_layer_coord(bld, texture_index, true, layer, NULL); /* because of seamless filtering can't add it to face (coords[2]) here. */ } } else if ((target == PIPE_TEXTURE_1D_ARRAY || target == PIPE_TEXTURE_2D_ARRAY) && !is_lodq) { coords[2] = lp_build_iround(&bld->coord_bld, coords[2]); - coords[2] = lp_build_layer_coord(bld, texture_index, FALSE, coords[2], NULL); + coords[2] = lp_build_layer_coord(bld, texture_index, false, coords[2], NULL); } if (bld->static_sampler_state->compare_mode != PIPE_TEX_COMPARE_NONE) { @@ -2998,7 +2998,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld, lp_build_if(&if_ctx, bld->gallivm, lod_positive); { /* Use the minification filter */ - lp_build_sample_mipmap(bld, min_filter, mip_filter, FALSE, + lp_build_sample_mipmap(bld, min_filter, mip_filter, false, coords, offsets, ilevel0, ilevel1, lod_fpart, texels); @@ -3007,7 +3007,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld, { /* Use the magnification filter */ lp_build_sample_mipmap(bld, mag_filter, PIPE_TEX_MIPFILTER_NONE, - FALSE, + false, coords, offsets, ilevel0, NULL, NULL, texels); @@ -3060,7 +3060,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld, * cheaper than linear, hence do a separate path for that. */ lp_build_sample_mipmap(bld, PIPE_TEX_FILTER_NEAREST, - mip_filter_for_nearest, FALSE, + mip_filter_for_nearest, false, coords, offsets, ilevel0, ilevel1, lod_fpart, texels); @@ -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; - bool 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]; @@ -3142,10 +3142,10 @@ lp_build_fetch_texel(struct lp_build_sample_context *bld, if (target == PIPE_TEXTURE_1D_ARRAY || target == PIPE_TEXTURE_2D_ARRAY) { if (out_of_bound_ret_zero) { - z = lp_build_layer_coord(bld, texture_unit, FALSE, z, &out1); + z = lp_build_layer_coord(bld, texture_unit, false, z, &out1); out_of_bounds = lp_build_or(int_coord_bld, out_of_bounds, out1); } else { - z = lp_build_layer_coord(bld, texture_unit, FALSE, z, NULL); + z = lp_build_layer_coord(bld, texture_unit, false, z, NULL); } } @@ -3210,7 +3210,7 @@ lp_build_fetch_texel(struct lp_build_sample_context *bld, lp_build_fetch_rgba_soa(bld->gallivm, bld->format_desc, - bld->texel_type, TRUE, + bld->texel_type, true, bld->base_ptr, offset, i, j, bld->cache, @@ -3386,13 +3386,13 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm, res_format_desc = util_format_description(static_texture_state->res_format); if (gallivm_perf & GALLIVM_PERF_NO_QUAD_LOD || op_is_lodq) { - bld.no_quad_lod = TRUE; + bld.no_quad_lod = true; } if (!(gallivm_perf & GALLIVM_PERF_RHO_APPROX) || op_is_lodq) { - bld.no_rho_approx = TRUE; + bld.no_rho_approx = true; } if (!(gallivm_perf & GALLIVM_PERF_BRILINEAR) || op_is_lodq || lod_bias || explicit_lod) { - bld.no_brilinear = TRUE; + bld.no_brilinear = true; } bld.vector_width = lp_type_width(type); @@ -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; - bool need_cache = FALSE; + bool need_cache = false; const enum lp_sampler_lod_control lod_control = (sample_key & LP_SAMPLER_LOD_CONTROL_MASK) @@ -4033,7 +4033,7 @@ lp_build_sample_gen_func(struct gallivm_state *gallivm, const struct util_format_description *format_desc; format_desc = util_format_description(static_texture_state->format); if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) { - need_cache = TRUE; + need_cache = true; } } @@ -4153,12 +4153,12 @@ lp_build_sample_soa_func(struct gallivm_state *gallivm, if (layer && op_type == LP_SAMPLER_OP_LODQ) layer = 0; - bool 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); if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) { - need_cache = TRUE; + need_cache = true; } } @@ -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) { - bool use_tex_func = FALSE; + bool use_tex_func = false; /* * Do not use a function call if the sampling is "simple enough". @@ -4337,7 +4337,7 @@ lp_build_sample_soa(const struct lp_static_texture_state *static_texture_state, 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) && + static_texture_state->level_zero_only == true) && static_sampler_state->min_img_filter == static_sampler_state->mag_img_filter); use_tex_func = !(simple_format && simple_tex); @@ -4542,7 +4542,7 @@ lp_build_size_query_soa(struct gallivm_state *gallivm, lp_build_const_int32(gallivm, 2), ""); } - size = lp_build_minify(&bld_int_vec4, size, lod, TRUE); + size = lp_build_minify(&bld_int_vec4, size, lod, true); size = lp_build_scale_view_dims(&bld_int_vec4, size, tex_blocksize, tex_blocksize_log2, view_blocksize); @@ -4891,7 +4891,7 @@ lp_build_img_op_soa(const struct lp_static_texture_state *static_texture_state, lp_build_context_init(&texel_bld, gallivm, texel_type); lp_build_fetch_rgba_soa(gallivm, format_desc, - texel_type, TRUE, + texel_type, true, base_ptr, offset, i, j, NULL, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c index 904eaa034d6..2d6dfcd38ce 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c @@ -194,7 +194,7 @@ lp_build_swizzle_scalar_aos(struct lp_build_context *bld, type, 1 << channel, num_channels), ""); type2 = type; - type2.floating = FALSE; + type2.floating = false; type2.width *= 2; type2.length /= 2; @@ -271,7 +271,7 @@ lp_build_swizzle_scalar_aos(struct lp_build_context *bld, */ struct lp_type type4 = type; - type4.floating = FALSE; + type4.floating = false; type4.width *= 4; type4.length /= 4; @@ -470,7 +470,7 @@ lp_build_swizzle_aos(struct lp_build_context *bld, * channels. */ struct lp_type type4 = type; - type4.floating = FALSE; + type4.floating = false; type4.width *= 4; type4.length /= 4; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c index 5cb8e620f36..db31512f1dc 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c @@ -258,13 +258,13 @@ lp_build_tgsi_inst_llvm(struct lp_build_tgsi_context *bld_base, case TGSI_OPCODE_UP4UB: /* deprecated? */ assert(0); - return FALSE; + return false; break; } /* Check if the opcode has been implemented */ if (!action->emit) { - return FALSE; + return false; } memset(&emit_data, 0, sizeof(emit_data)); @@ -336,7 +336,7 @@ lp_build_tgsi_inst_llvm(struct lp_build_tgsi_context *bld_base, if (info->num_dst >= 2) bld_base->emit_store(bld_base, inst, info, 1, emit_data.output1); } - return TRUE; + return true; } @@ -517,7 +517,7 @@ lp_build_tgsi_llvm(struct lp_build_tgsi_context *bld_base, } if (!lp_bld_tgsi_list_init(bld_base)) { - return FALSE; + return false; } struct tgsi_parse_context parse; @@ -554,7 +554,7 @@ lp_build_tgsi_llvm(struct lp_build_tgsi_context *bld_base, if (!lp_build_tgsi_inst_llvm(bld_base, instr)) { _debug_printf("warning: failed to translate tgsi opcode %s to LLVM\n", tgsi_get_opcode_name(instr->Instruction.Opcode)); - return FALSE; + return false; } } @@ -566,5 +566,5 @@ lp_build_tgsi_llvm(struct lp_build_tgsi_context *bld_base, bld_base->emit_epilogue(bld_base); } - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index cf5e0667087..59e3acb281c 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c @@ -1627,7 +1627,7 @@ log_emit_cpu( LLVMValueRef src0 = emit_data->args[0]; lp_build_log2_approx(&bld_base->base, src0, - &p_exp, &p_floor_log2, &p_log2, FALSE); + &p_exp, &p_floor_log2, &p_log2, false); emit_data->output[TGSI_CHAN_X] = p_floor_log2; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c index 80cb0fa1b7e..35129c3249a 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c @@ -464,7 +464,7 @@ lp_emit_instruction_aos( break; case TGSI_OPCODE_LIT: - return FALSE; + return false; case TGSI_OPCODE_RCP: /* TGSI_OPCODE_RECIP */ @@ -480,10 +480,10 @@ lp_emit_instruction_aos( break; case TGSI_OPCODE_EXP: - return FALSE; + return false; case TGSI_OPCODE_LOG: - return FALSE; + return false; case TGSI_OPCODE_MUL: src0 = lp_build_emit_fetch(&bld->bld_base, inst, 0, LP_CHAN_ALL); @@ -499,14 +499,14 @@ lp_emit_instruction_aos( case TGSI_OPCODE_DP3: /* TGSI_OPCODE_DOT3 */ - return FALSE; + return false; case TGSI_OPCODE_DP4: /* TGSI_OPCODE_DOT4 */ - return FALSE; + return false; case TGSI_OPCODE_DST: - return FALSE; + return false; case TGSI_OPCODE_MIN: src0 = lp_build_emit_fetch(&bld->bld_base, inst, 0, LP_CHAN_ALL); @@ -597,31 +597,31 @@ lp_emit_instruction_aos( break; case TGSI_OPCODE_DDX: - return FALSE; + return false; case TGSI_OPCODE_DDY: - return FALSE; + return false; case TGSI_OPCODE_KILL: - return FALSE; + return false; case TGSI_OPCODE_KILL_IF: - return FALSE; + return false; case TGSI_OPCODE_PK2H: - return FALSE; + return false; break; case TGSI_OPCODE_PK2US: - return FALSE; + return false; break; case TGSI_OPCODE_PK4B: - return FALSE; + return false; break; case TGSI_OPCODE_PK4UB: - return FALSE; + return false; case TGSI_OPCODE_SEQ: src0 = lp_build_emit_fetch(&bld->bld_base, inst, 0, LP_CHAN_ALL); @@ -668,25 +668,25 @@ lp_emit_instruction_aos( case TGSI_OPCODE_UP2H: /* deprecated */ assert (0); - return FALSE; + return false; break; case TGSI_OPCODE_UP2US: /* deprecated */ assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_UP4B: /* deprecated */ assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_UP4UB: /* deprecated */ assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_ARR: @@ -695,7 +695,7 @@ lp_emit_instruction_aos( break; case TGSI_OPCODE_CAL: - return FALSE; + return false; case TGSI_OPCODE_RET: /* safe to ignore at end */ @@ -725,11 +725,11 @@ lp_emit_instruction_aos( case TGSI_OPCODE_DIV: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_DP2: - return FALSE; + return false; case TGSI_OPCODE_TXL: dst0 = emit_tex(bld, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_LOD); @@ -740,29 +740,29 @@ lp_emit_instruction_aos( break; case TGSI_OPCODE_BRK: - return FALSE; + return false; case TGSI_OPCODE_IF: case TGSI_OPCODE_UIF: - return FALSE; + return false; case TGSI_OPCODE_BGNLOOP: - return FALSE; + return false; case TGSI_OPCODE_BGNSUB: - return FALSE; + return false; case TGSI_OPCODE_ELSE: - return FALSE; + return false; case TGSI_OPCODE_ENDIF: - return FALSE; + return false; case TGSI_OPCODE_ENDLOOP: - return FALSE; + return false; case TGSI_OPCODE_ENDSUB: - return FALSE; + return false; case TGSI_OPCODE_CEIL: src0 = lp_build_emit_fetch(&bld->bld_base, inst, 0, LP_CHAN_ALL); @@ -771,12 +771,12 @@ lp_emit_instruction_aos( case TGSI_OPCODE_I2F: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_NOT: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_TRUNC: @@ -786,53 +786,53 @@ lp_emit_instruction_aos( case TGSI_OPCODE_SHL: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_ISHR: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_AND: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_OR: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_MOD: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_XOR: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_TXF: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_TXQ: assert(0); - return FALSE; + return false; break; case TGSI_OPCODE_CONT: - return FALSE; + return false; case TGSI_OPCODE_EMIT: - return FALSE; + return false; break; case TGSI_OPCODE_ENDPRIM: - return FALSE; + return false; break; case TGSI_OPCODE_NOP: @@ -843,14 +843,14 @@ lp_emit_instruction_aos( break; default: - return FALSE; + return false; } if (info->num_dst) { lp_emit_store_aos(bld, inst, 0, dst0); } - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c index 06750d06ee8..2732d31b7c3 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c @@ -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]; - bool indirect = FALSE; + bool indirect = false; unsigned readmask = 0; tex_info->target = inst->Texture.Texture; @@ -143,12 +143,12 @@ analyse_tex(struct analysis_context *ctx, readmask = TGSI_WRITEMASK_XYZW; /* modifier would be in another not analyzed reg so just say indirect */ if (modifier != LP_BLD_TEX_MODIFIER_NONE) { - indirect = TRUE; + indirect = true; } break; case TGSI_TEXTURE_SHADOWCUBE_ARRAY: readmask = TGSI_WRITEMASK_XYZW; - indirect = TRUE; + indirect = true; break; default: assert(0); @@ -157,7 +157,7 @@ analyse_tex(struct analysis_context *ctx, if (modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV) { /* We don't track explicit derivatives, although we could */ - indirect = TRUE; + indirect = true; tex_info->sampler_unit = inst->Src[3].Register.Index; tex_info->texture_unit = inst->Src[3].Register.Index; } else { @@ -175,7 +175,7 @@ analyse_tex(struct analysis_context *ctx, if (readmask & (1 << chan)) { analyse_src(ctx, chan_info, &inst->Src[0].Register, chan); if (chan_info->file != TGSI_FILE_INPUT) { - indirect = TRUE; + indirect = true; } } else { memset(chan_info, 0, sizeof *chan_info); @@ -183,12 +183,12 @@ analyse_tex(struct analysis_context *ctx, } if (indirect) { - info->indirect_textures = TRUE; + info->indirect_textures = true; } ++info->num_texs; } else { - info->indirect_textures = TRUE; + info->indirect_textures = true; } } @@ -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]; - bool indirect = FALSE; - bool shadow = FALSE; + bool indirect = false; + bool shadow = false; unsigned readmask; switch (target) { @@ -245,14 +245,14 @@ analyse_sample(struct analysis_context *ctx, tex_info->sampler_unit = inst->Src[2].Register.Index; if (tex_info->texture_unit != tex_info->sampler_unit) { - info->sampler_texture_units_different = TRUE; + info->sampler_texture_units_different = true; } if (modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV || modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_LOD || modifier == LP_BLD_TEX_MODIFIER_LOD_BIAS || shadow) { /* We don't track insts with additional regs, although we could */ - indirect = TRUE; + indirect = true; } for (chan = 0; chan < 4; ++chan) { @@ -260,7 +260,7 @@ analyse_sample(struct analysis_context *ctx, if (readmask & (1 << chan)) { analyse_src(ctx, chan_info, &inst->Src[0].Register, chan); if (chan_info->file != TGSI_FILE_INPUT) { - indirect = TRUE; + indirect = true; } } else { memset(chan_info, 0, sizeof *chan_info); @@ -268,12 +268,12 @@ analyse_sample(struct analysis_context *ctx, } if (indirect) { - info->indirect_textures = TRUE; + info->indirect_textures = true; } ++info->num_texs; } else { - info->indirect_textures = TRUE; + info->indirect_textures = true; } } @@ -349,22 +349,22 @@ analyse_instruction(struct analysis_context *ctx, analyse_tex(ctx, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_LOD); break; case TGSI_OPCODE_SAMPLE: - analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_NONE, FALSE); + analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_NONE, false); break; case TGSI_OPCODE_SAMPLE_C: - analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_NONE, TRUE); + analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_NONE, true); break; case TGSI_OPCODE_SAMPLE_C_LZ: - analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_LOD_ZERO, TRUE); + analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_LOD_ZERO, true); break; case TGSI_OPCODE_SAMPLE_D: - analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV, FALSE); + analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV, false); break; case TGSI_OPCODE_SAMPLE_B: - analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_LOD_BIAS, FALSE); + analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_LOD_BIAS, false); break; case TGSI_OPCODE_SAMPLE_L: - analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_LOD, FALSE); + analyse_sample(ctx, inst, LP_BLD_TEX_MODIFIER_EXPLICIT_LOD, false); break; default: break; @@ -590,7 +590,7 @@ lp_build_tgsi_info(const struct tgsi_token *tokens, ctx->imm[ctx->num_imms][chan] = value; if (value < 0.0f || value > 1.0f) { - info->unclamped_immediates = TRUE; + info->unclamped_immediates = true; } } ++ctx->num_imms; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index 91b778e3432..61d8f4aae8b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -403,7 +403,7 @@ static void lp_exec_mask_ret(struct lp_exec_mask *mask, int *pc) * we don't drop the mask even if we have no call stack * (e.g. after a ret in a if clause after the endif) */ - mask->ret_in_main = TRUE; + mask->ret_in_main = true; } exec_mask = LLVMBuildNot(builder, @@ -996,12 +996,12 @@ emit_fetch_immediate( index_vec = get_soa_array_offsets(&bld_base->uint_bld, indirect_index, swizzle, - FALSE); + false); if (tgsi_type_is_64bit(stype)) index_vec2 = get_soa_array_offsets(&bld_base->uint_bld, indirect_index, swizzle_in >> 16, - FALSE); + false); /* Gather values from the immediate register array */ res = build_gather(bld_base, imms_array, index_vec, NULL, index_vec2); } else { @@ -1067,12 +1067,12 @@ emit_fetch_input( index_vec = get_soa_array_offsets(&bld_base->uint_bld, indirect_index, swizzle, - TRUE); + true); if (tgsi_type_is_64bit(stype)) { index_vec2 = get_soa_array_offsets(&bld_base->uint_bld, indirect_index, swizzle_in >> 16, - TRUE); + true); } /* cast inputs_array pointer to float* */ fptr_type = LLVMPointerType(LLVMFloatTypeInContext(gallivm->context), 0); @@ -1263,7 +1263,7 @@ emit_fetch_tcs_input( vertex_index, reg->Register.Indirect, attrib_index, - FALSE, + false, swizzle_index, bld_base->info->output_semantic_name[reg->Register.Index]); } else { @@ -1272,7 +1272,7 @@ emit_fetch_tcs_input( vertex_index, reg->Register.Indirect, attrib_index, - FALSE, + false, swizzle_index); } @@ -1287,7 +1287,7 @@ emit_fetch_tcs_input( vertex_index, reg->Register.Indirect, attrib_index, - FALSE, + false, swizzle_index, bld_base->info->output_semantic_name[reg->Register.Index]); } else { @@ -1296,7 +1296,7 @@ emit_fetch_tcs_input( vertex_index, reg->Register.Indirect, attrib_index, - FALSE, + false, swizzle_index); } assert(res2); @@ -1370,7 +1370,7 @@ emit_fetch_tes_input( vertex_index, reg->Register.Indirect, attrib_index, - FALSE, + false, swizzle_index); } @@ -1390,7 +1390,7 @@ emit_fetch_tes_input( vertex_index, reg->Register.Indirect, attrib_index, - FALSE, + false, swizzle_index); } assert(res2); @@ -1434,12 +1434,12 @@ emit_fetch_temporary( index_vec = get_soa_array_offsets(&bld_base->uint_bld, indirect_index, swizzle, - TRUE); + true); if (tgsi_type_is_64bit(stype)) { index_vec2 = get_soa_array_offsets(&bld_base->uint_bld, indirect_index, swizzle_in >> 16, - TRUE); + true); } /* cast temps_array pointer to float* */ @@ -1707,7 +1707,7 @@ emit_store_output(struct lp_build_tgsi_context *bld_base, index_vec = get_soa_array_offsets(&bld_base->uint_bld, indirect_index, chan_index, - TRUE); + true); fptr_type = LLVMPointerType(LLVMFloatTypeInContext(gallivm->context), 0); outputs_array = LLVMBuildBitCast(builder, bld->outputs_array, fptr_type, ""); @@ -1818,7 +1818,7 @@ emit_store_temp(struct lp_build_tgsi_context *bld_base, index_vec = get_soa_array_offsets(&bld_base->uint_bld, indirect_index, chan_index, - TRUE); + true); fptr_type = LLVMPointerType(LLVMFloatTypeInContext(gallivm->context), 0); temps_array = LLVMBuildBitCast(builder, bld->temps_array, fptr_type, ""); @@ -2667,7 +2667,7 @@ emit_size_query( struct lp_build_tgsi_soa_context *bld, params.target = pipe_target; params.resources_type = bld->resources_type; params.resources_ptr = bld->resources_ptr; - params.is_sviewinfo = TRUE; + params.is_sviewinfo = true; params.lod_property = lod_property; params.explicit_lod = explicit_lod; params.sizes_out = sizes_out; @@ -2688,12 +2688,12 @@ near_end_of_shader(struct lp_build_tgsi_soa_context *bld, enum tgsi_opcode opcode; if (pc + i >= bld->bld_base.info->num_instructions) - return TRUE; + return true; opcode = bld->bld_base.instructions[pc + i].Instruction.Opcode; if (opcode == TGSI_OPCODE_END) - return TRUE; + return true; if (opcode == TGSI_OPCODE_TEX || opcode == TGSI_OPCODE_TXP || @@ -2719,10 +2719,10 @@ near_end_of_shader(struct lp_build_tgsi_soa_context *bld, opcode == TGSI_OPCODE_UIF || opcode == TGSI_OPCODE_BGNLOOP || opcode == TGSI_OPCODE_SWITCH) - return FALSE; + return false; } - return TRUE; + return true; } @@ -3259,7 +3259,7 @@ txq_emit( { struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); - emit_size_query(bld, emit_data->inst, emit_data->output, FALSE); + emit_size_query(bld, emit_data->inst, emit_data->output, false); } static void @@ -3270,7 +3270,7 @@ txf_emit( { struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); - emit_fetch_texels(bld, emit_data->inst, emit_data->output, FALSE); + emit_fetch_texels(bld, emit_data->inst, emit_data->output, false); } static void @@ -3281,7 +3281,7 @@ sample_i_emit( { struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); - emit_fetch_texels(bld, emit_data->inst, emit_data->output, TRUE); + emit_fetch_texels(bld, emit_data->inst, emit_data->output, true); } static void @@ -3293,7 +3293,7 @@ sample_emit( struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_NONE, - FALSE, LP_SAMPLER_OP_TEXTURE, emit_data->output); + false, LP_SAMPLER_OP_TEXTURE, emit_data->output); } static void @@ -3305,7 +3305,7 @@ sample_b_emit( struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_LOD_BIAS, - FALSE, LP_SAMPLER_OP_TEXTURE, emit_data->output); + false, LP_SAMPLER_OP_TEXTURE, emit_data->output); } static void @@ -3317,7 +3317,7 @@ sample_c_emit( struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_NONE, - TRUE, LP_SAMPLER_OP_TEXTURE, emit_data->output); + true, LP_SAMPLER_OP_TEXTURE, emit_data->output); } static void @@ -3329,7 +3329,7 @@ sample_c_lz_emit( struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_LOD_ZERO, - TRUE, LP_SAMPLER_OP_TEXTURE, emit_data->output); + true, LP_SAMPLER_OP_TEXTURE, emit_data->output); } static void @@ -3341,7 +3341,7 @@ sample_d_emit( struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV, - FALSE, LP_SAMPLER_OP_TEXTURE, emit_data->output); + false, LP_SAMPLER_OP_TEXTURE, emit_data->output); } static void @@ -3353,7 +3353,7 @@ sample_l_emit( struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_EXPLICIT_LOD, - FALSE, LP_SAMPLER_OP_TEXTURE, emit_data->output); + false, LP_SAMPLER_OP_TEXTURE, emit_data->output); } static void @@ -3365,7 +3365,7 @@ gather4_emit( struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_NONE, - FALSE, LP_SAMPLER_OP_GATHER, emit_data->output); + false, LP_SAMPLER_OP_GATHER, emit_data->output); } static void @@ -3376,7 +3376,7 @@ sviewinfo_emit( { struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); - emit_size_query(bld, emit_data->inst, emit_data->output, TRUE); + emit_size_query(bld, emit_data->inst, emit_data->output, true); } static void @@ -3388,7 +3388,7 @@ lod_emit( struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); emit_sample(bld, emit_data->inst, LP_BLD_TEX_MODIFIER_NONE, - FALSE, LP_SAMPLER_OP_LODQ, emit_data->output); + false, LP_SAMPLER_OP_LODQ, emit_data->output); } static void @@ -4516,7 +4516,7 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm, } - bld.bld_base.soa = TRUE; + bld.bld_base.soa = true; bld.bld_base.emit_debug = emit_debug; bld.bld_base.emit_fetch_funcs[TGSI_FILE_CONSTANT] = emit_fetch_constant; bld.bld_base.emit_fetch_funcs[TGSI_FILE_IMMEDIATE] = emit_fetch_immediate; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.c b/src/gallium/auxiliary/gallivm/lp_bld_type.c index 7b6b3cb0721..e276e479aed 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_type.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_type.c @@ -86,7 +86,7 @@ lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type) { assert(elem_type); if (!elem_type) - return FALSE; + return false; const LLVMTypeKind elem_kind = LLVMGetTypeKind(elem_type); @@ -96,41 +96,41 @@ lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type) if (elem_kind != (lp_has_fp16() ? LLVMHalfTypeKind : LLVMIntegerTypeKind)) { debug_printf("%s:%d: type is not 16 bits\n", __FILE__, __LINE__); - return FALSE; + return false; } break; case 32: if (elem_kind != LLVMFloatTypeKind) { debug_printf("%s:%d: type is not float\n", __FILE__, __LINE__); - return FALSE; + return false; } break; case 64: if (elem_kind != LLVMDoubleTypeKind) { debug_printf("%s:%d: type is not double\n", __FILE__, __LINE__); - return FALSE; + return false; } break; default: assert(0); - return FALSE; + return false; } } else { if (elem_kind != LLVMIntegerTypeKind) { debug_printf("%s:%d: element is not integer\n", __FILE__, __LINE__); - return FALSE; + return false; } if (LLVMGetIntTypeWidth(elem_type) != type.width) { debug_printf("%s:%d: type width mismatch %d != %d\n", __FILE__, __LINE__, LLVMGetIntTypeWidth(elem_type), type.width); - return FALSE; + return false; } } - return TRUE; + return true; } @@ -139,20 +139,20 @@ lp_check_vec_type(struct lp_type type, LLVMTypeRef vec_type) { assert(vec_type); if (!vec_type) - return FALSE; + return false; if (type.length == 1) return lp_check_elem_type(type, vec_type); if (LLVMGetTypeKind(vec_type) != LLVMVectorTypeKind) { printf("%s:%d: kind is not vector\n", __FILE__, __LINE__); - return FALSE; + return false; } if (LLVMGetVectorSize(vec_type) != type.length) { printf("%s:%d: vector size mismatch %d != expected %d\n", __FILE__, __LINE__, LLVMGetVectorSize(vec_type), type.length); - return FALSE; + return false; } LLVMTypeRef elem_type = LLVMGetElementType(vec_type); @@ -166,7 +166,7 @@ lp_check_value(struct lp_type type, LLVMValueRef val) { assert(val); if (!val) - return FALSE; + return false; LLVMTypeRef vec_type = LLVMTypeOf(val); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.h b/src/gallium/auxiliary/gallivm/lp_bld_type.h index a459c5a28e2..f828ff15b62 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_type.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_type.h @@ -214,8 +214,8 @@ lp_type_float(unsigned width) struct lp_type res_type; memset(&res_type, 0, sizeof res_type); - res_type.floating = TRUE; - res_type.sign = TRUE; + res_type.floating = true; + res_type.sign = true; res_type.width = width; res_type.length = 1; @@ -230,8 +230,8 @@ lp_type_float_vec(unsigned width, unsigned total_width) struct lp_type res_type; memset(&res_type, 0, sizeof res_type); - res_type.floating = TRUE; - res_type.sign = TRUE; + res_type.floating = true; + res_type.sign = true; res_type.width = width; res_type.length = total_width / width; @@ -246,7 +246,7 @@ lp_type_int(unsigned width) struct lp_type res_type; memset(&res_type, 0, sizeof res_type); - res_type.sign = TRUE; + res_type.sign = true; res_type.width = width; res_type.length = 1; @@ -261,7 +261,7 @@ lp_type_int_vec(unsigned width, unsigned total_width) struct lp_type res_type; memset(&res_type, 0, sizeof res_type); - res_type.sign = TRUE; + res_type.sign = true; res_type.width = width; res_type.length = total_width / width; @@ -303,7 +303,7 @@ lp_type_unorm(unsigned width, unsigned total_width) struct lp_type res_type; memset(&res_type, 0, sizeof res_type); - res_type.norm = TRUE; + res_type.norm = true; res_type.width = width; res_type.length = total_width / width; @@ -317,8 +317,8 @@ lp_type_fixed(unsigned width, unsigned total_width) struct lp_type res_type; memset(&res_type, 0, sizeof res_type); - res_type.sign = TRUE; - res_type.fixed = TRUE; + res_type.sign = true; + res_type.fixed = true; res_type.width = width; res_type.length = total_width / width; @@ -332,7 +332,7 @@ lp_type_ufixed(unsigned width, unsigned total_width) struct lp_type res_type; memset(&res_type, 0, sizeof res_type); - res_type.fixed = TRUE; + res_type.fixed = true; res_type.width = width; res_type.length = total_width / width; @@ -376,9 +376,9 @@ lp_float32_vec4_type(void) struct lp_type type; memset(&type, 0, sizeof(type)); - type.floating = TRUE; - type.sign = TRUE; - type.norm = FALSE; + type.floating = true; + type.sign = true; + type.norm = false; type.width = 32; type.length = 4; @@ -392,9 +392,9 @@ lp_int32_vec4_type(void) struct lp_type type; memset(&type, 0, sizeof(type)); - type.floating = FALSE; - type.sign = TRUE; - type.norm = FALSE; + type.floating = false; + type.sign = true; + type.norm = false; type.width = 32; type.length = 4; @@ -408,9 +408,9 @@ lp_unorm8_vec4_type(void) struct lp_type type; memset(&type, 0, sizeof(type)); - type.floating = FALSE; - type.sign = FALSE; - type.norm = TRUE; + type.floating = false; + type.sign = false; + type.norm = true; type.width = 8; type.length = 4; diff --git a/src/gallium/auxiliary/hud/font.c b/src/gallium/auxiliary/hud/font.c index d19f06f96f8..b4430e20575 100644 --- a/src/gallium/auxiliary/hud/font.c +++ b/src/gallium/auxiliary/hud/font.c @@ -399,7 +399,7 @@ util_font_create_fixed_8x13(struct pipe_context *pipe, if (tex_format == PIPE_FORMAT_NONE) { debug_printf("Unable to find texture format for font.\n"); - return FALSE; + return false; } memset(&tex_templ, 0, sizeof(tex_templ)); @@ -414,14 +414,14 @@ util_font_create_fixed_8x13(struct pipe_context *pipe, tex = screen->resource_create(screen, &tex_templ); if (!tex) { - return FALSE; + return false; } map = pipe_texture_map(pipe, tex, 0, 0, PIPE_MAP_WRITE, 0, 0, tex->width0, tex->height0, &transfer); if (!map) { pipe_resource_reference(&tex, NULL); - return FALSE; + return false; } for (i = 0; i < 256; i++) { @@ -438,7 +438,7 @@ util_font_create_fixed_8x13(struct pipe_context *pipe, out_font->texture = tex; out_font->glyph_width = 8; out_font->glyph_height = 14; - return TRUE; + return true; } @@ -450,5 +450,5 @@ util_font_create(struct pipe_context *pipe, enum util_font_name name, case UTIL_FONT_FIXED_8X13: return util_font_create_fixed_8x13(pipe, out_font); } - return FALSE; + return false; } diff --git a/src/gallium/auxiliary/hud/hud_cpu.c b/src/gallium/auxiliary/hud/hud_cpu.c index be192d518ac..ce66a03d0e8 100644 --- a/src/gallium/auxiliary/hud/hud_cpu.c +++ b/src/gallium/auxiliary/hud/hud_cpu.c @@ -70,13 +70,13 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time) assert(sysInfo.dwNumberOfProcessors >= 1); if (cpu_index != ALL_CPUS && cpu_index >= sysInfo.dwNumberOfProcessors) { /* Tell hud_get_num_cpus there are only this many CPUs. */ - return FALSE; + return false; } /* Get accumulated user and sys time for all threads */ if (!GetProcessTimes(GetCurrentProcess(), &ftCreation, &ftExit, &ftKernel, &ftUser)) - return FALSE; + return false; GetSystemTimeAsFileTime(&ftNow); @@ -92,7 +92,7 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time) /* XXX: we ignore cpu_index, i.e, we assume that the individual CPU usage * and the system usage are one and the same. */ - return TRUE; + return true; } #elif DETECT_OS_BSD @@ -114,20 +114,20 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time) int mib[] = { CTL_KERN, KERN_CP_TIME }; if (sysctl(mib, ARRAY_SIZE(mib), cp_time, &len, NULL, 0) == -1) - return FALSE; + return false; #elif DETECT_OS_OPENBSD int mib[] = { CTL_KERN, KERN_CPTIME }; long sum_cp_time[CPUSTATES]; len = sizeof(sum_cp_time); if (sysctl(mib, ARRAY_SIZE(mib), sum_cp_time, &len, NULL, 0) == -1) - return FALSE; + return false; for (int state = 0; state < CPUSTATES; state++) cp_time[state] = sum_cp_time[state]; #else if (sysctlbyname("kern.cp_time", cp_time, &len, NULL, 0) == -1) - return FALSE; + return false; #endif } else { #if DETECT_OS_NETBSD @@ -135,26 +135,26 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time) len = sizeof(cp_time); if (sysctl(mib, ARRAY_SIZE(mib), cp_time, &len, NULL, 0) == -1) - return FALSE; + return false; #elif DETECT_OS_OPENBSD int mib[] = { CTL_KERN, KERN_CPTIME2, cpu_index }; len = sizeof(cp_time); if (sysctl(mib, ARRAY_SIZE(mib), cp_time, &len, NULL, 0) == -1) - return FALSE; + return false; #else long *cp_times = NULL; if (sysctlbyname("kern.cp_times", NULL, &len, NULL, 0) == -1) - return FALSE; + return false; if (len < (cpu_index + 1) * sizeof(cp_time)) - return FALSE; + return false; cp_times = malloc(len); if (sysctlbyname("kern.cp_times", cp_times, &len, NULL, 0) == -1) - return FALSE; + return false; memcpy(cp_time, cp_times + (cpu_index * CPUSTATES), sizeof(cp_time)); @@ -167,7 +167,7 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time) *total_time = *busy_time + cp_time[CP_IDLE]; - return TRUE; + return true; } #else @@ -186,7 +186,7 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time) f = fopen("/proc/stat", "r"); if (!f) - return FALSE; + return false; while (!feof(f) && fgets(line, sizeof(line), f)) { if (strstr(line, cpuname) == line) { @@ -201,7 +201,7 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time) &v[6], &v[7], &v[8], &v[9], &v[10], &v[11]); if (num < 5) { fclose(f); - return FALSE; + return false; } /* user + nice + system */ @@ -213,11 +213,11 @@ get_cpu_stats(unsigned cpu_index, uint64_t *busy_time, uint64_t *total_time) *total_time += v[i]; } fclose(f); - return TRUE; + return true; } } fclose(f); - return FALSE; + return false; } #endif diff --git a/src/gallium/auxiliary/hud/hud_driver_query.c b/src/gallium/auxiliary/hud/hud_driver_query.c index 683185c56db..e403a5b4bc4 100644 --- a/src/gallium/auxiliary/hud/hud_driver_query.c +++ b/src/gallium/auxiliary/hud/hud_driver_query.c @@ -73,11 +73,11 @@ hud_batch_query_update(struct hud_batch_query_context *bq, bq->num_query_types); if (!bq->result[idx]) { fprintf(stderr, "gallium_hud: out of memory.\n"); - bq->failed = TRUE; + bq->failed = true; return; } - if (!pipe->get_query_result(pipe, query, FALSE, bq->result[idx])) + if (!pipe->get_query_result(pipe, query, false, bq->result[idx])) break; ++bq->results; @@ -108,7 +108,7 @@ hud_batch_query_update(struct hud_batch_query_context *bq, fprintf(stderr, "gallium_hud: create_batch_query failed. You may have " "selected too many or incompatible queries.\n"); - bq->failed = TRUE; + bq->failed = true; return; } } @@ -125,7 +125,7 @@ hud_batch_query_begin(struct hud_batch_query_context *bq, fprintf(stderr, "gallium_hud: could not begin batch query. You may have " "selected too many or incompatible queries.\n"); - bq->failed = TRUE; + bq->failed = true; } } @@ -242,7 +242,7 @@ query_new_value_normal(struct query_info *info, struct pipe_context *pipe) union pipe_query_result result; uint64_t *res64 = (uint64_t *)&result; - if (query && pipe->get_query_result(pipe, query, FALSE, &result)) { + if (query && pipe->get_query_result(pipe, query, false, &result)) { if (info->type == PIPE_DRIVER_QUERY_TYPE_FLOAT) { assert(info->result_index == 0); info->results_cumulative += (uint64_t) (result.f * 1000.0f); @@ -426,27 +426,27 @@ hud_driver_query_install(struct hud_batch_query_context **pbq, { struct pipe_driver_query_info query = { 0 }; unsigned num_queries, i; - bool found = FALSE; + bool found = false; if (!screen->get_driver_query_info) - return FALSE; + return false; num_queries = screen->get_driver_query_info(screen, 0, NULL); for (i = 0; i < num_queries; i++) { if (screen->get_driver_query_info(screen, i, &query) && strcmp(query.name, name) == 0) { - found = TRUE; + found = true; break; } } if (!found) - return FALSE; + return false; hud_pipe_query_install(pbq, pane, query.name, query.query_type, 0, query.max_value.u64, query.type, query.result_type, query.flags); - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/hud/hud_nic.c b/src/gallium/auxiliary/hud/hud_nic.c index 66067115f5f..28b000f65db 100644 --- a/src/gallium/auxiliary/hud/hud_nic.c +++ b/src/gallium/auxiliary/hud/hud_nic.c @@ -101,9 +101,9 @@ static bool get_nic_bytes(const char *fn, uint64_t *bytes) { if (get_file_value(fn, bytes) < 0) - return FALSE; + return false; - return TRUE; + return true; } static void diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer.h b/src/gallium/auxiliary/pipebuffer/pb_buffer.h index 518d19e97ed..15aa4958e8e 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer.h +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer.h @@ -291,12 +291,12 @@ static inline bool pb_check_alignment(uint32_t requested, uint32_t provided) { if (!requested) - return TRUE; + return true; if (requested > provided) - return FALSE; + return false; if (provided % requested != 0) - return FALSE; - return TRUE; + return false; + return true; } @@ -307,7 +307,7 @@ pb_check_alignment(uint32_t requested, uint32_t provided) static inline bool pb_check_usage(unsigned requested, unsigned provided) { - return (requested & provided) == requested ? TRUE : FALSE; + return (requested & provided) == requested ? true : false; } #ifdef __cplusplus diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c index 613f45778e8..7926d3fffd6 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c @@ -314,10 +314,10 @@ fenced_buffer_remove_locked(struct fenced_manager *fenced_mgr, if (p_atomic_dec_zero(&fenced_buf->base.reference.count)) { fenced_buffer_destroy_locked(fenced_mgr, fenced_buf); - return TRUE; + return true; } - return FALSE; + return false; } @@ -360,7 +360,7 @@ fenced_buffer_finish_locked(struct fenced_manager *fenced_mgr, * Otherwise assume the work has been already carried out by another * thread that re-aquired the lock before us. */ - proceed = fence == fenced_buf->fence ? TRUE : FALSE; + proceed = fence == fenced_buf->fence ? true : false; ops->fence_reference(ops, &fence, NULL); @@ -396,7 +396,7 @@ fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr, struct list_head *curr, *next; struct fenced_buffer *fenced_buf; struct pipe_fence_handle *prev_fence = NULL; - bool ret = FALSE; + bool ret = false; curr = fenced_mgr->fenced.next; next = curr->next; @@ -412,7 +412,7 @@ fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr, /* Don't return just now. Instead preemptively check if the * following buffers' fences already expired, without further waits. */ - wait = FALSE; + wait = false; } else { signaled = ops->fence_signalled(ops, fenced_buf->fence, 0); } @@ -431,7 +431,7 @@ fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr, fenced_buffer_remove_locked(fenced_mgr, fenced_buf); - ret = TRUE; + ret = true; curr = next; next = curr->next; @@ -470,7 +470,7 @@ fenced_manager_free_gpu_storage_locked(struct fenced_manager *fenced_mgr) ret = fenced_buffer_copy_storage_to_cpu_locked(fenced_buf); if (ret == PIPE_OK) { fenced_buffer_destroy_gpu_storage_locked(fenced_buf); - return TRUE; + return true; } fenced_buffer_destroy_cpu_storage_locked(fenced_buf); } @@ -480,7 +480,7 @@ fenced_manager_free_gpu_storage_locked(struct fenced_manager *fenced_mgr) next = curr->next; } - return FALSE; + return false; } @@ -552,7 +552,7 @@ fenced_buffer_try_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, fenced_buf->buffer = provider->create_buffer(fenced_mgr->provider, fenced_buf->size, &fenced_buf->desc); - return fenced_buf->buffer ? TRUE : FALSE; + return fenced_buf->buffer ? true : false; } @@ -567,7 +567,7 @@ fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, assert(!fenced_buf->buffer); /* Check for signaled buffers before trying to allocate. */ - fenced_manager_check_signalled_locked(fenced_mgr, FALSE); + fenced_manager_check_signalled_locked(fenced_mgr, false); fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf); @@ -576,7 +576,7 @@ fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, * - or buffers are being being swapped out from GPU memory into CPU memory. */ while (!fenced_buf->buffer && - (fenced_manager_check_signalled_locked(fenced_mgr, FALSE) || + (fenced_manager_check_signalled_locked(fenced_mgr, false) || fenced_manager_free_gpu_storage_locked(fenced_mgr))) { fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf); } @@ -586,7 +586,7 @@ fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, * necessary. */ while (!fenced_buf->buffer && - (fenced_manager_check_signalled_locked(fenced_mgr, TRUE) || + (fenced_manager_check_signalled_locked(fenced_mgr, true) || fenced_manager_free_gpu_storage_locked(fenced_mgr))) { fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf); } @@ -776,7 +776,7 @@ fenced_buffer_validate(struct pb_buffer *buf, if (!fenced_buf->buffer) { assert(!fenced_buf->mapcount); - ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, TRUE); + ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, true); if (ret != PIPE_OK) { goto done; } @@ -920,7 +920,7 @@ fenced_bufmgr_create_buffer(struct pb_manager *mgr, mtx_lock(&fenced_mgr->mutex); /* Try to create GPU storage without stalling. */ - ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, FALSE); + ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, false); /* Attempt to use CPU memory to avoid stalling the GPU. */ if (ret != PIPE_OK) { @@ -929,7 +929,7 @@ fenced_bufmgr_create_buffer(struct pb_manager *mgr, /* Create GPU storage, waiting for some to be available. */ if (ret != PIPE_OK) { - ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, TRUE); + ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, true); } /* Give up. */ @@ -959,7 +959,7 @@ fenced_bufmgr_flush(struct pb_manager *mgr) struct fenced_manager *fenced_mgr = fenced_manager(mgr); mtx_lock(&fenced_mgr->mutex); - while (fenced_manager_check_signalled_locked(fenced_mgr, TRUE)) + while (fenced_manager_check_signalled_locked(fenced_mgr, true)) ; mtx_unlock(&fenced_mgr->mutex); @@ -983,7 +983,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr) sched_yield(); #endif mtx_lock(&fenced_mgr->mutex); - while (fenced_manager_check_signalled_locked(fenced_mgr, TRUE)) + while (fenced_manager_check_signalled_locked(fenced_mgr, true)) ; } diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c index e85c1253a01..f111bdac601 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c @@ -138,7 +138,7 @@ static inline bool check_random_pattern(const uint8_t *dst, pb_size size, pb_size *min_ofs, pb_size *max_ofs) { - bool result = TRUE; + bool result = true; pb_size i; *min_ofs = size; *max_ofs = 0; @@ -146,7 +146,7 @@ check_random_pattern(const uint8_t *dst, pb_size size, if(*dst++ != random_pattern[i % sizeof(random_pattern)]) { *min_ofs = MIN2(*min_ofs, i); *max_ofs = MAX2(*max_ofs, i); - result = FALSE; + result = false; } } return result; diff --git a/src/gallium/auxiliary/pipebuffer/pb_validate.c b/src/gallium/auxiliary/pipebuffer/pb_validate.c index b8dbbb7407b..5adc3315d45 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_validate.c +++ b/src/gallium/auxiliary/pipebuffer/pb_validate.c @@ -69,7 +69,7 @@ pb_validate_add_buffer(struct pb_validate *vl, bool *already_present) { assert(buf); - *already_present = FALSE; + *already_present = false; if (!buf) return PIPE_ERROR; @@ -85,7 +85,7 @@ pb_validate_add_buffer(struct pb_validate *vl, assert(entry->buf == buf); entry->flags |= flags; - *already_present = TRUE; + *already_present = true; return PIPE_OK; } diff --git a/src/gallium/auxiliary/postprocess/pp_celshade.c b/src/gallium/auxiliary/postprocess/pp_celshade.c index 9b19fdd84da..e51c5b944db 100644 --- a/src/gallium/auxiliary/postprocess/pp_celshade.c +++ b/src/gallium/auxiliary/postprocess/pp_celshade.c @@ -37,7 +37,7 @@ pp_celshade_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val) ppq->shaders[n][1] = pp_tgsi_to_state(ppq->p->pipe, celshade, false, "celshade"); - return (ppq->shaders[n][1] != NULL) ? TRUE : FALSE; + return (ppq->shaders[n][1] != NULL) ? true : false; } /** Free function */ diff --git a/src/gallium/auxiliary/postprocess/pp_colors.c b/src/gallium/auxiliary/postprocess/pp_colors.c index e7ce77758f5..cbd367635f3 100644 --- a/src/gallium/auxiliary/postprocess/pp_colors.c +++ b/src/gallium/auxiliary/postprocess/pp_colors.c @@ -65,7 +65,7 @@ pp_nored_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val) ppq->shaders[n][1] = pp_tgsi_to_state(ppq->p->pipe, nored, false, "nored"); - return (ppq->shaders[n][1] != NULL) ? TRUE : FALSE; + return (ppq->shaders[n][1] != NULL) ? true : false; } @@ -75,7 +75,7 @@ pp_nogreen_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val) ppq->shaders[n][1] = pp_tgsi_to_state(ppq->p->pipe, nogreen, false, "nogreen"); - return (ppq->shaders[n][1] != NULL) ? TRUE : FALSE; + return (ppq->shaders[n][1] != NULL) ? true : false; } @@ -85,7 +85,7 @@ pp_noblue_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val) ppq->shaders[n][1] = pp_tgsi_to_state(ppq->p->pipe, noblue, false, "noblue"); - return (ppq->shaders[n][1] != NULL) ? TRUE : FALSE; + return (ppq->shaders[n][1] != NULL) ? true : false; } /* Free functions */ diff --git a/src/gallium/auxiliary/postprocess/pp_init.c b/src/gallium/auxiliary/postprocess/pp_init.c index cdaa464cae9..aecc58c5399 100644 --- a/src/gallium/auxiliary/postprocess/pp_init.c +++ b/src/gallium/auxiliary/postprocess/pp_init.c @@ -253,7 +253,7 @@ pp_debug(const char *fmt, ...) { va_list ap; - if (!debug_get_bool_option("PP_DEBUG", FALSE)) + if (!debug_get_bool_option("PP_DEBUG", false)) return; va_start(ap, fmt); diff --git a/src/gallium/auxiliary/postprocess/pp_mlaa.c b/src/gallium/auxiliary/postprocess/pp_mlaa.c index 102e71f48b9..4650e6ec0f5 100644 --- a/src/gallium/auxiliary/postprocess/pp_mlaa.c +++ b/src/gallium/auxiliary/postprocess/pp_mlaa.c @@ -229,7 +229,7 @@ pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n, if (!tmp_text) { pp_debug("Failed to allocate shader space\n"); - return FALSE; + return false; } pp_debug("mlaa: using %u max search steps\n", val); @@ -279,7 +279,7 @@ pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n, FREE(tmp_text); - return TRUE; + return true; fail: @@ -291,7 +291,7 @@ pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n, */ pp_jimenezmlaa_free(ppq, n); - return FALSE; + return false; } /** Short wrapper to init the depth version. */ diff --git a/src/gallium/auxiliary/postprocess/pp_program.c b/src/gallium/auxiliary/postprocess/pp_program.c index 3f36434e4e9..2b829075d43 100644 --- a/src/gallium/auxiliary/postprocess/pp_program.c +++ b/src/gallium/auxiliary/postprocess/pp_program.c @@ -134,7 +134,7 @@ pp_init_prog(struct pp_queue_t *ppq, struct pipe_context *pipe, const uint semantic_indexes[] = { 0, 0 }; p->passvs = util_make_vertex_passthrough_shader(p->pipe, 2, semantic_names, - semantic_indexes, FALSE); + semantic_indexes, false); } p->framebuffer.nr_cbufs = 1; diff --git a/src/gallium/auxiliary/postprocess/pp_run.c b/src/gallium/auxiliary/postprocess/pp_run.c index 31e069da2ca..0d1a801ba93 100644 --- a/src/gallium/auxiliary/postprocess/pp_run.c +++ b/src/gallium/auxiliary/postprocess/pp_run.c @@ -143,7 +143,7 @@ pp_run(struct pp_queue_t *ppq, struct pipe_resource *in, cso_set_tessctrl_shader_handle(cso, NULL); cso_set_tesseval_shader_handle(cso, NULL); cso_set_geometry_shader_handle(cso, NULL); - cso_set_render_condition(cso, NULL, FALSE, 0); + cso_set_render_condition(cso, NULL, false, 0); // Kept only for this frame. pipe_resource_reference(&ppq->depth, indepth); @@ -259,7 +259,7 @@ pp_tgsi_to_state(struct pipe_context *pipe, const char *text, bool isvs, return NULL; } - if (tgsi_text_translate(text, tokens, PP_MAX_TOKENS) == FALSE) { + if (tgsi_text_translate(text, tokens, PP_MAX_TOKENS) == false) { _debug_printf("pp: Failed to translate a shader for %s\n", name); return NULL; } diff --git a/src/gallium/auxiliary/renderonly/renderonly.h b/src/gallium/auxiliary/renderonly/renderonly.h index 5c47db55abd..de22b37c0d6 100644 --- a/src/gallium/auxiliary/renderonly/renderonly.h +++ b/src/gallium/auxiliary/renderonly/renderonly.h @@ -102,13 +102,13 @@ renderonly_get_handle(struct renderonly_scanout *scanout, struct winsys_handle *handle) { if (!scanout) - return FALSE; + return false; assert(handle->type == WINSYS_HANDLE_TYPE_KMS); handle->handle = scanout->handle; handle->stride = scanout->stride; - return TRUE; + return true; } /** diff --git a/src/gallium/auxiliary/target-helpers/inline_debug_helper.h b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h index 0f999bf71ef..cce7faa341d 100644 --- a/src/gallium/auxiliary/target-helpers/inline_debug_helper.h +++ b/src/gallium/auxiliary/target-helpers/inline_debug_helper.h @@ -30,7 +30,7 @@ debug_screen_wrap(struct pipe_screen *screen) screen = trace_screen_create(screen); screen = noop_screen_create(screen); - if (debug_get_bool_option("GALLIUM_TESTS", FALSE)) + if (debug_get_bool_option("GALLIUM_TESTS", false)) util_run_tests(screen); return screen; diff --git a/src/gallium/auxiliary/tgsi/tgsi_aa_point.c b/src/gallium/auxiliary/tgsi/tgsi_aa_point.c index ace4d9a104b..9391e332655 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_aa_point.c +++ b/src/gallium/auxiliary/tgsi/tgsi_aa_point.c @@ -197,7 +197,7 @@ aa_prolog(struct tgsi_transform_context *ctx) */ /* KILL_IF tmp0.w; # if tmp0.w < 0 KILL */ tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, tmp0, - TGSI_SWIZZLE_W, FALSE); + TGSI_SWIZZLE_W, false); /* If the distance is less than the threshold, the coverage/alpha value * will be greater than one. Clamp to one here. diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index 662edcf4725..586d23139f4 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c @@ -444,7 +444,7 @@ iter_declaration( EOL(); - return TRUE; + return true; } static bool @@ -485,7 +485,7 @@ iter_property( } EOL(); - return TRUE; + return true; } static bool @@ -505,7 +505,7 @@ iter_immediate( EOL(); - return TRUE; + return true; } static bool @@ -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; - bool first_reg = TRUE; + bool first_reg = true; INSTID( instno ); TXT( ": " ); @@ -547,7 +547,7 @@ iter_instruction( _dump_register_dst( ctx, dst ); _dump_writemask( ctx, dst->Register.WriteMask ); - first_reg = FALSE; + first_reg = false; } for (i = 0; i < inst->Instruction.NumSrcRegs; i++) { @@ -578,7 +578,7 @@ iter_instruction( if (src->Register.Absolute) CHR( '|' ); - first_reg = FALSE; + first_reg = false; } if (inst->Instruction.Texture) { @@ -643,7 +643,7 @@ iter_instruction( EOL(); - return TRUE; + return true; } void @@ -671,7 +671,7 @@ prolog( struct dump_ctx *ctx = (struct dump_ctx *) iter; ENM( iter->processor.Processor, tgsi_processor_type_names ); EOL(); - return TRUE; + return true; } static void @@ -686,7 +686,7 @@ init_dump_ctx(struct dump_ctx *ctx, uint flags) ctx->iter.iterate_property = iter_property; if (flags & TGSI_DUMP_FLOAT_AS_HEX) - ctx->dump_float_as_hex = TRUE; + ctx->dump_float_as_hex = true; } void diff --git a/src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c b/src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c index 51279ad9da6..9b192776a7c 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++) { - bool out_of_bound_index = FALSE; + bool out_of_bound_index = false; /** * Make sure we are not exceeding index limit of constant buffer * @@ -178,7 +178,7 @@ remove_dynamic_indexes(struct tgsi_transform_context *ctx, if ((reg->Register.File == TGSI_FILE_CONSTANT) && (!reg->Register.Indirect && (reg->Register.Index > dc->const_buf_range[i]))) { - out_of_bound_index = TRUE; + out_of_bound_index = true; } if (!out_of_bound_index) { @@ -279,7 +279,7 @@ dIndexing_inst(struct tgsi_transform_context *ctx, struct tgsi_full_instruction *inst) { int i; - bool indexing = FALSE; + bool indexing = false; struct dIndexing_transform_context *dc = dIndexing_transform_context(ctx); for (i = 0; i < inst->Instruction.NumSrcRegs; i++) { @@ -300,7 +300,7 @@ dIndexing_inst(struct tgsi_transform_context *ctx, dc->num_iterations = dc->num_samplers; remove_dynamic_indexes(ctx, inst, src); - indexing = TRUE; + indexing = true; } } diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index c51ef27ec9c..dfdcfd35af2 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -1094,7 +1094,7 @@ tgsi_exec_machine_bind_shader( mach->Inputs = inputs; mach->Outputs = outputs; - mach->UsedGeometryShader = TRUE; + mach->UsedGeometryShader = true; } declarations = (struct tgsi_full_declaration *) @@ -5203,7 +5203,7 @@ exec_instruction( mach->SwitchStackTop = 0; mach->BreakStackTop = 0; *pc = -1; - return FALSE; + return false; } assert(mach->CallStackTop > 0); @@ -5586,19 +5586,19 @@ exec_instruction( break; case TGSI_OPCODE_SAMPLE: - exec_sample(mach, inst, TEX_MODIFIER_NONE, FALSE); + exec_sample(mach, inst, TEX_MODIFIER_NONE, false); break; case TGSI_OPCODE_SAMPLE_B: - exec_sample(mach, inst, TEX_MODIFIER_LOD_BIAS, FALSE); + exec_sample(mach, inst, TEX_MODIFIER_LOD_BIAS, false); break; case TGSI_OPCODE_SAMPLE_C: - exec_sample(mach, inst, TEX_MODIFIER_NONE, TRUE); + exec_sample(mach, inst, TEX_MODIFIER_NONE, true); break; case TGSI_OPCODE_SAMPLE_C_LZ: - exec_sample(mach, inst, TEX_MODIFIER_LEVEL_ZERO, TRUE); + exec_sample(mach, inst, TEX_MODIFIER_LEVEL_ZERO, true); break; case TGSI_OPCODE_SAMPLE_D: @@ -5606,11 +5606,11 @@ exec_instruction( break; case TGSI_OPCODE_SAMPLE_L: - exec_sample(mach, inst, TEX_MODIFIER_EXPLICIT_LOD, FALSE); + exec_sample(mach, inst, TEX_MODIFIER_EXPLICIT_LOD, false); break; case TGSI_OPCODE_GATHER4: - exec_sample(mach, inst, TEX_MODIFIER_GATHER, FALSE); + exec_sample(mach, inst, TEX_MODIFIER_GATHER, false); break; case TGSI_OPCODE_SVIEWINFO: @@ -5815,7 +5815,7 @@ exec_instruction( break; case TGSI_OPCODE_BARRIER: case TGSI_OPCODE_MEMBAR: - return TRUE; + return true; break; case TGSI_OPCODE_I64ABS: @@ -5940,7 +5940,7 @@ exec_instruction( default: assert( 0 ); } - return FALSE; + return false; } static void diff --git a/src/gallium/auxiliary/tgsi/tgsi_iterate.c b/src/gallium/auxiliary/tgsi/tgsi_iterate.c index 40415b961df..748fb561a0f 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_iterate.c +++ b/src/gallium/auxiliary/tgsi/tgsi_iterate.c @@ -36,7 +36,7 @@ tgsi_iterate_shader( struct tgsi_parse_context parse; if (tgsi_parse_init( &parse, tokens ) != TGSI_PARSE_OK) - return FALSE; + return false; ctx->processor = parse.FullHeader.Processor; @@ -82,9 +82,9 @@ tgsi_iterate_shader( goto fail; tgsi_parse_free( &parse ); - return TRUE; + return true; fail: tgsi_parse_free( &parse ); - return FALSE; + return false; } diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c index 00cff7b009f..9b372120cc0 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c +++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c @@ -34,7 +34,7 @@ #include "tgsi_iterate.h" -DEBUG_GET_ONCE_BOOL_OPTION(print_sanity, "TGSI_PRINT_SANITY", FALSE) +DEBUG_GET_ONCE_BOOL_OPTION(print_sanity, "TGSI_PRINT_SANITY", false) typedef struct { @@ -192,9 +192,9 @@ check_file_name( { if (file <= TGSI_FILE_NULL || file >= TGSI_FILE_COUNT) { report_error( ctx, "(%u): Invalid register file name", file ); - return FALSE; + return false; } - return TRUE; + return true; } static bool @@ -205,7 +205,7 @@ is_register_declared( void *data = cso_hash_find_data_from_template( &ctx->regs_decl, scan_register_key(reg), (void*)reg, sizeof(scan_register)); - return data ? TRUE : FALSE; + return data ? true : false; } static bool @@ -219,11 +219,11 @@ is_any_register_declared( while (!cso_hash_iter_is_null(iter)) { scan_register *reg = (scan_register *)cso_hash_iter_data(iter); if (reg->file == file) - return TRUE; + return true; iter = cso_hash_iter_next(iter); } - return FALSE; + return false; } static bool @@ -234,7 +234,7 @@ is_register_used( void *data = cso_hash_find_data_from_template( &ctx->regs_used, scan_register_key(reg), reg, sizeof(scan_register)); - return data ? TRUE : FALSE; + return data ? true : false; } @@ -269,7 +269,7 @@ check_register_usage( { if (!check_file_name( ctx, reg->file )) { FREE(reg); - return FALSE; + return false; } if (indirect_access) { @@ -300,7 +300,7 @@ check_register_usage( else FREE(reg); } - return TRUE; + return true; } static bool @@ -322,7 +322,7 @@ iter_instruction( info = tgsi_get_opcode_info( inst->Instruction.Opcode ); if (!info) { report_error( ctx, "(%u): Invalid instruction opcode", inst->Instruction.Opcode ); - return TRUE; + return true; } if (info->num_dst != inst->Instruction.NumDstRegs) { @@ -343,7 +343,7 @@ iter_instruction( ctx, reg, "destination", - FALSE ); + false ); if (!inst->Dst[i].Register.WriteMask) { report_error(ctx, "Destination register has empty writemask"); } @@ -365,13 +365,13 @@ iter_instruction( ctx, ind_reg, "indirect", - FALSE ); + false ); } } ctx->num_instructions++; - return TRUE; + return true; } static void @@ -406,7 +406,7 @@ iter_declaration( */ file = decl->Declaration.File; if (!check_file_name( ctx, file )) - return TRUE; + return true; for (i = decl->Range.First; i <= decl->Range.Last; i++) { /* declared TGSI_FILE_INPUT's for geometry and tessellation * have an implied second dimension */ @@ -443,7 +443,7 @@ iter_declaration( } } - return TRUE; + return true; } static bool @@ -472,10 +472,10 @@ iter_immediate( imm->Immediate.DataType != TGSI_IMM_UINT32 && imm->Immediate.DataType != TGSI_IMM_INT32) { report_error( ctx, "(%u): Invalid immediate data type", imm->Immediate.DataType ); - return TRUE; + return true; } - return TRUE; + return true; } @@ -493,7 +493,7 @@ iter_property( if (iter->processor.Processor == PIPE_SHADER_TESS_CTRL && prop->Property.PropertyName == TGSI_PROPERTY_TCS_VERTICES_OUT) ctx->implied_out_array_size = prop->u[0].Data; - return TRUE; + return true; } static bool @@ -503,7 +503,7 @@ prolog(struct tgsi_iterate_context *iter) if (iter->processor.Processor == PIPE_SHADER_TESS_CTRL || iter->processor.Processor == PIPE_SHADER_TESS_EVAL) ctx->implied_array_size = 32; - return TRUE; + return true; } static bool @@ -539,7 +539,7 @@ epilog( if (ctx->errors || ctx->warnings) debug_printf( "%u errors, %u warnings\n", ctx->errors, ctx->warnings ); - return TRUE; + return true; } static void @@ -586,8 +586,8 @@ tgsi_sanity_check( regs_hash_destroy(&ctx.regs_decl); regs_hash_destroy(&ctx.regs_used); regs_hash_destroy(&ctx.regs_ind_used); - if (retval == FALSE) - return FALSE; + if (retval == false) + return false; return ctx.errors == 0; } diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index bc97a66bbae..3c55e389cff 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -191,26 +191,26 @@ scan_src_operand(struct tgsi_shader_info *info, case TGSI_INTERPOLATE_PERSPECTIVE: switch (info->input_interpolate_loc[input]) { case TGSI_INTERPOLATE_LOC_CENTER: - info->uses_persp_center = TRUE; + info->uses_persp_center = true; break; case TGSI_INTERPOLATE_LOC_CENTROID: - info->uses_persp_centroid = TRUE; + info->uses_persp_centroid = true; break; case TGSI_INTERPOLATE_LOC_SAMPLE: - info->uses_persp_sample = TRUE; + info->uses_persp_sample = true; break; } break; case TGSI_INTERPOLATE_LINEAR: switch (info->input_interpolate_loc[input]) { case TGSI_INTERPOLATE_LOC_CENTER: - info->uses_linear_center = TRUE; + info->uses_linear_center = true; break; case TGSI_INTERPOLATE_LOC_CENTROID: - info->uses_linear_centroid = TRUE; + info->uses_linear_centroid = true; break; case TGSI_INTERPOLATE_LOC_SAMPLE: - info->uses_linear_sample = TRUE; + info->uses_linear_sample = true; break; } break; @@ -303,7 +303,7 @@ scan_src_operand(struct tgsi_shader_info *info, } if (tgsi_get_opcode_info(fullinst->Instruction.Opcode)->is_store) { - info->writes_memory = TRUE; + info->writes_memory = true; if (src->Register.File == TGSI_FILE_IMAGE) { if (src->Register.Indirect) @@ -451,13 +451,13 @@ scan_instruction(struct tgsi_shader_info *info, case TGSI_INTERPOLATE_PERSPECTIVE: switch (fullinst->Instruction.Opcode) { case TGSI_OPCODE_INTERP_CENTROID: - info->uses_persp_opcode_interp_centroid = TRUE; + info->uses_persp_opcode_interp_centroid = true; break; case TGSI_OPCODE_INTERP_OFFSET: - info->uses_persp_opcode_interp_offset = TRUE; + info->uses_persp_opcode_interp_offset = true; break; case TGSI_OPCODE_INTERP_SAMPLE: - info->uses_persp_opcode_interp_sample = TRUE; + info->uses_persp_opcode_interp_sample = true; break; } break; @@ -465,13 +465,13 @@ scan_instruction(struct tgsi_shader_info *info, case TGSI_INTERPOLATE_LINEAR: switch (fullinst->Instruction.Opcode) { case TGSI_OPCODE_INTERP_CENTROID: - info->uses_linear_opcode_interp_centroid = TRUE; + info->uses_linear_opcode_interp_centroid = true; break; case TGSI_OPCODE_INTERP_OFFSET: - info->uses_linear_opcode_interp_offset = TRUE; + info->uses_linear_opcode_interp_offset = true; break; case TGSI_OPCODE_INTERP_SAMPLE: - info->uses_linear_opcode_interp_sample = TRUE; + info->uses_linear_opcode_interp_sample = true; break; } break; @@ -486,7 +486,7 @@ scan_instruction(struct tgsi_shader_info *info, fullinst->Instruction.Opcode == TGSI_OPCODE_D2I64 || fullinst->Instruction.Opcode == TGSI_OPCODE_U642D || fullinst->Instruction.Opcode == TGSI_OPCODE_I642D) - info->uses_doubles = TRUE; + info->uses_doubles = true; for (i = 0; i < fullinst->Instruction.NumSrcRegs; i++) { scan_src_operand(info, fullinst, &fullinst->Src[i], i, @@ -566,7 +566,7 @@ scan_instruction(struct tgsi_shader_info *info, assert(fullinst->Instruction.Opcode == TGSI_OPCODE_STORE); is_mem_inst = true; - info->writes_memory = TRUE; + info->writes_memory = true; if (dst->Register.File == TGSI_FILE_IMAGE) { if (fullinst->Memory.Texture == TGSI_TEXTURE_2D_MSAA || @@ -695,34 +695,34 @@ scan_declaration(struct tgsi_shader_info *info, switch (semName) { case TGSI_SEMANTIC_INSTANCEID: - info->uses_instanceid = TRUE; + info->uses_instanceid = true; break; case TGSI_SEMANTIC_VERTEXID: - info->uses_vertexid = TRUE; + info->uses_vertexid = true; break; case TGSI_SEMANTIC_VERTEXID_NOBASE: - info->uses_vertexid_nobase = TRUE; + info->uses_vertexid_nobase = true; break; case TGSI_SEMANTIC_BASEVERTEX: - info->uses_basevertex = TRUE; + info->uses_basevertex = true; break; case TGSI_SEMANTIC_DRAWID: - info->uses_drawid = TRUE; + info->uses_drawid = true; break; case TGSI_SEMANTIC_PRIMID: - info->uses_primid = TRUE; + info->uses_primid = true; break; case TGSI_SEMANTIC_INVOCATIONID: - info->uses_invocationid = TRUE; + info->uses_invocationid = true; break; case TGSI_SEMANTIC_POSITION: - info->reads_position = TRUE; + info->reads_position = true; break; case TGSI_SEMANTIC_FACE: - info->uses_frontface = TRUE; + info->uses_frontface = true; break; case TGSI_SEMANTIC_SAMPLEMASK: - info->reads_samplemask = TRUE; + info->reads_samplemask = true; break; case TGSI_SEMANTIC_TESSINNER: case TGSI_SEMANTIC_TESSOUTER: diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c index 3f95186f06f..e019929f306 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_text.c +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c @@ -75,7 +75,7 @@ streq_nocase_uprcase(const char *str1, { while (*str1 && *str2) { if (*str1 != uprcase(*str2)) - return FALSE; + return false; str1++; str2++; } @@ -97,9 +97,9 @@ static bool str_match_no_case( const char **pcur, const char *str ) } if (*str == '\0') { *pcur = cur; - return TRUE; + return true; } - return FALSE; + return false; } /* Return TRUE if both strings match. @@ -115,9 +115,9 @@ static bool str_match_nocase_whole( const char **pcur, const char *str ) if (str_match_no_case(&cur, str) && !is_digit_alpha_underscore(cur)) { *pcur = cur; - return TRUE; + return true; } - return FALSE; + return false; } /* Return the array index that matches starting at *pcur, where the string at @@ -187,9 +187,9 @@ static bool parse_uint( const char **pcur, uint *val ) while (is_digit( cur )) *val = *val * 10 + *cur++ - '0'; *pcur = cur; - return TRUE; + return true; } - return FALSE; + return false; } static bool parse_int( const char **pcur, int *val ) @@ -203,10 +203,10 @@ static bool parse_int( const char **pcur, int *val ) if (parse_uint(&cur, (uint *)val)) { *val *= sign; *pcur = cur; - return TRUE; + return true; } - return FALSE; + return false; } static bool parse_identifier( const char **pcur, char *ret, size_t len ) @@ -217,14 +217,14 @@ static bool parse_identifier( const char **pcur, char *ret, size_t len ) ret[i++] = *cur++; while (is_alpha_underscore( cur ) || is_digit( cur )) { if (i == len - 1) - return FALSE; + return false; ret[i++] = *cur++; } ret[i++] = '\0'; *pcur = cur; - return TRUE; + return true; } - return FALSE; + return false; } /* Parse floating point. @@ -234,8 +234,8 @@ static bool parse_float( const char **pcur, float *val ) const char *cur = *pcur; *val = _mesa_strtof(cur, (char**)pcur); if (*pcur == cur) - return FALSE; - return TRUE; + return false; + return true; } static bool parse_double( const char **pcur, uint32_t *val0, uint32_t *val1) @@ -248,12 +248,12 @@ static bool parse_double( const char **pcur, uint32_t *val0, uint32_t *val1) v.dval = _mesa_strtod(cur, (char**)pcur); if (*pcur == cur) - return FALSE; + return false; *val0 = v.uval[0]; *val1 = v.uval[1]; - return TRUE; + return true; } static bool parse_int64( const char **pcur, uint32_t *val0, uint32_t *val1) @@ -266,12 +266,12 @@ static bool parse_int64( const char **pcur, uint32_t *val0, uint32_t *val1) v.i64val = strtoll(cur, (char**)pcur, 0); if (*pcur == cur) - return FALSE; + return false; *val0 = v.uval[0]; *val1 = v.uval[1]; - return TRUE; + return true; } static bool parse_uint64( const char **pcur, uint32_t *val0, uint32_t *val1) @@ -284,12 +284,12 @@ static bool parse_uint64( const char **pcur, uint32_t *val0, uint32_t *val1) v.u64val = strtoull(cur, (char**)pcur, 0); if (*pcur == cur) - return FALSE; + return false; *val0 = v.uval[0]; *val1 = v.uval[1]; - return TRUE; + return true; } struct translate_ctx @@ -347,20 +347,20 @@ static bool parse_header( struct translate_ctx *ctx ) processor = PIPE_SHADER_COMPUTE; else { report_error( ctx, "Unknown header" ); - return FALSE; + return false; } if (ctx->tokens_cur >= ctx->tokens_end) - return FALSE; + return false; ctx->header = (struct tgsi_header *) ctx->tokens_cur++; *ctx->header = tgsi_build_header(); if (ctx->tokens_cur >= ctx->tokens_end) - return FALSE; + return false; *(struct tgsi_processor *) ctx->tokens_cur++ = tgsi_build_processor( processor, ctx->header ); ctx->processor = processor; - return TRUE; + return true; } static bool parse_label( struct translate_ctx *ctx, uint *val ) @@ -372,10 +372,10 @@ static bool parse_label( struct translate_ctx *ctx, uint *val ) if (*cur == ':') { cur++; ctx->cur = cur; - return TRUE; + return true; } } - return FALSE; + return false; } static bool @@ -389,10 +389,10 @@ parse_file( const char **pcur, uint *file ) if (str_match_nocase_whole( &cur, tgsi_file_name(i) )) { *pcur = cur; *file = i; - return TRUE; + return true; } } - return FALSE; + return false; } static bool @@ -427,7 +427,7 @@ parse_opt_writemask( if (*writemask == TGSI_WRITEMASK_NONE) { report_error( ctx, "Writemask expected" ); - return FALSE; + return false; } ctx->cur = cur; @@ -435,7 +435,7 @@ parse_opt_writemask( else { *writemask = TGSI_WRITEMASK_XYZW; } - return TRUE; + return true; } @@ -448,15 +448,15 @@ parse_register_file_bracket( { if (!parse_file( &ctx->cur, file )) { report_error( ctx, "Unknown register file" ); - return FALSE; + return false; } eat_opt_white( &ctx->cur ); if (*ctx->cur != '[') { report_error( ctx, "Expected `['" ); - return FALSE; + return false; } ctx->cur++; - return TRUE; + return true; } /* ::= @@ -470,14 +470,14 @@ parse_register_file_bracket_index( uint uindex; if (!parse_register_file_bracket( ctx, file )) - return FALSE; + return false; eat_opt_white( &ctx->cur ); if (!parse_uint( &ctx->cur, &uindex )) { report_error( ctx, "Expected literal unsigned integer" ); - return FALSE; + return false; } *index = (int) uindex; - return TRUE; + return true; } /* Parse simple 1d register operand. @@ -489,14 +489,14 @@ parse_register_1d(struct translate_ctx *ctx, int *index ) { if (!parse_register_file_bracket_index( ctx, file, index )) - return FALSE; + return false; eat_opt_white( &ctx->cur ); if (*ctx->cur != ']') { report_error( ctx, "Expected `]'" ); - return FALSE; + return false; } ctx->cur++; - return TRUE; + return true; } struct parsed_bracket { @@ -525,7 +525,7 @@ parse_register_bracket( if (parse_file( &cur, &brackets->ind_file )) { if (!parse_register_1d( ctx, &brackets->ind_file, &brackets->ind_index )) - return FALSE; + return false; eat_opt_white( &ctx->cur ); if (*ctx->cur == '.') { @@ -547,7 +547,7 @@ parse_register_bracket( break; default: report_error(ctx, "Expected indirect register swizzle component `x', `y', `z' or `w'"); - return FALSE; + return false; } ctx->cur++; eat_opt_white(&ctx->cur); @@ -561,7 +561,7 @@ parse_register_bracket( else { if (!parse_uint( &ctx->cur, &uindex )) { report_error( ctx, "Expected literal unsigned integer" ); - return FALSE; + return false; } brackets->index = (int) uindex; brackets->ind_file = TGSI_FILE_NULL; @@ -570,7 +570,7 @@ parse_register_bracket( eat_opt_white( &ctx->cur ); if (*ctx->cur != ']') { report_error( ctx, "Expected `]'" ); - return FALSE; + return false; } ctx->cur++; if (*ctx->cur == '(') { @@ -578,16 +578,16 @@ parse_register_bracket( eat_opt_white( &ctx->cur ); if (!parse_uint( &ctx->cur, &brackets->ind_array )) { report_error( ctx, "Expected literal unsigned integer" ); - return FALSE; + return false; } eat_opt_white( &ctx->cur ); if (*ctx->cur != ')') { report_error( ctx, "Expected `)'" ); - return FALSE; + return false; } ctx->cur++; } - return TRUE; + return true; } static bool @@ -606,12 +606,12 @@ parse_opt_register_src_bracket( ctx->cur = cur; if (!parse_register_bracket(ctx, brackets)) - return FALSE; + return false; *parsed_brackets = 1; } - return TRUE; + return true; } @@ -629,11 +629,11 @@ parse_register_src( { brackets->ind_comp = TGSI_SWIZZLE_X; if (!parse_register_file_bracket( ctx, file )) - return FALSE; + return false; if (!parse_register_bracket( ctx, brackets )) - return FALSE; + return false; - return TRUE; + return true; } struct parsed_dcl_bracket { @@ -660,7 +660,7 @@ parse_register_dcl_bracket( goto cleanup; } report_error( ctx, "Expected literal unsigned integer" ); - return FALSE; + return false; } bracket->first = uindex; @@ -673,7 +673,7 @@ parse_register_dcl_bracket( eat_opt_white( &ctx->cur ); if (!parse_uint( &ctx->cur, &uindex )) { report_error( ctx, "Expected literal integer" ); - return FALSE; + return false; } bracket->last = (int) uindex; eat_opt_white( &ctx->cur ); @@ -685,10 +685,10 @@ parse_register_dcl_bracket( cleanup: if (*ctx->cur != ']') { report_error( ctx, "Expected `]' or `..'" ); - return FALSE; + return false; } ctx->cur++; - return TRUE; + return true; } /* Parse register declaration. @@ -707,9 +707,9 @@ parse_register_dcl( *num_brackets = 0; if (!parse_register_file_bracket( ctx, file )) - return FALSE; + return false; if (!parse_register_dcl_bracket( ctx, &brackets[0] )) - return FALSE; + return false; *num_brackets = 1; @@ -723,7 +723,7 @@ parse_register_dcl( ++cur; ctx->cur = cur; if (!parse_register_dcl_bracket( ctx, &brackets[1] )) - return FALSE; + return false; /* for geometry shader we don't really care about * the first brackets it's always the size of the * input primitive. so we want to declare just @@ -741,7 +741,7 @@ parse_register_dcl( } } - return TRUE; + return true; } @@ -754,11 +754,11 @@ parse_register_dst( { brackets->ind_comp = TGSI_SWIZZLE_X; if (!parse_register_file_bracket( ctx, file )) - return FALSE; + return false; if (!parse_register_bracket( ctx, brackets )) - return FALSE; + return false; - return TRUE; + return true; } static bool @@ -773,15 +773,15 @@ parse_dst_operand( int parsed_opt_brackets; if (!parse_register_dst( ctx, &file, &bracket[0] )) - return FALSE; + return false; if (!parse_opt_register_src_bracket(ctx, &bracket[1], &parsed_opt_brackets)) - return FALSE; + return false; cur = ctx->cur; eat_opt_white( &cur ); if (!parse_opt_writemask( ctx, &writemask )) - return FALSE; + return false; dst->Register.File = file; if (parsed_opt_brackets) { @@ -808,7 +808,7 @@ parse_dst_operand( dst->Indirect.Swizzle = bracket[0].ind_comp; dst->Indirect.ArrayID = bracket[0].ind_array; } - return TRUE; + return true; } static bool @@ -820,7 +820,7 @@ parse_optional_swizzle( { const char *cur = ctx->cur; - *parsed_swizzle = FALSE; + *parsed_swizzle = false; eat_opt_white( &cur ); if (*cur == '.') { @@ -839,14 +839,14 @@ parse_optional_swizzle( swizzle[i] = TGSI_SWIZZLE_W; else { report_error( ctx, "Expected register swizzle component `x', `y', `z' or `w'" ); - return FALSE; + return false; } cur++; } - *parsed_swizzle = TRUE; + *parsed_swizzle = true; ctx->cur = cur; } - return TRUE; + return true; } static bool @@ -873,9 +873,9 @@ parse_src_operand( } if (!parse_register_src(ctx, &file, &bracket[0])) - return FALSE; + return false; if (!parse_opt_register_src_bracket(ctx, &bracket[1], &parsed_opt_brackets)) - return FALSE; + return false; src->Register.File = file; if (parsed_opt_brackets) { @@ -916,13 +916,13 @@ parse_src_operand( eat_opt_white( &ctx->cur ); if (*ctx->cur != '|') { report_error( ctx, "Expected `|'" ); - return FALSE; + return false; } ctx->cur++; } - return TRUE; + return true; } static bool @@ -936,7 +936,7 @@ parse_texoffset_operand( struct parsed_bracket bracket; if (!parse_register_src(ctx, &file, &bracket)) - return FALSE; + return false; src->File = file; src->Index = bracket.index; @@ -951,7 +951,7 @@ parse_texoffset_operand( } } - return TRUE; + return true; } static bool @@ -968,7 +968,7 @@ match_inst(const char **pcur, *pcur = cur; *saturate = 0; *precise = 0; - return TRUE; + return true; } if (str_match_no_case(&cur, mnemonic)) { @@ -984,10 +984,10 @@ match_inst(const char **pcur, } if (!is_digit_alpha_underscore(cur)) - return TRUE; + return true; } - return FALSE; + return false; } static bool @@ -1028,7 +1028,7 @@ parse_instruction( report_error( ctx, "Unknown opcode" ); else report_error( ctx, "Expected `DCL', `IMM' or a label" ); - return FALSE; + return false; } inst.Instruction.Opcode = i; @@ -1063,7 +1063,7 @@ parse_instruction( eat_opt_white( &ctx->cur ); if (*ctx->cur != ',') { report_error( ctx, "Expected `,'" ); - return FALSE; + return false; } ctx->cur++; eat_opt_white( &ctx->cur ); @@ -1071,11 +1071,11 @@ parse_instruction( if (i < info->num_dst) { if (!parse_dst_operand( ctx, &inst.Dst[i] )) - return FALSE; + return false; } else if (i < info->num_dst + info->num_src) { if (!parse_src_operand( ctx, &inst.Src[i - info->num_dst] )) - return FALSE; + return false; } else { uint j; @@ -1089,7 +1089,7 @@ parse_instruction( } if (j == TGSI_TEXTURE_COUNT) { report_error( ctx, "Expected texture target" ); - return FALSE; + return false; } } } @@ -1101,7 +1101,7 @@ parse_instruction( eat_opt_white( &cur ); ctx->cur = cur; if (!parse_texoffset_operand( ctx, &inst.TexOffsets[i] )) - return FALSE; + return false; cur = ctx->cur; eat_opt_white( &cur ); } @@ -1139,7 +1139,7 @@ parse_instruction( ctx->cur = cur; report_error(ctx, "Expected memory qualifier, texture target, or format\n"); - return FALSE; + return false; } cur = ctx->cur; @@ -1151,7 +1151,7 @@ parse_instruction( eat_opt_white( &cur ); if (!parse_uint( &cur, &target )) { report_error( ctx, "Expected a label" ); - return FALSE; + return false; } inst.Instruction.Label = 1; inst.Label.Label = target; @@ -1164,10 +1164,10 @@ parse_instruction( ctx->header, (uint) (ctx->tokens_end - ctx->tokens_cur) ); if (advance == 0) - return FALSE; + return false; ctx->tokens_cur += advance; - return TRUE; + return true; } /* parses a 4-touple of the form {x, y, z, w} @@ -1181,7 +1181,7 @@ static bool parse_immediate_data(struct translate_ctx *ctx, unsigned type, eat_opt_white( &ctx->cur ); if (*ctx->cur != '{') { report_error( ctx, "Expected `{'" ); - return FALSE; + return false; } ctx->cur++; for (i = 0; i < 4; i++) { @@ -1189,7 +1189,7 @@ static bool parse_immediate_data(struct translate_ctx *ctx, unsigned type, if (i > 0) { if (*ctx->cur != ',') { report_error( ctx, "Expected `,'" ); - return FALSE; + return false; } ctx->cur++; eat_opt_white( &ctx->cur ); @@ -1219,23 +1219,23 @@ static bool parse_immediate_data(struct translate_ctx *ctx, unsigned type, break; default: assert(0); - ret = FALSE; + ret = false; break; } if (!ret) { report_error( ctx, "Expected immediate constant" ); - return FALSE; + return false; } } eat_opt_white( &ctx->cur ); if (*ctx->cur != '}') { report_error( ctx, "Expected `}'" ); - return FALSE; + return false; } ctx->cur++; - return TRUE; + return true; } static bool parse_declaration( struct translate_ctx *ctx ) @@ -1251,12 +1251,12 @@ static bool parse_declaration( struct translate_ctx *ctx ) if (!eat_white( &ctx->cur )) { report_error( ctx, "Syntax error" ); - return FALSE; + return false; } if (!parse_register_dcl( ctx, &file, brackets, &num_brackets)) - return FALSE; + return false; if (!parse_opt_writemask( ctx, &writemask )) - return FALSE; + return false; decl = tgsi_default_full_declaration(); decl.Declaration.File = file; @@ -1286,18 +1286,18 @@ static bool parse_declaration( struct translate_ctx *ctx ) int arrayid; if (*cur2 != '(') { report_error( ctx, "Expected `('" ); - return FALSE; + return false; } cur2++; eat_opt_white( &cur2 ); if (!parse_int( &cur2, &arrayid )) { report_error( ctx, "Expected `,'" ); - return FALSE; + return false; } eat_opt_white( &cur2 ); if (*cur2 != ')') { report_error( ctx, "Expected `)'" ); - return FALSE; + return false; } cur2++; decl.Declaration.Array = 1; @@ -1320,7 +1320,7 @@ static bool parse_declaration( struct translate_ctx *ctx ) } if (i == TGSI_TEXTURE_COUNT) { report_error(ctx, "Expected texture target"); - return FALSE; + return false; } cur2 = cur; @@ -1356,12 +1356,12 @@ static bool parse_declaration( struct translate_ctx *ctx ) } if (i == TGSI_TEXTURE_COUNT) { report_error(ctx, "Expected texture target"); - return FALSE; + return false; } eat_opt_white( &cur ); if (*cur != ',') { report_error( ctx, "Expected `,'" ); - return FALSE; + return false; } ++cur; eat_opt_white( &cur ); @@ -1390,7 +1390,7 @@ static bool parse_declaration( struct translate_ctx *ctx ) if (i == TGSI_RETURN_TYPE_COUNT) { if (j == 0 || j > 2) { report_error(ctx, "Expected type name"); - return FALSE; + return false; } break; } else { @@ -1455,12 +1455,12 @@ static bool parse_declaration( struct translate_ctx *ctx ) eat_opt_white( &cur2 ); if (!parse_uint( &cur2, &index )) { report_error( ctx, "Expected literal integer" ); - return FALSE; + return false; } eat_opt_white( &cur2 ); if (*cur2 != ']') { report_error( ctx, "Expected `]'" ); - return FALSE; + return false; } cur2++; @@ -1492,7 +1492,7 @@ static bool parse_declaration( struct translate_ctx *ctx ) eat_opt_white(&cur); if (*cur != '(') { report_error(ctx, "Expected '('"); - return FALSE; + return false; } cur++; @@ -1500,14 +1500,14 @@ static bool parse_declaration( struct translate_ctx *ctx ) eat_opt_white(&cur); if (!parse_uint(&cur, &stream[i])) { report_error(ctx, "Expected literal integer"); - return FALSE; + return false; } eat_opt_white(&cur); if (i < 3) { if (*cur != ',') { report_error(ctx, "Expected ','"); - return FALSE; + return false; } cur++; } @@ -1515,7 +1515,7 @@ static bool parse_declaration( struct translate_ctx *ctx ) if (*cur != ')') { report_error(ctx, "Expected ')'"); - return FALSE; + return false; } cur++; @@ -1573,7 +1573,7 @@ static bool parse_declaration( struct translate_ctx *ctx ) ctx->cur = cur; } else { report_error( ctx, "Expected semantic, interpolate attribute, or invariant "); - return FALSE; + return false; } } @@ -1584,10 +1584,10 @@ static bool parse_declaration( struct translate_ctx *ctx ) (uint) (ctx->tokens_end - ctx->tokens_cur) ); if (advance == 0) - return FALSE; + return false; ctx->tokens_cur += advance; - return TRUE; + return true; } static bool parse_immediate( struct translate_ctx *ctx ) @@ -1604,18 +1604,18 @@ static bool parse_immediate( struct translate_ctx *ctx ) eat_opt_white( &ctx->cur ); if (!parse_uint( &ctx->cur, &uindex )) { report_error( ctx, "Expected literal unsigned integer" ); - return FALSE; + return false; } if (uindex != ctx->num_immediates) { report_error( ctx, "Immediates must be sorted" ); - return FALSE; + return false; } eat_opt_white( &ctx->cur ); if (*ctx->cur != ']') { report_error( ctx, "Expected `]'" ); - return FALSE; + return false; } ctx->cur++; @@ -1623,7 +1623,7 @@ static bool parse_immediate( struct translate_ctx *ctx ) if (!eat_white( &ctx->cur )) { report_error( ctx, "Syntax error" ); - return FALSE; + return false; } for (type = 0; type < ARRAY_SIZE(tgsi_immediate_type_names); ++type) { if (str_match_nocase_whole(&ctx->cur, tgsi_immediate_type_names[type])) @@ -1631,7 +1631,7 @@ static bool parse_immediate( struct translate_ctx *ctx ) } if (type == ARRAY_SIZE(tgsi_immediate_type_names)) { report_error( ctx, "Expected immediate type" ); - return FALSE; + return false; } imm = tgsi_default_full_immediate(); @@ -1645,12 +1645,12 @@ static bool parse_immediate( struct translate_ctx *ctx ) ctx->header, (uint) (ctx->tokens_end - ctx->tokens_cur) ); if (advance == 0) - return FALSE; + return false; ctx->tokens_cur += advance; ctx->num_immediates++; - return TRUE; + return true; } static bool @@ -1664,10 +1664,10 @@ parse_primitive( const char **pcur, uint *primitive ) if (str_match_nocase_whole( &cur, tgsi_primitive_names[i])) { *primitive = i; *pcur = cur; - return TRUE; + return true; } } - return FALSE; + return false; } static bool @@ -1681,10 +1681,10 @@ parse_fs_coord_origin( const char **pcur, uint *fs_coord_origin ) if (str_match_nocase_whole( &cur, tgsi_fs_coord_origin_names[i])) { *fs_coord_origin = i; *pcur = cur; - return TRUE; + return true; } } - return FALSE; + return false; } static bool @@ -1698,10 +1698,10 @@ parse_fs_coord_pixel_center( const char **pcur, uint *fs_coord_pixel_center ) if (str_match_nocase_whole( &cur, tgsi_fs_coord_pixel_center_names[i])) { *fs_coord_pixel_center = i; *pcur = cur; - return TRUE; + return true; } } - return FALSE; + return false; } static bool @@ -1715,10 +1715,10 @@ parse_property_next_shader( const char **pcur, uint *next_shader ) if (str_match_nocase_whole( &cur, tgsi_processor_type_names[i])) { *next_shader = i; *pcur = cur; - return TRUE; + return true; } } - return FALSE; + return false; } static bool parse_property( struct translate_ctx *ctx ) @@ -1731,11 +1731,11 @@ static bool parse_property( struct translate_ctx *ctx ) if (!eat_white( &ctx->cur )) { report_error( ctx, "Syntax error" ); - return FALSE; + return false; } if (!parse_identifier( &ctx->cur, id, sizeof(id) )) { report_error( ctx, "Syntax error" ); - return FALSE; + return false; } for (property_name = 0; property_name < TGSI_PROPERTY_COUNT; ++property_name) { @@ -1745,7 +1745,7 @@ static bool parse_property( struct translate_ctx *ctx ) } if (property_name >= TGSI_PROPERTY_COUNT) { debug_printf( "\nError: Unknown property : '%s'", id ); - return FALSE; + return false; } eat_opt_white( &ctx->cur ); @@ -1754,7 +1754,7 @@ static bool parse_property( struct translate_ctx *ctx ) case TGSI_PROPERTY_GS_OUTPUT_PRIM: if (!parse_primitive(&ctx->cur, &values[0] )) { report_error( ctx, "Unknown primitive name as property!" ); - return FALSE; + return false; } if (property_name == TGSI_PROPERTY_GS_INPUT_PRIM && ctx->processor == PIPE_SHADER_GEOMETRY) { @@ -1764,26 +1764,26 @@ static bool parse_property( struct translate_ctx *ctx ) case TGSI_PROPERTY_FS_COORD_ORIGIN: if (!parse_fs_coord_origin(&ctx->cur, &values[0] )) { report_error( ctx, "Unknown coord origin as property: must be UPPER_LEFT or LOWER_LEFT!" ); - return FALSE; + return false; } break; case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER: if (!parse_fs_coord_pixel_center(&ctx->cur, &values[0] )) { report_error( ctx, "Unknown coord pixel center as property: must be HALF_INTEGER or INTEGER!" ); - return FALSE; + return false; } break; case TGSI_PROPERTY_NEXT_SHADER: if (!parse_property_next_shader(&ctx->cur, &values[0] )) { report_error( ctx, "Unknown next shader property value." ); - return FALSE; + return false; } break; case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS: default: if (!parse_uint(&ctx->cur, &values[0] )) { report_error( ctx, "Expected unsigned integer as property!" ); - return FALSE; + return false; } } @@ -1798,10 +1798,10 @@ static bool parse_property( struct translate_ctx *ctx ) ctx->header, (uint) (ctx->tokens_end - ctx->tokens_cur) ); if (advance == 0) - return FALSE; + return false; ctx->tokens_cur += advance; - return TRUE; + return true; } @@ -1809,7 +1809,7 @@ static bool translate( struct translate_ctx *ctx ) { eat_opt_white( &ctx->cur ); if (!parse_header( ctx )) - return FALSE; + return false; if (ctx->processor == PIPE_SHADER_TESS_CTRL || ctx->processor == PIPE_SHADER_TESS_EVAL) @@ -1819,33 +1819,33 @@ static bool translate( struct translate_ctx *ctx ) uint label_val = 0; if (!eat_white( &ctx->cur )) { report_error( ctx, "Syntax error" ); - return FALSE; + return false; } if (*ctx->cur == '\0') break; if (parse_label( ctx, &label_val )) { - if (!parse_instruction( ctx, TRUE )) - return FALSE; + if (!parse_instruction( ctx, true )) + return false; } else if (str_match_nocase_whole( &ctx->cur, "DCL" )) { if (!parse_declaration( ctx )) - return FALSE; + return false; } else if (str_match_nocase_whole( &ctx->cur, "IMM" )) { if (!parse_immediate( ctx )) - return FALSE; + return false; } else if (str_match_nocase_whole( &ctx->cur, "PROPERTY" )) { if (!parse_property( ctx )) - return FALSE; + return false; } - else if (!parse_instruction( ctx, FALSE )) { - return FALSE; + else if (!parse_instruction( ctx, false )) { + return false; } } - return TRUE; + return true; } bool @@ -1863,7 +1863,7 @@ tgsi_text_translate( ctx.tokens_end = tokens + num_tokens; if (!translate( &ctx )) - return FALSE; + return false; return tgsi_sanity_check( tokens ); } diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.c b/src/gallium/auxiliary/tgsi/tgsi_transform.c index bda607aa2c7..78753cedac3 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) { - bool first_instruction = TRUE; - bool epilog_emitted = FALSE; + bool first_instruction = true; + bool epilog_emitted = false; int cond_stack = 0; int call_stack = 0; @@ -244,7 +244,7 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in, assert(cond_stack == 0); /* Emit caller's epilog */ ctx->epilog(ctx); - epilog_emitted = TRUE; + epilog_emitted = true; } /* Emit END (or RET) */ ctx->emit_instruction(ctx, fullinst); @@ -281,7 +281,7 @@ tgsi_transform_shader(const struct tgsi_token *tokens_in, ctx->emit_instruction(ctx, fullinst); } - first_instruction = FALSE; + first_instruction = false; } break; diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h index 64545742cc5..2e88159af02 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_transform.h +++ b/src/gallium/auxiliary/tgsi/tgsi_transform.h @@ -533,7 +533,7 @@ tgsi_transform_tex_inst(struct tgsi_transform_context *ctx, inst.Dst[0].Register.File = dst_file; inst.Dst[0].Register.Index = dst_index; inst.Instruction.NumSrcRegs = 2; - inst.Instruction.Texture = TRUE; + inst.Instruction.Texture = true; inst.Texture.Texture = tex_target; tgsi_transform_src_reg_xyzw(&inst.Src[0], src_file, src_index); tgsi_transform_src_reg_xyzw(&inst.Src[1], TGSI_FILE_SAMPLER, sampler_index); diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c index ee0a884381d..113c619ad81 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c @@ -489,7 +489,7 @@ ureg_DECL_output_masked(struct ureg_program *ureg, { return ureg_DECL_output_layout(ureg, name, index, 0, ureg->nr_output_regs, usage_mask, array_id, - array_size, FALSE); + array_size, false); } @@ -666,12 +666,12 @@ static struct ureg_dst alloc_temporary( struct ureg_program *ureg, struct ureg_dst ureg_DECL_temporary( struct ureg_program *ureg ) { - return alloc_temporary(ureg, FALSE); + return alloc_temporary(ureg, false); } struct ureg_dst ureg_DECL_local_temporary( struct ureg_program *ureg ) { - return alloc_temporary(ureg, TRUE); + return alloc_temporary(ureg, true); } struct ureg_dst ureg_DECL_array_temporary( struct ureg_program *ureg, @@ -853,17 +853,17 @@ match_or_expand_immediate64( const unsigned *v, *swizzle = 0; for (i = 0; i < nr; i += 2) { - bool found = FALSE; + bool found = false; for (j = 0; j < nr2 && !found; j += 2) { if (v[i] == v2[j] && v[i + 1] == v2[j + 1]) { *swizzle |= (j << (i * 2)) | ((j + 1) << ((i + 1) * 2)); - found = TRUE; + found = true; } } if (!found) { if ((nr2) >= 4) { - return FALSE; + return false; } v2[nr2] = v[i]; @@ -877,7 +877,7 @@ match_or_expand_immediate64( const unsigned *v, /* Actually expand immediate only when fully succeeded. */ *pnr2 = nr2; - return TRUE; + return true; } static int @@ -899,18 +899,18 @@ match_or_expand_immediate( const unsigned *v, *swizzle = 0; for (i = 0; i < nr; i++) { - bool found = FALSE; + bool found = false; for (j = 0; j < nr2 && !found; j++) { if (v[i] == v2[j]) { *swizzle |= j << (i * 2); - found = TRUE; + found = true; } } if (!found) { if (nr2 >= 4) { - return FALSE; + return false; } v2[nr2] = v[i]; @@ -922,7 +922,7 @@ match_or_expand_immediate( const unsigned *v, /* Actually expand immediate only when fully succeeded. */ *pnr2 = nr2; - return TRUE; + return true; } @@ -1414,7 +1414,7 @@ ureg_insn(struct ureg_program *ureg, return; } - saturate = nr_dst ? dst[0].Saturate : FALSE; + saturate = nr_dst ? dst[0].Saturate : false; insn = ureg_emit_insn(ureg, opcode, @@ -1452,7 +1452,7 @@ ureg_tex_insn(struct ureg_program *ureg, return; } - saturate = nr_dst ? dst[0].Saturate : FALSE; + saturate = nr_dst ? dst[0].Saturate : false; insn = ureg_emit_insn(ureg, opcode, @@ -1493,7 +1493,7 @@ ureg_memory_insn(struct ureg_program *ureg, insn = ureg_emit_insn(ureg, opcode, - FALSE, + false, 0, nr_dst, nr_src); @@ -1904,7 +1904,7 @@ static void emit_decls( struct ureg_program *ureg ) 0, TGSI_WRITEMASK_XYZW, ureg->input[i].array_id, - FALSE); + false); } } else { @@ -1917,7 +1917,7 @@ static void emit_decls( struct ureg_program *ureg ) ureg->input[i].semantic_index + (j - ureg->input[i].first), 0, - TGSI_WRITEMASK_XYZW, 0, FALSE); + TGSI_WRITEMASK_XYZW, 0, false); } } } @@ -1931,7 +1931,7 @@ static void emit_decls( struct ureg_program *ureg ) ureg->system_value[i].semantic_name, ureg->system_value[i].semantic_index, 0, - TGSI_WRITEMASK_XYZW, 0, FALSE); + TGSI_WRITEMASK_XYZW, 0, false); } /* While not required by TGSI spec, virglrenderer has a dependency on the diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h index 003a7529fad..befb486bd88 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h @@ -631,7 +631,7 @@ static inline void ureg_##op( struct ureg_program *ureg ) \ struct ureg_emit_insn_result insn; \ insn = ureg_emit_insn(ureg, \ opcode, \ - FALSE, \ + false, \ 0, \ 0, \ 0); \ @@ -646,7 +646,7 @@ static inline void ureg_##op( struct ureg_program *ureg, \ struct ureg_emit_insn_result insn; \ insn = ureg_emit_insn(ureg, \ opcode, \ - FALSE, \ + false, \ 0, \ 0, \ 1); \ @@ -662,7 +662,7 @@ static inline void ureg_##op( struct ureg_program *ureg, \ struct ureg_emit_insn_result insn; \ insn = ureg_emit_insn(ureg, \ opcode, \ - FALSE, \ + false, \ 0, \ 0, \ 0); \ @@ -679,7 +679,7 @@ static inline void ureg_##op( struct ureg_program *ureg, \ struct ureg_emit_insn_result insn; \ insn = ureg_emit_insn(ureg, \ opcode, \ - FALSE, \ + false, \ 0, \ 0, \ 1); \ diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi/tgsi_util.c index 1304c5a54ad..8a199653d5f 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_util.c +++ b/src/gallium/auxiliary/tgsi/tgsi_util.c @@ -472,8 +472,8 @@ tgsi_is_shadow_target(enum tgsi_texture_type target) case TGSI_TEXTURE_SHADOW2D_ARRAY: case TGSI_TEXTURE_SHADOWCUBE: case TGSI_TEXTURE_SHADOWCUBE_ARRAY: - return TRUE; + return true; default: - return FALSE; + return false; } } diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c index 4507095cc34..93b5006818c 100644 --- a/src/gallium/auxiliary/translate/translate_generic.c +++ b/src/gallium/auxiliary/translate/translate_generic.c @@ -767,15 +767,15 @@ is_legal_int_format_combo(const struct util_format_description *src, for (i = 0; i < nr; i++) { /* The signs must match. */ if (src->channel[i].type != dst->channel[i].type) { - return FALSE; + return false; } /* Integers must not lose precision at any point in the pipeline. */ if (src->channel[i].size > dst->channel[i].size) { - return FALSE; + return false; } } - return TRUE; + return true; } struct translate * @@ -850,124 +850,124 @@ bool translate_generic_is_output_format_supported(enum pipe_format format) { switch(format) { - case PIPE_FORMAT_R64G64B64A64_FLOAT: return TRUE; - case PIPE_FORMAT_R64G64B64_FLOAT: return TRUE; - case PIPE_FORMAT_R64G64_FLOAT: return TRUE; - case PIPE_FORMAT_R64_FLOAT: return TRUE; + case PIPE_FORMAT_R64G64B64A64_FLOAT: return true; + case PIPE_FORMAT_R64G64B64_FLOAT: return true; + case PIPE_FORMAT_R64G64_FLOAT: return true; + case PIPE_FORMAT_R64_FLOAT: return true; - case PIPE_FORMAT_R32G32B32A32_FLOAT: return TRUE; - case PIPE_FORMAT_R32G32B32_FLOAT: return TRUE; - case PIPE_FORMAT_R32G32_FLOAT: return TRUE; - case PIPE_FORMAT_R32_FLOAT: return TRUE; + case PIPE_FORMAT_R32G32B32A32_FLOAT: return true; + case PIPE_FORMAT_R32G32B32_FLOAT: return true; + case PIPE_FORMAT_R32G32_FLOAT: return true; + case PIPE_FORMAT_R32_FLOAT: return true; - case PIPE_FORMAT_R16G16B16A16_FLOAT: return TRUE; - case PIPE_FORMAT_R16G16B16_FLOAT: return TRUE; - case PIPE_FORMAT_R16G16_FLOAT: return TRUE; - case PIPE_FORMAT_R16_FLOAT: return TRUE; + case PIPE_FORMAT_R16G16B16A16_FLOAT: return true; + case PIPE_FORMAT_R16G16B16_FLOAT: return true; + case PIPE_FORMAT_R16G16_FLOAT: return true; + case PIPE_FORMAT_R16_FLOAT: return true; - case PIPE_FORMAT_R32G32B32A32_USCALED: return TRUE; - case PIPE_FORMAT_R32G32B32_USCALED: return TRUE; - case PIPE_FORMAT_R32G32_USCALED: return TRUE; - case PIPE_FORMAT_R32_USCALED: return TRUE; + case PIPE_FORMAT_R32G32B32A32_USCALED: return true; + case PIPE_FORMAT_R32G32B32_USCALED: return true; + case PIPE_FORMAT_R32G32_USCALED: return true; + case PIPE_FORMAT_R32_USCALED: return true; - case PIPE_FORMAT_R32G32B32A32_SSCALED: return TRUE; - case PIPE_FORMAT_R32G32B32_SSCALED: return TRUE; - case PIPE_FORMAT_R32G32_SSCALED: return TRUE; - case PIPE_FORMAT_R32_SSCALED: return TRUE; + case PIPE_FORMAT_R32G32B32A32_SSCALED: return true; + case PIPE_FORMAT_R32G32B32_SSCALED: return true; + case PIPE_FORMAT_R32G32_SSCALED: return true; + case PIPE_FORMAT_R32_SSCALED: return true; - case PIPE_FORMAT_R32G32B32A32_UNORM: return TRUE; - case PIPE_FORMAT_R32G32B32_UNORM: return TRUE; - case PIPE_FORMAT_R32G32_UNORM: return TRUE; - case PIPE_FORMAT_R32_UNORM: return TRUE; + case PIPE_FORMAT_R32G32B32A32_UNORM: return true; + case PIPE_FORMAT_R32G32B32_UNORM: return true; + case PIPE_FORMAT_R32G32_UNORM: return true; + case PIPE_FORMAT_R32_UNORM: return true; - case PIPE_FORMAT_R32G32B32A32_SNORM: return TRUE; - case PIPE_FORMAT_R32G32B32_SNORM: return TRUE; - case PIPE_FORMAT_R32G32_SNORM: return TRUE; - case PIPE_FORMAT_R32_SNORM: return TRUE; + case PIPE_FORMAT_R32G32B32A32_SNORM: return true; + case PIPE_FORMAT_R32G32B32_SNORM: return true; + case PIPE_FORMAT_R32G32_SNORM: return true; + case PIPE_FORMAT_R32_SNORM: return true; - case PIPE_FORMAT_R16G16B16A16_USCALED: return TRUE; - case PIPE_FORMAT_R16G16B16_USCALED: return TRUE; - case PIPE_FORMAT_R16G16_USCALED: return TRUE; - case PIPE_FORMAT_R16_USCALED: return TRUE; + case PIPE_FORMAT_R16G16B16A16_USCALED: return true; + case PIPE_FORMAT_R16G16B16_USCALED: return true; + case PIPE_FORMAT_R16G16_USCALED: return true; + case PIPE_FORMAT_R16_USCALED: return true; - case PIPE_FORMAT_R16G16B16A16_SSCALED: return TRUE; - case PIPE_FORMAT_R16G16B16_SSCALED: return TRUE; - case PIPE_FORMAT_R16G16_SSCALED: return TRUE; - case PIPE_FORMAT_R16_SSCALED: return TRUE; + case PIPE_FORMAT_R16G16B16A16_SSCALED: return true; + case PIPE_FORMAT_R16G16B16_SSCALED: return true; + case PIPE_FORMAT_R16G16_SSCALED: return true; + case PIPE_FORMAT_R16_SSCALED: return true; - case PIPE_FORMAT_R16G16B16A16_UNORM: return TRUE; - case PIPE_FORMAT_R16G16B16_UNORM: return TRUE; - case PIPE_FORMAT_R16G16_UNORM: return TRUE; - case PIPE_FORMAT_R16_UNORM: return TRUE; + case PIPE_FORMAT_R16G16B16A16_UNORM: return true; + case PIPE_FORMAT_R16G16B16_UNORM: return true; + case PIPE_FORMAT_R16G16_UNORM: return true; + case PIPE_FORMAT_R16_UNORM: return true; - case PIPE_FORMAT_R16G16B16A16_SNORM: return TRUE; - case PIPE_FORMAT_R16G16B16_SNORM: return TRUE; - case PIPE_FORMAT_R16G16_SNORM: return TRUE; - case PIPE_FORMAT_R16_SNORM: return TRUE; + case PIPE_FORMAT_R16G16B16A16_SNORM: return true; + case PIPE_FORMAT_R16G16B16_SNORM: return true; + case PIPE_FORMAT_R16G16_SNORM: return true; + case PIPE_FORMAT_R16_SNORM: return true; - case PIPE_FORMAT_R8G8B8A8_USCALED: return TRUE; - case PIPE_FORMAT_R8G8B8_USCALED: return TRUE; - case PIPE_FORMAT_R8G8_USCALED: return TRUE; - case PIPE_FORMAT_R8_USCALED: return TRUE; + case PIPE_FORMAT_R8G8B8A8_USCALED: return true; + case PIPE_FORMAT_R8G8B8_USCALED: return true; + case PIPE_FORMAT_R8G8_USCALED: return true; + case PIPE_FORMAT_R8_USCALED: return true; - case PIPE_FORMAT_R8G8B8A8_SSCALED: return TRUE; - case PIPE_FORMAT_R8G8B8_SSCALED: return TRUE; - case PIPE_FORMAT_R8G8_SSCALED: return TRUE; - case PIPE_FORMAT_R8_SSCALED: return TRUE; + case PIPE_FORMAT_R8G8B8A8_SSCALED: return true; + case PIPE_FORMAT_R8G8B8_SSCALED: return true; + case PIPE_FORMAT_R8G8_SSCALED: return true; + case PIPE_FORMAT_R8_SSCALED: return true; - case PIPE_FORMAT_R8G8B8A8_UNORM: return TRUE; - case PIPE_FORMAT_R8G8B8_UNORM: return TRUE; - case PIPE_FORMAT_R8G8_UNORM: return TRUE; - case PIPE_FORMAT_R8_UNORM: return TRUE; + case PIPE_FORMAT_R8G8B8A8_UNORM: return true; + case PIPE_FORMAT_R8G8B8_UNORM: return true; + case PIPE_FORMAT_R8G8_UNORM: return true; + case PIPE_FORMAT_R8_UNORM: return true; - case PIPE_FORMAT_R8G8B8A8_SNORM: return TRUE; - case PIPE_FORMAT_R8G8B8_SNORM: return TRUE; - case PIPE_FORMAT_R8G8_SNORM: return TRUE; - case PIPE_FORMAT_R8_SNORM: return TRUE; + case PIPE_FORMAT_R8G8B8A8_SNORM: return true; + case PIPE_FORMAT_R8G8B8_SNORM: return true; + case PIPE_FORMAT_R8G8_SNORM: return true; + case PIPE_FORMAT_R8_SNORM: return true; - case PIPE_FORMAT_A8R8G8B8_UNORM: return TRUE; - case PIPE_FORMAT_B8G8R8A8_UNORM: return TRUE; + case PIPE_FORMAT_A8R8G8B8_UNORM: return true; + case PIPE_FORMAT_B8G8R8A8_UNORM: return true; - case PIPE_FORMAT_R32G32B32A32_UINT: return TRUE; - case PIPE_FORMAT_R32G32B32_UINT: return TRUE; - case PIPE_FORMAT_R32G32_UINT: return TRUE; - case PIPE_FORMAT_R32_UINT: return TRUE; + case PIPE_FORMAT_R32G32B32A32_UINT: return true; + case PIPE_FORMAT_R32G32B32_UINT: return true; + case PIPE_FORMAT_R32G32_UINT: return true; + case PIPE_FORMAT_R32_UINT: return true; - case PIPE_FORMAT_R16G16B16A16_UINT: return TRUE; - case PIPE_FORMAT_R16G16B16_UINT: return TRUE; - case PIPE_FORMAT_R16G16_UINT: return TRUE; - case PIPE_FORMAT_R16_UINT: return TRUE; + case PIPE_FORMAT_R16G16B16A16_UINT: return true; + case PIPE_FORMAT_R16G16B16_UINT: return true; + case PIPE_FORMAT_R16G16_UINT: return true; + case PIPE_FORMAT_R16_UINT: return true; - case PIPE_FORMAT_R8G8B8A8_UINT: return TRUE; - case PIPE_FORMAT_R8G8B8_UINT: return TRUE; - case PIPE_FORMAT_R8G8_UINT: return TRUE; - case PIPE_FORMAT_R8_UINT: return TRUE; + case PIPE_FORMAT_R8G8B8A8_UINT: return true; + case PIPE_FORMAT_R8G8B8_UINT: return true; + case PIPE_FORMAT_R8G8_UINT: return true; + case PIPE_FORMAT_R8_UINT: return true; - case PIPE_FORMAT_R32G32B32A32_SINT: return TRUE; - case PIPE_FORMAT_R32G32B32_SINT: return TRUE; - case PIPE_FORMAT_R32G32_SINT: return TRUE; - case PIPE_FORMAT_R32_SINT: return TRUE; + case PIPE_FORMAT_R32G32B32A32_SINT: return true; + case PIPE_FORMAT_R32G32B32_SINT: return true; + case PIPE_FORMAT_R32G32_SINT: return true; + case PIPE_FORMAT_R32_SINT: return true; - case PIPE_FORMAT_R16G16B16A16_SINT: return TRUE; - case PIPE_FORMAT_R16G16B16_SINT: return TRUE; - case PIPE_FORMAT_R16G16_SINT: return TRUE; - case PIPE_FORMAT_R16_SINT: return TRUE; + case PIPE_FORMAT_R16G16B16A16_SINT: return true; + case PIPE_FORMAT_R16G16B16_SINT: return true; + case PIPE_FORMAT_R16G16_SINT: return true; + case PIPE_FORMAT_R16_SINT: return true; - case PIPE_FORMAT_R8G8B8A8_SINT: return TRUE; - case PIPE_FORMAT_R8G8B8_SINT: return TRUE; - case PIPE_FORMAT_R8G8_SINT: return TRUE; - case PIPE_FORMAT_R8_SINT: return TRUE; + case PIPE_FORMAT_R8G8B8A8_SINT: return true; + case PIPE_FORMAT_R8G8B8_SINT: return true; + case PIPE_FORMAT_R8G8_SINT: return true; + case PIPE_FORMAT_R8_SINT: return true; - case PIPE_FORMAT_B10G10R10A2_UNORM: return TRUE; - case PIPE_FORMAT_B10G10R10A2_USCALED: return TRUE; - case PIPE_FORMAT_B10G10R10A2_SNORM: return TRUE; - case PIPE_FORMAT_B10G10R10A2_SSCALED: return TRUE; + case PIPE_FORMAT_B10G10R10A2_UNORM: return true; + case PIPE_FORMAT_B10G10R10A2_USCALED: return true; + case PIPE_FORMAT_B10G10R10A2_SNORM: return true; + case PIPE_FORMAT_B10G10R10A2_SSCALED: return true; - case PIPE_FORMAT_R10G10B10A2_UNORM: return TRUE; - case PIPE_FORMAT_R10G10B10A2_USCALED: return TRUE; - case PIPE_FORMAT_R10G10B10A2_SNORM: return TRUE; - case PIPE_FORMAT_R10G10B10A2_SSCALED: return TRUE; + case PIPE_FORMAT_R10G10B10A2_UNORM: return true; + case PIPE_FORMAT_R10G10B10A2_USCALED: return true; + case PIPE_FORMAT_R10G10B10A2_SNORM: return true; + case PIPE_FORMAT_R10G10B10A2_SSCALED: return true; - default: return FALSE; + default: return false; } } diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c index 45275275ed8..39bb84e543f 100644 --- a/src/gallium/auxiliary/translate/translate_sse.c +++ b/src/gallium/auxiliary/translate/translate_sse.c @@ -232,9 +232,9 @@ emit_load_sse2(struct translate_sse *p, sse2_movdqu(p->func, data, src); break; default: - return FALSE; + return false; } - return TRUE; + return true; } @@ -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; - bool id_swizzle = TRUE; + bool id_swizzle = true; unsigned swizzle[4] = { PIPE_SWIZZLE_NONE, PIPE_SWIZZLE_NONE, PIPE_SWIZZLE_NONE, PIPE_SWIZZLE_NONE }; @@ -490,26 +490,26 @@ translate_attr_convert(struct translate_sse *p, if (a->output_format == PIPE_FORMAT_NONE || a->input_format == PIPE_FORMAT_NONE) - return FALSE; + return false; if (input_desc->channel[0].size & 7) - return FALSE; + return false; if (input_desc->colorspace != output_desc->colorspace) - return FALSE; + return false; for (i = 1; i < input_desc->nr_channels; ++i) { if (memcmp (&input_desc->channel[i], &input_desc->channel[0], sizeof(input_desc->channel[0]))) - return FALSE; + return false; } for (i = 1; i < output_desc->nr_channels; ++i) { if (memcmp (&output_desc->channel[i], &output_desc->channel[0], sizeof(output_desc->channel[0]))) { - return FALSE; + return false; } } @@ -536,14 +536,14 @@ translate_attr_convert(struct translate_sse *p, if (swizzle[i] < 4) needed_chans = MAX2(needed_chans, swizzle[i] + 1); if (swizzle[i] < PIPE_SWIZZLE_0 && swizzle[i] != i) - id_swizzle = FALSE; + id_swizzle = false; } if (needed_chans > 0) { switch (input_desc->channel[0].type) { case UTIL_FORMAT_TYPE_UNSIGNED: if (!(x86_target_caps(p->func) & X86_SSE2)) - return FALSE; + return false; emit_load_sse2(p, dataXMM, src, input_desc->channel[0].size * input_desc->nr_channels >> 3); @@ -575,7 +575,7 @@ translate_attr_convert(struct translate_sse *p, sse_andps(p->func, auxXMM, get_const(p, CONST_2147483648)); break; default: - return FALSE; + return false; } sse2_cvtdq2ps(p->func, dataXMM, dataXMM); if (input_desc->channel[0].size == 32) @@ -606,7 +606,7 @@ translate_attr_convert(struct translate_sse *p, break; case UTIL_FORMAT_TYPE_SIGNED: if (!(x86_target_caps(p->func) & X86_SSE2)) - return FALSE; + return false; emit_load_sse2(p, dataXMM, src, input_desc->channel[0].size * input_desc->nr_channels >> 3); @@ -625,7 +625,7 @@ translate_attr_convert(struct translate_sse *p, case 32: /* we lose precision here */ break; default: - return FALSE; + return false; } sse2_cvtdq2ps(p->func, dataXMM, dataXMM); if (input_desc->channel[0].normalized) { @@ -656,7 +656,7 @@ translate_attr_convert(struct translate_sse *p, case UTIL_FORMAT_TYPE_FLOAT: if (input_desc->channel[0].size != 32 && input_desc->channel[0].size != 64) { - return FALSE; + return false; } if (swizzle[3] == PIPE_SWIZZLE_1 && input_desc->nr_channels <= 3) { @@ -670,16 +670,16 @@ translate_attr_convert(struct translate_sse *p, break; case 64: /* we lose precision here */ if (!(x86_target_caps(p->func) & X86_SSE2)) - return FALSE; + return false; emit_load_float64to32(p, dataXMM, src, needed_chans, input_desc->nr_channels); break; default: - return FALSE; + return false; } break; default: - return FALSE; + return false; } if (!id_swizzle) { @@ -751,7 +751,7 @@ translate_attr_convert(struct translate_sse *p, } } } - return TRUE; + return true; } else if ((x86_target_caps(p->func) & X86_SSE2) && input_desc->channel[0].size == 8 @@ -780,7 +780,7 @@ translate_attr_convert(struct translate_sse *p, if (swizzle[i] < 4) needed_chans = MAX2(needed_chans, swizzle[i] + 1); if (swizzle[i] < PIPE_SWIZZLE_0 && swizzle[i] != i) - id_swizzle = FALSE; + id_swizzle = false; } if (needed_chans > 0) { @@ -909,7 +909,7 @@ translate_attr_convert(struct translate_sse *p, } } } - return TRUE; + return true; } else if (!memcmp(&output_desc->channel[0], &input_desc->channel[0], sizeof(output_desc->channel[0]))) { @@ -926,7 +926,7 @@ translate_attr_convert(struct translate_sse *p, x86_mov(p->func, tmp, src); x86_bswap(p->func, tmp); x86_mov(p->func, dst, tmp); - return TRUE; + return true; } for (i = 0; i < output_desc->nr_channels; ++i) { @@ -943,7 +943,7 @@ translate_attr_convert(struct translate_sse *p, v = output_desc->channel[0].normalized ? 0x7f : 1; break; default: - return FALSE; + return false; } } x86_mov8_imm(p->func, x86_make_disp(dst, i * 1), v); @@ -968,7 +968,7 @@ translate_attr_convert(struct translate_sse *p, v = 0x3c00; break; default: - return FALSE; + return false; } } x86_mov16_imm(p->func, x86_make_disp(dst, i * 2), v); @@ -996,7 +996,7 @@ translate_attr_convert(struct translate_sse *p, v = 0x3f800000; break; default: - return FALSE; + return false; } } x86_mov_imm(p->func, x86_make_disp(dst, i * 4), v); @@ -1025,7 +1025,7 @@ translate_attr_convert(struct translate_sse *p, l = 0; break; default: - return FALSE; + return false; } } x86_mov_imm(p->func, x86_make_disp(dst, i * 8), l); @@ -1048,10 +1048,10 @@ translate_attr_convert(struct translate_sse *p, } break; default: - return FALSE; + return false; } } - return TRUE; + return true; } /* special case for draw's EMIT_4UB (RGBA) and EMIT_4UB_BGRA */ else if ((x86_target_caps(p->func) & X86_SSE2) && @@ -1076,10 +1076,10 @@ translate_attr_convert(struct translate_sse *p, sse2_packuswb(p->func, dataXMM, dataXMM); sse2_movd(p->func, dst, dataXMM); - return TRUE; + return true; } - return FALSE; + return false; } @@ -1090,7 +1090,7 @@ translate_attr(struct translate_sse *p, { if (a->input_format == a->output_format) { emit_memcpy(p, dst, src, util_format_get_stride(a->input_format, 1)); - return TRUE; + return true; } return translate_attr_convert(p, a, src, dst); @@ -1185,7 +1185,7 @@ init_inputs(struct translate_sse *p, unsigned index_size) } } - return TRUE; + return true; } @@ -1296,7 +1296,7 @@ incr_inputs(struct translate_sse *p, unsigned index_size) x86_lea(p->func, p->idx_ESI, x86_make_disp(p->idx_ESI, index_size)); } - return TRUE; + return true; } @@ -1420,7 +1420,7 @@ build_vertex_emit(struct translate_sse *p, if (!translate_attr(p, a, x86_make_disp(vb, a->input_offset), x86_make_disp(p->outbuf_EBX, a->output_offset))) - return FALSE; + return false; } /* Next output vertex: @@ -1466,7 +1466,7 @@ build_vertex_emit(struct translate_sse *p, } x86_ret(p->func); - return TRUE; + return true; } @@ -1534,7 +1534,7 @@ translate_sse2_create(const struct translate_key *key) MAX2(p->nr_buffers, key->element[i].input_buffer + 1); if (key->element[i].instance_divisor) { - p->use_instancing = TRUE; + p->use_instancing = true; } /* diff --git a/src/gallium/auxiliary/util/u_bitmask.c b/src/gallium/auxiliary/util/u_bitmask.c index a9d0853cfc1..14e6a25c696 100644 --- a/src/gallium/auxiliary/util/u_bitmask.c +++ b/src/gallium/auxiliary/util/u_bitmask.c @@ -96,10 +96,10 @@ util_bitmask_resize(struct util_bitmask *bm, /* Check integer overflow */ if (!minimum_size) - return FALSE; + return false; if (bm->size >= minimum_size) - return TRUE; + return true; assert(bm->size % UTIL_BITMASK_BITS_PER_WORD == 0); new_size = bm->size; @@ -107,7 +107,7 @@ util_bitmask_resize(struct util_bitmask *bm, new_size *= 2; /* Check integer overflow */ if (new_size < bm->size) - return FALSE; + return false; } assert(new_size); assert(new_size % UTIL_BITMASK_BITS_PER_WORD == 0); @@ -117,7 +117,7 @@ util_bitmask_resize(struct util_bitmask *bm, bm->size / UTIL_BITMASK_BITS_PER_BYTE, new_size / UTIL_BITMASK_BITS_PER_BYTE); if (!new_words) - return FALSE; + return false; memset(new_words + bm->size/UTIL_BITMASK_BITS_PER_WORD, 0, @@ -126,7 +126,7 @@ util_bitmask_resize(struct util_bitmask *bm, bm->size = new_size; bm->words = new_words; - return TRUE; + return true; } @@ -261,18 +261,18 @@ util_bitmask_get(struct util_bitmask *bm, if (index < bm->filled) { assert(bm->words[word] & mask); - return TRUE; + return true; } if (index >= bm->size) - return FALSE; + return false; if (bm->words[word] & mask) { util_bitmask_filled_set(bm, index); - return TRUE; + return true; } else - return FALSE; + return false; } diff --git a/src/gallium/auxiliary/util/u_box.h b/src/gallium/auxiliary/util/u_box.h index 55c5e1acae9..25a91adfdf3 100644 --- a/src/gallium/auxiliary/util/u_box.h +++ b/src/gallium/auxiliary/util/u_box.h @@ -228,9 +228,9 @@ u_box_test_intersection_2d(const struct pipe_box *a, for (i = 0; i < 2; ++i) { if (a_l[i] > b_r[i] || a_r[i] < b_l[i]) - return FALSE; + return false; } - return TRUE; + return true; } static inline bool diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c index 4511b9303c1..95aebbb7d4c 100644 --- a/src/gallium/auxiliary/util/u_debug_flush.c +++ b/src/gallium/auxiliary/util/u_debug_flush.c @@ -227,16 +227,16 @@ debug_flush_map(struct debug_flush_buf *fbuf, unsigned flags) */ if (fbuf->has_sync_map && !map_sync) { debug_flush_alert("Recursive sync map detected.", "Map", - 2, fbuf->bt_depth, TRUE, TRUE, NULL); - debug_flush_alert(NULL, "Previous map", 0, fbuf->bt_depth, FALSE, - FALSE, fbuf->maps[fbuf->last_sync_map].frame); + 2, fbuf->bt_depth, true, true, NULL); + debug_flush_alert(NULL, "Previous map", 0, fbuf->bt_depth, false, + false, fbuf->maps[fbuf->last_sync_map].frame); } fbuf->maps[fbuf->map_count].frame = debug_flush_capture_frame(1, fbuf->bt_depth); fbuf->maps[fbuf->map_count].persistent = persistent; if (!persistent) { - fbuf->has_sync_map = TRUE; + fbuf->has_sync_map = true; fbuf->last_sync_map = fbuf->map_count; } @@ -255,9 +255,9 @@ debug_flush_map(struct debug_flush_buf *fbuf, unsigned flags) if (item && fctx->catch_map_of_referenced) { debug_flush_alert("Already referenced map detected.", - "Map", 2, fbuf->bt_depth, TRUE, TRUE, NULL); + "Map", 2, fbuf->bt_depth, true, true, NULL); debug_flush_alert(NULL, "Reference", 0, item->bt_depth, - FALSE, FALSE, item->ref_frame); + false, false, item->ref_frame); } } simple_mtx_unlock(&list_mutex); @@ -273,15 +273,15 @@ debug_flush_unmap(struct debug_flush_buf *fbuf) mtx_lock(&fbuf->mutex); if (--fbuf->map_count < 0) { debug_flush_alert("Unmap not previously mapped detected.", "Map", - 2, fbuf->bt_depth, FALSE, TRUE, NULL); + 2, fbuf->bt_depth, false, true, NULL); } else { if (fbuf->has_sync_map && fbuf->last_sync_map == fbuf->map_count) { int i = fbuf->map_count; - fbuf->has_sync_map = FALSE; + fbuf->has_sync_map = false; while (i-- && !fbuf->has_sync_map) { if (!fbuf->maps[i].persistent) { - fbuf->has_sync_map = TRUE; + fbuf->has_sync_map = true; fbuf->last_sync_map = i; } } @@ -312,9 +312,9 @@ debug_flush_cb_reference(struct debug_flush_ctx *fctx, mtx_lock(&fbuf->mutex); if (fbuf->map_count && fbuf->has_sync_map) { debug_flush_alert("Reference of mapped buffer detected.", "Reference", - 2, fctx->bt_depth, TRUE, TRUE, NULL); - debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, FALSE, - FALSE, fbuf->maps[fbuf->last_sync_map].frame); + 2, fctx->bt_depth, true, true, NULL); + debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, false, + false, fbuf->maps[fbuf->last_sync_map].frame); } mtx_unlock(&fbuf->mutex); @@ -352,11 +352,11 @@ debug_flush_might_flush_cb(UNUSED void *key, void *value, void *data) snprintf(message, sizeof(message), "%s referenced mapped buffer detected.", reason); - debug_flush_alert(message, reason, 3, item->bt_depth, TRUE, TRUE, NULL); - debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, TRUE, FALSE, + debug_flush_alert(message, reason, 3, item->bt_depth, true, true, NULL); + debug_flush_alert(NULL, "Map", 0, fbuf->bt_depth, true, false, fbuf->maps[fbuf->last_sync_map].frame); - debug_flush_alert(NULL, "First reference", 0, item->bt_depth, FALSE, - FALSE, item->ref_frame); + debug_flush_alert(NULL, "First reference", 0, item->bt_depth, false, + false, item->ref_frame); } mtx_unlock(&fbuf->mutex); diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c index a8fd726b152..353b94221e0 100644 --- a/src/gallium/auxiliary/util/u_dump_state.c +++ b/src/gallium/auxiliary/util/u_dump_state.c @@ -242,55 +242,55 @@ util_dump_format(FILE *stream, enum pipe_format format) static void util_dump_enum_blend_factor(FILE *stream, unsigned value) { - util_dump_enum(stream, util_str_blend_factor(value, TRUE)); + util_dump_enum(stream, util_str_blend_factor(value, true)); } static void util_dump_enum_blend_func(FILE *stream, unsigned value) { - util_dump_enum(stream, util_str_blend_func(value, TRUE)); + util_dump_enum(stream, util_str_blend_func(value, true)); } static void util_dump_enum_func(FILE *stream, unsigned value) { - util_dump_enum(stream, util_str_func(value, TRUE)); + util_dump_enum(stream, util_str_func(value, true)); } static void util_dump_enum_prim_mode(FILE *stream, unsigned value) { - util_dump_enum(stream, util_str_prim_mode(value, TRUE)); + util_dump_enum(stream, util_str_prim_mode(value, true)); } static void util_dump_enum_tex_target(FILE *stream, unsigned value) { - util_dump_enum(stream, util_str_tex_target(value, TRUE)); + util_dump_enum(stream, util_str_tex_target(value, true)); } static void util_dump_enum_tex_filter(FILE *stream, unsigned value) { - util_dump_enum(stream, util_str_tex_filter(value, TRUE)); + util_dump_enum(stream, util_str_tex_filter(value, true)); } static void util_dump_enum_tex_mipfilter(FILE *stream, unsigned value) { - util_dump_enum(stream, util_str_tex_mipfilter(value, TRUE)); + util_dump_enum(stream, util_str_tex_mipfilter(value, true)); } static void util_dump_enum_tex_wrap(FILE *stream, unsigned value) { - util_dump_enum(stream, util_str_tex_wrap(value, TRUE)); + util_dump_enum(stream, util_str_tex_wrap(value, true)); } static void util_dump_enum_stencil_op(FILE *stream, unsigned value) { - util_dump_enum(stream, util_str_stencil_op(value, TRUE)); + util_dump_enum(stream, util_str_stencil_op(value, true)); } diff --git a/src/gallium/auxiliary/util/u_framebuffer.c b/src/gallium/auxiliary/util/u_framebuffer.c index 92bc9d13bc3..90bc37a63fe 100644 --- a/src/gallium/auxiliary/util/u_framebuffer.c +++ b/src/gallium/auxiliary/util/u_framebuffer.c @@ -53,31 +53,31 @@ util_framebuffer_state_equal(const struct pipe_framebuffer_state *dst, if (dst->width != src->width || dst->height != src->height) - return FALSE; + return false; if (dst->samples != src->samples || dst->layers != src->layers) - return FALSE; + return false; if (dst->nr_cbufs != src->nr_cbufs) { - return FALSE; + return false; } for (i = 0; i < src->nr_cbufs; i++) { if (dst->cbufs[i] != src->cbufs[i]) { - return FALSE; + return false; } } if (dst->zsbuf != src->zsbuf) { - return FALSE; + return false; } if (dst->resolve != src->resolve) { - return FALSE; + return false; } - return TRUE; + return true; } @@ -172,12 +172,12 @@ util_framebuffer_min_size(const struct pipe_framebuffer_state *fb, if (w == ~0u) { *width = 0; *height = 0; - return FALSE; + return false; } else { *width = w; *height = h; - return TRUE; + return true; } } diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c index 22e377458e9..30ccc9750dc 100644 --- a/src/gallium/auxiliary/util/u_gen_mipmap.c +++ b/src/gallium/auxiliary/util/u_gen_mipmap.c @@ -69,18 +69,18 @@ util_gen_mipmap(struct pipe_context *pipe, struct pipe_resource *pt, /* nothing to do for stencil-only formats */ if (is_zs && !has_depth) - return TRUE; + return true; /* nothing to do for integer formats */ if (!is_zs && util_format_is_pure_integer(format)) - return TRUE; + return true; if (!screen->is_format_supported(screen, format, pt->target, pt->nr_samples, pt->nr_storage_samples, PIPE_BIND_SAMPLER_VIEW | (is_zs ? PIPE_BIND_DEPTH_STENCIL : PIPE_BIND_RENDER_TARGET))) { - return FALSE; + return false; } /* The texture object should have room for the levels which we're @@ -124,5 +124,5 @@ util_gen_mipmap(struct pipe_context *pipe, struct pipe_resource *pt, pipe->blit(pipe, &blit); } - return TRUE; + return true; } diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 4b3e82d5915..39b82cfcf77 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -622,7 +622,7 @@ util_get_offset(const struct pipe_rasterizer_state *templ, return templ->offset_tri; default: assert(0); - return FALSE; + return false; } } @@ -645,7 +645,7 @@ util_query_clear_result(union pipe_query_result *result, unsigned type) case PIPE_QUERY_SO_OVERFLOW_PREDICATE: case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE: case PIPE_QUERY_GPU_FINISHED: - result->b = FALSE; + result->b = false; break; case PIPE_QUERY_OCCLUSION_COUNTER: case PIPE_QUERY_TIMESTAMP: diff --git a/src/gallium/auxiliary/util/u_prim.h b/src/gallium/auxiliary/util/u_prim.h index 09b090c1784..64e1481cfa7 100644 --- a/src/gallium/auxiliary/util/u_prim.h +++ b/src/gallium/auxiliary/util/u_prim.h @@ -173,11 +173,11 @@ u_trim_pipe_prim(enum mesa_prim pipe_prim, unsigned *nr) if (count && *nr >= count->min) { if (count->incr > 1) *nr -= (*nr % count->incr); - return TRUE; + return true; } else { *nr = 0; - return FALSE; + return false; } } diff --git a/src/gallium/auxiliary/util/u_prim_restart.c b/src/gallium/auxiliary/util/u_prim_restart.c index 3bbd6ccd2c7..07164cc0aee 100644 --- a/src/gallium/auxiliary/util/u_prim_restart.c +++ b/src/gallium/auxiliary/util/u_prim_restart.c @@ -109,13 +109,13 @@ add_range(enum mesa_prim mode, struct range_info *info, unsigned start, unsigned { /* degenerate primitive: ignore */ if (!u_trim_pipe_prim(mode, (unsigned*)&count)) - return TRUE; + return true; if (info->max == 0) { info->max = 10; info->draws = MALLOC(info->max * sizeof(struct pipe_draw_start_count_bias)); if (!info->draws) { - return FALSE; + return false; } } else if (info->count == info->max) { @@ -124,7 +124,7 @@ add_range(enum mesa_prim mode, struct range_info *info, unsigned start, unsigned info->max * sizeof(struct pipe_draw_start_count_bias), 2 * info->max * sizeof(struct pipe_draw_start_count_bias)); if (!info->draws) { - return FALSE; + return false; } info->max *= 2; @@ -139,7 +139,7 @@ add_range(enum mesa_prim mode, struct range_info *info, unsigned start, unsigned info->count++; info->total_index_count += count; - return TRUE; + return true; } struct pipe_draw_start_count_bias * @@ -270,7 +270,7 @@ util_draw_vbo_without_prim_restart(struct pipe_context *context, if (src_transfer) pipe_buffer_unmap(context, src_transfer); - new_info.primitive_restart = FALSE; + new_info.primitive_restart = false; new_info.index_bounds_valid = true; if (direct_draws) context->draw_vbo(context, &new_info, drawid_offset, NULL, direct_draws, num_draws); diff --git a/src/gallium/auxiliary/util/u_pstipple.c b/src/gallium/auxiliary/util/u_pstipple.c index 2ed3d803586..8d44a2f34ca 100644 --- a/src/gallium/auxiliary/util/u_pstipple.c +++ b/src/gallium/auxiliary/util/u_pstipple.c @@ -354,7 +354,7 @@ pstip_transform_prolog(struct tgsi_transform_context *ctx) /* KILL_IF -texTemp; # if -texTemp < 0, kill fragment */ tgsi_transform_kill_inst(ctx, TGSI_FILE_TEMPORARY, texTemp, - TGSI_SWIZZLE_W, TRUE); + TGSI_SWIZZLE_W, true); } diff --git a/src/gallium/auxiliary/util/u_resource.h b/src/gallium/auxiliary/util/u_resource.h index b489bbb3596..fe9c1c4d7f0 100644 --- a/src/gallium/auxiliary/util/u_resource.h +++ b/src/gallium/auxiliary/util/u_resource.h @@ -43,9 +43,9 @@ util_texture_is_array(enum pipe_texture_target target) case PIPE_TEXTURE_1D_ARRAY: case PIPE_TEXTURE_2D_ARRAY: case PIPE_TEXTURE_CUBE_ARRAY: - return TRUE; + return true; default: - return FALSE; + return false; } } diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c index d23034ad59f..49ec9f3ac0b 100644 --- a/src/gallium/auxiliary/util/u_simple_shaders.c +++ b/src/gallium/auxiliary/util/u_simple_shaders.c @@ -85,7 +85,7 @@ util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe, return NULL; if (window_space) - ureg_property(ureg, TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION, TRUE); + ureg_property(ureg, TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION, true); for (i = 0; i < num_attribs; i++) { struct ureg_src src; diff --git a/src/gallium/auxiliary/util/u_split_prim.h b/src/gallium/auxiliary/util/u_split_prim.h index cc2ec4af185..fe048ccc4d0 100644 --- a/src/gallium/auxiliary/util/u_split_prim.h +++ b/src/gallium/auxiliary/util/u_split_prim.h @@ -50,8 +50,8 @@ util_split_prim_next(struct util_split_prim *s, unsigned max_verts) s->emit(s->priv, s->start, 1); max_verts--; if (s->edgeflag_off) { - s->edge(s->priv, TRUE); - s->edgeflag_off = FALSE; + s->edge(s->priv, true); + s->edgeflag_off = false; } } @@ -59,7 +59,7 @@ util_split_prim_next(struct util_split_prim *s, unsigned max_verts) s->emit(s->priv, s->p_start, s->p_end - s->p_start); if (s->close_first) s->emit(s->priv, s->start, 1); - return TRUE; + return true; } switch (s->mode) { @@ -72,12 +72,12 @@ util_split_prim_next(struct util_split_prim *s, unsigned max_verts) case MESA_PRIM_POLYGON: max_verts--; s->emit(s->priv, s->p_start, max_verts); - s->edge(s->priv, FALSE); + s->edge(s->priv, false); s->emit(s->priv, s->p_start + max_verts, 1); s->p_start += max_verts; - s->repeat_first = TRUE; - s->edgeflag_off = TRUE; - return FALSE; + s->repeat_first = true; + s->edgeflag_off = true; + return false; case MESA_PRIM_TRIANGLES: max_verts = max_verts - (max_verts % 3); break; @@ -89,7 +89,7 @@ util_split_prim_next(struct util_split_prim *s, unsigned max_verts) repeat = 2; break; case MESA_PRIM_TRIANGLE_FAN: - s->repeat_first = TRUE; + s->repeat_first = true; repeat = 1; break; case MESA_PRIM_QUADS: @@ -108,7 +108,7 @@ util_split_prim_next(struct util_split_prim *s, unsigned max_verts) s->emit (s->priv, s->p_start, max_verts); s->p_start += (max_verts - repeat); - return FALSE; + return false; } #endif /* U_SPLIT_PRIM_H */ diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c index d34cc9c97d2..29c1dd96aca 100644 --- a/src/gallium/auxiliary/util/u_surface.c +++ b/src/gallium/auxiliary/util/u_surface.c @@ -582,12 +582,12 @@ util_clear_depth_stencil_texture(struct pipe_context *pipe, { struct pipe_transfer *dst_trans; ubyte *dst_map; - bool need_rmw = FALSE; + bool need_rmw = false; if ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) && ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) && util_format_is_depth_and_stencil(format)) - need_rmw = TRUE; + need_rmw = true; dst_map = pipe_texture_map_3d(pipe, texture, @@ -778,7 +778,7 @@ util_can_blit_via_copy_region(const struct pipe_blit_info *blit, if (tight_format_check) { /* no format conversions allowed */ if (blit->src.format != blit->dst.format) { - return FALSE; + return false; } } else { @@ -788,7 +788,7 @@ util_can_blit_via_copy_region(const struct pipe_blit_info *blit, (blit->src.resource->format != blit->src.format || blit->dst.resource->format != blit->dst.format || !util_is_format_compatible(src_desc, dst_desc))) { - return FALSE; + return false; } } @@ -801,7 +801,7 @@ util_can_blit_via_copy_region(const struct pipe_blit_info *blit, blit->num_window_rectangles > 0 || blit->alpha_blend || (blit->render_condition_enable && render_condition_bound)) { - return FALSE; + return false; } /* Only the src box can have negative dims for flipping */ @@ -813,7 +813,7 @@ util_can_blit_via_copy_region(const struct pipe_blit_info *blit, if (blit->src.box.width != blit->dst.box.width || blit->src.box.height != blit->dst.box.height || blit->src.box.depth != blit->dst.box.depth) { - return FALSE; + return false; } /* No out-of-bounds access. */ @@ -821,16 +821,16 @@ util_can_blit_via_copy_region(const struct pipe_blit_info *blit, blit->src.level) || !is_box_inside_resource(blit->dst.resource, &blit->dst.box, blit->dst.level)) { - return FALSE; + return false; } /* Sample counts must match. */ if (get_sample_count(blit->src.resource) != get_sample_count(blit->dst.resource)) { - return FALSE; + return false; } - return TRUE; + return true; } @@ -848,15 +848,15 @@ util_try_blit_via_copy_region(struct pipe_context *ctx, const struct pipe_blit_info *blit, bool render_condition_bound) { - if (util_can_blit_via_copy_region(blit, FALSE, render_condition_bound)) { + if (util_can_blit_via_copy_region(blit, false, render_condition_bound)) { ctx->resource_copy_region(ctx, blit->dst.resource, blit->dst.level, blit->dst.box.x, blit->dst.box.y, blit->dst.box.z, blit->src.resource, blit->src.level, &blit->src.box); - return TRUE; + return true; } else { - return FALSE; + return false; } } diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index 6f13718b924..c1a82effeed 100644 --- a/src/gallium/auxiliary/util/u_tests.c +++ b/src/gallium/auxiliary/util/u_tests.c @@ -334,7 +334,7 @@ tgsi_vs_window_space_position(struct pipe_context *ctx) /* Fragment shader. */ fs = util_make_fragment_passthrough_shader(ctx, TGSI_SEMANTIC_GENERIC, - TGSI_INTERPOLATE_LINEAR, TRUE); + TGSI_INTERPOLATE_LINEAR, true); cso_set_fragment_shader_handle(cso, fs); /* Vertex shader. */ @@ -653,7 +653,7 @@ test_texture_barrier(struct pipe_context *ctx, bool use_fbfetch, if (num_samples > 1) { void *fs = util_make_fragment_passthrough_shader(ctx, TGSI_SEMANTIC_GENERIC, - TGSI_INTERPOLATE_LINEAR, TRUE); + TGSI_INTERPOLATE_LINEAR, true); cso_set_fragment_shader_handle(cso, fs); /* Vertex shader. */ diff --git a/src/gallium/auxiliary/util/u_tile.h b/src/gallium/auxiliary/util/u_tile.h index 3799feb476a..e9f0ab03b8f 100644 --- a/src/gallium/auxiliary/util/u_tile.h +++ b/src/gallium/auxiliary/util/u_tile.h @@ -46,14 +46,14 @@ static inline bool u_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_box *box) { if ((int) x >= box->width) - return TRUE; + return true; if ((int) y >= box->height) - return TRUE; + return true; if ((int) (x + *w) > box->width) *w = box->width - x; if ((int) (y + *h) > box->height) *h = box->height - y; - return FALSE; + return false; } #ifdef __cplusplus diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c index 47d787235ba..034c5297875 100644 --- a/src/gallium/auxiliary/util/u_upload_mgr.c +++ b/src/gallium/auxiliary/util/u_upload_mgr.c @@ -116,7 +116,7 @@ u_upload_clone(struct pipe_context *pipe, struct u_upload_mgr *upload) void u_upload_disable_persistent(struct u_upload_mgr *upload) { - upload->map_persistent = FALSE; + upload->map_persistent = false; upload->map_flags &= ~(PIPE_MAP_COHERENT | PIPE_MAP_PERSISTENT); upload->map_flags |= PIPE_MAP_FLUSH_EXPLICIT; } @@ -143,7 +143,7 @@ upload_unmap_internal(struct u_upload_mgr *upload, bool destroying) void u_upload_unmap(struct u_upload_mgr *upload) { - upload_unmap_internal(upload, FALSE); + upload_unmap_internal(upload, false); } @@ -151,7 +151,7 @@ static void u_upload_release_buffer(struct u_upload_mgr *upload) { /* Unmap and unreference the upload buffer. */ - upload_unmap_internal(upload, TRUE); + upload_unmap_internal(upload, true); if (upload->buffer_private_refcount) { /* Subtract the remaining private references before unreferencing * the buffer. The mega comment below explains it. diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index d2bce61c6e8..269a94bacb3 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -628,7 +628,7 @@ u_vbuf_translate_find_free_vb_slots(struct u_vbuf *mgr, /* No vertex buffers available at all */ if (!unused_vb_mask) - return FALSE; + return false; memset(fallback_vbs, ~0, sizeof(fallback_vbs)); mgr->fallback_vbs_mask = 0; @@ -671,7 +671,7 @@ u_vbuf_translate_find_free_vb_slots(struct u_vbuf *mgr, } memcpy(mgr->fallback_vbs, fallback_vbs, sizeof(fallback_vbs)); - return TRUE; + return true; } static bool @@ -735,7 +735,7 @@ u_vbuf_translate_begin(struct u_vbuf *mgr, /* Find free vertex buffer slots. */ if (!u_vbuf_translate_find_free_vb_slots(mgr, mask)) { - return FALSE; + return false; } unsigned min_alignment[VB_NUM] = {0}; @@ -801,7 +801,7 @@ u_vbuf_translate_begin(struct u_vbuf *mgr, start[type], num[type], min_index, unroll_indices && type == VB_VERTEX); if (err != PIPE_OK) - return FALSE; + return false; /* Fixup the stride for constant attribs. */ if (type == VB_CONST) { @@ -836,8 +836,8 @@ u_vbuf_translate_begin(struct u_vbuf *mgr, mgr->fallback_velems.count = mgr->ve->count; u_vbuf_set_vertex_elements_internal(mgr, &mgr->fallback_velems); - mgr->using_translate = TRUE; - return TRUE; + mgr->using_translate = true; + return true; } static void u_vbuf_translate_end(struct u_vbuf *mgr) @@ -846,7 +846,7 @@ static void u_vbuf_translate_end(struct u_vbuf *mgr) /* Restore vertex elements. */ mgr->pipe->bind_vertex_elements_state(mgr->pipe, mgr->ve->driver_cso); - mgr->using_translate = FALSE; + mgr->using_translate = false; /* Unreference the now-unused VBOs. */ for (i = 0; i < VB_NUM; i++) { @@ -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; - bool 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; @@ -1701,7 +1701,7 @@ void u_vbuf_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *inf !new_info.primitive_restart && util_is_vbo_upload_ratio_too_large(new_draw.count, num_vertices) && !u_vbuf_mapping_vertex_buffer_blocks(mgr, misaligned)) { - unroll_indices = TRUE; + unroll_indices = true; user_vb_mask &= ~(mgr->nonzero_stride_vb_mask & mgr->ve->noninstance_vb_mask_any); } diff --git a/src/gallium/drivers/crocus/crocus_formats.c b/src/gallium/drivers/crocus/crocus_formats.c index e968978da37..29b3232da9a 100644 --- a/src/gallium/drivers/crocus/crocus_formats.c +++ b/src/gallium/drivers/crocus/crocus_formats.c @@ -456,7 +456,7 @@ crocus_is_format_supported(struct pipe_screen *pscreen, pformat == PIPE_FORMAT_X24S8_UINT || pformat == PIPE_FORMAT_S8X24_UINT || pformat == PIPE_FORMAT_X32_S8X24_UINT) - return FALSE; + return false; } const struct isl_format_layout *fmtl = isl_format_get_layout(format); diff --git a/src/gallium/drivers/d3d12/d3d12_context.cpp b/src/gallium/drivers/d3d12/d3d12_context.cpp index 9d09a2bef15..2964c17f8b0 100644 --- a/src/gallium/drivers/d3d12/d3d12_context.cpp +++ b/src/gallium/drivers/d3d12/d3d12_context.cpp @@ -345,7 +345,7 @@ d3d12_create_blend_state(struct pipe_context *pctx, return NULL; if (blend_state->logicop_enable) { - state->desc.RenderTarget[0].LogicOpEnable = TRUE; + state->desc.RenderTarget[0].LogicOpEnable = true; state->desc.RenderTarget[0].LogicOp = logic_op((pipe_logicop) blend_state->logicop_func); } @@ -355,7 +355,7 @@ d3d12_create_blend_state(struct pipe_context *pctx, int num_targets = 1; if (blend_state->independent_blend_enable) { - state->desc.IndependentBlendEnable = TRUE; + state->desc.IndependentBlendEnable = true; num_targets = PIPE_MAX_COLOR_BUFS; } @@ -363,7 +363,7 @@ d3d12_create_blend_state(struct pipe_context *pctx, const struct pipe_rt_blend_state *rt = blend_state->rt + i; if (rt->blend_enable) { - state->desc.RenderTarget[i].BlendEnable = TRUE; + state->desc.RenderTarget[i].BlendEnable = true; state->desc.RenderTarget[i].SrcBlend = blend_factor_rgb((pipe_blendfactor) rt->rgb_src_factor); state->desc.RenderTarget[i].DestBlend = blend_factor_rgb((pipe_blendfactor) rt->rgb_dst_factor); state->desc.RenderTarget[i].BlendOp = blend_op((pipe_blend_func) rt->rgb_func); @@ -458,21 +458,21 @@ d3d12_create_depth_stencil_alpha_state(struct pipe_context *pctx, return NULL; if (depth_stencil_alpha->depth_enabled) { - dsa->desc.DepthEnable = TRUE; + dsa->desc.DepthEnable = true; dsa->desc.DepthFunc = compare_op((pipe_compare_func) depth_stencil_alpha->depth_func); } /* TODO Add support for GL_depth_bound_tests */ #if 0 if (depth_stencil_alpha->depth.bounds_test) { - dsa->desc.DepthBoundsTestEnable = TRUE; + dsa->desc.DepthBoundsTestEnable = true; dsa->min_depth_bounds = depth_stencil_alpha->depth.bounds_min; dsa->max_depth_bounds = depth_stencil_alpha->depth.bounds_max; } #endif if (depth_stencil_alpha->stencil[0].enabled) { - dsa->desc.StencilEnable = TRUE; + dsa->desc.StencilEnable = true; dsa->desc.FrontFace = stencil_op_state(depth_stencil_alpha->stencil); } diff --git a/src/gallium/drivers/d3d12/d3d12_draw.cpp b/src/gallium/drivers/d3d12/d3d12_draw.cpp index 923d7c82920..fb9e0aec245 100644 --- a/src/gallium/drivers/d3d12/d3d12_draw.cpp +++ b/src/gallium/drivers/d3d12/d3d12_draw.cpp @@ -1161,7 +1161,7 @@ d3d12_draw_vbo(struct pipe_context *pctx, d3d12_batch_reference_surface_texture(batch, surface); depth_desc = &tmp_desc; } - ctx->cmdlist->OMSetRenderTargets(ctx->fb.nr_cbufs, render_targets, FALSE, depth_desc); + ctx->cmdlist->OMSetRenderTargets(ctx->fb.nr_cbufs, render_targets, false, depth_desc); } struct pipe_stream_output_target **so_targets = ctx->fake_so_buffer_factor ? ctx->fake_so_targets diff --git a/src/gallium/drivers/d3d12/d3d12_fence.h b/src/gallium/drivers/d3d12/d3d12_fence.h index f5f1e024c00..242afb98852 100644 --- a/src/gallium/drivers/d3d12/d3d12_fence.h +++ b/src/gallium/drivers/d3d12/d3d12_fence.h @@ -44,7 +44,7 @@ inline HANDLE d3d12_fence_create_event(int *fd) { *fd = -1; - return CreateEvent(NULL, FALSE, FALSE, NULL); + return CreateEvent(NULL, false, false, NULL); } inline bool diff --git a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp index ea7ad5a5b7c..587083d4fcb 100644 --- a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp +++ b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp @@ -285,7 +285,7 @@ create_gfx_pipeline_state(struct d3d12_context *ctx) D3D12_BLEND_DESC& blend_state = (D3D12_BLEND_DESC&)pso_desc.BlendState; blend_state = state->blend->desc; if (state->has_float_rtv) - blend_state.RenderTarget[0].LogicOpEnable = FALSE; + blend_state.RenderTarget[0].LogicOpEnable = false; (d3d12_depth_stencil_desc_type&)pso_desc.DepthStencilState = state->zsa->desc; pso_desc.SampleMask = state->sample_mask; diff --git a/src/gallium/drivers/d3d12/d3d12_video_dec.cpp b/src/gallium/drivers/d3d12/d3d12_video_dec.cpp index 786c65e16be..3438770e707 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_dec.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_dec.cpp @@ -539,7 +539,7 @@ d3d12_video_decoder_end_frame(struct pipe_video_codec *codec, bool fReferenceOnly = (pD3D12Dec->m_ConfigDecoderSpecificFlags & d3d12_video_decode_config_specific_flag_reference_only_textures_required) != 0; if (fReferenceOnly) { - d3d12OutputArguments.ConversionArguments.Enable = TRUE; + d3d12OutputArguments.ConversionArguments.Enable = true; assert(pRefOnlyOutputD3D12Texture); d3d12OutputArguments.ConversionArguments.pReferenceTexture2D = pRefOnlyOutputD3D12Texture; @@ -565,7 +565,7 @@ d3d12_video_decoder_end_frame(struct pipe_video_codec *codec, d3d12OutputArguments.ConversionArguments.OutputWidth = HeapDesc.DecodeWidth; d3d12OutputArguments.ConversionArguments.OutputHeight = HeapDesc.DecodeHeight; } else { - d3d12OutputArguments.ConversionArguments.Enable = FALSE; + d3d12OutputArguments.ConversionArguments.Enable = false; } CD3DX12_RESOURCE_DESC outputDesc(GetDesc(d3d12OutputArguments.pOutputTexture2D)); diff --git a/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_h264.cpp b/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_h264.cpp index 95dab62bb5f..316401d526f 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_h264.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_h264.cpp @@ -173,10 +173,10 @@ void d3d12_video_nalu_writer_h264::write_nalu_end(d3d12_video_encoder_bitstream *pNALU) { pNALU->flush(); - pNALU->set_start_code_prevention(FALSE); + pNALU->set_start_code_prevention(false); int32_t iNALUnitLen = pNALU->get_byte_count(); - if (FALSE == pNALU->m_bBufferOverflow && 0x00 == pNALU->get_bitstream_buffer()[iNALUnitLen - 1]) { + if (false == pNALU->m_bBufferOverflow && 0x00 == pNALU->get_bitstream_buffer()[iNALUnitLen - 1]) { pNALU->put_bits(8, 0x03); pNALU->flush(); } @@ -193,7 +193,7 @@ d3d12_video_nalu_writer_h264::wrap_rbsp_into_nalu(d3d12_video_encoder_bitstream int32_t iBytesWritten = pNALU->get_byte_count(); - pNALU->set_start_code_prevention(FALSE); + pNALU->set_start_code_prevention(false); // NAL start code pNALU->put_bits(24, 0); @@ -213,7 +213,7 @@ d3d12_video_nalu_writer_h264::wrap_rbsp_into_nalu(d3d12_video_encoder_bitstream pNALU->append_byte_stream(pRBSP); } else { // Copy with start code prevention. - pNALU->set_start_code_prevention(TRUE); + pNALU->set_start_code_prevention(true); int32_t iLength = pRBSP->get_byte_count(); uint8_t *pBuffer = pRBSP->get_bitstream_buffer(); @@ -251,7 +251,7 @@ d3d12_video_nalu_writer_h264::sps_to_nalu_bytes(H264_SPS * p assert(false); } - rbsp.set_start_code_prevention(TRUE); + rbsp.set_start_code_prevention(true); if (write_sps_bytes(&rbsp, pSPS) <= 0u) { debug_printf("write_sps_bytes(&rbsp, pSPS) didn't write any bytes.\n"); assert(false); @@ -296,7 +296,7 @@ d3d12_video_nalu_writer_h264::pps_to_nalu_bytes(H264_PPS * p assert(false); } - rbsp.set_start_code_prevention(TRUE); + rbsp.set_start_code_prevention(true); if (write_pps_bytes(&rbsp, pPPS, bIsHighProfile) <= 0u) { debug_printf("write_pps_bytes(&rbsp, pPPS, bIsHighProfile) didn't write any bytes.\n"); @@ -338,7 +338,7 @@ d3d12_video_nalu_writer_h264::write_end_of_stream_nalu(std::vector & assert(false); } - rbsp.set_start_code_prevention(TRUE); + rbsp.set_start_code_prevention(true); if (wrap_rbsp_into_nalu(&nalu, &rbsp, NAL_REFIDC_REF, NAL_TYPE_END_OF_STREAM) <= 0u) { debug_printf( "wrap_rbsp_into_nalu(&nalu, &rbsp, NAL_REFIDC_REF, NAL_TYPE_END_OF_STREAM) didn't write any bytes.\n");; @@ -376,7 +376,7 @@ d3d12_video_nalu_writer_h264::write_end_of_sequence_nalu(std::vector & assert(false); } - rbsp.set_start_code_prevention(TRUE); + rbsp.set_start_code_prevention(true); if (wrap_rbsp_into_nalu(&nalu, &rbsp, NAL_REFIDC_REF, NAL_TYPE_END_OF_SEQUENCE) <= 0u) { debug_printf( diff --git a/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_hevc.cpp b/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_hevc.cpp index 98a8a34a8ef..f50b7600f5c 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_hevc.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_encoder_nalu_writer_hevc.cpp @@ -112,7 +112,7 @@ d3d12_video_nalu_writer_hevc::generic_write_bytes( std::vector &headerBits assert(false); } - rbsp.set_start_code_prevention(TRUE); + rbsp.set_start_code_prevention(true); if (write_bytes_from_struct(&rbsp, pStructure, nal_header->nal_unit_type) <= 0u) { debug_printf("write_bytes_from_struct(&rbsp, pStructure, nal_header->nal_unit_type) didn't write any bytes.\n"); assert(false); @@ -391,7 +391,7 @@ d3d12_video_nalu_writer_hevc::wrap_rbsp_into_nalu(d3d12_video_encoder_bitstream int32_t iBytesWritten = pNALU->get_byte_count(); - pNALU->set_start_code_prevention(FALSE); + pNALU->set_start_code_prevention(false); // NAL start code pNALU->put_bits(24, 0); @@ -412,7 +412,7 @@ d3d12_video_nalu_writer_hevc::wrap_rbsp_into_nalu(d3d12_video_encoder_bitstream pNALU->append_byte_stream(pRBSP); } else { // Copy with start code prevention. - pNALU->set_start_code_prevention(TRUE); + pNALU->set_start_code_prevention(true); int32_t iLength = pRBSP->get_byte_count(); uint8_t *pBuffer = pRBSP->get_bitstream_buffer(); @@ -435,10 +435,10 @@ void d3d12_video_nalu_writer_hevc::write_nalu_end(d3d12_video_encoder_bitstream *pNALU) { pNALU->flush(); - pNALU->set_start_code_prevention(FALSE); + pNALU->set_start_code_prevention(false); int32_t iNALUnitLen = pNALU->get_byte_count(); - if (FALSE == pNALU->m_bBufferOverflow && 0x00 == pNALU->get_bitstream_buffer()[iNALUnitLen - 1]) { + if (false == pNALU->m_bBufferOverflow && 0x00 == pNALU->get_bitstream_buffer()[iNALUnitLen - 1]) { pNALU->put_bits(8, 0x03); pNALU->flush(); } diff --git a/src/gallium/drivers/d3d12/d3d12_video_proc.cpp b/src/gallium/drivers/d3d12/d3d12_video_proc.cpp index c714258ccc6..3aba46dec18 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_proc.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_proc.cpp @@ -550,7 +550,7 @@ d3d12_video_processor_check_caps_and_create_processor(struct d3d12_video_process {}, // LumaKey 0, // NumPastFrames 0, // NumFutureFrames - FALSE // EnableAutoProcessing + false // EnableAutoProcessing }; D3D12_VIDEO_PROCESS_OUTPUT_STREAM_DESC outputStreamDesc = @@ -561,7 +561,7 @@ d3d12_video_processor_check_caps_and_create_processor(struct d3d12_video_process 0u, // AlphaFillModeSourceStreamIndex {0, 0, 0, 0}, // BackgroundColor FrameRate, // FrameRate - FALSE // EnableStereo + false // EnableStereo }; // gets the required past/future frames for VP creation diff --git a/src/gallium/drivers/i915/i915_prim_vbuf.c b/src/gallium/drivers/i915/i915_prim_vbuf.c index c4981951d0d..73ad83cdc46 100644 --- a/src/gallium/drivers/i915/i915_prim_vbuf.c +++ b/src/gallium/drivers/i915/i915_prim_vbuf.c @@ -234,8 +234,8 @@ i915_vbuf_render_allocate_vertices(struct vbuf_render *render, i915_vbuf_update_vbo_state(render); if (!i915_render->vbo) - return FALSE; - return TRUE; + return false; + return true; } static void * diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend.c b/src/gallium/drivers/llvmpipe/lp_bld_blend.c index 11009f63f13..3481721a571 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend.c @@ -49,13 +49,13 @@ lp_build_blend_func_commutative(enum pipe_blend_func func) case PIPE_BLEND_ADD: case PIPE_BLEND_MIN: case PIPE_BLEND_MAX: - return TRUE; + return true; case PIPE_BLEND_SUBTRACT: case PIPE_BLEND_REVERSE_SUBTRACT: - return FALSE; + return false; default: assert(0); - return TRUE; + return true; } } @@ -68,12 +68,12 @@ lp_build_blend_func_reverse(enum pipe_blend_func rgb_func, enum pipe_blend_func alpha_func) { if (rgb_func == alpha_func) - return FALSE; + return false; if (rgb_func == PIPE_BLEND_SUBTRACT && alpha_func == PIPE_BLEND_REVERSE_SUBTRACT) - return TRUE; + return true; if (rgb_func == PIPE_BLEND_REVERSE_SUBTRACT && alpha_func == PIPE_BLEND_SUBTRACT) - return TRUE; - return FALSE; + return true; + return false; } @@ -296,9 +296,9 @@ lp_build_blend(struct lp_build_context *bld, } lp_build_mul_norm_expand(bld, src, src_factor, &src_terml, &src_termh, - is_inverse_factor(factor_src) ? TRUE : FALSE); + is_inverse_factor(factor_src) ? true : false); lp_build_mul_norm_expand(bld, dst, dst_factor, &dst_terml, &dst_termh, - is_inverse_factor(factor_dst) ? TRUE : FALSE); + is_inverse_factor(factor_dst) ? true : false); resl = lp_build_blend_func(&bldw, func, src_terml, dst_terml); resh = lp_build_blend_func(&bldw, func, src_termh, dst_termh); diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c index 57c251c5d22..e16bbd7d967 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c @@ -271,14 +271,14 @@ lp_build_blend_factor(struct lp_build_blend_aos_context *bld, enum lp_build_blend_swizzle rgb_swizzle; if (alpha_swizzle == PIPE_SWIZZLE_X && num_channels == 1) { - return lp_build_blend_factor_unswizzled(bld, alpha_factor, TRUE); + return lp_build_blend_factor_unswizzled(bld, alpha_factor, true); } - rgb_factor_ = lp_build_blend_factor_unswizzled(bld, rgb_factor, FALSE); + rgb_factor_ = lp_build_blend_factor_unswizzled(bld, rgb_factor, false); if (alpha_swizzle != PIPE_SWIZZLE_NONE) { rgb_swizzle = lp_build_blend_factor_swizzle(rgb_factor); - alpha_factor_ = lp_build_blend_factor_unswizzled(bld, alpha_factor, TRUE); + alpha_factor_ = lp_build_blend_factor_unswizzled(bld, alpha_factor, true); return lp_build_blend_swizzle(bld, rgb_factor_, alpha_factor_, rgb_swizzle, alpha_swizzle, num_channels); } else { @@ -339,7 +339,7 @@ lp_build_blend_aos(struct gallivm_state *gallivm, bld.src_alpha = src_alpha; bld.src1_alpha = src1_alpha; bld.const_alpha = const_alpha; - bld.has_dst_alpha = FALSE; + bld.has_dst_alpha = false; /* Find the alpha channel if not provided separately */ unsigned alpha_swizzle = PIPE_SWIZZLE_NONE; diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/src/gallium/drivers/llvmpipe/lp_bld_depth.c index d1f8c73a8d1..a437a71d234 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_depth.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.c @@ -315,7 +315,7 @@ lp_depth_type(const struct util_format_description *format_desc, z_swizzle = format_desc->swizzle[0]; if (z_swizzle < 4) { if (format_desc->channel[z_swizzle].type == UTIL_FORMAT_TYPE_FLOAT) { - type.floating = TRUE; + type.floating = true; assert(z_swizzle == 0); assert(format_desc->channel[z_swizzle].size == 32); } @@ -326,7 +326,7 @@ lp_depth_type(const struct util_format_description *format_desc, /* Prefer signed integers when possible, as SSE has less support * for unsigned comparison; */ - type.sign = TRUE; + type.sign = true; } } else @@ -364,7 +364,7 @@ get_z_shift_and_mask(const struct util_format_description *format_desc, z_swizzle = format_desc->swizzle[0]; if (z_swizzle == PIPE_SWIZZLE_NONE) - return FALSE; + return false; *width = format_desc->channel[z_swizzle].size; /* & 31 is for the same reason as the 32-bit limit above */ @@ -376,7 +376,7 @@ get_z_shift_and_mask(const struct util_format_description *format_desc, *mask = ((1 << *width) - 1) << *shift; } - return TRUE; + return true; } @@ -392,7 +392,7 @@ get_s_shift_and_mask(const struct util_format_description *format_desc, const unsigned s_swizzle = format_desc->swizzle[1]; if (s_swizzle == PIPE_SWIZZLE_NONE) - return FALSE; + return false; /* just special case 64bit d/s format */ if (format_desc->block.bits > 32) { @@ -400,14 +400,14 @@ get_s_shift_and_mask(const struct util_format_description *format_desc, assert(format_desc->format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT); *shift = 0; *mask = 0xff; - return TRUE; + return true; } *shift = format_desc->channel[s_swizzle].shift; const unsigned sz = format_desc->channel[s_swizzle].size; *mask = (1U << sz) - 1U; - return TRUE; + return true; } @@ -854,8 +854,8 @@ lp_build_depth_stencil_test(struct gallivm_state *gallivm, */ if (z_src_type.floating) { if (restrict_depth) { - z_src_type.sign = FALSE; - z_src_type.norm = TRUE; + z_src_type.sign = false; + z_src_type.norm = true; } } else { assert(!z_src_type.sign); diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.c b/src/gallium/drivers/llvmpipe/lp_bld_interp.c index 0728b6629cf..5fd04a11cb1 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_interp.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.c @@ -739,14 +739,14 @@ lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld, memset(bld, 0, sizeof *bld); memset(&coeff_type, 0, sizeof coeff_type); - coeff_type.floating = TRUE; - coeff_type.sign = TRUE; + coeff_type.floating = true; + coeff_type.sign = true; coeff_type.width = 32; coeff_type.length = type.length; memset(&setup_type, 0, sizeof setup_type); - setup_type.floating = TRUE; - setup_type.sign = TRUE; + setup_type.floating = true; + setup_type.sign = true; setup_type.width = 32; setup_type.length = TGSI_NUM_CHANNELS; diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index 3c199c7d08c..be3162abc77 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -321,13 +321,13 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv, /* convert points and lines into triangles: * (otherwise, draw points and lines natively) */ - draw_wide_point_sprites(llvmpipe->draw, FALSE); - draw_enable_point_sprites(llvmpipe->draw, FALSE); + draw_wide_point_sprites(llvmpipe->draw, false); + draw_enable_point_sprites(llvmpipe->draw, false); draw_wide_point_threshold(llvmpipe->draw, 10000.0); draw_wide_line_threshold(llvmpipe->draw, 10000.0); /* initial state for clipping - enabled, with no guardband */ - draw_set_driver_clipping(llvmpipe->draw, FALSE, FALSE, FALSE, TRUE); + draw_set_driver_clipping(llvmpipe->draw, false, false, false, true); lp_reset_counters(); diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c index 97532edaf48..1b9bc06c6d8 100644 --- a/src/gallium/drivers/llvmpipe/lp_flush.c +++ b/src/gallium/drivers/llvmpipe/lp_flush.c @@ -134,7 +134,7 @@ llvmpipe_flush_resource(struct pipe_context *pipe, if (cpu_access) if (do_not_block) - return FALSE; + return false; /* * Flush and wait. @@ -143,5 +143,5 @@ llvmpipe_flush_resource(struct pipe_context *pipe, llvmpipe_finish(pipe, reason); } - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_linear.c b/src/gallium/drivers/llvmpipe/lp_linear.c index d450ce78315..e255b513cf7 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear.c +++ b/src/gallium/drivers/llvmpipe/lp_linear.c @@ -64,7 +64,7 @@ linear_fallback(const struct lp_rast_state *state, } } - return TRUE; + return true; } @@ -200,7 +200,7 @@ lp_fs_linear_run(const struct lp_rast_state *state, jit.color0 += stride; } - return TRUE; + return true; fail: /* Visually distinguish this from other fallbacks: @@ -209,7 +209,7 @@ fail: return linear_fallback(state, x, y, width, height, color, stride); } - return FALSE; + return false; } diff --git a/src/gallium/drivers/llvmpipe/lp_linear_fastpath.c b/src/gallium/drivers/llvmpipe/lp_linear_fastpath.c index c584086f0ea..3b2b9e1d6ca 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear_fastpath.c +++ b/src/gallium/drivers/llvmpipe/lp_linear_fastpath.c @@ -76,7 +76,7 @@ lp_linear_blit_rgba_blit(const struct lp_rast_state *state, if (a0[0][3] != 1.0 || dadx[0][3] != 0.0 || dady[0][3] != 0.0) - return FALSE; + return false; const int src_x = x + util_iround(a0[1][0]*texture->width - 0.5f); const int src_y = y + util_iround(a0[1][1]*texture->height - 0.5f); @@ -90,7 +90,7 @@ lp_linear_blit_rgba_blit(const struct lp_rast_state *state, src_y < 0 || src_x + width > texture->width || src_y + height > texture->height) - return FALSE; + return false; util_copy_rect(color, PIPE_FORMAT_B8G8R8A8_UNORM, stride, x, y, @@ -98,7 +98,7 @@ lp_linear_blit_rgba_blit(const struct lp_rast_state *state, src, src_stride, src_x, src_y); - return TRUE; + return true; } @@ -125,7 +125,7 @@ lp_linear_blit_rgb1_blit(const struct lp_rast_state *state, if (a0[0][3] != 1.0 || dadx[0][3] != 0.0 || dady[0][3] != 0.0) - return FALSE; + return false; color += x * 4 + y * stride; @@ -141,7 +141,7 @@ lp_linear_blit_rgb1_blit(const struct lp_rast_state *state, src_y < 0 || src_x + width > texture->width || src_y + height > texture->height) - return FALSE; + return false; for (y = 0; y < height; y++) { const uint32_t *src_row = (const uint32_t *)src; @@ -155,7 +155,7 @@ lp_linear_blit_rgb1_blit(const struct lp_rast_state *state, src += src_stride; } - return TRUE; + return true; } @@ -185,7 +185,7 @@ lp_linear_purple(const struct lp_rast_state *state, height, &uc); - return TRUE; + return true; } @@ -233,7 +233,7 @@ lp_linear_check_fastpath(struct lp_fragment_shader_variant *variant) bool lp_linear_check_fastpath(struct lp_fragment_shader_variant *variant) { - return FALSE; + return false; } #endif diff --git a/src/gallium/drivers/llvmpipe/lp_linear_interp.c b/src/gallium/drivers/llvmpipe/lp_linear_interp.c index 4ff6c837f40..3aaea61ddab 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear_interp.c +++ b/src/gallium/drivers/llvmpipe/lp_linear_interp.c @@ -225,7 +225,7 @@ lp_linear_init_interp(struct lp_linear_interp *interp, interp->base.fetch = interp_0_8; } - return TRUE; + return true; } #else //DETECT_ARCH_SSE @@ -240,7 +240,7 @@ lp_linear_init_interp(struct lp_linear_interp *interp, const float *dadx, const float *dady) { - return FALSE; + return false; } #endif //DETECT_ARCH_SSE diff --git a/src/gallium/drivers/llvmpipe/lp_linear_priv.h b/src/gallium/drivers/llvmpipe/lp_linear_priv.h index 5680974c767..dd18e263bae 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_linear_priv.h @@ -165,7 +165,7 @@ lp_linear_init_noop_sampler(struct lp_linear_sampler *samp); #define FAIL(s) do { \ if (LP_DEBUG & DEBUG_LINEAR) \ debug_printf("%s: %s\n", __func__, s); \ - return FALSE; \ + return false; \ } while (0) #endif diff --git a/src/gallium/drivers/llvmpipe/lp_linear_sampler.c b/src/gallium/drivers/llvmpipe/lp_linear_sampler.c index c417ffa0f7c..baed9fcff6f 100644 --- a/src/gallium/drivers/llvmpipe/lp_linear_sampler.c +++ b/src/gallium/drivers/llvmpipe/lp_linear_sampler.c @@ -671,7 +671,7 @@ sampler_is_nearest(const struct lp_linear_sampler *samp, /* Is it obviously nearest? */ if (img_filter == PIPE_TEX_FILTER_NEAREST) - return TRUE; + return true; /* Otherwise look for linear samplers which devolve to nearest. */ @@ -679,20 +679,20 @@ sampler_is_nearest(const struct lp_linear_sampler *samp, /* Needs to be axis aligned. */ if (!samp->axis_aligned) - return FALSE; + return false; if (0) { /* For maximizing shaders, revert to nearest */ if (samp->dsdx < -FIXED16_HALF && samp->dsdx < FIXED16_HALF && samp->dtdy < -FIXED16_HALF && samp->dtdy < FIXED16_HALF) - return TRUE; + return true; /* For severely minimising shaders, revert to nearest: */ if ((samp->dsdx < 2 * FIXED16_ONE || samp->dsdx > 2 * FIXED16_ONE) && (samp->dtdy < 2 * FIXED16_ONE || samp->dtdy > 2 * FIXED16_ONE)) - return TRUE; + return true; } /* @@ -700,18 +700,18 @@ sampler_is_nearest(const struct lp_linear_sampler *samp, */ if (!fixed16_approx(fixed16_frac(samp->s), FIXED16_HALF, FIXED16_TOL) || !fixed16_approx(fixed16_frac(samp->t), FIXED16_HALF, FIXED16_TOL)) - return FALSE; + return false; /* * Must make a full step between pixels: */ if (!fixed16_approx(samp->dsdx, FIXED16_ONE, FIXED16_TOL_DERIV) || !fixed16_approx(samp->dtdy, FIXED16_ONE, FIXED16_TOL_DERIV)) - return FALSE; + return false; /* Treat it as nearest! */ - return TRUE; + return true; } @@ -868,7 +868,7 @@ lp_linear_init_sampler(struct lp_linear_sampler *samp, if (need_wrap && (sampler_state->sampler_state.wrap_s != PIPE_TEX_WRAP_CLAMP_TO_EDGE || sampler_state->sampler_state.wrap_t != PIPE_TEX_WRAP_CLAMP_TO_EDGE)) { - return FALSE; + return false; } if (is_nearest) { @@ -882,7 +882,7 @@ lp_linear_init_sampler(struct lp_linear_sampler *samp, samp->base.fetch = fetch_bgra_axis_aligned; else samp->base.fetch = fetch_bgra_memcpy; - return TRUE; + return true; case PIPE_FORMAT_B8G8R8X8_UNORM: if (need_wrap) samp->base.fetch = fetch_bgrx_clamp; @@ -892,7 +892,7 @@ lp_linear_init_sampler(struct lp_linear_sampler *samp, samp->base.fetch = fetch_bgrx_axis_aligned; else samp->base.fetch = fetch_bgrx_memcpy; - return TRUE; + return true; default: break; } @@ -911,7 +911,7 @@ lp_linear_init_sampler(struct lp_linear_sampler *samp, samp->base.fetch = fetch_bgra_linear; else samp->base.fetch = fetch_bgra_axis_aligned_linear; - return TRUE; + return true; case PIPE_FORMAT_B8G8R8X8_UNORM: if (need_wrap) samp->base.fetch = fetch_bgrx_clamp_linear; @@ -919,7 +919,7 @@ lp_linear_init_sampler(struct lp_linear_sampler *samp, samp->base.fetch = fetch_bgrx_linear; else samp->base.fetch = fetch_bgrx_axis_aligned_linear; - return TRUE; + return true; default: break; } @@ -952,14 +952,14 @@ lp_linear_check_sampler(const struct lp_sampler_static_state *sampler, const struct lp_tgsi_texture_info *tex) { if (tex->modifier != LP_BLD_TEX_MODIFIER_NONE) - return FALSE; + return false; if (tex->target != TGSI_TEXTURE_2D) - return FALSE; + return false; if (tex->coord[0].file != TGSI_FILE_INPUT || tex->coord[1].file != TGSI_FILE_INPUT) - return FALSE; + return false; /* These are the only sampling modes we support at the moment. * @@ -969,23 +969,23 @@ lp_linear_check_sampler(const struct lp_sampler_static_state *sampler, */ if (!is_nearest_sampler(sampler) && !is_linear_sampler(sampler)) - return FALSE; + return false; /* These are the only texture formats we support at the moment */ if (sampler->texture_state.format != PIPE_FORMAT_B8G8R8A8_UNORM && sampler->texture_state.format != PIPE_FORMAT_B8G8R8X8_UNORM) - return FALSE; + return false; /* We don't support sampler view swizzling on the linear path */ if (sampler->texture_state.swizzle_r != PIPE_SWIZZLE_X || sampler->texture_state.swizzle_g != PIPE_SWIZZLE_Y || sampler->texture_state.swizzle_b != PIPE_SWIZZLE_Z || sampler->texture_state.swizzle_a != PIPE_SWIZZLE_W) { - return FALSE; + return false; } - return TRUE; + return true; } #else // DETECT_ARCH_SSE @@ -994,7 +994,7 @@ bool lp_linear_check_sampler(const struct lp_sampler_static_state *sampler, const struct lp_tgsi_texture_info *tex) { - return FALSE; + return false; } #endif // DETECT_ARCH_SSE diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c index c787a7319e2..d63c6aae0a3 100644 --- a/src/gallium/drivers/llvmpipe/lp_query.c +++ b/src/gallium/drivers/llvmpipe/lp_query.c @@ -552,7 +552,7 @@ llvmpipe_check_render_cond(struct llvmpipe_context *lp) return (!data) == lp->render_cond_cond; } if (!lp->render_cond_query) - return TRUE; /* no query predicate, draw normally */ + return true; /* no query predicate, draw normally */ bool wait = (lp->render_cond_mode == PIPE_RENDER_COND_WAIT || lp->render_cond_mode == PIPE_RENDER_COND_BY_REGION_WAIT); @@ -563,7 +563,7 @@ llvmpipe_check_render_cond(struct llvmpipe_context *lp) if (b) return ((!result) == lp->render_cond_cond); else - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 20fcf45d86c..7b909c52f0c 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -1101,7 +1101,7 @@ lp_rast_queue_scene(struct lp_rasterizer *rast, lp_fence_reference(&rast->last_fence, scene->fence); if (rast->last_fence) - rast->last_fence->issued = TRUE; + rast->last_fence->issued = true; if (rast->num_threads == 0) { /* no threading */ @@ -1187,7 +1187,7 @@ thread_function(void *init_data) * - get next scene to rasterize * - map the framebuffer surfaces */ - lp_rast_begin(rast, lp_scene_dequeue(rast->full_scenes, TRUE)); + lp_rast_begin(rast, lp_scene_dequeue(rast->full_scenes, true)); } /* Wait for all threads to get here so that threads[1+] don't @@ -1275,7 +1275,7 @@ lp_rast_create(unsigned num_threads) rast->num_threads = num_threads; - rast->no_rast = debug_get_bool_option("LP_NO_RAST", FALSE); + rast->no_rast = debug_get_bool_option("LP_NO_RAST", false); create_rast_threads(rast); @@ -1312,7 +1312,7 @@ lp_rast_destroy(struct lp_rasterizer *rast) * Each thread will be woken up, notice that the exit_flag is set and * break out of its main loop. The thread will then exit. */ - rast->exit_flag = TRUE; + rast->exit_flag = true; for (unsigned i = 0; i < rast->num_threads; i++) { util_semaphore_signal(&rast->tasks[i].work_ready); } diff --git a/src/gallium/drivers/llvmpipe/lp_rast_debug.c b/src/gallium/drivers/llvmpipe/lp_rast_debug.c index 5ec13caf3d3..5d1702e945a 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_debug.c +++ b/src/gallium/drivers/llvmpipe/lp_rast_debug.c @@ -118,7 +118,7 @@ is_blend(const struct lp_rast_state *state, if (variant) return variant->key.blend.rt[0].blend_enable; - return FALSE; + return false; } @@ -137,7 +137,7 @@ is_linear(const struct lp_rast_state *state, if (block->cmd[k] == LP_RAST_OP_RECTANGLE) return state->variant->jit_linear != NULL; - return FALSE; + return false; } @@ -258,7 +258,7 @@ debug_blit_tile(int x, int y, for (unsigned i = 0; i < TILE_SIZE; i++) for (unsigned j = 0; j < TILE_SIZE; j++) - plot(tile, i, j, val, FALSE); + plot(tile, i, j, val, false); return TILE_SIZE * TILE_SIZE; } @@ -295,7 +295,7 @@ debug_clear_tile(int x, int y, { for (unsigned i = 0; i < TILE_SIZE; i++) for (unsigned j = 0; j < TILE_SIZE; j++) - plot(tile, i, j, val, FALSE); + plot(tile, i, j, val, false); return TILE_SIZE * TILE_SIZE; } @@ -430,7 +430,7 @@ lp_debug_bin(const struct cmd_bin *bin, int i, int j) struct tile tile; if (bin->head) { - do_debug_bin(&tile, bin, i, j, TRUE); + do_debug_bin(&tile, bin, i, j, true); debug_printf("------------------------------------------------------------------\n"); for (int y = 0; y < TILE_SIZE; y++) { @@ -482,7 +482,7 @@ lp_debug_draw_bins_by_coverage(struct lp_scene *scene) struct tile tile; //lp_debug_bin(bin, x, y); - do_debug_bin(&tile, bin, x, y, FALSE); + do_debug_bin(&tile, bin, x, y, false); total += tile.coverage; possible += 64*64; diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c index 19220f1d383..96e5b7535bc 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.c +++ b/src/gallium/drivers/llvmpipe/lp_scene.c @@ -119,11 +119,11 @@ lp_scene_is_empty(struct lp_scene *scene) for (unsigned x = 0; x < scene->tiles_x; x++) { const struct cmd_bin *bin = lp_scene_get_bin(scene, x, y); if (bin->head) { - return FALSE; + return false; } } } - return TRUE; + return true; } @@ -321,7 +321,7 @@ lp_scene_end_rasterization(struct lp_scene *scene) scene->scene_size = 0; scene->resource_reference_size = 0; - scene->alloc_failed = FALSE; + scene->alloc_failed = false; util_unreference_framebuffer_state(&scene->fb); } @@ -353,7 +353,7 @@ lp_scene_new_data_block(struct lp_scene *scene) { if (scene->scene_size + DATA_BLOCK_SIZE > LP_SCENE_MAX_SIZE) { if (0) debug_printf("%s: failed\n", __func__); - scene->alloc_failed = TRUE; + scene->alloc_failed = true; return NULL; } else { struct data_block *block = MALLOC_STRUCT(data_block); @@ -411,7 +411,7 @@ lp_scene_add_resource_reference(struct lp_scene *scene, */ for (i = 0; i < ref->count; i++) if (ref->resource[i] == resource) - return TRUE; + return true; if (ref->count < RESOURCE_REF_SZ) { /* If the block is half-empty, then append the reference here. @@ -426,7 +426,7 @@ lp_scene_add_resource_reference(struct lp_scene *scene, assert(*last == NULL); *last = lp_scene_alloc(scene, sizeof *ref); if (*last == NULL) - return FALSE; + return false; ref = *last; memset(ref, 0, sizeof *ref); @@ -450,9 +450,9 @@ lp_scene_add_resource_reference(struct lp_scene *scene, */ if (!initializing_scene && scene->resource_reference_size >= LP_SCENE_MAX_RESOURCE_SIZE) - return FALSE; + return false; - return TRUE; + return true; } @@ -475,7 +475,7 @@ lp_scene_add_frag_shader_reference(struct lp_scene *scene, */ for (int i = 0; i < ref->count; i++) if (ref->variant[i] == variant) - return TRUE; + return true; if (ref->count < SHADER_REF_SZ) { /* If the block is half-empty, then append the reference here. @@ -490,7 +490,7 @@ lp_scene_add_frag_shader_reference(struct lp_scene *scene, assert(*last == NULL); *last = lp_scene_alloc(scene, sizeof *ref); if (*last == NULL) - return FALSE; + return false; ref = *last; memset(ref, 0, sizeof *ref); @@ -501,7 +501,7 @@ lp_scene_add_frag_shader_reference(struct lp_scene *scene, lp_fs_variant_reference(llvmpipe_context(scene->pipe), &ref->variant[ref->count++], variant); - return TRUE; + return true; } @@ -542,9 +542,9 @@ next_bin(struct lp_scene *scene) } if (scene->curr_y >= scene->tiles_y) { /* no more bins */ - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h index ccbf0dffb3d..7bf6be11a50 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.h +++ b/src/gallium/drivers/llvmpipe/lp_scene.h @@ -330,7 +330,7 @@ lp_scene_bin_command(struct lp_scene *scene, if (tail == NULL || tail->count == CMD_BLOCK_MAX) { tail = lp_scene_new_cmd_block(scene, bin); if (!tail) { - return FALSE; + return false; } assert(tail->count == 0); } @@ -342,7 +342,7 @@ lp_scene_bin_command(struct lp_scene *scene, tail->count++; } - return TRUE; + return true; } @@ -360,13 +360,13 @@ lp_scene_bin_cmd_with_state(struct lp_scene *scene, if (!lp_scene_bin_command(scene, x, y, LP_RAST_OP_SET_STATE, lp_rast_arg_state(state))) - return FALSE; + return false; } if (!lp_scene_bin_command(scene, x, y, cmd, arg)) - return FALSE; + return false; - return TRUE; + return true; } @@ -380,11 +380,11 @@ lp_scene_bin_everywhere(struct lp_scene *scene, for (unsigned i = 0; i < scene->tiles_x; i++) { for (unsigned j = 0; j < scene->tiles_y; j++) { if (!lp_scene_bin_command(scene, i, j, cmd, arg)) - return FALSE; + return false; } } - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 220cc651d9f..24b86e130d1 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -401,12 +401,12 @@ llvmpipe_get_shader_param(struct pipe_screen *screen, * support vertex shader texture lookups when LLVM is enabled in * the draw module. */ - if (debug_get_bool_option("DRAW_USE_LLVM", TRUE)) + if (debug_get_bool_option("DRAW_USE_LLVM", true)) return PIPE_MAX_SAMPLERS; else return 0; case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: - if (debug_get_bool_option("DRAW_USE_LLVM", TRUE)) + if (debug_get_bool_option("DRAW_USE_LLVM", true)) return PIPE_MAX_SHADER_SAMPLER_VIEWS; else return 0; diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index be926bd77f4..778caee6534 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -231,17 +231,17 @@ begin_binning(struct lp_setup_context *setup) */ scene->fence = lp_fence_create(MAX2(1, setup->num_threads)); if (!scene->fence) - return FALSE; + return false; if (!try_update_scene_state(setup)) { - return FALSE; + return false; } - bool 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)) { - need_zsload = TRUE; + need_zsload = true; } LP_DBG(DEBUG_SETUP, "%s color clear bufs: %x depth: %s\n", __func__, @@ -258,7 +258,7 @@ begin_binning(struct lp_setup_context *setup) lp_scene_alloc(scene, sizeof(struct lp_rast_clear_rb)); if (!cc_scene) { - return FALSE; + return false; } cc_scene->cbuf = cbuf; @@ -268,7 +268,7 @@ begin_binning(struct lp_setup_context *setup) if (!lp_scene_bin_everywhere(scene, LP_RAST_OP_CLEAR_COLOR, clearrb_arg)) { - return FALSE; + return false; } } } @@ -281,7 +281,7 @@ begin_binning(struct lp_setup_context *setup) lp_rast_arg_clearzs( setup->clear.zsvalue, setup->clear.zsmask))) { - return FALSE; + return false; } } } @@ -293,7 +293,7 @@ begin_binning(struct lp_setup_context *setup) scene->had_queries = !!setup->active_binned_queries; LP_DBG(DEBUG_SETUP, "%s done\n", __func__); - return TRUE; + return true; } @@ -326,7 +326,7 @@ set_scene_state(struct lp_setup_context *setup, const unsigned old_state = setup->state; if (old_state == new_state) - return TRUE; + return true; if (LP_DEBUG & DEBUG_SCENE) { debug_printf("%s old %s new %s%s%s\n", @@ -365,7 +365,7 @@ set_scene_state(struct lp_setup_context *setup, } setup->state = new_state; - return TRUE; + return true; fail: if (setup->scene) { @@ -375,7 +375,7 @@ fail: setup->state = SETUP_FLUSHED; lp_setup_reset(setup); - return FALSE; + return false; } @@ -445,7 +445,7 @@ lp_setup_try_clear_color_buffer(struct lp_setup_context *setup, lp_scene_alloc_aligned(scene, sizeof(struct lp_rast_clear_rb), 8); if (!cc_scene) { - return FALSE; + return false; } cc_scene->cbuf = cbuf; @@ -455,7 +455,7 @@ lp_setup_try_clear_color_buffer(struct lp_setup_context *setup, if (!lp_scene_bin_everywhere(scene, LP_RAST_OP_CLEAR_COLOR, clearrb_arg)) { - return FALSE; + return false; } } else { /* Put ourselves into the 'pre-clear' state, specifically to try @@ -470,7 +470,7 @@ lp_setup_try_clear_color_buffer(struct lp_setup_context *setup, setup->clear.color_val[cbuf] = uc; } - return TRUE; + return true; } @@ -514,7 +514,7 @@ lp_setup_try_clear_zs(struct lp_setup_context *setup, if (!lp_scene_bin_everywhere(scene, LP_RAST_OP_CLEAR_ZSTENCIL, lp_rast_arg_clearzs(zsvalue, zsmask))) - return FALSE; + return false; } else { /* Put ourselves into the 'pre-clear' state, specifically to try * and accumulate multiple clears to color and depth_stencil @@ -530,7 +530,7 @@ lp_setup_try_clear_zs(struct lp_setup_context *setup, (setup->clear.zsvalue & ~zsmask) | (zsvalue & zsmask); } - return TRUE; + return true; } @@ -809,7 +809,7 @@ lp_setup_set_linear_mode(struct lp_setup_context *setup, setup->permit_linear_rasterizer = (mode && util_get_cpu_caps()->has_sse2); #else - setup->permit_linear_rasterizer = FALSE; + setup->permit_linear_rasterizer = false; #endif } @@ -1014,7 +1014,7 @@ try_update_scene_state(struct lp_setup_context *setup) if (!stored) { assert(!new_scene); - return FALSE; + return false; } memcpy(stored, setup->viewports, sizeof setup->viewports); @@ -1033,7 +1033,7 @@ try_update_scene_state(struct lp_setup_context *setup) if (!stored) { assert(!new_scene); - return FALSE; + return false; } /* Store floating point colour (after ubyte colors (see below)) */ @@ -1093,7 +1093,7 @@ try_update_scene_state(struct lp_setup_context *setup) void *stored = lp_scene_alloc(scene, current_size); if (!stored) { assert(!new_scene); - return FALSE; + return false; } memcpy(stored, @@ -1139,7 +1139,7 @@ try_update_scene_state(struct lp_setup_context *setup) (struct lp_rast_state *) lp_scene_alloc(scene, sizeof *stored); if (!stored) { assert(!new_scene); - return FALSE; + return false; } memcpy(&stored->jit_context, @@ -1155,7 +1155,7 @@ try_update_scene_state(struct lp_setup_context *setup) if (!lp_scene_add_frag_shader_reference(scene, setup->fs.current.variant)) { - return FALSE; + return false; } setup->fs.stored = stored; @@ -1169,7 +1169,7 @@ try_update_scene_state(struct lp_setup_context *setup) setup->fs.current_tex[i], new_scene, false)) { assert(!new_scene); - return FALSE; + return false; } } } @@ -1180,7 +1180,7 @@ try_update_scene_state(struct lp_setup_context *setup) setup->ssbos[i].current.buffer, new_scene, setup->ssbo_write_mask & (1 << i))) { assert(!new_scene); - return FALSE; + return false; } } } @@ -1192,7 +1192,7 @@ try_update_scene_state(struct lp_setup_context *setup) new_scene, setup->images[i].current.shader_access & PIPE_IMAGE_ACCESS_WRITE)) { assert(!new_scene); - return FALSE; + return false; } } } @@ -1243,7 +1243,7 @@ try_update_scene_state(struct lp_setup_context *setup) setup->dirty = 0; assert(setup->fs.stored); - return TRUE; + return true; } @@ -1289,7 +1289,7 @@ lp_setup_update_state(struct lp_setup_context *setup, if (update_scene && setup->state != SETUP_ACTIVE) { if (!set_scene_state(setup, SETUP_ACTIVE, __func__)) - return FALSE; + return false; } /* Only call into update_scene_state() if we already have a @@ -1299,7 +1299,7 @@ lp_setup_update_state(struct lp_setup_context *setup, assert(setup->state == SETUP_ACTIVE); if (try_update_scene_state(setup)) - return TRUE; + return true; /* Update failed, try to restart the scene. * @@ -1307,18 +1307,18 @@ lp_setup_update_state(struct lp_setup_context *setup, * because of potential recursion. */ if (!set_scene_state(setup, SETUP_FLUSHED, __func__)) - return FALSE; + return false; if (!set_scene_state(setup, SETUP_ACTIVE, __func__)) - return FALSE; + return false; if (!setup->scene) - return FALSE; + return false; return try_update_scene_state(setup); } - return TRUE; + return true; } @@ -1476,7 +1476,7 @@ lp_setup_begin_query(struct lp_setup_context *setup, return; } } - setup->scene->had_queries |= TRUE; + setup->scene->had_queries |= true; } } @@ -1523,7 +1523,7 @@ lp_setup_end_query(struct lp_setup_context *setup, struct llvmpipe_query *pq) goto fail; } } - setup->scene->had_queries |= TRUE; + setup->scene->had_queries |= true; } } else { struct llvmpipe_screen *screen = llvmpipe_screen(setup->pipe->screen); @@ -1566,12 +1566,12 @@ lp_setup_flush_and_restart(struct lp_setup_context *setup) assert(setup->state == SETUP_ACTIVE); if (!set_scene_state(setup, SETUP_FLUSHED, __func__)) - return FALSE; + return false; - if (!lp_setup_update_state(setup, TRUE)) - return FALSE; + if (!lp_setup_update_state(setup, true)) + return false; - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_setup_analysis.c b/src/gallium/drivers/llvmpipe/lp_setup_analysis.c index 5b9832afe5e..0f2ed1ecc20 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_analysis.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_analysis.c @@ -136,7 +136,7 @@ rect(struct lp_setup_context *setup, assert(v0[0][0] == v1[0][0]); assert(v1[0][1] == v2[0][1]); - lp_rect_cw(setup, v0, v1, v2, TRUE); + lp_rect_cw(setup, v0, v1, v2, true); assert(culled == LP_COUNT_GET(nr_culled_rects)); } @@ -160,15 +160,15 @@ test_rect(const_float4_ptr v0, v1[0][1] != v2[0][1] || v2[0][0] != v3[0][0] || v3[0][1] != v0[0][1]) - return FALSE; + return false; if (v0[0][3] != 1.0 || v1[0][3] != 1.0 || v2[0][3] != 1.0 || v3[0][3] != 1.0) - return FALSE; + return false; - return TRUE; + return true; } @@ -249,15 +249,15 @@ check_elts24(struct lp_setup_context *setup, const void *vb, int stride) int i; if (stride != 32) - return FALSE; + return false; /* Check the shape is two rectangles: */ if (!test_rect(v12, v2, v1, v18)) - return FALSE; + return false; if (!test_rect(v6, v0, v3, v9)) - return FALSE; + return false; /* XXX: check one rect is inside the other? */ @@ -268,7 +268,7 @@ check_elts24(struct lp_setup_context *setup, const void *vb, int stride) if (memcmp(get_vert(vb, i, stride), get_vert(vb, elts[i], stride), 6 * sizeof(float)) != 0) - return FALSE; + return false; } /* Test that this is a stretch blit, meaning we should be able to @@ -280,7 +280,7 @@ check_elts24(struct lp_setup_context *setup, const void *vb, int stride) for (i = 0; i < ARRAY_SIZE(uniq); i++) { const_float4_ptr v = get_vert(vb, stride, i); if (!test_interps(v, as, bs, at, bt)) - return FALSE; + return false; } make_vert(v18, v9, vA); @@ -313,7 +313,7 @@ check_elts24(struct lp_setup_context *setup, const void *vb, int stride) (const_float4_ptr)vD, (const_float4_ptr)v0); - return TRUE; + return true; } bool @@ -368,9 +368,9 @@ lp_setup_analyse_triangles(struct lp_setup_context *setup, v0[0][1] == v3[0][1] && v0[0][1] == v5[0][1] && v1[0][1] == v2[0][1] && v1[0][1] == v4[0][1]) { - lp_rect_cw(setup, v0, v1, v2, TRUE); + lp_rect_cw(setup, v0, v1, v2, true); } - return TRUE; + return true; } /* When highlighting (?) windows, aero sends a window border @@ -391,8 +391,8 @@ lp_setup_analyse_triangles(struct lp_setup_context *setup, get_vert(vb, nr-3, stride)) && check_elts24(setup, vb, stride)) { - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c index def6a6039d4..de6b5638b5e 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_line.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c @@ -299,7 +299,7 @@ try_setup_line(struct lp_setup_context *setup, if (lp_setup_zero_sample_mask(setup)) { if (0) debug_printf("zero sample mask\n"); LP_COUNT(nr_culled_tris); - return TRUE; + return true; } const float (*pv)[4]; @@ -326,7 +326,7 @@ try_setup_line(struct lp_setup_context *setup, const float area = dx * dx + dy * dy; if (area == 0) { LP_COUNT(nr_culled_tris); - return TRUE; + return true; } struct lp_line_info info; @@ -599,7 +599,7 @@ try_setup_line(struct lp_setup_context *setup, if (!u_rect_test_intersection(&setup->draw_regions[viewport_index], &bbox)) { if (0) debug_printf("no intersection\n"); LP_COUNT(nr_culled_tris); - return TRUE; + return true; } int max_szorig = ((bbox.x1 - (bbox.x0 & ~3)) | @@ -627,7 +627,7 @@ try_setup_line(struct lp_setup_context *setup, key->num_inputs, nr_planes); if (!line) - return FALSE; + return false; #ifdef DEBUG line->v[0][0] = v1[0][0]; @@ -654,7 +654,7 @@ try_setup_line(struct lp_setup_context *setup, setup->face_slot > 0) { line->inputs.frontfacing = v1[setup->face_slot][0]; } else { - line->inputs.frontfacing = TRUE; + line->inputs.frontfacing = true; } /* Setup parameter interpolants: @@ -665,7 +665,7 @@ try_setup_line(struct lp_setup_context *setup, info.frontfacing = line->inputs.frontfacing; setup_line_coefficients(setup, &info); - line->inputs.disable = FALSE; + line->inputs.disable = false; line->inputs.layer = layer; line->inputs.viewport_index = viewport_index; line->inputs.view_index = setup->view_index; diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c index a755eccb6f5..9403368facb 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_point.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c @@ -452,13 +452,13 @@ try_setup_point(struct lp_setup_context *setup, if (lp_setup_zero_sample_mask(setup)) { if (0) debug_printf("zero sample mask\n"); LP_COUNT(nr_culled_tris); - return TRUE; + return true; } if (!u_rect_test_intersection(&setup->draw_regions[viewport_index], &bbox)) { if (0) debug_printf("no intersection\n"); LP_COUNT(nr_culled_tris); - return TRUE; + return true; } u_rect_find_intersection(&setup->draw_regions[viewport_index], &bbox); @@ -473,7 +473,7 @@ try_setup_point(struct lp_setup_context *setup, key->num_inputs, nr_planes); if (!point) - return FALSE; + return false; #ifdef DEBUG point->v[0][0] = v0[0][0]; @@ -486,7 +486,7 @@ try_setup_point(struct lp_setup_context *setup, setup->face_slot > 0) { point->inputs.frontfacing = v0[setup->face_slot][0]; } else { - point->inputs.frontfacing = TRUE; + point->inputs.frontfacing = true; } struct point_info info; @@ -504,8 +504,8 @@ try_setup_point(struct lp_setup_context *setup, */ setup_point_coefficients(setup, &info); - point->inputs.disable = FALSE; - point->inputs.is_blit = FALSE; + point->inputs.disable = false; + point->inputs.is_blit = false; point->inputs.layer = layer; point->inputs.viewport_index = viewport_index; point->inputs.view_index = setup->view_index; @@ -553,7 +553,7 @@ try_setup_point(struct lp_setup_context *setup, struct lp_rast_rectangle *point = lp_setup_alloc_rectangle(scene, key->num_inputs); if (!point) - return FALSE; + return false; #ifdef DEBUG point->v[0][0] = v0[0][0]; point->v[0][1] = v0[0][1]; @@ -570,7 +570,7 @@ try_setup_point(struct lp_setup_context *setup, setup->face_slot > 0) { point->inputs.frontfacing = v0[setup->face_slot][0]; } else { - point->inputs.frontfacing = TRUE; + point->inputs.frontfacing = true; } struct point_info info; @@ -588,8 +588,8 @@ try_setup_point(struct lp_setup_context *setup, */ setup_point_coefficients(setup, &info); - point->inputs.disable = FALSE; - point->inputs.is_blit = FALSE; + point->inputs.disable = false; + point->inputs.is_blit = false; point->inputs.layer = layer; point->inputs.viewport_index = viewport_index; point->inputs.view_index = setup->view_index; diff --git a/src/gallium/drivers/llvmpipe/lp_setup_rect.c b/src/gallium/drivers/llvmpipe/lp_setup_rect.c index 5cb6ee48ab9..37cd2d64d00 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_rect.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_rect.c @@ -184,11 +184,11 @@ lp_setup_is_blit(const struct lp_setup_context *setup, debug_printf("dtdy = %f\n", dtdy); debug_printf("\n"); #endif - return FALSE; + return false; } } - return FALSE; + return false; } @@ -259,7 +259,7 @@ try_rect_cw(struct lp_setup_context *setup, const bool cw = (x2 < x1) ^ (y0 < y2); if (cw) { LP_COUNT(nr_culled_rects); - return TRUE; + return true; } const float (*pv)[4]; @@ -305,7 +305,7 @@ try_rect_cw(struct lp_setup_context *setup, if (!u_rect_test_intersection(&setup->draw_regions[viewport_index], &bbox)) { if (0) debug_printf("no intersection\n"); LP_COUNT(nr_culled_rects); - return TRUE; + return true; } u_rect_find_intersection(&setup->draw_regions[viewport_index], &bbox); @@ -313,7 +313,7 @@ try_rect_cw(struct lp_setup_context *setup, struct lp_rast_rectangle *rect = lp_setup_alloc_rectangle(scene, key->num_inputs); if (!rect) - return FALSE; + return false; #ifdef DEBUG rect->v[0][0] = v0[0][0]; @@ -339,7 +339,7 @@ try_rect_cw(struct lp_setup_context *setup, &setup->setup.variant->key); rect->inputs.frontfacing = frontfacing; - rect->inputs.disable = FALSE; + rect->inputs.disable = false; rect->inputs.is_blit = lp_setup_is_blit(setup, &rect->inputs); rect->inputs.layer = layer; rect->inputs.viewport_index = viewport_index; @@ -445,11 +445,11 @@ lp_setup_bin_rectangle(struct lp_setup_context *setup, /* Disable rasterization of this partially-binned rectangle. * We'll flush this scene and re-bin the entire rectangle: */ - rect->inputs.disable = TRUE; - return FALSE; + rect->inputs.disable = true; + return false; } - return TRUE; + return true; } @@ -773,12 +773,12 @@ setup_rect_cw(struct lp_setup_context *setup, return do_rect_ccw(setup, v0, v2, v1, v3, v5, v4, !setup->ccw_is_frontface); } else if (winding0 == WINDING_CW) { setup->triangle(setup, v0, v1, v2); - return TRUE; + return true; } else if (winding1 == WINDING_CW) { setup->triangle(setup, v3, v4, v5); - return TRUE; + return true; } else { - return TRUE; + return true; } } @@ -800,13 +800,13 @@ setup_rect_ccw(struct lp_setup_context *setup, return do_rect_ccw(setup, v0, v1, v2, v3, v4, v5, setup->ccw_is_frontface); } else if (winding0 == WINDING_CCW) { setup->triangle(setup, v0, v1, v2); - return TRUE; + return true; } else if (winding1 == WINDING_CCW) { - return FALSE; + return false; setup->triangle(setup, v3, v4, v5); - return TRUE; + return true; } else { - return TRUE; + return true; } } @@ -820,7 +820,7 @@ setup_rect_noop(struct lp_setup_context *setup, const float (*v4)[4], const float (*v5)[4]) { - return TRUE; + return true; } @@ -847,13 +847,13 @@ setup_rect_both(struct lp_setup_context *setup, * CW/CCW rectangles under some circumstances, but we catch them * explicitly. */ - return FALSE; + return false; } else if (winding0 == WINDING_CCW) { return do_rect_ccw(setup, v0, v1, v2, v3, v4, v5, setup->ccw_is_frontface); } else if (winding0 == WINDING_CW) { return do_rect_ccw(setup, v0, v2, v1, v3, v5, v4, !setup->ccw_is_frontface); } else { - return TRUE; + return true; } } diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 460b4f98fa3..007a1f5b73e 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -243,10 +243,10 @@ check_opaque(const struct lp_setup_context *setup, setup->fs.current.variant; if (variant->opaque) - return TRUE; + return true; if (!variant->potentially_opaque) - return FALSE; + return false; const struct lp_tgsi_channel_info *alpha_info = &variant->shader->info.cbuf[0][3]; if (alpha_info->file == TGSI_FILE_CONSTANT) { @@ -262,7 +262,7 @@ check_opaque(const struct lp_setup_context *setup, v3[1 + alpha_info->u.index][alpha_info->swizzle] == 1.0f); } - return FALSE; + return false; } @@ -326,7 +326,7 @@ do_triangle_ccw(struct lp_setup_context *setup, if (!u_rect_test_intersection(&setup->draw_regions[viewport_index], &bbox)) { if (0) debug_printf("no intersection\n"); LP_COUNT(nr_culled_tris); - return TRUE; + return true; } int max_szorig = ((bbox.x1 - (bbox.x0 & ~3)) | @@ -359,7 +359,7 @@ do_triangle_ccw(struct lp_setup_context *setup, struct lp_rast_triangle *tri = lp_setup_alloc_triangle(scene, key->num_inputs, nr_planes); if (!tri) - return FALSE; + return false; #ifdef DEBUG tri->v[0][0] = v0[0][0]; @@ -460,8 +460,8 @@ do_triangle_ccw(struct lp_setup_context *setup, &setup->setup.variant->key); tri->inputs.frontfacing = frontfacing; - tri->inputs.disable = FALSE; - tri->inputs.is_blit = FALSE; + tri->inputs.disable = false; + tri->inputs.is_blit = false; tri->inputs.layer = layer; tri->inputs.viewport_index = viewport_index; tri->inputs.view_index = setup->view_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++) { - bool 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++) @@ -953,7 +953,7 @@ lp_setup_bin_triangle(struct lp_setup_context *setup, * rasterize/shade partial tile */ int count = util_bitcount(partial); - in = TRUE; + in = true; if (setup->multisample) cmd = lp_rast_ms_tri_tab[count]; @@ -968,7 +968,7 @@ lp_setup_bin_triangle(struct lp_setup_context *setup, } else { /* triangle covers the whole tile- shade whole tile */ LP_COUNT(nr_fully_covered_64); - in = TRUE; + in = true; if (!lp_setup_whole_tile(setup, &tri->inputs, x, y, opaque)) goto fail; } @@ -984,15 +984,15 @@ lp_setup_bin_triangle(struct lp_setup_context *setup, } } - return TRUE; + return true; fail: /* Need to disable any partially binned triangle. This is easier * than trying to locate all the triangle, shade-tile, etc, * commands which may have been binned. */ - tri->inputs.disable = TRUE; - return FALSE; + tri->inputs.disable = true; + return false; } diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c index 21b9175d52f..f72fb8ca20a 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c @@ -72,7 +72,7 @@ lp_setup_get_vertex_info(struct vbuf_render *vbr) /* Vertex size/info depends on the latest state. * The draw module may have issued additional state-change commands. */ - lp_setup_update_state(setup, FALSE); + lp_setup_update_state(setup, false); return setup->vertex_info; } @@ -179,7 +179,7 @@ lp_setup_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr) assert(setup->setup.variant); - if (!lp_setup_update_state(setup, TRUE)) + if (!lp_setup_update_state(setup, true)) return; const bool uses_constant_interp = @@ -387,7 +387,7 @@ lp_setup_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) const bool flatshade_first = setup->flatshade_first; unsigned i; - if (!lp_setup_update_state(setup, TRUE)) + if (!lp_setup_update_state(setup, true)) return; const bool uses_constant_interp = diff --git a/src/gallium/drivers/llvmpipe/lp_state_cs.c b/src/gallium/drivers/llvmpipe/lp_state_cs.c index aaaa35ec25c..6118d7359e3 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_cs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_cs.c @@ -354,9 +354,9 @@ generate_compute(struct llvmpipe_context *lp, assert(lp_native_vector_width / 32 >= 4); memset(&cs_type, 0, sizeof cs_type); - cs_type.floating = TRUE; /* floating point values */ - cs_type.sign = TRUE; /* values are signed */ - cs_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */ + cs_type.floating = true; /* floating point values */ + cs_type.sign = true; /* values are signed */ + cs_type.norm = false; /* values are not limited to [0,1] or [-1,1] */ cs_type.width = 32; /* 32-bit float */ cs_type.length = MIN2(lp_native_vector_width / 32, 16); /* n*4 elements per vector */ snprintf(func_name, sizeof(func_name), "cs_variant"); @@ -817,7 +817,7 @@ generate_compute(struct llvmpipe_context *lp, io = LLVMBuildIntToPtr(gallivm->builder, io, LLVMPointerType(LLVMVoidTypeInContext(gallivm->context), 0), ""); mesh_convert_to_aos(gallivm, shader->base.ir.nir, true, variant->jit_vertex_header_type, io, output_array, clipmask, - vertex_loop_state.counter, lp_elem_type(cs_type), -1, FALSE); + vertex_loop_state.counter, lp_elem_type(cs_type), -1, false); lp_build_loop_end_cond(&vertex_loop_state, vertex_count, NULL, LLVMIntUGE); @@ -832,7 +832,7 @@ generate_compute(struct llvmpipe_context *lp, io = LLVMBuildIntToPtr(gallivm->builder, io, LLVMPointerType(LLVMVoidTypeInContext(gallivm->context), 0), ""); mesh_convert_to_aos(gallivm, shader->base.ir.nir, false, variant->jit_prim_type, io, output_array, clipmask, - prim_loop_state.counter, lp_elem_type(cs_type), -1, FALSE); + prim_loop_state.counter, lp_elem_type(cs_type), -1, false); lp_build_loop_end_cond(&prim_loop_state, prim_count, NULL, LLVMIntUGE); @@ -1073,17 +1073,17 @@ dump_cs_variant_key(const struct lp_compute_shader_variant_key *key) const struct lp_static_sampler_state *sampler = &samplers[i].sampler_state; debug_printf("sampler[%u] = \n", i); debug_printf(" .wrap = %s %s %s\n", - util_str_tex_wrap(sampler->wrap_s, TRUE), - util_str_tex_wrap(sampler->wrap_t, TRUE), - util_str_tex_wrap(sampler->wrap_r, TRUE)); + util_str_tex_wrap(sampler->wrap_s, true), + util_str_tex_wrap(sampler->wrap_t, true), + util_str_tex_wrap(sampler->wrap_r, true)); debug_printf(" .min_img_filter = %s\n", - util_str_tex_filter(sampler->min_img_filter, TRUE)); + util_str_tex_filter(sampler->min_img_filter, true)); debug_printf(" .min_mip_filter = %s\n", - util_str_tex_mipfilter(sampler->min_mip_filter, TRUE)); + util_str_tex_mipfilter(sampler->min_mip_filter, true)); debug_printf(" .mag_img_filter = %s\n", - util_str_tex_filter(sampler->mag_img_filter, TRUE)); + util_str_tex_filter(sampler->mag_img_filter, true)); if (sampler->compare_mode != PIPE_TEX_COMPARE_NONE) - debug_printf(" .compare_func = %s\n", util_str_func(sampler->compare_func, TRUE)); + debug_printf(" .compare_func = %s\n", util_str_func(sampler->compare_func, true)); debug_printf(" .normalized_coords = %u\n", sampler->normalized_coords); debug_printf(" .min_max_lod_equal = %u\n", sampler->min_max_lod_equal); debug_printf(" .lod_bias_non_zero = %u\n", sampler->lod_bias_non_zero); @@ -1098,7 +1098,7 @@ dump_cs_variant_key(const struct lp_compute_shader_variant_key *key) debug_printf(" .format = %s\n", util_format_name(texture->format)); debug_printf(" .target = %s\n", - util_str_tex_target(texture->target, TRUE)); + util_str_tex_target(texture->target, true)); debug_printf(" .level_zero_only = %u\n", texture->level_zero_only); debug_printf(" .pot = %u %u %u\n", @@ -1113,7 +1113,7 @@ dump_cs_variant_key(const struct lp_compute_shader_variant_key *key) debug_printf(" .format = %s\n", util_format_name(image->format)); debug_printf(" .target = %s\n", - util_str_tex_target(image->target, TRUE)); + util_str_tex_target(image->target, true)); debug_printf(" .level_zero_only = %u\n", image->level_zero_only); debug_printf(" .pot = %u %u %u\n", diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c index 616b3337251..1ca5eed7601 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_derived.c +++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c @@ -206,12 +206,12 @@ check_linear_rasterizer(struct llvmpipe_context *lp) if (lp->permit_linear_rasterizer != permit_linear) { lp->permit_linear_rasterizer = permit_linear; lp_setup_set_linear_mode(lp->setup, permit_linear); - clipping_changed = TRUE; + clipping_changed = true; } if (lp->single_vp != single_vp) { lp->single_vp = single_vp; - clipping_changed = TRUE; + clipping_changed = true; } /* Disable xy clipping in linear mode. @@ -228,8 +228,8 @@ check_linear_rasterizer(struct llvmpipe_context *lp) */ if (clipping_changed) { draw_set_driver_clipping(lp->draw, - FALSE, // bypass_clip_xy - FALSE, //bypass_clip_z + false, // bypass_clip_xy + false, //bypass_clip_z permit_linear, // guard_band_xy, single_vp); // bypass_clip_points) } @@ -301,7 +301,7 @@ llvmpipe_update_derived(struct llvmpipe_context *llvmpipe) LP_NEW_SAMPLE_MASK | LP_NEW_DEPTH_STENCIL_ALPHA)) { bool discard = - llvmpipe->rasterizer ? llvmpipe->rasterizer->rasterizer_discard : FALSE; + 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 da6f4a5e996..6615e614cbd 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -2453,7 +2453,7 @@ generate_unswizzled_blend(struct gallivm_state *gallivm, /* We need to make sure that denorms are ok for half float conversions */ fpstate = lp_build_fpstate_get(gallivm); - lp_build_fpstate_set_denorms_zero(gallivm, FALSE); + lp_build_fpstate_set_denorms_zero(gallivm, false); } struct lp_type mask_type = lp_int32_vec4_type(); @@ -2664,9 +2664,9 @@ generate_unswizzled_blend(struct gallivm_state *gallivm, * unpack only with 128bit vectors). * Note: for 16bit sizes really need matching pack conversion code */ - bool twiddle_after_convert = FALSE; + bool twiddle_after_convert = false; if (!is_1d && dst_channels != 3 && dst_type.width == 8) { - twiddle_after_convert = TRUE; + twiddle_after_convert = true; } /* @@ -3161,17 +3161,17 @@ generate_fragment(struct llvmpipe_context *lp, struct lp_type fs_type; memset(&fs_type, 0, sizeof fs_type); - fs_type.floating = TRUE; /* floating point values */ - fs_type.sign = TRUE; /* values are signed */ - fs_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */ + fs_type.floating = true; /* floating point values */ + fs_type.sign = true; /* values are signed */ + fs_type.norm = false; /* values are not limited to [0,1] or [-1,1] */ fs_type.width = 32; /* 32-bit float */ fs_type.length = MIN2(lp_native_vector_width / 32, 16); /* n*4 elements per vector */ struct lp_type blend_type; memset(&blend_type, 0, sizeof blend_type); - blend_type.floating = FALSE; /* values are integers */ - blend_type.sign = FALSE; /* values are unsigned */ - blend_type.norm = TRUE; /* values are in [0,1] or [-1,1] */ + blend_type.floating = false; /* values are integers */ + blend_type.sign = false; /* values are unsigned */ + blend_type.norm = true; /* values are in [0,1] or [-1,1] */ blend_type.width = 8; /* 8-bit ubyte values */ blend_type.length = 16; /* 16 elements per vector */ @@ -3568,23 +3568,23 @@ dump_fs_variant_key(struct lp_fragment_shader_variant_key *key) debug_printf("depth nr_samples = %d\n", key->zsbuf_nr_samples); } if (key->depth.enabled) { - debug_printf("depth.func = %s\n", util_str_func(key->depth.func, TRUE)); + debug_printf("depth.func = %s\n", util_str_func(key->depth.func, true)); debug_printf("depth.writemask = %u\n", key->depth.writemask); } for (unsigned i = 0; i < 2; ++i) { if (key->stencil[i].enabled) { - debug_printf("stencil[%u].func = %s\n", i, util_str_func(key->stencil[i].func, TRUE)); - debug_printf("stencil[%u].fail_op = %s\n", i, util_str_stencil_op(key->stencil[i].fail_op, TRUE)); - debug_printf("stencil[%u].zpass_op = %s\n", i, util_str_stencil_op(key->stencil[i].zpass_op, TRUE)); - debug_printf("stencil[%u].zfail_op = %s\n", i, util_str_stencil_op(key->stencil[i].zfail_op, TRUE)); + debug_printf("stencil[%u].func = %s\n", i, util_str_func(key->stencil[i].func, true)); + debug_printf("stencil[%u].fail_op = %s\n", i, util_str_stencil_op(key->stencil[i].fail_op, true)); + debug_printf("stencil[%u].zpass_op = %s\n", i, util_str_stencil_op(key->stencil[i].zpass_op, true)); + debug_printf("stencil[%u].zfail_op = %s\n", i, util_str_stencil_op(key->stencil[i].zfail_op, true)); debug_printf("stencil[%u].valuemask = 0x%x\n", i, key->stencil[i].valuemask); debug_printf("stencil[%u].writemask = 0x%x\n", i, key->stencil[i].writemask); } } if (key->alpha.enabled) { - debug_printf("alpha.func = %s\n", util_str_func(key->alpha.func, TRUE)); + debug_printf("alpha.func = %s\n", util_str_func(key->alpha.func, true)); } if (key->occlusion_count) { @@ -3592,14 +3592,14 @@ dump_fs_variant_key(struct lp_fragment_shader_variant_key *key) } if (key->blend.logicop_enable) { - debug_printf("blend.logicop_func = %s\n", util_str_logicop(key->blend.logicop_func, TRUE)); + debug_printf("blend.logicop_func = %s\n", util_str_logicop(key->blend.logicop_func, true)); } else if (key->blend.rt[0].blend_enable) { - debug_printf("blend.rgb_func = %s\n", util_str_blend_func (key->blend.rt[0].rgb_func, TRUE)); - debug_printf("blend.rgb_src_factor = %s\n", util_str_blend_factor(key->blend.rt[0].rgb_src_factor, TRUE)); - debug_printf("blend.rgb_dst_factor = %s\n", util_str_blend_factor(key->blend.rt[0].rgb_dst_factor, TRUE)); - debug_printf("blend.alpha_func = %s\n", util_str_blend_func (key->blend.rt[0].alpha_func, TRUE)); - debug_printf("blend.alpha_src_factor = %s\n", util_str_blend_factor(key->blend.rt[0].alpha_src_factor, TRUE)); - debug_printf("blend.alpha_dst_factor = %s\n", util_str_blend_factor(key->blend.rt[0].alpha_dst_factor, TRUE)); + debug_printf("blend.rgb_func = %s\n", util_str_blend_func (key->blend.rt[0].rgb_func, true)); + debug_printf("blend.rgb_src_factor = %s\n", util_str_blend_factor(key->blend.rt[0].rgb_src_factor, true)); + debug_printf("blend.rgb_dst_factor = %s\n", util_str_blend_factor(key->blend.rt[0].rgb_dst_factor, true)); + debug_printf("blend.alpha_func = %s\n", util_str_blend_func (key->blend.rt[0].alpha_func, true)); + debug_printf("blend.alpha_src_factor = %s\n", util_str_blend_factor(key->blend.rt[0].alpha_src_factor, true)); + debug_printf("blend.alpha_dst_factor = %s\n", util_str_blend_factor(key->blend.rt[0].alpha_dst_factor, true)); } debug_printf("blend.colormask = 0x%x\n", key->blend.rt[0].colormask); if (key->blend.alpha_to_coverage) { @@ -3610,17 +3610,17 @@ dump_fs_variant_key(struct lp_fragment_shader_variant_key *key) const struct lp_static_sampler_state *sampler = &samplers[i].sampler_state; debug_printf("sampler[%u] = \n", i); debug_printf(" .wrap = %s %s %s\n", - util_str_tex_wrap(sampler->wrap_s, TRUE), - util_str_tex_wrap(sampler->wrap_t, TRUE), - util_str_tex_wrap(sampler->wrap_r, TRUE)); + util_str_tex_wrap(sampler->wrap_s, true), + util_str_tex_wrap(sampler->wrap_t, true), + util_str_tex_wrap(sampler->wrap_r, true)); debug_printf(" .min_img_filter = %s\n", - util_str_tex_filter(sampler->min_img_filter, TRUE)); + util_str_tex_filter(sampler->min_img_filter, true)); debug_printf(" .min_mip_filter = %s\n", - util_str_tex_mipfilter(sampler->min_mip_filter, TRUE)); + util_str_tex_mipfilter(sampler->min_mip_filter, true)); debug_printf(" .mag_img_filter = %s\n", - util_str_tex_filter(sampler->mag_img_filter, TRUE)); + util_str_tex_filter(sampler->mag_img_filter, true)); if (sampler->compare_mode != PIPE_TEX_COMPARE_NONE) - debug_printf(" .compare_func = %s\n", util_str_func(sampler->compare_func, TRUE)); + debug_printf(" .compare_func = %s\n", util_str_func(sampler->compare_func, true)); debug_printf(" .normalized_coords = %u\n", sampler->normalized_coords); debug_printf(" .min_max_lod_equal = %u\n", sampler->min_max_lod_equal); debug_printf(" .lod_bias_non_zero = %u\n", sampler->lod_bias_non_zero); @@ -3636,7 +3636,7 @@ dump_fs_variant_key(struct lp_fragment_shader_variant_key *key) debug_printf(" .format = %s\n", util_format_name(texture->format)); debug_printf(" .target = %s\n", - util_str_tex_target(texture->target, TRUE)); + util_str_tex_target(texture->target, true)); debug_printf(" .level_zero_only = %u\n", texture->level_zero_only); debug_printf(" .pot = %u %u %u\n", @@ -3651,7 +3651,7 @@ dump_fs_variant_key(struct lp_fragment_shader_variant_key *key) debug_printf(" .format = %s\n", util_format_name(image->format)); debug_printf(" .target = %s\n", - util_str_tex_target(image->target, TRUE)); + util_str_tex_target(image->target, true)); debug_printf(" .level_zero_only = %u\n", image->level_zero_only); debug_printf(" .pot = %u %u %u\n", @@ -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; - bool 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, @@ -3798,7 +3798,7 @@ generate_variant(struct llvmpipe_context *lp, no_kill && !key->blend.logicop_enable && !key->blend.rt[0].blend_enable - ? TRUE : FALSE; + ? true : false; variant->potentially_opaque = no_kill && @@ -3816,7 +3816,7 @@ generate_variant(struct llvmpipe_context *lp, * field, hence causing a crash). */ shader->info.cbuf[0][3].file != TGSI_FILE_NULL - ? TRUE : FALSE; + ? true : false; /* We only care about opaque blits for now */ if (variant->opaque && @@ -4403,7 +4403,7 @@ make_variant_key(struct llvmpipe_context *lp, sizeof key->stencil); } if (llvmpipe_resource_is_1d(lp->framebuffer.zsbuf->texture)) { - key->resource_1d = TRUE; + key->resource_1d = true; } key->zsbuf_nr_samples = util_res_sample_count(lp->framebuffer.zsbuf->texture); @@ -4439,7 +4439,7 @@ make_variant_key(struct llvmpipe_context *lp, key->multisample = lp->rasterizer->multisample; key->no_ms_sample_mask_out = lp->rasterizer->no_ms_sample_mask_out; if (lp->active_occlusion_queries && !lp->queries_disabled) { - key->occlusion_count = TRUE; + key->occlusion_count = true; } memcpy(&key->blend, lp->blend, sizeof key->blend); @@ -4503,7 +4503,7 @@ make_variant_key(struct llvmpipe_context *lp, * we pick 1d if any cbuf or zsbuf is 1d. */ if (llvmpipe_resource_is_1d(lp->framebuffer.cbufs[i]->texture)) { - key->resource_1d = TRUE; + key->resource_1d = true; } const struct util_format_description *format_desc = diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c index d7fe88cc754..ea8d5f9ac93 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c @@ -94,7 +94,7 @@ match_aero_minification_shader(const struct tgsi_token *tokens, if ((info->base.opcode_count[TGSI_OPCODE_TEX] != 4 && info->base.opcode_count[TGSI_OPCODE_SAMPLE] != 4) || info->num_texs != 4) { - return FALSE; + return false; } /* @@ -111,20 +111,20 @@ match_aero_minification_shader(const struct tgsi_token *tokens, tex->coord[0].u.index != tex->coord[1].u.index || (tex->coord[0].swizzle % 2) != 0 || tex->coord[1].swizzle != tex->coord[0].swizzle + 1) { - return FALSE; + return false; } coord_mask |= 1 << (tex->coord[0].u.index*2 + tex->coord[0].swizzle/2); } if (coord_mask != 0xf) { - return FALSE; + return false; } /* * Ensure it has the 0.25 immediate. */ - has_quarter_imm = FALSE; + has_quarter_imm = false; tgsi_parse_init(&parse, tokens); @@ -145,7 +145,7 @@ match_aero_minification_shader(const struct tgsi_token *tokens, assert(size <= 4); for (chan = 0; chan < size; ++chan) { if (parse.FullToken.FullImmediate.u[chan].Float == 0.25f) { - has_quarter_imm = TRUE; + has_quarter_imm = true; goto finished; } } @@ -165,10 +165,10 @@ finished: tgsi_parse_free(&parse); if (!has_quarter_imm) { - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c b/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c index e614f73a36b..89aac04dc33 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c @@ -264,7 +264,7 @@ init_nearest_sampler(struct nearest_sampler *samp, const float oow = 1.0f / w0; if (dwdx != 0.0 || dwdy != 0.0) - return FALSE; + return false; samp->texture = texture; samp->width = width; @@ -317,7 +317,7 @@ init_nearest_sampler(struct nearest_sampler *samp, } } - return TRUE; + return true; } @@ -373,7 +373,7 @@ blit_rgba_blit(const struct lp_rast_state *state, if (a0[0][3] != 1.0 || dadx[0][3] != 0.0 || dady[0][3] != 0.0) - return FALSE; + return false; src_x = x + util_iround(a0[1][0]*texture->width - 0.5f); src_y = y + util_iround(a0[1][1]*texture->height - 0.5f); @@ -387,7 +387,7 @@ blit_rgba_blit(const struct lp_rast_state *state, src_y < 0 || src_x + width > texture->width || src_y + height > texture->height) - return FALSE; + return false; util_copy_rect(color, PIPE_FORMAT_B8G8R8A8_UNORM, stride, x, y, @@ -395,7 +395,7 @@ blit_rgba_blit(const struct lp_rast_state *state, src, src_stride, src_x, src_y); - return TRUE; + return true; } @@ -425,7 +425,7 @@ blit_rgb1_blit(const struct lp_rast_state *state, if (a0[0][3] != 1.0 || dadx[0][3] != 0.0 || dady[0][3] != 0.0) - return FALSE; + return false; color += x * 4 + y * stride; @@ -441,7 +441,7 @@ blit_rgb1_blit(const struct lp_rast_state *state, src_y < 0 || src_x + width > texture->width || src_y + height > texture->height) - return FALSE; + return false; for (y = 0; y < height; y++) { const uint32_t *src_row = (const uint32_t *)src; @@ -455,7 +455,7 @@ blit_rgb1_blit(const struct lp_rast_state *state, src += src_stride; } - return TRUE; + return true; } @@ -484,7 +484,7 @@ blit_rgba(const struct lp_rast_state *state, a0[1][0], dadx[1][0], dady[1][0], a0[1][1], dadx[1][1], dady[1][1], a0[0][3], dadx[0][3], dady[0][3])) - return FALSE; + return false; init_blend(&blend, x, y, width, height, @@ -497,7 +497,7 @@ blit_rgba(const struct lp_rast_state *state, blend_noop(&blend); } - return TRUE; + return true; } @@ -524,7 +524,7 @@ blit_rgb1(const struct lp_rast_state *state, a0[1][0], dadx[1][0], dady[1][0], a0[1][1], dadx[1][1], dady[1][1], a0[0][3], dadx[0][3], dady[0][3])) - return FALSE; + return false; init_blend(&blend, x, y, width, height, color, stride); @@ -538,7 +538,7 @@ blit_rgb1(const struct lp_rast_state *state, blend_noop(&blend); } - return TRUE; + return true; } @@ -567,7 +567,7 @@ blit_rgba_blend_premul(const struct lp_rast_state *state, a0[1][0], dadx[1][0], dady[1][0], a0[1][1], dadx[1][1], dady[1][1], a0[0][3], dadx[0][3], dady[0][3])) - return FALSE; + return false; init_blend(&blend, x, y, width, height, color, stride); @@ -578,7 +578,7 @@ blit_rgba_blend_premul(const struct lp_rast_state *state, blend_premul(&blend); } - return TRUE; + return true; } @@ -608,7 +608,7 @@ linear_red(const struct lp_rast_state *state, height, &uc); - return TRUE; + return true; } @@ -624,7 +624,7 @@ linear_no_op(const struct lp_rast_state *state, uint8_t *color, unsigned stride) { - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c b/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c index 2ed7e43187d..9f11357c429 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c @@ -96,7 +96,7 @@ emit_fetch_texel_linear(const struct lp_build_sampler_aos *base, struct linear_sampler *sampler = (struct linear_sampler *)base; if (sampler->instance >= LP_MAX_LINEAR_TEXTURES) { - assert(FALSE); + assert(false); return bld->undef; } @@ -257,9 +257,9 @@ llvmpipe_fs_variant_linear_llvm(struct llvmpipe_context *lp, // unorm8[16] vector type struct lp_type fs_type; memset(&fs_type, 0, sizeof fs_type); - fs_type.floating = FALSE; - fs_type.sign = FALSE; - fs_type.norm = TRUE; + fs_type.floating = false; + fs_type.sign = false; + fs_type.norm = true; fs_type.width = 8; fs_type.length = 16; diff --git a/src/gallium/drivers/llvmpipe/lp_state_gs.c b/src/gallium/drivers/llvmpipe/lp_state_gs.c index b56e01ed0b8..6191f4f523a 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_gs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_gs.c @@ -58,7 +58,7 @@ llvmpipe_create_gs_state(struct pipe_context *pipe, if (templ->type == PIPE_SHADER_IR_TGSI) state->no_tokens = !templ->tokens; else - state->no_tokens = FALSE; + state->no_tokens = false; memcpy(&state->stream_output, &templ->stream_output, sizeof state->stream_output); if (templ->tokens || templ->type == PIPE_SHADER_IR_NIR) { diff --git a/src/gallium/drivers/llvmpipe/lp_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c index 4c280f9da44..8a3745a63a1 100644 --- a/src/gallium/drivers/llvmpipe/lp_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_surface.c @@ -92,16 +92,16 @@ lp_resource_copy(struct pipe_context *pipe, { llvmpipe_flush_resource(pipe, dst, dst_level, - FALSE, /* read_only */ - TRUE, /* cpu_access */ - FALSE, /* do_not_block */ + false, /* read_only */ + true, /* cpu_access */ + false, /* do_not_block */ "blit dest"); llvmpipe_flush_resource(pipe, src, src_level, - TRUE, /* read_only */ - TRUE, /* cpu_access */ - FALSE, /* do_not_block */ + true, /* read_only */ + true, /* cpu_access */ + false, /* do_not_block */ "blit src"); if (dst->nr_samples > 1 && @@ -366,12 +366,12 @@ lp_clear_depth_stencil_texture_msaa(struct pipe_context *pipe, const struct pipe_box *box) { struct pipe_transfer *dst_trans; - bool need_rmw = FALSE; + bool need_rmw = false; if ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) && ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) && util_format_is_depth_and_stencil(format)) { - need_rmw = TRUE; + need_rmw = true; } ubyte *dst_map = llvmpipe_transfer_map_ms(pipe, diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c index 4f8125d6f66..fd8489f8358 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_arit.c +++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c @@ -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; - bool 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; - bool expected_pass = TRUE; + bool expected_pass = true; bool pass; testval = flush_denorm_to_zero(in[i]); @@ -485,7 +485,7 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned /* FIXME: The generic (non SSE) path in lp_build_iround, which is * always taken for length==2 regardless of native round support, * does not round to even. */ - expected_pass = FALSE; + expected_pass = false; } if (test->ref == &expf && util_inf_sign(testval) == -1) { @@ -506,7 +506,7 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned } if (pass != expected_pass) { - success = FALSE; + success = false; } } } @@ -524,7 +524,7 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned bool test_all(unsigned verbose, FILE *fp) { - bool success = TRUE; + bool success = true; int i; for (i = 0; i < ARRAY_SIZE(unary_tests); ++i) { @@ -532,7 +532,7 @@ test_all(unsigned verbose, FILE *fp) unsigned length; for (length = 1; length <= max_length; length *= 2) { if (!test_unary(verbose, fp, &unary_tests[i], length)) { - success = FALSE; + success = false; } } } @@ -556,5 +556,5 @@ test_some(unsigned verbose, FILE *fp, bool test_single(unsigned verbose, FILE *fp) { - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index d42c3124b9d..7851bf29dd6 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -95,12 +95,12 @@ write_tsv_row(FILE *fp, fprintf(fp, "%s\t%s\t%s\t%s\t%s\t%s\n", - util_str_blend_func(blend->rt[0].rgb_func, TRUE), - util_str_blend_factor(blend->rt[0].rgb_src_factor, TRUE), - util_str_blend_factor(blend->rt[0].rgb_dst_factor, TRUE), - util_str_blend_func(blend->rt[0].alpha_func, TRUE), - util_str_blend_factor(blend->rt[0].alpha_src_factor, TRUE), - util_str_blend_factor(blend->rt[0].alpha_dst_factor, TRUE)); + util_str_blend_func(blend->rt[0].rgb_func, true), + util_str_blend_factor(blend->rt[0].rgb_src_factor, true), + util_str_blend_factor(blend->rt[0].rgb_dst_factor, true), + util_str_blend_func(blend->rt[0].alpha_func, true), + util_str_blend_factor(blend->rt[0].alpha_src_factor, true), + util_str_blend_factor(blend->rt[0].alpha_dst_factor, true)); fflush(fp); } @@ -119,12 +119,12 @@ dump_blend_type(FILE *fp, fprintf(fp, " %s=%s %s=%s %s=%s %s=%s %s=%s %s=%s", - "rgb_func", util_str_blend_func(blend->rt[0].rgb_func, TRUE), - "rgb_src_factor", util_str_blend_factor(blend->rt[0].rgb_src_factor, TRUE), - "rgb_dst_factor", util_str_blend_factor(blend->rt[0].rgb_dst_factor, TRUE), - "alpha_func", util_str_blend_func(blend->rt[0].alpha_func, TRUE), - "alpha_src_factor", util_str_blend_factor(blend->rt[0].alpha_src_factor, TRUE), - "alpha_dst_factor", util_str_blend_factor(blend->rt[0].alpha_dst_factor, TRUE)); + "rgb_func", util_str_blend_func(blend->rt[0].rgb_func, true), + "rgb_src_factor", util_str_blend_factor(blend->rt[0].rgb_src_factor, true), + "rgb_dst_factor", util_str_blend_factor(blend->rt[0].rgb_dst_factor, true), + "alpha_func", util_str_blend_func(blend->rt[0].alpha_func, true), + "alpha_src_factor", util_str_blend_factor(blend->rt[0].alpha_src_factor, true), + "alpha_dst_factor", util_str_blend_factor(blend->rt[0].alpha_dst_factor, true)); fprintf(fp, " ...\n"); fflush(fp); @@ -465,7 +465,7 @@ test_one(unsigned verbose, gallivm_free_ir(gallivm); - success = TRUE; + success = true; { uint8_t *src, *src1, *dst, *con, *res, *ref; @@ -510,7 +510,7 @@ test_one(unsigned verbose, cycles[i] = end_counter - start_counter; if (!compare_vec(type, res, ref)) { - success = FALSE; + success = false; if (verbose < 1) dump_blend_type(stderr, blend, type); @@ -626,8 +626,8 @@ blend_funcs[] = { const struct lp_type blend_types[] = { /* float, fixed, sign, norm, width, len */ - { TRUE, FALSE, TRUE, FALSE, 32, 4 }, /* f32 x 4 */ - { FALSE, FALSE, FALSE, TRUE, 8, 16 }, /* u8n x 16 */ + { true, false, true, false, 32, 4 }, /* f32 x 4 */ + { false, false, false, true, 8, 16 }, /* u8n x 16 */ }; @@ -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; - bool 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) { @@ -672,7 +672,7 @@ test_all(unsigned verbose, FILE *fp) blend.rt[0].colormask = PIPE_MASK_RGBA; if (!test_one(verbose, fp, &blend, *type)) - success = FALSE; + success = false; } } @@ -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; - bool success = TRUE; + bool success = true; for (unsigned long i = 0; i < n; ++i) { rgb_func = &blend_funcs[rand() % num_funcs]; @@ -727,7 +727,7 @@ test_some(unsigned verbose, FILE *fp, blend.rt[0].colormask = PIPE_MASK_RGBA; if (!test_one(verbose, fp, &blend, *type)) - success = FALSE; + success = false; } return success; @@ -738,5 +738,5 @@ bool test_single(unsigned verbose, FILE *fp) { printf("no test_single()"); - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c index 36b1a047678..9fb64486f11 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_conv.c +++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c @@ -172,7 +172,7 @@ test_one(unsigned verbose, if ((src_type.width >= dst_type.width && src_type.length > dst_type.length) || (src_type.width <= dst_type.width && src_type.length < dst_type.length)) { - return TRUE; + return true; } /* Known failures @@ -181,7 +181,7 @@ test_one(unsigned verbose, */ if ((src_type.floating && !dst_type.floating && dst_type.sign && dst_type.norm && src_type.width == dst_type.width) || (!src_type.floating && dst_type.floating && src_type.fixed && src_type.width == dst_type.width)) { - return TRUE; + return true; } /* Known failures @@ -190,7 +190,7 @@ test_one(unsigned verbose, */ if ((src_type.floating && !dst_type.floating && dst_type.sign && dst_type.norm && src_type.width == dst_type.width) || (!src_type.floating && dst_type.floating && src_type.fixed && src_type.width == dst_type.width)) { - return TRUE; + return true; } if (verbose >= 1) @@ -236,7 +236,7 @@ test_one(unsigned verbose, gallivm_free_ir(gallivm); - success = TRUE; + success = true; for (i = 0; i < n && success; ++i) { unsigned src_stride = src_type.length*src_type.width/8; unsigned dst_stride = dst_type.length*dst_type.width/8; @@ -264,7 +264,7 @@ test_one(unsigned verbose, for (j = 0; j < num_dsts; ++j) { if (!compare_vec_with_eps(dst_type, dst + j*dst_stride, ref + j*dst_stride, eps)) - success = FALSE; + success = false; } if (!success || verbose >= 3) { @@ -347,54 +347,54 @@ const struct lp_type conv_types[] = { /* float, fixed, sign, norm, width, len */ /* Float */ - { TRUE, FALSE, TRUE, TRUE, 32, 4 }, - { TRUE, FALSE, TRUE, FALSE, 32, 4 }, - { TRUE, FALSE, FALSE, TRUE, 32, 4 }, - { TRUE, FALSE, FALSE, FALSE, 32, 4 }, + { true, false, true, true, 32, 4 }, + { true, false, true, false, 32, 4 }, + { true, false, false, true, 32, 4 }, + { true, false, false, false, 32, 4 }, - { TRUE, FALSE, TRUE, TRUE, 32, 8 }, - { TRUE, FALSE, TRUE, FALSE, 32, 8 }, - { TRUE, FALSE, FALSE, TRUE, 32, 8 }, - { TRUE, FALSE, FALSE, FALSE, 32, 8 }, + { true, false, true, true, 32, 8 }, + { true, false, true, false, 32, 8 }, + { true, false, false, true, 32, 8 }, + { true, false, false, false, 32, 8 }, /* Fixed */ - { FALSE, TRUE, TRUE, TRUE, 32, 4 }, - { FALSE, TRUE, TRUE, FALSE, 32, 4 }, - { FALSE, TRUE, FALSE, TRUE, 32, 4 }, - { FALSE, TRUE, FALSE, FALSE, 32, 4 }, + { false, true, true, true, 32, 4 }, + { false, true, true, false, 32, 4 }, + { false, true, false, true, 32, 4 }, + { false, true, false, false, 32, 4 }, - { FALSE, TRUE, TRUE, TRUE, 32, 8 }, - { FALSE, TRUE, TRUE, FALSE, 32, 8 }, - { FALSE, TRUE, FALSE, TRUE, 32, 8 }, - { FALSE, TRUE, FALSE, FALSE, 32, 8 }, + { false, true, true, true, 32, 8 }, + { false, true, true, false, 32, 8 }, + { false, true, false, true, 32, 8 }, + { false, true, false, false, 32, 8 }, /* Integer */ - { FALSE, FALSE, TRUE, TRUE, 32, 4 }, - { FALSE, FALSE, TRUE, FALSE, 32, 4 }, - { FALSE, FALSE, FALSE, TRUE, 32, 4 }, - { FALSE, FALSE, FALSE, FALSE, 32, 4 }, + { false, false, true, true, 32, 4 }, + { false, false, true, false, 32, 4 }, + { false, false, false, true, 32, 4 }, + { false, false, false, false, 32, 4 }, - { FALSE, FALSE, TRUE, TRUE, 32, 8 }, - { FALSE, FALSE, TRUE, FALSE, 32, 8 }, - { FALSE, FALSE, FALSE, TRUE, 32, 8 }, - { FALSE, FALSE, FALSE, FALSE, 32, 8 }, + { false, false, true, true, 32, 8 }, + { false, false, true, false, 32, 8 }, + { false, false, false, true, 32, 8 }, + { false, false, false, false, 32, 8 }, - { FALSE, FALSE, TRUE, TRUE, 16, 8 }, - { FALSE, FALSE, TRUE, FALSE, 16, 8 }, - { FALSE, FALSE, FALSE, TRUE, 16, 8 }, - { FALSE, FALSE, FALSE, FALSE, 16, 8 }, + { false, false, true, true, 16, 8 }, + { false, false, true, false, 16, 8 }, + { false, false, false, true, 16, 8 }, + { false, false, false, false, 16, 8 }, - { FALSE, FALSE, TRUE, TRUE, 8, 16 }, - { FALSE, FALSE, TRUE, FALSE, 8, 16 }, - { FALSE, FALSE, FALSE, TRUE, 8, 16 }, - { FALSE, FALSE, FALSE, FALSE, 8, 16 }, + { false, false, true, true, 8, 16 }, + { false, false, true, false, 8, 16 }, + { false, false, false, true, 8, 16 }, + { false, false, false, false, 8, 16 }, - { FALSE, FALSE, TRUE, TRUE, 8, 4 }, - { FALSE, FALSE, TRUE, FALSE, 8, 4 }, - { FALSE, FALSE, FALSE, TRUE, 8, 4 }, - { FALSE, FALSE, FALSE, FALSE, 8, 4 }, + { false, false, true, true, 8, 4 }, + { false, false, true, false, 8, 4 }, + { false, false, false, true, 8, 4 }, + { false, false, false, false, 8, 4 }, - { FALSE, FALSE, FALSE, TRUE, 8, 8 }, + { false, false, false, true, 8, 8 }, }; @@ -406,7 +406,7 @@ test_all(unsigned verbose, FILE *fp) { const struct lp_type *src_type; const struct lp_type *dst_type; - bool success = TRUE; + bool success = true; int error_count = 0; for (src_type = conv_types; src_type < &conv_types[num_types]; ++src_type) { @@ -416,7 +416,7 @@ test_all(unsigned verbose, FILE *fp) continue; if (!test_one(verbose, fp, *src_type, *dst_type)){ - success = FALSE; + success = false; ++error_count; } } @@ -435,7 +435,7 @@ test_some(unsigned verbose, FILE *fp, const struct lp_type *src_type; const struct lp_type *dst_type; unsigned long i; - bool success = TRUE; + bool success = true; for (i = 0; i < n; ++i) { src_type = &conv_types[rand() % num_types]; @@ -445,7 +445,7 @@ test_some(unsigned verbose, FILE *fp, } while (src_type == dst_type || src_type->norm != dst_type->norm); if (!test_one(verbose, fp, *src_type, *dst_type)) - success = FALSE; + success = false; } return success; @@ -457,9 +457,9 @@ test_single(unsigned verbose, FILE *fp) { /* float, fixed, sign, norm, width, len */ struct lp_type f32x4_type = - { TRUE, FALSE, TRUE, TRUE, 32, 4 }; + { true, false, true, true, 32, 4 }; struct lp_type ub8x4_type = - { FALSE, FALSE, FALSE, TRUE, 8, 16 }; + { false, false, false, true, 8, 16 }; bool success; diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c index 22d7b74e8d1..6d3a60bd8db 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_format.c +++ b/src/gallium/drivers/llvmpipe/lp_test_format.c @@ -120,7 +120,7 @@ add_fetch_rgba_test(struct gallivm_state *gallivm, unsigned verbose, block = LLVMAppendBasicBlockInContext(context, func, "entry"); LLVMPositionBuilderAtEnd(builder, block); - rgba = lp_build_fetch_rgba_aos(gallivm, desc, type, TRUE, + rgba = lp_build_fetch_rgba_aos(gallivm, desc, type, true, packed_ptr, offset, i, j, cache); LLVMBuildStore(builder, rgba, rgba_ptr); @@ -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]; - bool first = TRUE; - bool success = TRUE; + bool first = true; + bool success = true; unsigned i, j, k, l; context = LLVMContextCreate(); @@ -173,7 +173,7 @@ test_format_float(unsigned verbose, FILE *fp, printf("Testing %s (float) ...\n", desc->name); fflush(stdout); - first = FALSE; + first = false; } /* To ensure it's 16-byte aligned */ @@ -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) { - bool match = TRUE; + bool match = true; memset(unpacked, 0, sizeof unpacked); @@ -189,22 +189,22 @@ test_format_float(unsigned verbose, FILE *fp, for (k = 0; k < 4; ++k) { if (util_double_inf_sign(test->unpacked[i][j][k]) != util_inf_sign(unpacked[k])) { - match = FALSE; + match = false; } if (util_is_double_nan(test->unpacked[i][j][k]) != util_is_nan(unpacked[k])) { - match = FALSE; + match = false; } if (!util_is_double_inf_or_nan(test->unpacked[i][j][k]) && fabs((float)test->unpacked[i][j][k] - unpacked[k]) > FLT_EPSILON) { - match = FALSE; + match = false; } } /* Ignore errors in S3TC for now */ if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) { - match = TRUE; + match = true; } if (!match) { @@ -220,7 +220,7 @@ test_format_float(unsigned verbose, FILE *fp, test->unpacked[i][j][2], test->unpacked[i][j][3]); fflush(stdout); - success = FALSE; + success = false; } } } @@ -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]; - bool first = TRUE; - bool success = TRUE; + bool first = true; + bool success = true; unsigned i, j, k, l; context = LLVMContextCreate(); @@ -276,7 +276,7 @@ test_format_unorm8(unsigned verbose, FILE *fp, if (first) { printf("Testing %s (unorm8) ...\n", desc->name); - first = FALSE; + first = false; } /* To ensure it's 16-byte aligned */ @@ -291,7 +291,7 @@ test_format_unorm8(unsigned verbose, FILE *fp, fetch_ptr(unpacked, packed, j, i, use_cache ? cache_ptr : NULL); - match = TRUE; + match = true; for (k = 0; k < 4; ++k) { int error = float_to_ubyte(test->unpacked[i][j][k]) - unpacked[k]; @@ -302,12 +302,12 @@ test_format_unorm8(unsigned verbose, FILE *fp, error = -error; if (error > 1) - match = FALSE; + match = false; } /* Ignore errors in S3TC as we only implement a poor man approach */ if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) { - match = TRUE; + match = true; } if (!match) { @@ -323,7 +323,7 @@ test_format_unorm8(unsigned verbose, FILE *fp, float_to_ubyte(test->unpacked[i][j][2]), float_to_ubyte(test->unpacked[i][j][3])); - success = FALSE; + success = false; } } } @@ -347,14 +347,14 @@ test_one(unsigned verbose, FILE *fp, const struct util_format_description *format_desc, unsigned use_cache) { - bool success = TRUE; + bool success = true; if (!test_format_float(verbose, fp, format_desc, use_cache)) { - success = FALSE; + success = false; } if (!test_format_unorm8(verbose, fp, format_desc, use_cache)) { - success = FALSE; + success = false; } return success; @@ -365,7 +365,7 @@ bool test_all(unsigned verbose, FILE *fp) { enum pipe_format format; - bool success = TRUE; + bool success = true; unsigned use_cache; cache_ptr = align_malloc(sizeof(struct lp_build_format_cache), 16); @@ -402,7 +402,7 @@ test_all(unsigned verbose, FILE *fp) } if (!test_one(verbose, fp, format_desc, use_cache)) { - success = FALSE; + success = false; } } } @@ -424,5 +424,5 @@ bool test_single(unsigned verbose, FILE *fp) { printf("no test_single()"); - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_test_main.c b/src/gallium/drivers/llvmpipe/lp_test_main.c index 2b4fa4a0054..27ef356864b 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_main.c +++ b/src/gallium/drivers/llvmpipe/lp_test_main.c @@ -267,11 +267,11 @@ compare_vec_with_eps(struct lp_type type, const void *res, const void *ref, doub } delta = fabs(delta); if (delta >= eps) { - return FALSE; + return false; } } - return TRUE; + return true; } @@ -371,7 +371,7 @@ main(int argc, char **argv) unsigned long n = 1000; unsigned i; bool success; - bool single = FALSE; + bool single = false; unsigned fpstate; fpstate = util_fpstate_get(); @@ -384,7 +384,7 @@ main(int argc, char **argv) if (strcmp(argv[i], "-v") == 0) ++verbose; else if (strcmp(argv[i], "-s") == 0) - single = TRUE; + single = true; else if (strcmp(argv[i], "-o") == 0) fp = fopen(argv[++i], "wt"); else diff --git a/src/gallium/drivers/llvmpipe/lp_test_printf.c b/src/gallium/drivers/llvmpipe/lp_test_printf.c index 5430e1f3bae..7e53aa51928 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_printf.c +++ b/src/gallium/drivers/llvmpipe/lp_test_printf.c @@ -93,7 +93,7 @@ test_printf(unsigned verbose, FILE *fp, struct gallivm_state *gallivm; LLVMValueRef test; test_printf_t test_printf_func; - bool success = TRUE; + bool success = true; context = LLVMContextCreate(); #if LLVM_VERSION_MAJOR == 15 @@ -121,7 +121,7 @@ test_printf(unsigned verbose, FILE *fp, bool test_all(unsigned verbose, FILE *fp) { - bool success = TRUE; + bool success = true; test_printf(verbose, fp, NULL); @@ -141,5 +141,5 @@ bool test_single(unsigned verbose, FILE *fp) { printf("no test_single()"); - return TRUE; + return true; } diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 54054c1c6d8..5a9c44fc747 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -178,16 +178,16 @@ llvmpipe_texture_layout(struct llvmpipe_screen *screen, lpr->tex_data = align_malloc(total_size, mip_align); if (!lpr->tex_data) { - return FALSE; + return false; } else { memset(lpr->tex_data, 0, total_size); } } - return TRUE; + return true; fail: - return FALSE; + return false; } @@ -712,7 +712,7 @@ llvmpipe_transfer_map_ms(struct pipe_context *pipe, if (!llvmpipe_flush_resource(pipe, resource, level, read_only, - TRUE, /* cpu_access */ + true, /* cpu_access */ do_not_block, __func__)) { /* @@ -1029,18 +1029,18 @@ llvmpipe_resource_bind_backing(struct pipe_screen *screen, struct llvmpipe_resource *lpr = llvmpipe_resource(pt); if (!lpr->backable) - return FALSE; + return false; if (llvmpipe_resource_is_texture(&lpr->base)) { if (lpr->size_required > LP_MAX_TEXTURE_SIZE) - return FALSE; + return false; lpr->tex_data = (char *)pmem + offset; } else lpr->data = (char *)pmem + offset; lpr->backing_offset = offset; - return TRUE; + return true; } @@ -1163,11 +1163,11 @@ llvmpipe_init_screen_resource_funcs(struct pipe_screen *screen) #ifdef DEBUG /* init linked list for tracking resources */ { - static bool first_call = TRUE; + static bool first_call = true; if (first_call) { memset(&resource_list, 0, sizeof(resource_list)); list_inithead(&resource_list.list); - first_call = FALSE; + first_call = false; } } #endif diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h index 07556b9d77e..72d1ff52701 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.h +++ b/src/gallium/drivers/llvmpipe/lp_texture.h @@ -161,7 +161,7 @@ llvmpipe_resource_is_texture(const struct pipe_resource *resource) { switch (resource->target) { case PIPE_BUFFER: - return FALSE; + return false; case PIPE_TEXTURE_1D: case PIPE_TEXTURE_1D_ARRAY: case PIPE_TEXTURE_2D: @@ -170,10 +170,10 @@ llvmpipe_resource_is_texture(const struct pipe_resource *resource) case PIPE_TEXTURE_3D: case PIPE_TEXTURE_CUBE: case PIPE_TEXTURE_CUBE_ARRAY: - return TRUE; + return true; default: assert(0); - return FALSE; + return false; } } @@ -185,17 +185,17 @@ llvmpipe_resource_is_1d(const struct pipe_resource *resource) case PIPE_BUFFER: case PIPE_TEXTURE_1D: case PIPE_TEXTURE_1D_ARRAY: - return TRUE; + return true; case PIPE_TEXTURE_2D: case PIPE_TEXTURE_2D_ARRAY: case PIPE_TEXTURE_RECT: case PIPE_TEXTURE_3D: case PIPE_TEXTURE_CUBE: case PIPE_TEXTURE_CUBE_ARRAY: - return FALSE; + return false; default: assert(0); - return FALSE; + return false; } } diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c index 40e84a3654d..b87fb18eca9 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_surface.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_surface.c @@ -1748,7 +1748,7 @@ nv50_blit(struct pipe_context *pipe, const struct pipe_blit_info *info) { struct nv50_context *nv50 = nv50_context(pipe); struct nouveau_pushbuf *push = nv50->base.pushbuf; - bool eng3d = FALSE; + bool eng3d = false; if (info->src.box.width == 0 || info->src.box.height == 0 || info->dst.box.width == 0 || info->dst.box.height == 0) { diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index 073393d962f..09a5eb3c64a 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -101,7 +101,7 @@ static void r300_blitter_begin(struct r300_context* r300, enum r300_blitter_op o if (op & R300_IGNORE_RENDER_COND) { /* Save the flag. */ r300->blitter_saved_skip_rendering = r300->skip_rendering+1; - r300->skip_rendering = FALSE; + r300->skip_rendering = false; } else { r300->blitter_saved_skip_rendering = 0; } @@ -140,7 +140,7 @@ static bool r300_cbzb_clear_allowed(struct r300_context *r300, /* Only color clear allowed, and only one colorbuffer. */ if ((clear_buffers & ~PIPE_CLEAR_COLOR) != 0 || fb->nr_cbufs != 1 || !fb->cbufs[0]) - return FALSE; + return false; return r300_surface(fb->cbufs[0])->cbzb_allowed; } @@ -206,7 +206,7 @@ static void r300_set_clear_color(struct r300_context *r300, } } -DEBUG_GET_ONCE_BOOL_OPTION(hyperz, "RADEON_HYPERZ", FALSE) +DEBUG_GET_ONCE_BOOL_OPTION(hyperz, "RADEON_HYPERZ", false) /* Clear currently bound buffers. */ static void r300_clear(struct pipe_context* pipe, @@ -277,8 +277,8 @@ static void r300_clear(struct pipe_context* pipe, /* If both depth and stencil are present, they must be cleared together. */ if (fb->zsbuf->texture->format == PIPE_FORMAT_S8_UINT_Z24_UNORM && (buffers & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) { - zmask_clear = FALSE; - hiz_clear = FALSE; + zmask_clear = false; + hiz_clear = false; } else { zmask_clear = r300_fast_zclear_allowed(r300, buffers); hiz_clear = r300_hiz_clear_allowed(r300); @@ -292,7 +292,7 @@ static void r300_clear(struct pipe_context* pipe, r300->hyperz_enabled = r300->rws->cs_request_feature(&r300->cs, RADEON_FID_R300_HYPERZ_ACCESS, - TRUE); + true); if (r300->hyperz_enabled) { /* Need to emit HyperZ buffer regs for the first time. */ r300_mark_fb_state_dirty(r300, R300_CHANGED_HYPERZ_FLAG); @@ -330,7 +330,7 @@ static void r300_clear(struct pipe_context* pipe, r300->cmask_access = r300->rws->cs_request_feature(&r300->cs, RADEON_FID_R300_CMASK_ACCESS, - TRUE); + true); } /* Setup the clear. */ @@ -367,7 +367,7 @@ static void r300_clear(struct pipe_context* pipe, width = surf->cbzb_width; height = surf->cbzb_height; - r300->cbzb_clear = TRUE; + r300->cbzb_clear = true; r300_mark_fb_state_dirty(r300, R300_CHANGED_HYPERZ_FLAG); } @@ -399,22 +399,22 @@ static void r300_clear(struct pipe_context* pipe, /* Emit clear packets. */ r300_emit_gpu_flush(r300, r300->gpu_flush.size, r300->gpu_flush.state); - r300->gpu_flush.dirty = FALSE; + r300->gpu_flush.dirty = false; if (r300->zmask_clear.dirty) { r300_emit_zmask_clear(r300, r300->zmask_clear.size, r300->zmask_clear.state); - r300->zmask_clear.dirty = FALSE; + r300->zmask_clear.dirty = false; } if (r300->hiz_clear.dirty) { r300_emit_hiz_clear(r300, r300->hiz_clear.size, r300->hiz_clear.state); - r300->hiz_clear.dirty = FALSE; + r300->hiz_clear.dirty = false; } if (r300->cmask_clear.dirty) { r300_emit_cmask_clear(r300, r300->cmask_clear.size, r300->cmask_clear.state); - r300->cmask_clear.dirty = FALSE; + r300->cmask_clear.dirty = false; } } else { assert(0); @@ -422,7 +422,7 @@ static void r300_clear(struct pipe_context* pipe, /* Disable CBZB clear. */ if (r300->cbzb_clear) { - r300->cbzb_clear = FALSE; + r300->cbzb_clear = false; hyperz->zb_depthclearvalue = hyperz_dcv; r300_mark_fb_state_dirty(r300, R300_CHANGED_HYPERZ_FLAG); } @@ -489,7 +489,7 @@ void r300_decompress_zmask(struct r300_context *r300) if (!r300->zmask_in_use || r300->locked_zbuffer) return; - r300->zmask_decompress = TRUE; + r300->zmask_decompress = true; r300_mark_atom_dirty(r300, &r300->hyperz_state); r300_blitter_begin(r300, R300_DECOMPRESS); @@ -497,8 +497,8 @@ void r300_decompress_zmask(struct r300_context *r300) r300->dsa_decompress_zmask); r300_blitter_end(r300); - r300->zmask_decompress = FALSE; - r300->zmask_in_use = FALSE; + r300->zmask_decompress = false; + r300->zmask_in_use = false; r300_mark_atom_dirty(r300, &r300->hyperz_state); } @@ -685,7 +685,7 @@ static void r300_resource_copy_region(struct pipe_context *pipe, util_blitter_blit_generic(r300->blitter, dst_view, &dstbox, src_view, src_box, src_width0, src_height0, PIPE_MASK_RGBAZS, PIPE_TEX_FILTER_NEAREST, NULL, - FALSE, FALSE, 0); + false, false, 0); r300_blitter_end(r300); pipe_surface_reference(&dst_view, NULL); diff --git a/src/gallium/drivers/r300/r300_chipset.c b/src/gallium/drivers/r300/r300_chipset.c index abea18b409a..e0a79b3a754 100644 --- a/src/gallium/drivers/r300/r300_chipset.c +++ b/src/gallium/drivers/r300/r300_chipset.c @@ -80,34 +80,34 @@ void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps) } /* Defaults. */ - caps->high_second_pipe = FALSE; + caps->high_second_pipe = false; caps->num_vert_fpus = 0; caps->hiz_ram = 0; caps->zmask_ram = 0; - caps->has_cmask = FALSE; + caps->has_cmask = false; switch (caps->family) { case CHIP_R300: case CHIP_R350: - caps->high_second_pipe = TRUE; + caps->high_second_pipe = true; caps->num_vert_fpus = 4; - caps->has_cmask = TRUE; /* guessed because there is also HiZ */ + caps->has_cmask = true; /* guessed because there is also HiZ */ caps->hiz_ram = R300_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; case CHIP_RV350: case CHIP_RV370: - caps->high_second_pipe = TRUE; + caps->high_second_pipe = true; caps->num_vert_fpus = 2; caps->zmask_ram = RV3xx_ZMASK_SIZE; break; case CHIP_RV380: - caps->high_second_pipe = TRUE; + caps->high_second_pipe = true; caps->num_vert_fpus = 2; - caps->has_cmask = TRUE; /* guessed because there is also HiZ */ + caps->has_cmask = true; /* guessed because there is also HiZ */ caps->hiz_ram = R300_HIZ_LIMIT; caps->zmask_ram = RV3xx_ZMASK_SIZE; break; @@ -130,28 +130,28 @@ void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps) case CHIP_R481: case CHIP_RV410: caps->num_vert_fpus = 6; - caps->has_cmask = TRUE; /* guessed because there is also HiZ */ + caps->has_cmask = true; /* guessed because there is also HiZ */ caps->hiz_ram = R300_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; case CHIP_R520: caps->num_vert_fpus = 8; - caps->has_cmask = TRUE; + caps->has_cmask = true; caps->hiz_ram = R300_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; case CHIP_RV515: caps->num_vert_fpus = 2; - caps->has_cmask = TRUE; + caps->has_cmask = true; caps->hiz_ram = R300_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; case CHIP_RV530: caps->num_vert_fpus = 5; - caps->has_cmask = TRUE; + caps->has_cmask = true; caps->hiz_ram = RV530_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; @@ -160,7 +160,7 @@ void r300_parse_chipset(uint32_t pci_id, struct r300_capabilities* caps) case CHIP_RV560: case CHIP_RV570: caps->num_vert_fpus = 8; - caps->has_cmask = TRUE; + caps->has_cmask = true; caps->hiz_ram = RV530_HIZ_LIMIT; caps->zmask_ram = PIPE_ZMASK_SIZE; break; diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index 0b0fbf0019a..140878c41db 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -75,10 +75,10 @@ static void r300_destroy_context(struct pipe_context* context) struct r300_context* r300 = r300_context(context); if (r300->cs.priv && r300->hyperz_enabled) { - r300->rws->cs_request_feature(&r300->cs, RADEON_FID_R300_HYPERZ_ACCESS, FALSE); + r300->rws->cs_request_feature(&r300->cs, RADEON_FID_R300_HYPERZ_ACCESS, false); } if (r300->cs.priv && r300->cmask_access) { - r300->rws->cs_request_feature(&r300->cs, RADEON_FID_R300_CMASK_ACCESS, FALSE); + r300->rws->cs_request_feature(&r300->cs, RADEON_FID_R300_CMASK_ACCESS, false); } if (r300->blitter) @@ -142,14 +142,14 @@ static void r300_flush_callback(void *data, unsigned flags, r300->atomname.state = NULL; \ r300->atomname.size = atomsize; \ r300->atomname.emit = r300_emit_##atomname; \ - r300->atomname.dirty = FALSE; \ + r300->atomname.dirty = false; \ } while (0) #define R300_ALLOC_ATOM(atomname, statetype) \ do { \ r300->atomname.state = CALLOC_STRUCT(statetype); \ if (r300->atomname.state == NULL) \ - return FALSE; \ + return false; \ } while (0) static bool r300_setup_atoms(struct r300_context* r300) @@ -244,11 +244,11 @@ static bool r300_setup_atoms(struct r300_context* r300) } /* Some non-CSO atoms don't use the state pointer. */ - r300->fb_state_pipelined.allow_null_state = TRUE; - r300->fs_rc_constant_state.allow_null_state = TRUE; - r300->pvs_flush.allow_null_state = TRUE; - r300->query_start.allow_null_state = TRUE; - r300->texture_cache_inval.allow_null_state = TRUE; + r300->fb_state_pipelined.allow_null_state = true; + r300->fs_rc_constant_state.allow_null_state = true; + r300->pvs_flush.allow_null_state = true; + r300->query_start.allow_null_state = true; + r300->texture_cache_inval.allow_null_state = true; /* Some states must be marked as dirty here to properly set up * hardware in the first command stream. */ @@ -258,7 +258,7 @@ static bool r300_setup_atoms(struct r300_context* r300) r300_mark_atom_dirty(r300, &r300->texture_cache_inval); r300_mark_atom_dirty(r300, &r300->textures_state); - return TRUE; + return true; } /* Not every gallium frontend calls every driver function before the first draw @@ -407,9 +407,9 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen, /* Disable converting points/lines to triangles. */ draw_wide_line_threshold(r300->draw, 10000000.f); draw_wide_point_threshold(r300->draw, 10000000.f); - draw_wide_point_sprites(r300->draw, FALSE); - draw_enable_line_stipple(r300->draw, TRUE); - draw_enable_point_sprites(r300->draw, FALSE); + draw_wide_point_sprites(r300->draw, false); + draw_enable_line_stipple(r300->draw, true); + draw_enable_point_sprites(r300->draw, false); } if (!r300_setup_atoms(r300)) diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index bc7c3cd0952..adce1d772e5 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -681,7 +681,7 @@ static inline struct r300_vertex_shader *r300_vs(struct r300_context *r300) static inline void r300_mark_atom_dirty(struct r300_context *r300, struct r300_atom *atom) { - atom->dirty = TRUE; + atom->dirty = true; if (!r300->first_dirty) { r300->first_dirty = atom; diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 52bc70386f9..3ac7f9eb63c 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -659,7 +659,7 @@ void r300_emit_query_start(struct r300_context *r300, unsigned size, void*state) } OUT_CS_REG(R300_ZB_ZPASS_DATA, 0); END_CS; - query->begin_emitted = TRUE; + query->begin_emitted = true; } static void r300_emit_query_end_frag_pipes(struct r300_context *r300, @@ -755,7 +755,7 @@ void r300_emit_query_end(struct r300_context* r300) if (!query) return; - if (query->begin_emitted == FALSE) + if (query->begin_emitted == false) return; if (caps->family == CHIP_RV530) { @@ -766,7 +766,7 @@ void r300_emit_query_end(struct r300_context* r300) } else r300_emit_query_end_frag_pipes(r300, query); - query->begin_emitted = FALSE; + query->begin_emitted = false; query->num_results += query->num_pipes; /* XXX grab all the results and reset the counter. */ @@ -1233,7 +1233,7 @@ void r300_emit_hiz_clear(struct r300_context *r300, unsigned size, void *state) END_CS; /* Mark the current zbuffer's hiz ram as in use. */ - r300->hiz_in_use = TRUE; + r300->hiz_in_use = true; r300->hiz_func = HIZ_FUNC_NONE; r300_mark_atom_dirty(r300, &r300->hyperz_state); } @@ -1255,7 +1255,7 @@ void r300_emit_zmask_clear(struct r300_context *r300, unsigned size, void *state END_CS; /* Mark the current zbuffer's zmask as in use. */ - r300->zmask_in_use = TRUE; + r300->zmask_in_use = true; r300_mark_atom_dirty(r300, &r300->hyperz_state); } @@ -1276,7 +1276,7 @@ void r300_emit_cmask_clear(struct r300_context *r300, unsigned size, void *state END_CS; /* Mark the current zbuffer's zmask as in use. */ - r300->cmask_in_use = TRUE; + r300->cmask_in_use = true; r300_mark_fb_state_dirty(r300, R300_CHANGED_CMASK_ENABLE); } @@ -1311,7 +1311,7 @@ bool r300_emit_buffer_validate(struct r300_context *r300, (struct r300_textures_state*)r300->textures_state.state; struct r300_resource *tex; unsigned i; - bool flushed = FALSE; + bool flushed = false; validate: if (r300->fb_state.dirty) { @@ -1404,13 +1404,13 @@ validate: if (!r300->rws->cs_validate(&r300->cs)) { /* Ooops, an infinite loop, give up. */ if (flushed) - return FALSE; + return false; - flushed = TRUE; + flushed = true; goto validate; } - return TRUE; + return true; } unsigned r300_get_num_dirty_dwords(struct r300_context *r300) @@ -1452,7 +1452,7 @@ void r300_emit_dirty_state(struct r300_context* r300) foreach_dirty_atom(r300, atom) { if (atom->dirty) { atom->emit(r300, atom->size, atom->state); - atom->dirty = FALSE; + atom->dirty = false; } } diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c index 8956e68b055..2c813e5fad0 100644 --- a/src/gallium/drivers/r300/r300_flush.c +++ b/src/gallium/drivers/r300/r300_flush.c @@ -61,13 +61,13 @@ static void r300_flush_and_cleanup(struct r300_context *r300, unsigned flags, r300_mark_atom_dirty(r300, atom); } } - r300->vertex_arrays_dirty = TRUE; + r300->vertex_arrays_dirty = true; /* Unmark HWTCL state for SWTCL. */ if (!r300->screen->caps.has_tcl) { - r300->vs_state.dirty = FALSE; - r300->vs_constants.dirty = FALSE; - r300->clip_state.dirty = FALSE; + r300->vs_state.dirty = false; + r300->vs_constants.dirty = false; + r300->clip_state.dirty = false; } } @@ -101,7 +101,7 @@ void r300_flush(struct pipe_context *pipe, r300->num_z_clears = 0; } else if (r300->hyperz_time_of_last_flush - os_time_get() > 2000000) { /* If there hasn't been a Z clear for 2 seconds, revoke Hyper-Z access. */ - r300->hiz_in_use = FALSE; + r300->hiz_in_use = false; /* Decompress the Z buffer. */ if (r300->zmask_in_use) { @@ -118,8 +118,8 @@ void r300_flush(struct pipe_context *pipe, /* Revoke Hyper-Z access, so that some other process can take it. */ r300->rws->cs_request_feature(&r300->cs, RADEON_FID_R300_HYPERZ_ACCESS, - FALSE); - r300->hyperz_enabled = FALSE; + false); + r300->hyperz_enabled = false; } } } diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index 49cd34f746b..4c25492b634 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -214,7 +214,7 @@ void r300_fragment_program_get_external_state( } if (t->b.target == PIPE_TEXTURE_3D) - state->unit[i].clamp_and_scale_before_fetch = TRUE; + state->unit[i].clamp_and_scale_before_fetch = true; } } } @@ -243,7 +243,7 @@ static void r300_dummy_fragment_shader( state.tokens = ureg_finalize(ureg); - shader->dummy = TRUE; + shader->dummy = true; r300_translate_fragment_shader(r300, shader, state.tokens); ureg_destroy(ureg); @@ -453,9 +453,9 @@ static void r300_translate_fragment_shader( compiler.Base.is_r500 = r300->screen->caps.is_r500; compiler.Base.is_r400 = r300->screen->caps.is_r400; compiler.Base.disable_optimizations = DBG_ON(r300, DBG_NO_OPT); - compiler.Base.has_half_swizzles = TRUE; - compiler.Base.has_presub = TRUE; - compiler.Base.has_omod = TRUE; + compiler.Base.has_half_swizzles = true; + compiler.Base.has_presub = true; + compiler.Base.has_omod = true; compiler.Base.max_temp_regs = compiler.Base.is_r500 ? 128 : (compiler.Base.is_r400 ? 64 : 32); compiler.Base.max_constants = compiler.Base.is_r500 ? 256 : 32; @@ -491,7 +491,7 @@ static void r300_translate_fragment_shader( if (!r300->screen->caps.is_r500 || compiler.Base.Program.Constants.Count > 200) { - compiler.Base.remove_unused_constants = TRUE; + compiler.Base.remove_unused_constants = true; } /** @@ -503,7 +503,7 @@ static void r300_translate_fragment_shader( * to read from a newly allocated temporary. */ if (wpos != ATTR_UNUSED) { /* Moving the input to some other reg is not really necessary. */ - rc_transform_fragment_wpos(&compiler.Base, wpos, wpos, TRUE); + rc_transform_fragment_wpos(&compiler.Base, wpos, wpos, true); } if (face != ATTR_UNUSED) { @@ -587,7 +587,7 @@ bool r300_pick_fragment_shader(struct r300_context *r300, memcpy(&fs->shader->compare_state, state, sizeof(*state)); r300_translate_fragment_shader(r300, fs->shader, fs->state.tokens); - return TRUE; + return true; } else { /* Check if the currently-bound shader has been compiled @@ -599,10 +599,10 @@ bool r300_pick_fragment_shader(struct r300_context *r300, if (memcmp(&ptr->compare_state, state, sizeof(*state)) == 0) { if (fs->shader != ptr) { fs->shader = ptr; - return TRUE; + return true; } /* The currently-bound one is OK. */ - return FALSE; + return false; } ptr = ptr->next; } @@ -614,9 +614,9 @@ bool r300_pick_fragment_shader(struct r300_context *r300, memcpy(&ptr->compare_state, state, sizeof(*state)); r300_translate_fragment_shader(r300, ptr, fs->state.tokens); - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/src/gallium/drivers/r300/r300_fs.h b/src/gallium/drivers/r300/r300_fs.h index 8e011bb2ca7..625c384ade9 100644 --- a/src/gallium/drivers/r300/r300_fs.h +++ b/src/gallium/drivers/r300/r300_fs.h @@ -84,14 +84,14 @@ void r300_fragment_program_get_external_state(struct r300_context *r300, 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; + return false; + return (fs->shader->code.writes_depth) ? true : false; } static inline bool r300_fragment_shader_writes_all(struct r300_fragment_shader *fs) { if (!fs) - return FALSE; - return (fs->shader->write_all) ? TRUE : FALSE; + return false; + return (fs->shader->write_all) ? true : false; } #endif /* R300_FS_H */ diff --git a/src/gallium/drivers/r300/r300_hyperz.c b/src/gallium/drivers/r300/r300_hyperz.c index eba1ba0028c..e043c9ca0d5 100644 --- a/src/gallium/drivers/r300/r300_hyperz.c +++ b/src/gallium/drivers/r300/r300_hyperz.c @@ -74,19 +74,19 @@ static bool r300_is_hiz_func_valid(struct r300_context *r300) unsigned func = dsa->dsa.depth_func; if (r300->hiz_func == HIZ_FUNC_NONE) - return TRUE; + return true; /* func1 is less/lessthan */ if (r300->hiz_func == HIZ_FUNC_MAX && (func == PIPE_FUNC_GEQUAL || func == PIPE_FUNC_GREATER)) - return FALSE; + return false; /* func1 is greater/greaterthan */ if (r300->hiz_func == HIZ_FUNC_MIN && (func == PIPE_FUNC_LESS || func == PIPE_FUNC_LEQUAL)) - return FALSE; + return false; - return TRUE; + return true; } static bool r300_dsa_stencil_op_not_keep(struct pipe_stencil_state *s) @@ -101,30 +101,30 @@ static bool r300_hiz_allowed(struct r300_context *r300) struct r300_screen *r300screen = r300->screen; if (r300_fragment_shader_writes_depth(r300_fs(r300))) - return FALSE; + return false; if (r300->query_current) - return FALSE; + return false; /* If the depth function is inverted, HiZ must be disabled. */ if (!r300_is_hiz_func_valid(r300)) - return FALSE; + return false; /* if stencil fail/zfail op is not KEEP */ if (r300_dsa_stencil_op_not_keep(&dsa->dsa.stencil[0]) || r300_dsa_stencil_op_not_keep(&dsa->dsa.stencil[1])) - return FALSE; + return false; if (dsa->dsa.depth_enabled) { /* if depth func is EQUAL pre-r500 */ if (dsa->dsa.depth_func == PIPE_FUNC_EQUAL && !r300screen->caps.is_r500) - return FALSE; + return false; /* if depth func is NOTEQUAL */ if (dsa->dsa.depth_func == PIPE_FUNC_NOTEQUAL) - return FALSE; + return false; } - return TRUE; + return true; } static void r300_update_hyperz(struct r300_context* r300) @@ -190,7 +190,7 @@ static void r300_update_hyperz(struct r300_context* r300) /* If writemask is disabled, the HiZ memory will not be changed, * so we can keep its content for later. */ if (dsa->dsa.depth_writemask) { - r300->hiz_in_use = FALSE; + r300->hiz_in_use = false; } return; } diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c index a7f810d88c0..00514d0e1e8 100644 --- a/src/gallium/drivers/r300/r300_query.c +++ b/src/gallium/drivers/r300/r300_query.c @@ -151,7 +151,7 @@ static bool r300_get_query_result(struct pipe_context* pipe, if (wait) { r300->rws->buffer_wait(r300->rws, q->buf, OS_TIMEOUT_INFINITE, RADEON_USAGE_READWRITE); - vresult->b = TRUE; + vresult->b = true; } else { vresult->b = r300->rws->buffer_wait(r300->rws, q->buf, 0, RADEON_USAGE_READWRITE); } @@ -162,7 +162,7 @@ static bool r300_get_query_result(struct pipe_context* pipe, PIPE_MAP_READ | (!wait ? PIPE_MAP_DONTBLOCK : 0)); if (!map) - return FALSE; + return false; /* Sum up the results. */ temp = 0; @@ -178,7 +178,7 @@ static bool r300_get_query_result(struct pipe_context* pipe, } else { vresult->u64 = temp; } - return TRUE; + return true; } static void r300_render_condition(struct pipe_context *pipe, @@ -190,7 +190,7 @@ static void r300_render_condition(struct pipe_context *pipe, union pipe_query_result result; bool wait; - r300->skip_rendering = FALSE; + r300->skip_rendering = false; if (query) { wait = mode == PIPE_RENDER_COND_WAIT || diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 09e56dc245f..84582938d8f 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -197,7 +197,7 @@ static bool r300_reserve_cs_dwords(struct r300_context *r300, enum r300_prepare_flags flags, unsigned cs_dwords) { - bool flushed = FALSE; + 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; @@ -220,7 +220,7 @@ static bool r300_reserve_cs_dwords(struct r300_context *r300, /* Reserve requested CS space. */ if (!r300->rws->cs_check_space(&r300->cs, cs_dwords)) { r300_flush(&r300->context, PIPE_FLUSH_ASYNC, NULL); - flushed = TRUE; + flushed = true; } return flushed; @@ -254,7 +254,7 @@ static bool r300_emit_states(struct r300_context *r300, index_buffer)) { fprintf(stderr, "r300: CS space validation failed. " "(not enough memory?) Skipping rendering.\n"); - return FALSE; + return false; } } @@ -275,7 +275,7 @@ static bool r300_emit_states(struct r300_context *r300, r300->vertex_arrays_instance_id != instance_id)) { r300_emit_vertex_arrays(r300, buffer_offset, indexed, instance_id); - r300->vertex_arrays_dirty = FALSE; + r300->vertex_arrays_dirty = false; r300->vertex_arrays_indexed = indexed; r300->vertex_arrays_offset = buffer_offset; r300->vertex_arrays_instance_id = instance_id; @@ -284,7 +284,7 @@ static bool r300_emit_states(struct r300_context *r300, if (emit_vertex_arrays_swtcl) r300_emit_vertex_arrays_swtcl(r300, indexed); - return TRUE; + return true; } /** @@ -319,16 +319,16 @@ static bool immd_is_good_idea(struct r300_context *r300, unsigned count) { if (DBG_ON(r300, DBG_NO_IMMD)) { - return FALSE; + return false; } if (count * r300->velems->vertex_size_dwords > IMMD_DWORDS) { - return FALSE; + return false; } /* Buffers can only be used for read by r300 (except query buffers, but * those can't be bound by an gallium frontend as vertex buffers). */ - return TRUE; + return true; } /***************************************************************************** @@ -961,7 +961,7 @@ static bool r300_render_allocate_vertices(struct vbuf_render* render, RADEON_DOMAIN_GTT, RADEON_FLAG_NO_INTERPROCESS_SHARING); if (!r300->vbo) { - return FALSE; + return false; } r300->draw_vbo_offset = 0; r300render->vbo_ptr = rws->buffer_map(rws, r300->vbo, &r300->cs, @@ -969,7 +969,7 @@ static bool r300_render_allocate_vertices(struct vbuf_render* render, } r300render->vertex_size = vertex_size; - return TRUE; + return true; } static void* r300_render_map_vertices(struct vbuf_render* render) @@ -1201,7 +1201,7 @@ void r300_blitter_draw_rectangle(struct blitter_context *blitter, r300_update_derived_state(r300); /* Mark some states we don't care about as non-dirty. */ - r300->viewport_state.dirty = FALSE; + r300->viewport_state.dirty = false; if (!r300_prepare_for_rendering(r300, PREP_EMIT_STATES, NULL, dwords, 0, 0, -1)) goto done; diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 80438315cd6..43ba7a8f219 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -585,17 +585,17 @@ util_format_is_rgba1010102_variant(const struct util_format_description *desc) if (desc->block.width != 1 || desc->block.height != 1 || desc->block.bits != 32) - return FALSE; + return false; for (chan = 0; chan < 4; ++chan) { if(desc->channel[chan].type != UTIL_FORMAT_TYPE_UNSIGNED && desc->channel[chan].type != UTIL_FORMAT_TYPE_VOID) - return FALSE; + return false; if (desc->channel[chan].size != size[chan]) - return FALSE; + return false; } - return TRUE; + return true; } static bool r300_is_blending_supported(struct r300_screen *rscreen, @@ -837,7 +837,7 @@ struct pipe_screen* r300_screen_create(struct radeon_winsys *rws, if (SCREEN_DBG_ON(r300screen, DBG_NO_HIZ)) r300screen->caps.hiz_ram = 0; if (SCREEN_DBG_ON(r300screen, DBG_NO_TCL)) - r300screen->caps.has_tcl = FALSE; + r300screen->caps.has_tcl = false; r300screen->rws = rws; r300screen->screen.destroy = r300_destroy_screen; diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h index 31d6787851c..721de566ea5 100644 --- a/src/gallium/drivers/r300/r300_screen.h +++ b/src/gallium/drivers/r300/r300_screen.h @@ -107,7 +107,7 @@ radeon_winsys(struct pipe_screen *screen) { /*@}*/ static inline bool SCREEN_DBG_ON(struct r300_screen * screen, unsigned flags) { - return (screen->debug & flags) ? TRUE : FALSE; + return (screen->debug & flags) ? true : false; } static inline void SCREEN_DBG(struct r300_screen * screen, unsigned flags, diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c index 9a884e556f9..2b119a83e79 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.c +++ b/src/gallium/drivers/r300/r300_screen_buffer.c @@ -128,7 +128,7 @@ r300_buffer_transfer_map( struct pipe_context *context, /* We changed the buffer, now we need to bind it where the old one was bound. */ for (i = 0; i < r300->nr_vertex_buffers; i++) { if (r300->vertex_buffer[i].buffer.resource == &rbuf->b) { - r300->vertex_arrays_dirty = TRUE; + r300->vertex_arrays_dirty = true; break; } } diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 6a61f939e47..530e938afda 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -397,8 +397,8 @@ static void* r300_create_blend_state(struct pipe_context* pipe, ( r300_translate_blend_factor(srcRGBX) << R300_SRC_BLEND_SHIFT) | ( r300_translate_blend_factor(dstRGBX) << R300_DST_BLEND_SHIFT); - blend_eq = r300_translate_blend_function(eqRGB, TRUE); - blend_eq_noclamp = r300_translate_blend_function(eqRGB, FALSE); + blend_eq = r300_translate_blend_function(eqRGB, true); + blend_eq_noclamp = r300_translate_blend_function(eqRGB, false); blend_control |= blend_eq; blend_control_noalpha |= blend_eq; @@ -409,11 +409,11 @@ static void* r300_create_blend_state(struct pipe_context* pipe, blend_control |= blend_read_enable(eqRGB, eqA, dstRGB, dstA, srcRGB, srcA, r300screen->caps.is_r500); blend_control_noclamp |= blend_read_enable(eqRGB, eqA, dstRGB, dstA, - srcRGB, srcA, FALSE); + srcRGB, srcA, false); blend_control_noalpha |= blend_read_enable(eqRGB, eqA, dstRGBX, dstA, srcRGBX, srcA, r300screen->caps.is_r500); blend_control_noalpha_noclamp |= blend_read_enable(eqRGB, eqA, dstRGBX, dstA, - srcRGBX, srcA, FALSE); + srcRGBX, srcA, false); /* Optimization: discard pixels which don't change the colorbuffer. * It cannot be used with FP16 AA. */ @@ -430,8 +430,8 @@ static void* r300_create_blend_state(struct pipe_context* pipe, alpha_blend_control = alpha_blend_control_noclamp = (r300_translate_blend_factor(srcA) << R300_SRC_BLEND_SHIFT) | (r300_translate_blend_factor(dstA) << R300_DST_BLEND_SHIFT); - alpha_blend_control |= r300_translate_blend_function(eqA, TRUE); - alpha_blend_control_noclamp |= r300_translate_blend_function(eqA, FALSE); + alpha_blend_control |= r300_translate_blend_function(eqA, true); + alpha_blend_control_noclamp |= r300_translate_blend_function(eqA, false); } if (srcA != srcRGBX || dstA != dstRGBX || eqA != eqRGB) { blend_control_noalpha |= R300_SEPARATE_ALPHA_ENABLE; @@ -440,8 +440,8 @@ static void* r300_create_blend_state(struct pipe_context* pipe, alpha_blend_control_noalpha = alpha_blend_control_noalpha_noclamp = (r300_translate_blend_factor(srcA) << R300_SRC_BLEND_SHIFT) | (r300_translate_blend_factor(dstA) << R300_DST_BLEND_SHIFT); - alpha_blend_control_noalpha |= r300_translate_blend_function(eqA, TRUE); - alpha_blend_control_noalpha_noclamp |= r300_translate_blend_function(eqA, FALSE); + alpha_blend_control_noalpha |= r300_translate_blend_function(eqA, true); + alpha_blend_control_noalpha_noclamp |= r300_translate_blend_function(eqA, false); } } @@ -721,7 +721,7 @@ static void* r300_create_dsa_state(struct pipe_context* pipe, (state->stencil[0].writemask << R300_STENCILWRITEMASK_SHIFT); if (state->stencil[1].enabled) { - dsa->two_sided = TRUE; + dsa->two_sided = true; z_buffer_control |= R300_STENCIL_FRONT_BACK; z_stencil_control |= @@ -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; - bool unlock_zbuffer = FALSE; + bool unlock_zbuffer = false; if (r300->screen->caps.is_r500) { max_width = max_height = 4096; @@ -929,7 +929,7 @@ r300_set_framebuffer_state(struct pipe_context* pipe, if (!pipe_surface_equal(current_state->zsbuf, state->zsbuf)) { /* Decompress the currently bound zbuffer before we bind another one. */ r300_decompress_zmask(r300); - r300->hiz_in_use = FALSE; + r300->hiz_in_use = false; } } else { /* We don't bind another zbuffer, so lock the current one. */ @@ -942,10 +942,10 @@ r300_set_framebuffer_state(struct pipe_context* pipe, /* We are binding some other zbuffer, so decompress the locked one, * it gets unlocked automatically. */ r300_decompress_zmask_locked_unsafe(r300); - r300->hiz_in_use = FALSE; + r300->hiz_in_use = false; } else { /* We are binding the locked zbuffer again, so unlock it. */ - unlock_zbuffer = TRUE; + unlock_zbuffer = true; } } } @@ -1379,12 +1379,12 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state) r300->flatshade = rs->rs.flatshade; r300->clip_halfz = rs->rs.clip_halfz; } else { - r300->polygon_offset_enabled = FALSE; + r300->polygon_offset_enabled = false; r300->sprite_coord_enable = 0; - r300->two_sided_color = FALSE; - r300->msaa_enable = FALSE; - r300->flatshade = FALSE; - r300->clip_halfz = FALSE; + r300->two_sided_color = false; + r300->msaa_enable = false; + r300->flatshade = false; + r300->clip_halfz = false; } UPDATE_STATE(state, r300->rs_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; - bool dirty_tex = FALSE; + bool dirty_tex = false; assert(start == 0); /* non-zero not handled yet */ @@ -1593,7 +1593,7 @@ static void r300_set_sampler_views(struct pipe_context* pipe, } /* A new sampler view (= texture)... */ - dirty_tex = TRUE; + dirty_tex = true; /* Set the texrect factor in the fragment shader. * Needed for RECT and NPOT fallback. */ @@ -1790,7 +1790,7 @@ static void r300_set_vertex_buffers_hwtcl(struct pipe_context* pipe, &r300->dummy_vb, 0, 1, 0, false); } - r300->vertex_arrays_dirty = TRUE; + r300->vertex_arrays_dirty = true; } static void r300_set_vertex_buffers_swtcl(struct pipe_context* pipe, @@ -1927,7 +1927,7 @@ static void r300_bind_vertex_elements_state(struct pipe_context *pipe, UPDATE_STATE(&velems->vertex_stream, r300->vertex_stream_state); r300->vertex_stream_state.size = (1 + velems->vertex_stream.count) * 2; - r300->vertex_arrays_dirty = TRUE; + r300->vertex_arrays_dirty = true; } static void r300_delete_vertex_elements_state(struct pipe_context *pipe, void *state) diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index d83ab338789..3adb031247f 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -1016,10 +1016,10 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300) if (sampler->state.compare_mode == PIPE_TEX_COMPARE_NONE) { texstate->format.format1 |= r300_get_swizzle_combined(depth_swizzle, - view->swizzle, FALSE); + view->swizzle, false); } else { texstate->format.format1 |= - r300_get_swizzle_combined(depth_swizzle, NULL, FALSE); + r300_get_swizzle_combined(depth_swizzle, NULL, false); } } @@ -1121,7 +1121,7 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300) r300_translate_tex_filters(PIPE_TEX_FILTER_NEAREST, PIPE_TEX_FILTER_NEAREST, PIPE_TEX_FILTER_NEAREST, - FALSE); + false); texstate->filter1 = 0; texstate->border_color = 0; diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index aa46627651c..40f63a8468b 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -170,7 +170,7 @@ uint32_t r300_translate_texformat(enum pipe_format format, uint32_t result = 0; const struct util_format_description *desc; int i; - bool uniform = TRUE; + bool uniform = true; const uint32_t sign_bit[4] = { R300_TX_FORMAT_SIGNED_W, R300_TX_FORMAT_SIGNED_Z, @@ -241,10 +241,10 @@ uint32_t r300_translate_texformat(enum pipe_format format, format != PIPE_FORMAT_LATC1_UNORM && format != PIPE_FORMAT_LATC1_SNORM) { result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view, - TRUE); + true); } else { result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view, - FALSE); + false); } /* S3TC formats. */ @@ -659,10 +659,10 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format) } /* Add sign. */ - uniform_sign = TRUE; + uniform_sign = true; for (i = 0; i < desc->nr_channels; i++) if (desc->channel[i].type != UTIL_FORMAT_TYPE_SIGNED) - uniform_sign = FALSE; + uniform_sign = false; if (uniform_sign) modifier |= R300_OUT_SIGN(0xf); @@ -886,7 +886,7 @@ bool r300_is_zs_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; + return r300_translate_texformat(format, NULL, true, false) != ~0; } void r300_texture_setup_format_state(struct r300_screen *screen, diff --git a/src/gallium/drivers/r300/r300_texture_desc.c b/src/gallium/drivers/r300/r300_texture_desc.c index b16730a3268..7b1b2e21d2a 100644 --- a/src/gallium/drivers/r300/r300_texture_desc.c +++ b/src/gallium/drivers/r300/r300_texture_desc.c @@ -88,7 +88,7 @@ static bool r300_texture_macro_switch(struct r300_resource *tex, unsigned tile, texdim; if (tex->b.nr_samples > 1) { - return TRUE; + return true; } tile = r300_get_pixel_alignment(tex->b.format, tex->b.nr_samples, @@ -193,7 +193,7 @@ static unsigned r300_texture_get_nblocksy(struct r300_resource *tex, *out_aligned_for_cbzb = height % (tile_height * 2) == 0; } else { - *out_aligned_for_cbzb = FALSE; + *out_aligned_for_cbzb = false; } } } @@ -236,7 +236,7 @@ static void r300_setup_miptree(struct r300_screen *screen, /* Compute the number of blocks in Y, see if the CBZB clear can be * used on the texture. */ - aligned_for_cbzb = FALSE; + aligned_for_cbzb = false; if (align_for_cbzb && tex->tex.cbzb_allowed[i]) nblocksy = r300_texture_get_nblocksy(tex, i, &aligned_for_cbzb); else @@ -298,7 +298,7 @@ static void r300_setup_cbzb_flags(struct r300_screen *rscreen, tex->tex.macrotile[0]; if (SCREEN_DBG_ON(rscreen, DBG_NO_CBZB)) - first_level_valid = FALSE; + first_level_valid = false; for (i = 0; i <= tex->b.last_level; i++) tex->tex.cbzb_allowed[i] = first_level_valid && tex->tex.macrotile[i]; @@ -388,7 +388,7 @@ static void r300_setup_hyperz_properties(struct r300_screen *screen, util_align_npot(stride, zmask_blocks_x_per_dw[pipes-1] * zcompsize); } else { tex->tex.zmask_dwords[i] = 0; - tex->tex.zcomp8x8[i] = FALSE; + tex->tex.zcomp8x8[i] = false; tex->tex.zmask_stride_in_pixels[i] = 0; } @@ -603,11 +603,11 @@ void r300_texture_desc_init(struct r300_screen *rscreen, r300_setup_cbzb_flags(rscreen, tex); /* Setup the miptree description. */ - r300_setup_miptree(rscreen, tex, TRUE); + r300_setup_miptree(rscreen, tex, true); /* If the required buffer size is larger than the given max size, * try again without the alignment for the CBZB clear. */ if (tex->buf && tex->tex.size_in_bytes > tex->buf->size) { - r300_setup_miptree(rscreen, tex, FALSE); + r300_setup_miptree(rscreen, tex, false); /* Make sure the buffer we got is large enough. */ if (tex->tex.size_in_bytes > tex->buf->size) { diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.c b/src/gallium/drivers/r300/r300_tgsi_to_rc.c index 7867939a454..137bfaf1e0c 100644 --- a/src/gallium/drivers/r300/r300_tgsi_to_rc.c +++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.c @@ -132,7 +132,7 @@ static void transform_dstreg( dst->WriteMask = src->Register.WriteMask; if (src->Register.Indirect) { - ttr->error = TRUE; + ttr->error = true; fprintf(stderr, "r300: Relative addressing of destination operands " "is unsupported.\n"); } @@ -222,12 +222,12 @@ static void transform_instruction(struct tgsi_to_rc * ttr, struct tgsi_full_inst dst = rc_insert_new_instruction(ttr->compiler, ttr->compiler->Program.Instructions.Prev); dst->U.I.Opcode = translate_opcode(src->Instruction.Opcode); - if (!ttr->compiler->is_r500 && dst->U.I.Opcode == RC_OPCODE_BGNLOOP && ttr->error == FALSE) { - ttr->error = TRUE; + if (!ttr->compiler->is_r500 && dst->U.I.Opcode == RC_OPCODE_BGNLOOP && ttr->error == false) { + ttr->error = true; fprintf(stderr, "r300: Dynamic loops are not supported on R3xx/R4xx.\n"); } - if (!ttr->compiler->is_r500 && dst->U.I.Opcode == RC_OPCODE_IF && ttr->error == FALSE) { - ttr->error = TRUE; + if (!ttr->compiler->is_r500 && dst->U.I.Opcode == RC_OPCODE_IF && ttr->error == false) { + ttr->error = true; fprintf(stderr, "r300: Branches are not supported on R3xx/R4xx.\n"); } @@ -270,7 +270,7 @@ void r300_tgsi_to_rc(struct tgsi_to_rc * ttr, unsigned imm_index = 0; int i; - ttr->error = FALSE; + ttr->error = false; /* Allocate constants placeholders. * diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c index f061e99f2a6..85253daf4ac 100644 --- a/src/gallium/drivers/r300/r300_transfer.c +++ b/src/gallium/drivers/r300/r300_transfer.c @@ -114,7 +114,7 @@ r300_texture_transfer_map(struct pipe_context *ctx, referenced_cs = r300->rws->cs_is_buffer_referenced(&r300->cs, tex->buf, RADEON_USAGE_READWRITE); if (referenced_cs) { - referenced_hw = TRUE; + referenced_hw = true; } else { referenced_hw = !r300->rws->buffer_wait(r300->rws, tex->buf, 0, RADEON_USAGE_READWRITE); diff --git a/src/gallium/drivers/r300/r300_vs.c b/src/gallium/drivers/r300/r300_vs.c index a5bf371d958..6449584bc09 100644 --- a/src/gallium/drivers/r300/r300_vs.c +++ b/src/gallium/drivers/r300/r300_vs.c @@ -209,9 +209,9 @@ void r300_translate_vertex_shader(struct r300_context *r300, compiler.Base.debug = &r300->context.debug; compiler.Base.is_r500 = r300->screen->caps.is_r500; compiler.Base.disable_optimizations = DBG_ON(r300, DBG_NO_OPT); - compiler.Base.has_half_swizzles = FALSE; - compiler.Base.has_presub = FALSE; - compiler.Base.has_omod = FALSE; + compiler.Base.has_half_swizzles = false; + compiler.Base.has_presub = false; + compiler.Base.has_omod = false; compiler.Base.max_temp_regs = 32; compiler.Base.max_constants = 256; compiler.Base.max_alu_insts = r300->screen->caps.is_r500 ? 1024 : 256; @@ -230,12 +230,12 @@ void r300_translate_vertex_shader(struct r300_context *r300, if (ttr.error) { fprintf(stderr, "r300 VP: Cannot translate a shader. " "Corresponding draws will be skipped.\n"); - vs->dummy = TRUE; + vs->dummy = true; return; } if (compiler.Base.Program.Constants.Count > 200) { - compiler.Base.remove_unused_constants = TRUE; + compiler.Base.remove_unused_constants = true; } compiler.RequiredOutputs = ~(~0U << (vs->info.num_outputs + (vs->wpos ? 1 : 0))); @@ -252,7 +252,7 @@ void r300_translate_vertex_shader(struct r300_context *r300, " skipped.\n", compiler.Base.ErrorMsg); rc_destroy(&compiler.Base); - vs->dummy = TRUE; + vs->dummy = true; return; } diff --git a/src/gallium/drivers/r300/r300_vs_draw.c b/src/gallium/drivers/r300/r300_vs_draw.c index c2a4db6d1df..65eff8356ed 100644 --- a/src/gallium/drivers/r300/r300_vs_draw.c +++ b/src/gallium/drivers/r300/r300_vs_draw.c @@ -95,7 +95,7 @@ static void emit_output(struct tgsi_transform_context *ctx, decl = tgsi_default_full_declaration(); decl.Declaration.File = TGSI_FILE_OUTPUT; decl.Declaration.Interpolate = 1; - decl.Declaration.Semantic = TRUE; + decl.Declaration.Semantic = true; decl.Semantic.Name = name; decl.Semantic.Index = index; decl.Range.First = decl.Range.Last = reg; @@ -163,7 +163,7 @@ static void transform_decl(struct tgsi_transform_context *ctx, if (decl->Semantic.Index == 1 && !vsctx->color_used[0]) { insert_output_before(ctx, decl, TGSI_SEMANTIC_COLOR, 0, TGSI_INTERPOLATE_LINEAR); - vsctx->color_used[0] = TRUE; + vsctx->color_used[0] = true; } break; @@ -176,17 +176,17 @@ static void transform_decl(struct tgsi_transform_context *ctx, if (!vsctx->color_used[0]) { insert_output_before(ctx, decl, TGSI_SEMANTIC_COLOR, 0, TGSI_INTERPOLATE_LINEAR); - vsctx->color_used[0] = TRUE; + vsctx->color_used[0] = true; } if (!vsctx->color_used[1]) { insert_output_before(ctx, decl, TGSI_SEMANTIC_COLOR, 1, TGSI_INTERPOLATE_LINEAR); - vsctx->color_used[1] = TRUE; + vsctx->color_used[1] = true; } if (decl->Semantic.Index == 1 && !vsctx->bcolor_used[0]) { insert_output_before(ctx, decl, TGSI_SEMANTIC_BCOLOR, 0, TGSI_INTERPOLATE_LINEAR); - vsctx->bcolor_used[0] = TRUE; + vsctx->bcolor_used[0] = true; } break; @@ -204,7 +204,7 @@ static void transform_decl(struct tgsi_transform_context *ctx, ++vsctx->num_outputs; } else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) { for (i = decl->Range.First; i <= decl->Range.Last; i++) { - vsctx->temp_used[i] = TRUE; + vsctx->temp_used[i] = true; } } @@ -227,7 +227,7 @@ static void transform_inst(struct tgsi_transform_context *ctx, unsigned i; if (!vsctx->first_instruction) { - vsctx->first_instruction = TRUE; + vsctx->first_instruction = true; /* Insert the generic output for WPOS. */ emit_output(ctx, TGSI_SEMANTIC_GENERIC, vsctx->last_generic + 1, @@ -268,7 +268,7 @@ static void transform_inst(struct tgsi_transform_context *ctx, new_inst.Src[0].Register.Index = vsctx->pos_temp; ctx->emit_instruction(ctx, &new_inst); - vsctx->end_instruction = TRUE; + vsctx->end_instruction = true; } else { /* Not an END instruction. */ /* Fix writes to outputs. */ @@ -337,12 +337,12 @@ void r300_draw_init_vertex_shader(struct r300_context *r300, switch (info.output_semantic_name[i]) { case TGSI_SEMANTIC_COLOR: assert(index < 2); - transform.color_used[index] = TRUE; + transform.color_used[index] = true; break; case TGSI_SEMANTIC_BCOLOR: assert(index < 2); - transform.bcolor_used[index] = TRUE; + transform.bcolor_used[index] = true; break; } } diff --git a/src/gallium/drivers/r600/evergreen_hw_context.c b/src/gallium/drivers/r600/evergreen_hw_context.c index e2231d35d0f..e20d4c1f408 100644 --- a/src/gallium/drivers/r600/evergreen_hw_context.c +++ b/src/gallium/drivers/r600/evergreen_hw_context.c @@ -109,7 +109,7 @@ void evergreen_cp_dma_clear_buffer(struct r600_context *rctx, r600_need_cs_space(rctx, 10 + (rctx->b.flags ? R600_MAX_FLUSH_CS_DWORDS : 0) + - R600_MAX_PFP_SYNC_ME_DWORDS, FALSE, 0); + R600_MAX_PFP_SYNC_ME_DWORDS, false, 0); /* Flush the caches for the first copy only. */ if (rctx->b.flags) { diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 8c860c8ec59..e51ffb6000d 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -225,13 +225,13 @@ static uint32_t r600_translate_dbformat(enum pipe_format format) static bool r600_is_sampler_format_supported(struct pipe_screen *screen, enum pipe_format format) { return r600_translate_texformat(screen, format, NULL, NULL, NULL, - FALSE) != ~0U; + false) != ~0U; } static bool r600_is_colorbuffer_format_supported(enum amd_gfx_level chip, enum pipe_format format) { - return r600_translate_colorformat(chip, format, FALSE) != ~0U && - r600_translate_colorswap(format, FALSE) != ~0U; + return r600_translate_colorformat(chip, format, false) != ~0U && + r600_translate_colorswap(format, false) != ~0U; } static bool r600_is_zs_format_supported(enum pipe_format format) @@ -671,9 +671,9 @@ static void evergreen_fill_buffer_resource_words(struct r600_context *rctx, desc = util_format_description(params->pipe_format); if (params->force_swizzle) - swizzle_res = r600_get_swizzle_combined(params->swizzle, NULL, TRUE); + swizzle_res = r600_get_swizzle_combined(params->swizzle, NULL, true); else - swizzle_res = r600_get_swizzle_combined(desc->swizzle, params->swizzle, TRUE); + swizzle_res = r600_get_swizzle_combined(desc->swizzle, params->swizzle, true); va = tmp->resource.gpu_address + params->offset; *skip_mip_address_reloc = true; @@ -755,7 +755,7 @@ static int evergreen_fill_tex_resource_words(struct r600_context *rctx, unsigned base_level, first_level, last_level; unsigned dim, last_layer; uint64_t va; - bool do_endian_swap = FALSE; + bool do_endian_swap = false; tile_split = tmp->surface.u.legacy.tile_split; surflevel = tmp->surface.u.legacy.level; @@ -1080,10 +1080,10 @@ static void evergreen_set_color_surface_buffer(struct r600_context *rctx, width_elements = last_element - first_element + 1; - format = r600_translate_colorformat(rctx->b.gfx_level, pformat, FALSE); - swap = r600_translate_colorswap(pformat, FALSE); + format = r600_translate_colorformat(rctx->b.gfx_level, pformat, false); + swap = r600_translate_colorswap(pformat, false); - endian = r600_colorformat_endian_swap(format, FALSE); + endian = r600_colorformat_endian_swap(format, false); desc = util_format_description(pformat); i = util_format_get_first_non_void_channel(pformat); @@ -1139,7 +1139,7 @@ static void evergreen_set_color_surface_common(struct r600_context *rctx, unsigned non_disp_tiling, macro_aspect, tile_split, bankh, bankw, fmask_bankh, nbanks; unsigned format, swap, ntype, endian; const struct util_format_description *desc; - bool blend_clamp = 0, blend_bypass = 0, do_endian_swap = FALSE; + bool blend_clamp = 0, blend_bypass = 0, do_endian_swap = false; int i; color->offset = (uint64_t)rtex->surface.u.legacy.level[level].offset_256B * 256; @@ -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; - bool 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), @@ -3545,13 +3545,13 @@ void evergreen_update_ps_state(struct pipe_context *ctx, struct r600_pipe_shader shader->ps_color_export_mask = rshader->ps_color_export_mask; if (ninterp == 0) { ninterp = 1; - have_perspective = TRUE; + have_perspective = true; } if (!spi_baryc_cntl) spi_baryc_cntl |= spi_baryc_enable_bit[0]; if (!have_perspective && !have_linear) - have_perspective = TRUE; + have_perspective = true; spi_ps_in_control_0 = S_0286CC_NUM_INTERP(ninterp) | S_0286CC_PERSP_GRADIENT_ENA(have_perspective) | @@ -4412,7 +4412,7 @@ static void evergreen_set_shader_images(struct pipe_context *ctx, } istate->atom.num_dw = util_bitcount(istate->enabled_mask) * 46; - istate->dirty_buffer_constants = TRUE; + istate->dirty_buffer_constants = true; rctx->b.flags |= R600_CONTEXT_WAIT_3D_IDLE | R600_CONTEXT_FLUSH_AND_INV; rctx->b.flags |= R600_CONTEXT_FLUSH_AND_INV_CB | R600_CONTEXT_FLUSH_AND_INV_CB_META; diff --git a/src/gallium/drivers/r600/r600_blit.c b/src/gallium/drivers/r600/r600_blit.c index bb90814cd29..b73a7b5b70e 100644 --- a/src/gallium/drivers/r600/r600_blit.c +++ b/src/gallium/drivers/r600/r600_blit.c @@ -806,7 +806,7 @@ void r600_resource_copy_region(struct pipe_context *ctx, util_blitter_blit_generic(rctx->blitter, dst_view, &dstbox, src_view, src_box, src_width0, src_height0, PIPE_MASK_RGBAZS, PIPE_TEX_FILTER_NEAREST, NULL, - FALSE, FALSE, 0); + false, false, 0); r600_blitter_end(ctx); pipe_surface_reference(&dst_view, NULL); diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c index aeecc226818..d1db316964d 100644 --- a/src/gallium/drivers/r600/r600_hw_context.c +++ b/src/gallium/drivers/r600/r600_hw_context.c @@ -528,7 +528,7 @@ void r600_cp_dma_copy_buffer(struct r600_context *rctx, r600_need_cs_space(rctx, 10 + (rctx->b.flags ? R600_MAX_FLUSH_CS_DWORDS : 0) + - 3 + R600_MAX_PFP_SYNC_ME_DWORDS, FALSE, 0); + 3 + R600_MAX_PFP_SYNC_ME_DWORDS, false, 0); /* Flush the caches for the first copy only. */ if (rctx->b.flags) { diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index d327a5ddd61..64b6f614e96 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -224,7 +224,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, rctx->b.gfx.flush = r600_context_gfx_flush; u_suballocator_init(&rctx->allocator_fetch_shader, &rctx->b.b, 64 * 1024, - 0, PIPE_USAGE_DEFAULT, 0, FALSE); + 0, PIPE_USAGE_DEFAULT, 0, false); rctx->isa = calloc(1, sizeof(struct r600_isa)); if (!rctx->isa || r600_isa_init(rctx, rctx->isa)) @@ -715,11 +715,11 @@ struct pipe_screen *r600_screen_create(struct radeon_winsys *ws, } rscreen->b.debug_flags |= debug_get_flags_option("R600_DEBUG", r600_debug_options, 0); - if (debug_get_bool_option("R600_DEBUG_COMPUTE", FALSE)) + if (debug_get_bool_option("R600_DEBUG_COMPUTE", false)) rscreen->b.debug_flags |= DBG_COMPUTE; - if (debug_get_bool_option("R600_DUMP_SHADERS", FALSE)) + if (debug_get_bool_option("R600_DUMP_SHADERS", false)) rscreen->b.debug_flags |= DBG_ALL_SHADERS | DBG_FS; - if (!debug_get_bool_option("R600_HYPERZ", TRUE)) + if (!debug_get_bool_option("R600_HYPERZ", true)) rscreen->b.debug_flags |= DBG_NO_HYPERZ; if (rscreen->b.family == CHIP_UNKNOWN) { diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 9184f218988..a806f4de4eb 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -144,13 +144,13 @@ static uint32_t r600_translate_dbformat(enum pipe_format format) static bool r600_is_sampler_format_supported(struct pipe_screen *screen, enum pipe_format format) { return r600_translate_texformat(screen, format, NULL, NULL, NULL, - FALSE) != ~0U; + false) != ~0U; } static bool r600_is_colorbuffer_format_supported(enum amd_gfx_level chip, enum pipe_format format) { - return r600_translate_colorformat(chip, format, FALSE) != ~0U && - r600_translate_colorswap(format, FALSE) != ~0U; + return r600_translate_colorformat(chip, format, false) != ~0U && + r600_translate_colorswap(format, false) != ~0U; } static bool r600_is_zs_format_supported(enum pipe_format format) @@ -677,7 +677,7 @@ r600_create_sampler_view_custom(struct pipe_context *ctx, uint32_t word4 = 0, yuv_format = 0, pitch = 0; unsigned char swizzle[4], array_mode = 0; unsigned width, height, depth, offset_level, last_level; - bool do_endian_swap = FALSE; + bool do_endian_swap = false; if (!view) return NULL; @@ -824,7 +824,7 @@ static void r600_init_color_surface(struct r600_context *rctx, unsigned offset; const struct util_format_description *desc; int i; - bool blend_bypass = 0, blend_clamp = 0, do_endian_swap = FALSE; + bool blend_bypass = 0, blend_clamp = 0, do_endian_swap = false; if (rtex->db_compatible && !r600_can_sample_zs(rtex, false)) { r600_init_flushed_depth_texture(&rctx->b.b, surf->base.texture, NULL); @@ -2917,7 +2917,7 @@ static bool r600_dma_copy_tile(struct r600_context *rctx, } /* check that we are in dw/base alignment constraint */ if (addr % 4 || base % 256) { - return FALSE; + return false; } /* It's a r6xx/r7xx limitation, the blit must be on 8 boundary for number @@ -2946,7 +2946,7 @@ static bool r600_dma_copy_tile(struct r600_context *rctx, addr += cheight * pitch; y += cheight; } - return TRUE; + return true; } static void r600_dma_copy(struct pipe_context *ctx, diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 45a53f460dd..db0f4a8a21f 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -739,7 +739,7 @@ static void r600_set_sampler_views(struct pipe_context *pipe, dst->views.dirty_mask |= new_mask; dst->views.compressed_depthtex_mask &= dst->views.enabled_mask; dst->views.compressed_colortex_mask &= dst->views.enabled_mask; - dst->views.dirty_buffer_constants = TRUE; + dst->views.dirty_buffer_constants = true; r600_sampler_views_dirty(rctx, &dst->views); if (dirty_sampler_states_mask) { @@ -1478,7 +1478,7 @@ static void r600_setup_buffer_constants(struct r600_context *rctx, int shader_ty if (!samplers->views.dirty_buffer_constants) return; - samplers->views.dirty_buffer_constants = FALSE; + samplers->views.dirty_buffer_constants = false; bits = util_last_bit(samplers->views.enabled_mask); array_size = bits * 8 * sizeof(uint32_t); @@ -1536,8 +1536,8 @@ void eg_setup_buffer_constants(struct r600_context *rctx, int shader_type) return; if (images) - images->dirty_buffer_constants = FALSE; - samplers->views.dirty_buffer_constants = FALSE; + images->dirty_buffer_constants = false; + samplers->views.dirty_buffer_constants = false; bits = sview_bits = util_last_bit(samplers->views.enabled_mask); if (images) @@ -2325,7 +2325,7 @@ static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info evergreen_setup_tess_constants(rctx, info, &num_patches); /* Emit states. */ - r600_need_cs_space(rctx, has_user_indices ? 5 : 0, TRUE, util_bitcount(atomic_used_mask)); + r600_need_cs_space(rctx, has_user_indices ? 5 : 0, true, util_bitcount(atomic_used_mask)); r600_flush_emit(rctx); mask = rctx->dirty_atoms; @@ -2773,8 +2773,8 @@ 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; - bool uniform = TRUE; - bool is_srgb_valid = FALSE; + 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}; const unsigned char swizzle_xxxy[4] = {0, 0, 0, 1}; @@ -2813,15 +2813,15 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, */ if (do_endian_swap) { if (format == PIPE_FORMAT_L4A4_UNORM) - word4 |= r600_get_swizzle_combined(swizzle_xxxy, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_xxxy, swizzle_view, false); else if (format == PIPE_FORMAT_B4G4R4A4_UNORM) - word4 |= r600_get_swizzle_combined(swizzle_zyxw, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_zyxw, swizzle_view, false); else if (format == PIPE_FORMAT_B4G4R4X4_UNORM || format == PIPE_FORMAT_B5G6R5_UNORM) - word4 |= r600_get_swizzle_combined(swizzle_zyx1, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_zyx1, swizzle_view, false); else - word4 |= r600_get_swizzle_combined(desc->swizzle, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(desc->swizzle, swizzle_view, false); } else { - word4 |= r600_get_swizzle_combined(desc->swizzle, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(desc->swizzle, swizzle_view, false); } } @@ -2832,50 +2832,50 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, switch (format) { /* Depth sampler formats. */ case PIPE_FORMAT_Z16_UNORM: - word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, false); result = FMT_16; goto out_word4; case PIPE_FORMAT_Z24X8_UNORM: case PIPE_FORMAT_Z24_UNORM_S8_UINT: - word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, false); result = FMT_8_24; goto out_word4; case PIPE_FORMAT_X8Z24_UNORM: case PIPE_FORMAT_S8_UINT_Z24_UNORM: if (rscreen->b.gfx_level < EVERGREEN) goto out_unknown; - word4 |= r600_get_swizzle_combined(swizzle_yyyy, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_yyyy, swizzle_view, false); result = FMT_24_8; goto out_word4; case PIPE_FORMAT_Z32_FLOAT: - word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, false); result = FMT_32_FLOAT; goto out_word4; case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, false); result = FMT_X24_8_32_FLOAT; goto out_word4; /* Stencil sampler formats. */ case PIPE_FORMAT_S8_UINT: word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT); - word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, false); result = FMT_8; goto out_word4; case PIPE_FORMAT_X24S8_UINT: word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT); - word4 |= r600_get_swizzle_combined(swizzle_yyyy, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_yyyy, swizzle_view, false); result = FMT_8_24; goto out_word4; case PIPE_FORMAT_S8X24_UINT: if (rscreen->b.gfx_level < EVERGREEN) goto out_unknown; word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT); - word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_xxxx, swizzle_view, false); result = FMT_24_8; goto out_word4; case PIPE_FORMAT_X32_S8X24_UINT: word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT); - word4 |= r600_get_swizzle_combined(swizzle_yyyy, swizzle_view, FALSE); + word4 |= r600_get_swizzle_combined(swizzle_yyyy, swizzle_view, false); result = FMT_X24_8_32_FLOAT; goto out_word4; default: @@ -2930,17 +2930,17 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, case PIPE_FORMAT_DXT1_SRGB: case PIPE_FORMAT_DXT1_SRGBA: result = FMT_BC1; - is_srgb_valid = TRUE; + is_srgb_valid = true; goto out_word4; case PIPE_FORMAT_DXT3_RGBA: case PIPE_FORMAT_DXT3_SRGBA: result = FMT_BC2; - is_srgb_valid = TRUE; + is_srgb_valid = true; goto out_word4; case PIPE_FORMAT_DXT5_RGBA: case PIPE_FORMAT_DXT5_SRGBA: result = FMT_BC3; - is_srgb_valid = TRUE; + is_srgb_valid = true; goto out_word4; default: goto out_unknown; @@ -2955,7 +2955,7 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, case PIPE_FORMAT_BPTC_RGBA_UNORM: case PIPE_FORMAT_BPTC_SRGBA: result = FMT_BC7; - is_srgb_valid = TRUE; + is_srgb_valid = true; goto out_word4; case PIPE_FORMAT_BPTC_RGB_FLOAT: word4 |= sign_bit[0] | sign_bit[1] | sign_bit[2]; @@ -3072,14 +3072,14 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen, switch (desc->nr_channels) { case 1: result = FMT_8; - is_srgb_valid = TRUE; + is_srgb_valid = true; goto out_word4; case 2: result = FMT_8_8; goto out_word4; case 4: result = FMT_8_8_8_8; - is_srgb_valid = TRUE; + is_srgb_valid = true; goto out_word4; } goto out_unknown; diff --git a/src/gallium/drivers/radeonsi/radeon_vcn_enc_1_2.c b/src/gallium/drivers/radeonsi/radeon_vcn_enc_1_2.c index 5a9ab4b5662..969a4810e3b 100644 --- a/src/gallium/drivers/radeonsi/radeon_vcn_enc_1_2.c +++ b/src/gallium/drivers/radeonsi/radeon_vcn_enc_1_2.c @@ -1398,7 +1398,7 @@ static int get_picture_storage(struct radeon_encoder *enc) if (enc->dpb_info[i].in_use && enc->dpb_info[i].is_ltr && enc->enc_pic.ltr_idx == enc->dpb_info[i].pic_num) { - enc->dpb_info[i].in_use = FALSE; + enc->dpb_info[i].in_use = false; return i; } } @@ -1423,7 +1423,7 @@ static int get_picture_storage(struct radeon_encoder *enc) } if (oldest_idx >= 0) - enc->dpb_info[oldest_idx].in_use = FALSE; + enc->dpb_info[oldest_idx].in_use = false; return oldest_idx; } @@ -1444,14 +1444,14 @@ static void manage_dpb_before_encode(struct radeon_encoder *enc) int ref0_idx = find_ref_idx(enc, enc->enc_pic.ref_idx_l0, enc->enc_pic.ref_idx_l0_is_ltr); if (!enc->enc_pic.not_referenced) - enc->dpb_info[current_pic_idx].in_use = TRUE; + enc->dpb_info[current_pic_idx].in_use = true; if (enc->enc_pic.is_ltr) { enc->dpb_info[current_pic_idx].pic_num = enc->enc_pic.ltr_idx; - enc->dpb_info[current_pic_idx].is_ltr = TRUE; + enc->dpb_info[current_pic_idx].is_ltr = true; } else { enc->dpb_info[current_pic_idx].pic_num = enc->enc_pic.frame_num; - enc->dpb_info[current_pic_idx].is_ltr = FALSE; + enc->dpb_info[current_pic_idx].is_ltr = false; } if (enc->enc_pic.picture_type == PIPE_H2645_ENC_PICTURE_TYPE_IDR) diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c index 2d6da35906c..bc896db073b 100644 --- a/src/gallium/drivers/softpipe/sp_clear.c +++ b/src/gallium/drivers/softpipe/sp_clear.c @@ -89,5 +89,5 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, sp_tile_cache_clear(softpipe->zsbuf_cache, &zero, cv); } - softpipe->dirty_render_cache = TRUE; + softpipe->dirty_render_cache = true; } diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index ef3c9e160d2..36662dc6fc5 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -327,7 +327,7 @@ softpipe_create_context(struct pipe_screen *screen, /* Do polygon stipple w/ texture map + frag prog. */ draw_install_pstipple_stage(softpipe->draw, &softpipe->pipe); - draw_wide_point_sprites(softpipe->draw, TRUE); + draw_wide_point_sprites(softpipe->draw, true); sp_init_surface_functions(softpipe); diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c index f73131f95bc..5c9b6c6b92a 100644 --- a/src/gallium/drivers/softpipe/sp_draw_arrays.c +++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c @@ -164,5 +164,5 @@ softpipe_draw_vbo(struct pipe_context *pipe, draw_flush(draw); /* Note: leave drawing surfaces mapped */ - sp->dirty_render_cache = TRUE; + sp->dirty_render_cache = true; } diff --git a/src/gallium/drivers/softpipe/sp_fence.c b/src/gallium/drivers/softpipe/sp_fence.c index 64ed9de47f2..3b8c0496df3 100644 --- a/src/gallium/drivers/softpipe/sp_fence.c +++ b/src/gallium/drivers/softpipe/sp_fence.c @@ -47,7 +47,7 @@ softpipe_fence_finish(struct pipe_screen *screen, uint64_t timeout) { assert(fence); - return TRUE; + return true; } diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c index ffb3f2feb50..a5c786d6e0e 100644 --- a/src/gallium/drivers/softpipe/sp_flush.c +++ b/src/gallium/drivers/softpipe/sp_flush.c @@ -75,7 +75,7 @@ softpipe_flush( struct pipe_context *pipe, if (softpipe->zsbuf_cache) sp_flush_tile_cache(softpipe->zsbuf_cache); - softpipe->dirty_render_cache = FALSE; + softpipe->dirty_render_cache = false; /* Enable to dump BMPs of the color/depth buffers each frame */ #if 0 @@ -144,7 +144,7 @@ softpipe_flush_resource(struct pipe_context *pipe, struct pipe_fence_handle *fence = NULL; if (do_not_block) - return FALSE; + return false; softpipe_flush(pipe, flush_flags, &fence); @@ -166,7 +166,7 @@ softpipe_flush_resource(struct pipe_context *pipe, } } - return TRUE; + return true; } void softpipe_texture_barrier(struct pipe_context *pipe, unsigned flags) @@ -187,7 +187,7 @@ void softpipe_texture_barrier(struct pipe_context *pipe, unsigned flags) if (softpipe->zsbuf_cache) sp_flush_tile_cache(softpipe->zsbuf_cache); - softpipe->dirty_render_cache = FALSE; + softpipe->dirty_render_cache = false; } void softpipe_memory_barrier(struct pipe_context *pipe, unsigned flags) diff --git a/src/gallium/drivers/softpipe/sp_fs_exec.c b/src/gallium/drivers/softpipe/sp_fs_exec.c index 8250af96be2..de709e54818 100644 --- a/src/gallium/drivers/softpipe/sp_fs_exec.c +++ b/src/gallium/drivers/softpipe/sp_fs_exec.c @@ -123,7 +123,7 @@ exec_run( const struct sp_fragment_shader_variant *var, machine->NonHelperMask = quad->inout.mask; quad->inout.mask &= tgsi_exec_machine_run( machine, 0 ); if (quad->inout.mask == 0) - return FALSE; + return false; /* store outputs */ { @@ -169,7 +169,7 @@ exec_run( const struct sp_fragment_shader_variant *var, } } - return TRUE; + return true; } diff --git a/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/src/gallium/drivers/softpipe/sp_quad_depth_test.c index 59a04785d6d..9bf9056b725 100644 --- a/src/gallium/drivers/softpipe/sp_quad_depth_test.c +++ b/src/gallium/drivers/softpipe/sp_quad_depth_test.c @@ -238,7 +238,7 @@ convert_quad_stencil( struct depth_data *data, { unsigned j; - data->use_shader_stencil_refs = TRUE; + data->use_shader_stencil_refs = true; /* Copy quads stencil values */ switch (data->format) { @@ -591,7 +591,7 @@ depth_test_quad(struct quad_stage *qs, quad->inout.mask &= zmask; if (quad->inout.mask == 0) - return FALSE; + return false; /* Update our internal copy only if writemask set. Even if * depth.writemask is FALSE, may still need to write out buffer @@ -605,7 +605,7 @@ depth_test_quad(struct quad_stage *qs, } } - return TRUE; + return true; } @@ -855,7 +855,7 @@ depth_test_quads_fallback(struct quad_stage *qs, struct depth_data data; unsigned vp_idx = quads[0]->input.viewport_index; - data.use_shader_stencil_refs = FALSE; + data.use_shader_stencil_refs = false; if (have_zs && (qs->softpipe->depth_stencil->depth_enabled || qs->softpipe->depth_stencil->stencil[0].enabled || @@ -1007,7 +1007,7 @@ choose_depth_test(struct quad_stage *qs, bool depth_bounds = qs->softpipe->depth_stencil->depth_bounds_test; if(!qs->softpipe->framebuffer.zsbuf) - depth = depthwrite = stencil = FALSE; + depth = depthwrite = stencil = false; /* default */ qs->run = depth_test_quads_fallback; diff --git a/src/gallium/drivers/softpipe/sp_quad_fs.c b/src/gallium/drivers/softpipe/sp_quad_fs.c index 2488a600da6..08802868134 100644 --- a/src/gallium/drivers/softpipe/sp_quad_fs.c +++ b/src/gallium/drivers/softpipe/sp_quad_fs.c @@ -71,7 +71,7 @@ shade_quad(struct quad_stage *qs, struct quad_header *quad) } /* run shader */ - machine->flatshade_color = softpipe->rasterizer->flatshade ? TRUE : FALSE; + machine->flatshade_color = softpipe->rasterizer->flatshade ? true : false; return softpipe->fs_variant->run( softpipe->fs_variant, machine, quad, softpipe->early_depth ); } diff --git a/src/gallium/drivers/softpipe/sp_query.c b/src/gallium/drivers/softpipe/sp_query.c index c98ce15ae6e..1a2b7d17ae3 100644 --- a/src/gallium/drivers/softpipe/sp_query.c +++ b/src/gallium/drivers/softpipe/sp_query.c @@ -319,7 +319,7 @@ softpipe_check_render_cond(struct softpipe_context *sp) memset(&result, 0, sizeof(union pipe_query_result)); if (!sp->render_cond_query) { - return TRUE; /* no query predicate, draw normally */ + return true; /* no query predicate, draw normally */ } wait = (sp->render_cond_mode == PIPE_RENDER_COND_WAIT || @@ -330,7 +330,7 @@ softpipe_check_render_cond(struct softpipe_context *sp) if (b) return !is_result_nonzero(sp->render_cond_query, &result) == sp->render_cond_cond; else - return TRUE; + return true; } diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c index 850fb0d4989..c3c660ceed2 100644 --- a/src/gallium/drivers/softpipe/sp_setup.c +++ b/src/gallium/drivers/softpipe/sp_setup.c @@ -372,7 +372,7 @@ setup_sort_vertices(struct setup_context *setup, __func__, setup->oneoverarea, area, det ); */ if (util_is_inf_or_nan(setup->oneoverarea)) - return FALSE; + return false; } /* We need to know if this is a front or back-facing triangle for: @@ -388,10 +388,10 @@ setup_sort_vertices(struct setup_context *setup, unsigned face = setup->facing == 0 ? PIPE_FACE_FRONT : PIPE_FACE_BACK; if (face & setup->cull_face) - return FALSE; + return false; } - return TRUE; + return true; } @@ -904,7 +904,7 @@ setup_line_coefficients(struct setup_context *setup, /* NOTE: this is not really area but something proportional to it */ area = setup->emaj.dx * setup->emaj.dx + setup->emaj.dy * setup->emaj.dy; if (area == 0.0f || util_is_inf_or_nan(area)) - return FALSE; + return false; setup->oneoverarea = 1.0f / area; /* z and w are done by linear interpolation: @@ -956,7 +956,7 @@ setup_line_coefficients(struct setup_context *setup, setup->coef[fragSlot].dady[0] = 0.0; } } - return TRUE; + return true; } diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c index ae71de53c92..7edeb2cfdc6 100644 --- a/src/gallium/drivers/softpipe/sp_tex_sample.c +++ b/src/gallium/drivers/softpipe/sp_tex_sample.c @@ -3519,7 +3519,7 @@ softpipe_create_sampler_state(struct pipe_context *pipe, sampler->wrap_t == PIPE_TEX_WRAP_REPEAT && sampler->min_img_filter == PIPE_TEX_FILTER_LINEAR && sampler->max_anisotropy <= 1) { - samp->min_mag_equal_repeat_linear = TRUE; + samp->min_mag_equal_repeat_linear = true; } samp->filter_funcs = &funcs_linear; @@ -3545,7 +3545,7 @@ softpipe_create_sampler_state(struct pipe_context *pipe, break; } if (samp->min_img_filter == sampler->mag_img_filter) { - samp->min_mag_equal = TRUE; + samp->min_mag_equal = true; } return (void *)samp; @@ -3627,7 +3627,7 @@ softpipe_create_sampler_view(struct pipe_context *pipe, #endif if (any_swizzle(view)) { - sview->need_swizzle = TRUE; + sview->need_swizzle = true; } sview->need_cube_convert = (view->target == PIPE_TEXTURE_CUBE || diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c index 61b8dedfcc4..4bc8e3e4a0c 100644 --- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c @@ -107,7 +107,7 @@ sp_tex_tile_is_compat_view(struct softpipe_tex_tile_cache *tc, struct pipe_sampler_view *view) { if (!view) - return FALSE; + return false; return (tc->texture == view->texture && tc->format == view->format && tc->swizzle_r == view->swizzle_r && diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index 8eae88effb4..6e32b6ac170 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -83,7 +83,7 @@ softpipe_resource_layout(struct pipe_screen *screen, /* if row_stride * height > SP_MAX_TEXTURE_SIZE */ if ((uint64_t)spr->stride[level] * nblocksy > SP_MAX_TEXTURE_SIZE) { /* image too large */ - return FALSE; + return false; } spr->img_stride[level] = spr->stride[level] * nblocksy; @@ -96,14 +96,14 @@ softpipe_resource_layout(struct pipe_screen *screen, } if (buffer_size > SP_MAX_TEXTURE_SIZE) - return FALSE; + return false; if (allocate) { spr->data = align_malloc(buffer_size, 64); return spr->data != NULL; } else { - return TRUE; + return true; } } @@ -119,7 +119,7 @@ softpipe_can_create_resource(struct pipe_screen *screen, struct softpipe_resource spr; memset(&spr, 0, sizeof(spr)); spr.base = *res; - return softpipe_resource_layout(screen, &spr, FALSE); + return softpipe_resource_layout(screen, &spr, false); } @@ -177,7 +177,7 @@ softpipe_resource_create_front(struct pipe_screen *screen, goto fail; } else { - if (!softpipe_resource_layout(screen, spr, TRUE)) + if (!softpipe_resource_layout(screen, spr, true)) goto fail; } @@ -401,7 +401,7 @@ softpipe_transfer_map(struct pipe_context *pipe, level, box->depth > 1 ? -1 : box->z, 0, /* flush_flags */ read_only, - TRUE, /* cpu_access */ + true, /* cpu_access */ do_not_block)) { /* * It would have blocked, but state tracker requested no to. @@ -502,7 +502,7 @@ softpipe_user_buffer_create(struct pipe_screen *screen, spr->base.height0 = 1; spr->base.depth0 = 1; spr->base.array_size = 1; - spr->userBuffer = TRUE; + spr->userBuffer = true; spr->data = ptr; return &spr->base; diff --git a/src/gallium/drivers/svga/include/svga_overlay.h b/src/gallium/drivers/svga/include/svga_overlay.h index 161c3de7b80..ae4bbc4c379 100644 --- a/src/gallium/drivers/svga/include/svga_overlay.h +++ b/src/gallium/drivers/svga/include/svga_overlay.h @@ -190,10 +190,10 @@ VMwareVideoGetAttributes(const SVGAOverlayFormat format, /* IN */ break; default: - return FALSE; + return false; } - return TRUE; + return true; } #endif /* _SVGA_OVERLAY_H_ */ diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c index fda6032db79..2bf598734a2 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -48,11 +48,11 @@ #define CONST0_UPLOAD_DEFAULT_SIZE 65536 -DEBUG_GET_ONCE_BOOL_OPTION(no_swtnl, "SVGA_NO_SWTNL", FALSE) -DEBUG_GET_ONCE_BOOL_OPTION(force_swtnl, "SVGA_FORCE_SWTNL", FALSE); -DEBUG_GET_ONCE_BOOL_OPTION(use_min_mipmap, "SVGA_USE_MIN_MIPMAP", FALSE); -DEBUG_GET_ONCE_BOOL_OPTION(no_line_width, "SVGA_NO_LINE_WIDTH", FALSE); -DEBUG_GET_ONCE_BOOL_OPTION(force_hw_line_stipple, "SVGA_FORCE_HW_LINE_STIPPLE", FALSE); +DEBUG_GET_ONCE_BOOL_OPTION(no_swtnl, "SVGA_NO_SWTNL", false) +DEBUG_GET_ONCE_BOOL_OPTION(force_swtnl, "SVGA_FORCE_SWTNL", false); +DEBUG_GET_ONCE_BOOL_OPTION(use_min_mipmap, "SVGA_USE_MIN_MIPMAP", false); +DEBUG_GET_ONCE_BOOL_OPTION(no_line_width, "SVGA_NO_LINE_WIDTH", false); +DEBUG_GET_ONCE_BOOL_OPTION(force_hw_line_stipple, "SVGA_FORCE_HW_LINE_STIPPLE", false); static void @@ -291,7 +291,7 @@ svga_context_create(struct pipe_screen *screen, void *priv, unsigned flags) sizeof(svga->state.hw_draw.sampler_views)); svga->state.hw_draw.num_views = 0; svga->state.hw_draw.num_backed_views = 0; - svga->state.hw_draw.rasterizer_discard = FALSE; + svga->state.hw_draw.rasterizer_discard = false; /* Initialize uavs */ svga->state.hw_draw.uavSpliceIndex = -1; @@ -355,7 +355,7 @@ svga_context_create(struct pipe_screen *screen, void *priv, unsigned flags) svga->dirty = SVGA_NEW_ALL; svga->pred.query_id = SVGA3D_INVALID_ID; - svga->disable_rasterizer = FALSE; + svga->disable_rasterizer = false; /** * Create stream output statistics queries used in the workaround for auto @@ -448,28 +448,28 @@ svga_context_flush(struct svga_context *svga, /* To force the re-emission of rendertargets and texture sampler bindings on * the next command buffer. */ - svga->rebind.flags.rendertargets = TRUE; - svga->rebind.flags.texture_samplers = TRUE; + svga->rebind.flags.rendertargets = true; + svga->rebind.flags.texture_samplers = true; if (svga_have_gb_objects(svga)) { - svga->rebind.flags.constbufs = TRUE; - svga->rebind.flags.vs = TRUE; - svga->rebind.flags.fs = TRUE; - svga->rebind.flags.gs = TRUE; + svga->rebind.flags.constbufs = true; + svga->rebind.flags.vs = true; + svga->rebind.flags.fs = true; + svga->rebind.flags.gs = true; if (svga_have_sm5(svga)) { - svga->rebind.flags.tcs = TRUE; - svga->rebind.flags.tes = TRUE; + svga->rebind.flags.tcs = true; + svga->rebind.flags.tes = true; } if (svga_need_to_rebind_resources(svga)) { - svga->rebind.flags.query = TRUE; + svga->rebind.flags.query = true; } if (svga_sws(svga)->have_index_vertex_buffer_offset_cmd) { - svga->rebind.flags.vertexbufs = TRUE; - svga->rebind.flags.indexbuf = TRUE; + svga->rebind.flags.vertexbufs = true; + svga->rebind.flags.indexbuf = true; } } diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h index e73143ac40a..f058866b7d7 100644 --- a/src/gallium/drivers/svga/svga_context.h +++ b/src/gallium/drivers/svga/svga_context.h @@ -1050,7 +1050,7 @@ svga_get_time(struct svga_context *svga) * the _retry parameter to TRUE. */ #define SVGA_TRY_MAP(_func, _retry) \ - ((SVGA_DEBUG & DEBUG_RETRY) ? (_retry) = TRUE, NULL : (_func)) + ((SVGA_DEBUG & DEBUG_RETRY) ? (_retry) = true, NULL : (_func)) #else #define SVGA_TRY(_func) (_func) diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c index 30c1e931fe8..91ac04f705c 100644 --- a/src/gallium/drivers/svga/svga_draw.c +++ b/src/gallium/drivers/svga/svga_draw.c @@ -164,26 +164,26 @@ svga_hwtnl_is_buffer_referred(struct svga_hwtnl *hwtnl, unsigned i; if (svga_buffer_is_user_buffer(buffer)) { - return FALSE; + return false; } if (!hwtnl->cmd.prim_count) { - return FALSE; + return false; } for (i = 0; i < hwtnl->cmd.vbuf_count; ++i) { if (hwtnl->cmd.vbufs[i].buffer.resource == buffer) { - return TRUE; + return true; } } for (i = 0; i < hwtnl->cmd.prim_count; ++i) { if (hwtnl->cmd.prim_ib[i] == buffer) { - return TRUE; + return true; } } - return FALSE; + return false; } @@ -419,7 +419,7 @@ svga_validate_sampler_resources(struct svga_context *svga, } } } - svga->rebind.flags.texture_samplers = FALSE; + svga->rebind.flags.texture_samplers = false; return PIPE_OK; } @@ -519,7 +519,7 @@ svga_validate_constant_buffers(struct svga_context *svga, } } } - svga->rebind.flags.constbufs = FALSE; + svga->rebind.flags.constbufs = false; return PIPE_OK; } @@ -558,7 +558,7 @@ svga_validate_image_views(struct svga_context *svga, return ret; } - svga->rebind.flags.images = FALSE; + svga->rebind.flags.images = false; return PIPE_OK; } @@ -597,7 +597,7 @@ svga_validate_shader_buffers(struct svga_context *svga, return ret; } - svga->rebind.flags.shaderbufs = FALSE; + svga->rebind.flags.shaderbufs = false; ret = svga_validate_shader_buffer_resources(svga, svga->state.hw_draw.num_atomic_buffers, @@ -607,7 +607,7 @@ svga_validate_shader_buffers(struct svga_context *svga, if (ret != PIPE_OK) return ret; - svga->rebind.flags.atomicbufs = FALSE; + svga->rebind.flags.atomicbufs = false; return PIPE_OK; } @@ -848,7 +848,7 @@ validate_vertex_buffers(struct svga_hwtnl *hwtnl, /* Include the last vertex buffer in the next emit * if it is different. */ - emit = TRUE; + emit = true; numVBuf++; i++; } @@ -915,7 +915,7 @@ validate_vertex_buffers(struct svga_hwtnl *hwtnl, } } - svga->rebind.flags.vertexbufs = FALSE; + svga->rebind.flags.vertexbufs = false; return PIPE_OK; } @@ -987,7 +987,7 @@ validate_index_buffer(struct svga_hwtnl *hwtnl, } } - svga->rebind.flags.indexbuf = FALSE; + svga->rebind.flags.indexbuf = false; return PIPE_OK; } diff --git a/src/gallium/drivers/svga/svga_draw_private.h b/src/gallium/drivers/svga/svga_draw_private.h index a4801b11af5..d4866e72b0d 100644 --- a/src/gallium/drivers/svga/svga_draw_private.h +++ b/src/gallium/drivers/svga/svga_draw_private.h @@ -202,7 +202,7 @@ svga_need_unfilled_fallback(const struct svga_hwtnl *hwtnl, { if (u_reduced_prim(prim) != MESA_PRIM_TRIANGLES) { /* if we're drawing points or lines, no fallback needed */ - return FALSE; + return false; } if ((prim == MESA_PRIM_QUADS || diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index d9e396fe2f9..7228a8cf348 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 bool first_call = TRUE; + static bool first_call = true; if (first_call) { unsigned i; @@ -1480,7 +1480,7 @@ check_format_tables(void) assert(format_cap_table[i].format == i); } - first_call = FALSE; + first_call = false; } } @@ -1808,9 +1808,9 @@ svga_format_is_integer(SVGA3dSurfaceFormat format) case SVGA3D_R8G8_UINT: case SVGA3D_R8_UINT: case SVGA3D_R10G10B10A2_UINT: - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -1905,10 +1905,10 @@ svga_has_any_integer_cbufs(const struct svga_context *svga) struct pipe_surface *cbuf = svga->curr.framebuffer.cbufs[i]; if (cbuf && util_format_is_pure_integer(cbuf->format)) { - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/src/gallium/drivers/svga/svga_image_view.c b/src/gallium/drivers/svga/svga_image_view.c index 8098ace53d2..9ff6daf4326 100644 --- a/src/gallium/drivers/svga/svga_image_view.c +++ b/src/gallium/drivers/svga/svga_image_view.c @@ -80,7 +80,7 @@ svga_create_uav_image(struct svga_context *svga, /* mark this buffer as being used in uav */ struct svga_buffer *sbuf = svga_buffer(res); - sbuf->uav = TRUE; + sbuf->uav = true; } else if (resourceDim == SVGA3D_RESOURCE_TEXTURE1D || resourceDim == SVGA3D_RESOURCE_TEXTURE2D) { diff --git a/src/gallium/drivers/svga/svga_pipe_blend.c b/src/gallium/drivers/svga/svga_pipe_blend.c index 6c28ba9c504..23ba4575f5f 100644 --- a/src/gallium/drivers/svga/svga_pipe_blend.c +++ b/src/gallium/drivers/svga/svga_pipe_blend.c @@ -186,76 +186,76 @@ emulate_logicop(struct svga_context *svga, switch (logicop_func) { case PIPE_LOGICOP_XOR: case PIPE_LOGICOP_INVERT: - blend->need_white_fragments = TRUE; - blend->rt[buffer].blend_enable = TRUE; + blend->need_white_fragments = true; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_ONE; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_ONE; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_SUBTRACT; break; case PIPE_LOGICOP_CLEAR: - blend->rt[buffer].blend_enable = TRUE; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_ZERO; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_ZERO; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_MINIMUM; break; case PIPE_LOGICOP_COPY: - blend->rt[buffer].blend_enable = FALSE; + blend->rt[buffer].blend_enable = false; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_ONE; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_ZERO; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_ADD; break; case PIPE_LOGICOP_COPY_INVERTED: - blend->rt[buffer].blend_enable = TRUE; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_INVSRCCOLOR; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_ZERO; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_ADD; break; case PIPE_LOGICOP_NOOP: - blend->rt[buffer].blend_enable = TRUE; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_ZERO; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_DESTCOLOR; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_ADD; break; case PIPE_LOGICOP_SET: - blend->rt[buffer].blend_enable = TRUE; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_ONE; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_ONE; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_MAXIMUM; break; case PIPE_LOGICOP_AND: /* Approximate with minimum - works for the 0 & anything case: */ - blend->rt[buffer].blend_enable = TRUE; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_SRCCOLOR; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_DESTCOLOR; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_MINIMUM; break; case PIPE_LOGICOP_AND_REVERSE: - blend->rt[buffer].blend_enable = TRUE; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_SRCCOLOR; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_INVDESTCOLOR; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_MINIMUM; break; case PIPE_LOGICOP_AND_INVERTED: - blend->rt[buffer].blend_enable = TRUE; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_INVSRCCOLOR; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_DESTCOLOR; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_MINIMUM; break; case PIPE_LOGICOP_OR: /* Approximate with maximum - works for the 1 | anything case: */ - blend->rt[buffer].blend_enable = TRUE; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_SRCCOLOR; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_DESTCOLOR; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_MAXIMUM; break; case PIPE_LOGICOP_OR_REVERSE: - blend->rt[buffer].blend_enable = TRUE; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_SRCCOLOR; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_INVDESTCOLOR; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_MAXIMUM; break; case PIPE_LOGICOP_OR_INVERTED: - blend->rt[buffer].blend_enable = TRUE; + blend->rt[buffer].blend_enable = true; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_INVSRCCOLOR; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_DESTCOLOR; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_MAXIMUM; @@ -264,7 +264,7 @@ emulate_logicop(struct svga_context *svga, case PIPE_LOGICOP_NOR: case PIPE_LOGICOP_EQUIV: /* Fill these in with plausible values */ - blend->rt[buffer].blend_enable = FALSE; + blend->rt[buffer].blend_enable = false; blend->rt[buffer].srcblend = SVGA3D_BLENDOP_ONE; blend->rt[buffer].dstblend = SVGA3D_BLENDOP_ZERO; blend->rt[buffer].blendeq = SVGA3D_BLENDEQ_ADD; @@ -321,7 +321,7 @@ svga_create_blend_state(struct pipe_context *pipe, */ if (templ->logicop_enable) { if (ss->haveBlendLogicops) { - blend->logicop_enabled = TRUE; + blend->logicop_enabled = true; blend->logicop_mode = translate_logicop(templ->logicop_func); blend->rt[i].blendeq = SVGA3D_BLENDEQ_ADD; blend->rt[i].blendeq_alpha = SVGA3D_BLENDEQ_ADD; @@ -359,7 +359,7 @@ svga_create_blend_state(struct pipe_context *pipe, if (blend->rt[i].srcblend_alpha != blend->rt[i].srcblend || blend->rt[i].dstblend_alpha != blend->rt[i].dstblend || blend->rt[i].blendeq_alpha != blend->rt[i].blendeq) { - blend->rt[i].separate_alpha_blend_enable = TRUE; + blend->rt[i].separate_alpha_blend_enable = true; } } else { @@ -393,7 +393,7 @@ svga_create_blend_state(struct pipe_context *pipe, templ->rt[0].rgb_dst_factor == PIPE_BLENDFACTOR_CONST_ALPHA || templ->rt[0].rgb_src_factor == PIPE_BLENDFACTOR_INV_CONST_ALPHA || templ->rt[0].rgb_dst_factor == PIPE_BLENDFACTOR_INV_CONST_ALPHA) { - blend->blend_color_alpha = TRUE; + blend->blend_color_alpha = true; } } diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c index cd12327dbcb..a9432568371 100644 --- a/src/gallium/drivers/svga/svga_pipe_blit.c +++ b/src/gallium/drivers/svga/svga_pipe_blit.c @@ -322,7 +322,7 @@ can_blit_via_svga_copy_region(struct svga_context *svga, local_blit.dst.format = local_blit.src.format; if (local_blit.filter == PIPE_TEX_FILTER_LINEAR) local_blit.filter = PIPE_TEX_FILTER_NEAREST; - if (!util_can_blit_via_copy_region(&local_blit, TRUE, svga->render_condition)) + if (!util_can_blit_via_copy_region(&local_blit, true, svga->render_condition)) return false; /* For depth+stencil formats, copy with mask != PIPE_MASK_ZS is not @@ -470,7 +470,7 @@ try_copy_region(struct svga_context *svga, &dst_layer_face, &dst_z); if (can_blit_via_copy_region_vgpu10(svga, blit)) { - svga_toggle_render_condition(svga, blit->render_condition_enable, FALSE); + svga_toggle_render_condition(svga, blit->render_condition_enable, false); copy_region_vgpu10(svga, blit->src.resource, @@ -482,7 +482,7 @@ try_copy_region(struct svga_context *svga, blit->src.box.width, blit->src.box.height, blit->src.box.depth); - svga_toggle_render_condition(svga, blit->render_condition_enable, TRUE); + svga_toggle_render_condition(svga, blit->render_condition_enable, true); return true; } @@ -705,11 +705,11 @@ try_blit(struct svga_context *svga, const struct pipe_blit_info *blit_info) blit.dst.resource = newDst; } - svga_toggle_render_condition(svga, blit.render_condition_enable, FALSE); + svga_toggle_render_condition(svga, blit.render_condition_enable, false); util_blitter_blit(svga->blitter, &blit); - svga_toggle_render_condition(svga, blit.render_condition_enable, TRUE); + svga_toggle_render_condition(svga, blit.render_condition_enable, true); if (blit.dst.resource != dst) { struct pipe_blit_info copy_region_blit; @@ -753,8 +753,8 @@ static bool try_cpu_copy_region(struct svga_context *svga, const struct pipe_blit_info *blit) { - if (util_can_blit_via_copy_region(blit, TRUE, svga->render_condition) || - util_can_blit_via_copy_region(blit, FALSE, svga->render_condition)) { + if (util_can_blit_via_copy_region(blit, true, svga->render_condition) || + util_can_blit_via_copy_region(blit, false, svga->render_condition)) { if (svga->render_condition && blit->render_condition_enable) { debug_warning("CPU copy_region doesn't support " @@ -788,7 +788,7 @@ try_resolve_copy(struct svga_context *svga, /* check if formats are compatible for resolve copy */ if (!formats_compatible(svga_screen(svga->pipe.screen), src_tex->key.format, dst_tex->key.format)) - return FALSE; + return false; /* check if the copy dimensions are the same */ if ((blit->src.box.x || blit->src.box.y || blit->src.box.z) || @@ -796,7 +796,7 @@ try_resolve_copy(struct svga_context *svga, (blit->src.box.width != blit->dst.box.width) || (blit->src.box.height != blit->dst.box.height) || (blit->src.box.depth != blit->dst.box.depth)) - return FALSE; + return false; ret = SVGA3D_vgpu10_ResolveCopy(svga->swc, 0, dst_tex->handle, 0, src_tex->handle, dst_tex->key.format); @@ -921,7 +921,7 @@ svga_resource_copy_region(struct pipe_context *pipe, SVGA_RETRY(svga, SVGA3D_vgpu10_BufferCopy(svga->swc, src_surf, dst_surf, src_box->x, dstx, src_box->width)); - dbuffer->dirty = TRUE; + dbuffer->dirty = true; /* Mark the buffer surface as RENDERED */ assert(dbuffer->bufsurf); diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c index cdc03c01d04..1aa99ddd6e5 100644 --- a/src/gallium/drivers/svga/svga_pipe_clear.c +++ b/src/gallium/drivers/svga/svga_pipe_clear.c @@ -98,10 +98,10 @@ is_integer_target(struct pipe_framebuffer_state *fb, unsigned buffers) if ((buffers & (PIPE_CLEAR_COLOR0 << i)) && fb->cbufs[i] && util_format_is_pure_integer(fb->cbufs[i]->format)) { - return TRUE; + return true; } } - return FALSE; + return false; } @@ -130,7 +130,7 @@ try_clear(struct svga_context *svga, { enum pipe_error ret = PIPE_OK; SVGA3dRect rect = { 0, 0, 0, 0 }; - bool restore_viewport = FALSE; + bool restore_viewport = false; SVGA3dClearFlag flags = 0; struct pipe_framebuffer_state *fb = &svga->curr.framebuffer; union util_color uc = {0}; @@ -167,7 +167,7 @@ try_clear(struct svga_context *svga, if (!svga_have_vgpu10(svga) && !svga_rects_equal(&rect, &svga->state.hw_clear.viewport)) { - restore_viewport = TRUE; + restore_viewport = true; ret = SVGA3D_SetViewport(svga->swc, &rect); if (ret != PIPE_OK) return ret; @@ -531,7 +531,7 @@ svga_clear_render_target(struct pipe_context *pipe, { struct svga_context *svga = svga_context( pipe ); - svga_toggle_render_condition(svga, render_condition_enabled, FALSE); + svga_toggle_render_condition(svga, render_condition_enabled, false); if (!svga_have_vgpu10(svga) || dstx != 0 || dsty != 0 || width != dst->width || height != dst->height) { svga_blitter_clear_render_target(svga, dst, color, dstx, dsty, width, @@ -543,7 +543,7 @@ svga_clear_render_target(struct pipe_context *pipe, color)); assert (ret == PIPE_OK); } - svga_toggle_render_condition(svga, render_condition_enabled, TRUE); + svga_toggle_render_condition(svga, render_condition_enabled, true); } void svga_init_clear_functions(struct svga_context *svga) diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c index 446c69656ea..ed1e93f5fe1 100644 --- a/src/gallium/drivers/svga/svga_pipe_draw.c +++ b/src/gallium/drivers/svga/svga_pipe_draw.c @@ -186,10 +186,10 @@ need_fallback_prim_restart(const struct svga_context *svga, { if (info->primitive_restart && info->index_size) { if (!svga_have_vgpu10(svga)) - return TRUE; + return true; else if (!svga->state.sw.need_swtnl) { if (info->index_size == 1) - return TRUE; /* no device support for 1-byte indexes */ + return true; /* no device support for 1-byte indexes */ else if (info->index_size == 2) return info->restart_index != 0xffff; else @@ -197,7 +197,7 @@ need_fallback_prim_restart(const struct svga_context *svga, } } - return FALSE; + return false; } diff --git a/src/gallium/drivers/svga/svga_pipe_query.c b/src/gallium/drivers/svga/svga_pipe_query.c index 91b2c65c052..3bbbdc28b5b 100644 --- a/src/gallium/drivers/svga/svga_pipe_query.c +++ b/src/gallium/drivers/svga/svga_pipe_query.c @@ -133,7 +133,7 @@ begin_query_vgpu9(struct svga_context *svga, struct svga_query *sq) * big deal, given that no sane application would do this. */ uint64_t result; - svga_get_query_result(&svga->pipe, &sq->base, TRUE, (void*)&result); + svga_get_query_result(&svga->pipe, &sq->base, true, (void*)&result); assert(sq->queryResult->state != SVGA3D_QUERYSTATE_PENDING); } @@ -545,7 +545,7 @@ rebind_vgpu10_query(struct svga_context *svga) { SVGA_RETRY(svga, svga->swc->query_bind(svga->swc, svga->gb_query, SVGA_QUERY_FLAG_REF)); - svga->rebind.flags.query = FALSE; + svga->rebind.flags.query = false; } @@ -742,7 +742,7 @@ svga_create_query(struct pipe_context *pipe, case SVGA_QUERY_FLUSH_TIME: case SVGA_QUERY_MAP_BUFFER_TIME: /* These queries need os_time_get() */ - svga->hud.uses_time = TRUE; + svga->hud.uses_time = true; break; default: @@ -955,7 +955,7 @@ svga_begin_query(struct pipe_context *pipe, struct pipe_query *q) SVGA_DBG(DEBUG_QUERY, "%s sq=0x%x id=%d type=%d svga_type=%d\n", __func__, sq, sq->id, sq->type, sq->svga_type); - sq->active = TRUE; + sq->active = true; return true; } @@ -1075,7 +1075,7 @@ svga_end_query(struct pipe_context *pipe, struct pipe_query *q) default: assert(!"unexpected query type in svga_end_query()"); } - sq->active = FALSE; + sq->active = false; return true; } @@ -1290,7 +1290,7 @@ svga_get_timestamp(struct pipe_context *pipe) util_query_clear_result(&result, PIPE_QUERY_TIMESTAMP); svga_begin_query(pipe, q); svga_end_query(pipe,q); - svga_get_query_result(pipe, q, TRUE, &result); + svga_get_query_result(pipe, q, true, &result); svga_destroy_query(pipe, q); return result.u64; diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c index 82d42c39c28..d719f41b489 100644 --- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c +++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c @@ -217,7 +217,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe, * But as-is, our implementation gives acceptable results and passes * Piglit's MSAA point smooth test. */ - rast->templ.point_smooth = TRUE; + rast->templ.point_smooth = true; } if (rast->templ.point_smooth && @@ -228,7 +228,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe, * pipe_rasterizer_state::point_size value, not when the point size * is set in the VS. */ - rast->templ.point_smooth = FALSE; + rast->templ.point_smooth = false; } if (rast->templ.point_smooth) { @@ -297,11 +297,11 @@ svga_create_rasterizer_state(struct pipe_context *pipe, int fill = PIPE_POLYGON_MODE_FILL; bool offset_front = util_get_offset(templ, fill_front); bool offset_back = util_get_offset(templ, fill_back); - bool offset = FALSE; + bool offset = false; switch (templ->cull_face) { case PIPE_FACE_FRONT_AND_BACK: - offset = FALSE; + offset = false; fill = PIPE_POLYGON_MODE_FILL; break; diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c index 3dc2a460793..64544ee9d6a 100644 --- a/src/gallium/drivers/svga/svga_pipe_sampler.c +++ b/src/gallium/drivers/svga/svga_pipe_sampler.c @@ -301,7 +301,7 @@ svga_bind_sampler_states(struct pipe_context *pipe, { struct svga_context *svga = svga_context(pipe); unsigned i; - bool any_change = FALSE; + bool any_change = false; assert(shader < PIPE_SHADER_TYPES); assert(start + num <= PIPE_MAX_SAMPLERS); @@ -312,7 +312,7 @@ svga_bind_sampler_states(struct pipe_context *pipe, for (i = 0; i < num; i++) { if (svga->curr.sampler[shader][start + i] != samplers[i]) - any_change = TRUE; + any_change = true; svga->curr.sampler[shader][start + i] = samplers[i]; } @@ -421,7 +421,7 @@ svga_set_sampler_views(struct pipe_context *pipe, unsigned flag_1d = 0; unsigned flag_srgb = 0; uint i; - bool any_change = FALSE; + bool any_change = false; assert(shader < PIPE_SHADER_TYPES); assert(start + num <= ARRAY_SIZE(svga->curr.sampler_views[shader])); @@ -447,7 +447,7 @@ svga_set_sampler_views(struct pipe_context *pipe, pipe_sampler_view_reference(&svga->curr.sampler_views[shader][i], NULL); } - any_change = TRUE; + any_change = true; } for (i = 0; i < num; i++) { @@ -490,7 +490,7 @@ svga_set_sampler_views(struct pipe_context *pipe, if (svga->curr.sampler_views[shader][start + i]) { pipe_sampler_view_reference(&svga->curr.sampler_views[shader][start + i], NULL); - any_change = TRUE; + any_change = true; } } diff --git a/src/gallium/drivers/svga/svga_pipe_streamout.c b/src/gallium/drivers/svga/svga_pipe_streamout.c index c89dcdb59a2..fd9960d3389 100644 --- a/src/gallium/drivers/svga/svga_pipe_streamout.c +++ b/src/gallium/drivers/svga/svga_pipe_streamout.c @@ -434,7 +434,7 @@ svga_set_stream_output_targets(struct pipe_context *pipe, */ for (i = 0; i < svga->num_so_targets; i++) { struct svga_buffer *sbuf = svga_buffer(svga->so_targets[i]->buffer); - sbuf->dirty = TRUE; + sbuf->dirty = true; } /* Before the currently bound streamout targets are unbound, @@ -470,7 +470,7 @@ svga_set_stream_output_targets(struct pipe_context *pipe, /* The streamout is being resumed. There is no need to restart streamout statistics * queries for the draw-auto fallback since those queries are still active. */ - begin_so_queries = FALSE; + begin_so_queries = false; } else soBindings[i].offset = sot->base.buffer_offset + offsets[i]; @@ -593,7 +593,7 @@ svga_begin_stream_output_queries(struct svga_context *svga, } (void) ret; } - svga->in_streamout = TRUE; + svga->in_streamout = true; return; } @@ -618,7 +618,7 @@ svga_end_stream_output_queries(struct svga_context *svga, } (void) ret; } - svga->in_streamout = FALSE; + svga->in_streamout = false; return; } @@ -642,7 +642,7 @@ svga_get_primcount_from_stream_output(struct svga_context *svga, ret = svga->pipe.get_query_result(&svga->pipe, svga->so_queries[stream], - TRUE, &result); + true, &result); if (ret) primcount = result.so_statistics.num_primitives_written; diff --git a/src/gallium/drivers/svga/svga_pipe_vertex.c b/src/gallium/drivers/svga/svga_pipe_vertex.c index 59dc63ea707..1105faa2ebf 100644 --- a/src/gallium/drivers/svga/svga_pipe_vertex.c +++ b/src/gallium/drivers/svga/svga_pipe_vertex.c @@ -68,9 +68,9 @@ attrib_needs_range_adjustment(enum pipe_format format) { switch (format) { case PIPE_FORMAT_R8G8B8_SNORM: - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -153,7 +153,7 @@ define_input_element_object(struct svga_context *svga, elements[i].inputRegister = i; if (elements[i].format == SVGA3D_FORMAT_INVALID) { - velems->need_swvfetch = TRUE; + velems->need_swvfetch = true; } if (util_format_is_pure_integer(elem->src_format)) { @@ -215,7 +215,7 @@ translate_vertex_decls(struct svga_context *svga, velems->decl_type[i] = translate_vertex_format_to_decltype(f); if (velems->decl_type[i] == SVGA3D_DECLTYPE_MAX) { /* Unsupported format - use software fetch */ - velems->need_swvfetch = TRUE; + velems->need_swvfetch = true; } /* Check for VS-based adjustments */ @@ -244,7 +244,7 @@ svga_create_vertex_elements_state(struct pipe_context *pipe, velems->count = count; memcpy(velems->velem, attribs, sizeof(*attribs) * count); - velems->need_swvfetch = FALSE; + velems->need_swvfetch = false; velems->adjust_attrib_range = 0x0; velems->attrib_is_pure_int = 0x0; velems->adjust_attrib_w_1 = 0x0; diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c index 08ddfdf17af..55ae7692a3a 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer.c +++ b/src/gallium/drivers/svga/svga_resource_buffer.c @@ -74,7 +74,7 @@ svga_buffer_needs_hw_storage(const struct svga_screen *ss, } if (template->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) - return TRUE; + return true; return !!(template->bind & bind_mask); } @@ -87,11 +87,11 @@ need_buf_readback(struct svga_context *svga, struct svga_buffer *sbuf = svga_buffer(st->resource); if (st->usage != PIPE_MAP_READ) - return FALSE; + return false; /* No buffer surface has been created */ if (!sbuf->bufsurf) - return FALSE; + return false; return ((sbuf->dirty || sbuf->bufsurf->surface_state == SVGA_SURFACE_STATE_RENDERED) && @@ -176,7 +176,7 @@ svga_buffer_transfer_map(struct pipe_context *pipe, svga_context_finish(svga); - sbuf->dirty = FALSE; + sbuf->dirty = false; /* Mark the buffer surface state as UPDATED */ assert(sbuf->bufsurf); @@ -210,7 +210,7 @@ svga_buffer_transfer_map(struct pipe_context *pipe, } sbuf->map.num_ranges = 0; - sbuf->dma.flags.discard = TRUE; + sbuf->dma.flags.discard = true; } if (usage & PIPE_MAP_UNSYNCHRONIZED) { @@ -220,7 +220,7 @@ svga_buffer_transfer_map(struct pipe_context *pipe, * not synchronize on the next DMA command. */ - sbuf->dma.flags.unsynchronized = TRUE; + sbuf->dma.flags.unsynchronized = true; } } else { /* @@ -265,7 +265,7 @@ svga_buffer_transfer_map(struct pipe_context *pipe, } } - sbuf->dma.flags.unsynchronized = FALSE; + sbuf->dma.flags.unsynchronized = false; } } @@ -388,7 +388,7 @@ svga_buffer_transfer_unmap(struct pipe_context *pipe, SVGA_DBG(DEBUG_DMA, "flushing the whole buffer\n"); - sbuf->dma.flags.discard = TRUE; + sbuf->dma.flags.discard = true; if (!(svga->swc->force_coherent || sbuf->key.coherent) || sbuf->swbuf) svga_buffer_add_range(sbuf, 0, sbuf->b.width0); @@ -552,7 +552,7 @@ svga_buffer_create(struct pipe_screen *screen, * the default constant buffer. */ if ((bind_flags & PIPE_BIND_CONSTANT_BUFFER) || !bind_flags) - sbuf->use_swbuf = TRUE; + sbuf->use_swbuf = true; } debug_reference(&sbuf->b.reference, @@ -600,7 +600,7 @@ svga_user_buffer_create(struct pipe_screen *screen, sbuf->bind_flags = bind; sbuf->swbuf = ptr; - sbuf->user = TRUE; + sbuf->user = true; debug_reference(&sbuf->b.reference, (debug_reference_descriptor)debug_describe_resource, 0); diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h b/src/gallium/drivers/svga/svga_resource_buffer.h index 05b7cc1f21d..8eee8940321 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer.h +++ b/src/gallium/drivers/svga/svga_resource_buffer.h @@ -250,7 +250,7 @@ svga_buffer_is_user_buffer(struct pipe_resource *buffer) if (buffer) { return svga_buffer(buffer)->user; } else { - return FALSE; + return false; } } @@ -273,9 +273,9 @@ static inline bool svga_buffer_has_hw_storage(struct svga_buffer *sbuf) { if (svga_buffer_winsys_screen(sbuf)->have_gb_objects) - return (sbuf->handle ? TRUE : FALSE); + return (sbuf->handle ? true : false); else - return (sbuf->hwbuf ? TRUE : FALSE); + return (sbuf->hwbuf ? true : false); } /** @@ -313,7 +313,7 @@ svga_buffer_hw_storage_map(struct svga_context *svga, } return map; } else { - *retry = FALSE; + *retry = false; return sws->buffer_map(sws, sbuf->hwbuf, flags); } } diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c index aec6504e6b7..3a9687cd3ef 100644 --- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c +++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c @@ -235,7 +235,7 @@ svga_buffer_create_host_surface(struct svga_screen *ss, * mode, the recycled buffer would have been invalidated. */ if (!ss->sws->have_gb_objects) - sbuf->dma.flags.discard = TRUE; + sbuf->dma.flags.discard = true; SVGA_DBG(DEBUG_DMA, " --> got sid %p sz %d (buffer)\n", sbuf->handle, sbuf->b.width0); @@ -299,7 +299,7 @@ svga_buffer_recreate_host_surface(struct svga_context *svga, /* Set the dirty bit to signal a read back is needed before the data copied * to this new surface can be referenced. */ - sbuf->dirty = TRUE; + sbuf->dirty = true; return ret; } @@ -313,15 +313,15 @@ compatible_bind_flags(unsigned bind_flags, unsigned tobind_flags) { if ((bind_flags & tobind_flags) == tobind_flags) - return TRUE; + return true; else if ((bind_flags|tobind_flags) & PIPE_BIND_CONSTANT_BUFFER) - return FALSE; + return false; else if ((bind_flags & PIPE_BIND_STREAM_OUTPUT) && (tobind_flags & (PIPE_BIND_SHADER_IMAGE | PIPE_BIND_SHADER_BUFFER))) /* Stream out cannot be mixed with UAV */ - return FALSE; + return false; else - return TRUE; + return true; } @@ -554,7 +554,7 @@ svga_buffer_upload_gb_command(struct svga_context *svga, SVGA_FIFOCommitAll(swc); swc->hints |= SVGA_HINT_FLAG_CAN_PRE_FLUSH; - sbuf->dma.flags.discard = FALSE; + sbuf->dma.flags.discard = false; svga->hud.num_resource_updates++; @@ -631,7 +631,7 @@ svga_buffer_upload_hb_command(struct svga_context *svga, SVGA_FIFOCommitAll(swc); swc->hints |= SVGA_HINT_FLAG_CAN_PRE_FLUSH; - sbuf->dma.flags.discard = FALSE; + sbuf->dma.flags.discard = false; svga->hud.num_buffer_uploads++; @@ -736,9 +736,9 @@ svga_buffer_upload_flush(struct svga_context *svga, struct svga_buffer *sbuf) assert(sbuf->head.prev && sbuf->head.next); list_del(&sbuf->head); /* remove from svga->dirty_buffers list */ - sbuf->dma.pending = FALSE; - sbuf->dma.flags.discard = FALSE; - sbuf->dma.flags.unsynchronized = FALSE; + sbuf->dma.pending = false; + sbuf->dma.flags.discard = false; + sbuf->dma.flags.unsynchronized = false; sbuf->dma.svga = NULL; sbuf->dma.boxes = NULL; @@ -896,7 +896,7 @@ svga_buffer_update_hw(struct svga_context *svga, struct svga_buffer *sbuf, assert(sbuf->map.count == 0); if (sbuf->map.count == 0) { if (sbuf->user) - sbuf->user = FALSE; + sbuf->user = false; else align_free(sbuf->swbuf); sbuf->swbuf = NULL; @@ -969,7 +969,7 @@ svga_buffer_upload_piecewise(struct svga_screen *ss, hwbuf, sbuf->handle, SVGA3D_WRITE_HOST_VRAM, size, 0, offset, sbuf->dma.flags)); - sbuf->dma.flags.discard = FALSE; + sbuf->dma.flags.discard = false; sws->buffer_destroy(sws, hwbuf); @@ -1005,7 +1005,7 @@ svga_buffer_upload_ranges(struct svga_context *svga, /* Emit DMA or UpdateGBImage commands */ SVGA_RETRY_OOM(svga, ret, svga_buffer_upload_command(svga, sbuf)); if (ret == PIPE_OK) { - sbuf->dma.pending = TRUE; + sbuf->dma.pending = true; assert(!sbuf->head.prev && !sbuf->head.next); list_addtail(&sbuf->head, &svga->dirty_buffers); } diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index 3824fc4ee12..8ce5b945520 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -177,7 +177,7 @@ svga_transfer_dma(struct svga_context *svga, * Prevent the texture contents to be discarded on the next band * upload. */ - flags.discard = FALSE; + flags.discard = false; if (transfer == SVGA3D_READ_HOST_VRAM) { svga_context_flush(svga, &fence); @@ -229,14 +229,14 @@ static inline bool need_tex_readback(struct svga_transfer *st) { if (st->base.usage & PIPE_MAP_READ) - return TRUE; + return true; if ((st->base.usage & PIPE_MAP_WRITE) && ((st->base.usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE) == 0)) { return svga_was_texture_rendered_to(svga_texture(st->base.resource)); } - return FALSE; + return false; } @@ -493,7 +493,7 @@ svga_texture_transfer_map(struct pipe_context *pipe, /* We can't map texture storage directly unless we have GB objects */ if (usage & PIPE_MAP_DIRECTLY) { if (svga_have_gb_objects(svga)) - use_direct_map = TRUE; + use_direct_map = true; else goto done; } @@ -542,7 +542,7 @@ svga_texture_transfer_map(struct pipe_context *pipe, * makes it impossible to support both at the same time. */ if (svga_have_gb_objects(svga)) { - use_direct_map = TRUE; + use_direct_map = true; } st->use_direct_map = use_direct_map; @@ -696,10 +696,10 @@ svga_texture_transfer_unmap_dma(struct svga_context *svga, memset(&flags, 0, sizeof flags); if (st->base.usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE) { - flags.discard = TRUE; + flags.discard = true; } if (st->base.usage & PIPE_MAP_UNSYNCHRONIZED) { - flags.unsynchronized = TRUE; + flags.unsynchronized = true; } svga_transfer_dma(svga, st, SVGA3D_WRITE_HOST_VRAM, flags); @@ -1041,7 +1041,7 @@ svga_texture_create(struct pipe_screen *screen, goto fail; } - bool use_typeless = FALSE; + bool use_typeless = false; if (svgascreen->sws->have_gl43) { /* Do not use typeless for SHARED, SCANOUT or DISPLAY_TARGET surfaces. */ use_typeless = !(bindings & (PIPE_BIND_SHARED | PIPE_BIND_SCANOUT | @@ -1211,7 +1211,7 @@ svga_texture_from_handle(struct pipe_screen *screen, if (!tex->dirty) goto out_no_dirty; - tex->imported = TRUE; + tex->imported = true; ss->hud.num_resources++; @@ -1324,25 +1324,25 @@ bool svga_texture_transfer_map_can_upload(const struct svga_screen *svgascreen, const struct pipe_resource *texture) { - if (svgascreen->sws->have_transfer_from_buffer_cmd == FALSE) - return FALSE; + if (svgascreen->sws->have_transfer_from_buffer_cmd == false) + return false; /* TransferFromBuffer command is not well supported with multi-samples surface */ if (texture->nr_samples > 1) - return FALSE; + return false; if (util_format_is_compressed(texture->format)) { /* XXX Need to take a closer look to see why texture upload * with 3D texture with compressed format fails */ if (texture->target == PIPE_TEXTURE_3D) - return FALSE; + return false; } else if (texture->format == PIPE_FORMAT_R9G9B9E5_FLOAT) { - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/src/gallium/drivers/svga/svga_resource_texture.h b/src/gallium/drivers/svga/svga_resource_texture.h index d60dcdec672..e1d82db6ed8 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.h +++ b/src/gallium/drivers/svga/svga_resource_texture.h @@ -247,7 +247,7 @@ svga_set_texture_dirty(struct svga_texture *tex, { check_face_level(tex, face, level); tex->dirty[face] |= 1 << level; - tex->modified = TRUE; + tex->modified = true; } static inline void @@ -257,7 +257,7 @@ svga_clear_texture_dirty(struct svga_texture *tex) for (i = 0; i < tex->b.depth0 * tex->b.array_size; i++) { tex->dirty[i] = 0; } - tex->modified = FALSE; + tex->modified = false; } static inline bool diff --git a/src/gallium/drivers/svga/svga_sampler_view.c b/src/gallium/drivers/svga/svga_sampler_view.c index b30eaea249a..e024ab3a203 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); - bool view = TRUE; + bool view = true; assert(pt); assert(min_lod <= max_lod); @@ -80,13 +80,13 @@ svga_get_tex_sampler_view(struct pipe_context *pipe, * results as a view. */ if (min_lod == 0 && max_lod >= pt->last_level) - view = FALSE; + view = false; if (ss->debug.no_sampler_view) - view = FALSE; + view = false; if (ss->debug.force_sampler_view) - view = TRUE; + view = true; } /* First try the cache */ @@ -151,7 +151,7 @@ svga_get_tex_sampler_view(struct pipe_context *pipe, flags, format, min_lod, max_lod - min_lod + 1, - -1, 1, -1, FALSE, + -1, 1, -1, false, &sv->key); if (!sv->handle) { diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 49e1d700b63..15b4fd2b90f 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -691,18 +691,18 @@ vgpu10_get_shader_param(struct pipe_screen *screen, case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR: case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR: case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR: - return TRUE; /* XXX verify */ + return true; /* XXX verify */ case PIPE_SHADER_CAP_CONT_SUPPORTED: case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED: case PIPE_SHADER_CAP_SUBROUTINES: case PIPE_SHADER_CAP_INTEGERS: - return TRUE; + return true; case PIPE_SHADER_CAP_FP16: case PIPE_SHADER_CAP_FP16_DERIVATIVES: case PIPE_SHADER_CAP_FP16_CONST_BUFFERS: case PIPE_SHADER_CAP_INT16: case PIPE_SHADER_CAP_GLSL_16BIT_CONSTS: - return FALSE; + return false; case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS: return sws->have_gl43 ? PIPE_MAX_SAMPLERS : SVGA3D_DX_MAX_SAMPLERS; @@ -901,7 +901,7 @@ svga_fence_get_fd(struct pipe_screen *screen, { struct svga_winsys_screen *sws = svga_screen(screen)->sws; - return sws->fence_get_fd(sws, fence, TRUE); + return sws->fence_get_fd(sws, fence, true); } @@ -1006,7 +1006,7 @@ init_logging(struct pipe_screen *screen) /* If the SVGA_EXTRA_LOGGING env var is set, log the process's command * line (program name and arguments). */ - if (debug_get_bool_option("SVGA_EXTRA_LOGGING", FALSE)) { + if (debug_get_bool_option("SVGA_EXTRA_LOGGING", false)) { char cmdline[1000]; if (util_get_command_line(cmdline, sizeof(cmdline))) { snprintf(host_log, sizeof(host_log) - strlen(log_prefix), @@ -1070,17 +1070,17 @@ svga_screen_create(struct svga_winsys_screen *sws) goto error1; svgascreen->debug.force_level_surface_view = - debug_get_bool_option("SVGA_FORCE_LEVEL_SURFACE_VIEW", FALSE); + debug_get_bool_option("SVGA_FORCE_LEVEL_SURFACE_VIEW", false); svgascreen->debug.force_surface_view = - debug_get_bool_option("SVGA_FORCE_SURFACE_VIEW", FALSE); + debug_get_bool_option("SVGA_FORCE_SURFACE_VIEW", false); svgascreen->debug.force_sampler_view = - debug_get_bool_option("SVGA_FORCE_SAMPLER_VIEW", FALSE); + debug_get_bool_option("SVGA_FORCE_SAMPLER_VIEW", false); svgascreen->debug.no_surface_view = - debug_get_bool_option("SVGA_NO_SURFACE_VIEW", FALSE); + debug_get_bool_option("SVGA_NO_SURFACE_VIEW", false); svgascreen->debug.no_sampler_view = - debug_get_bool_option("SVGA_NO_SAMPLER_VIEW", FALSE); + debug_get_bool_option("SVGA_NO_SAMPLER_VIEW", false); svgascreen->debug.no_cache_index_buffers = - debug_get_bool_option("SVGA_NO_CACHE_INDEX_BUFFERS", FALSE); + debug_get_bool_option("SVGA_NO_CACHE_INDEX_BUFFERS", false); screen = &svgascreen->screen; @@ -1133,13 +1133,13 @@ svga_screen_create(struct svga_winsys_screen *sws) debug_get_bool_option("SVGA_GL43", sws->have_gl43); svgascreen->debug.sampler_state_mapping = - debug_get_bool_option("SVGA_SAMPLER_STATE_MAPPING", FALSE); + debug_get_bool_option("SVGA_SAMPLER_STATE_MAPPING", false); } else { /* sampler state mapping code is only enabled with GL43 * due to the limitation in SW Renderer. (VMware bug 2825014) */ - svgascreen->debug.sampler_state_mapping = FALSE; + svgascreen->debug.sampler_state_mapping = false; } debug_printf("%s enabled\n", @@ -1200,21 +1200,21 @@ svga_screen_create(struct svga_winsys_screen *sws) */ if (sws->have_vgpu10) { svgascreen->haveProvokingVertex - = get_bool_cap(sws, SVGA3D_DEVCAP_DX_PROVOKING_VERTEX, FALSE); - svgascreen->haveLineSmooth = TRUE; + = get_bool_cap(sws, SVGA3D_DEVCAP_DX_PROVOKING_VERTEX, false); + svgascreen->haveLineSmooth = true; svgascreen->maxPointSize = 80.0F; svgascreen->max_color_buffers = SVGA3D_DX_MAX_RENDER_TARGETS; /* Multisample samples per pixel */ - if (sws->have_sm4_1 && debug_get_bool_option("SVGA_MSAA", TRUE)) { - if (get_bool_cap(sws, SVGA3D_DEVCAP_MULTISAMPLE_2X, FALSE)) + if (sws->have_sm4_1 && debug_get_bool_option("SVGA_MSAA", true)) { + if (get_bool_cap(sws, SVGA3D_DEVCAP_MULTISAMPLE_2X, false)) svgascreen->ms_samples |= 1 << 1; - if (get_bool_cap(sws, SVGA3D_DEVCAP_MULTISAMPLE_4X, FALSE)) + if (get_bool_cap(sws, SVGA3D_DEVCAP_MULTISAMPLE_4X, false)) svgascreen->ms_samples |= 1 << 3; } - if (sws->have_sm5 && debug_get_bool_option("SVGA_MSAA", TRUE)) { - if (get_bool_cap(sws, SVGA3D_DEVCAP_MULTISAMPLE_8X, FALSE)) + if (sws->have_sm5 && debug_get_bool_option("SVGA_MSAA", true)) { + if (get_bool_cap(sws, SVGA3D_DEVCAP_MULTISAMPLE_8X, false)) svgascreen->ms_samples |= 1 << 7; } @@ -1230,7 +1230,7 @@ svga_screen_create(struct svga_winsys_screen *sws) } svgascreen->haveBlendLogicops = - get_bool_cap(sws, SVGA3D_DEVCAP_LOGIC_BLENDOPS, FALSE); + get_bool_cap(sws, SVGA3D_DEVCAP_LOGIC_BLENDOPS, false); screen->is_format_supported = svga_is_dx_format_supported; @@ -1260,10 +1260,10 @@ svga_screen_create(struct svga_winsys_screen *sws) goto error2; } - svgascreen->haveProvokingVertex = FALSE; + svgascreen->haveProvokingVertex = false; svgascreen->haveLineSmooth = - get_bool_cap(sws, SVGA3D_DEVCAP_LINE_AA, FALSE); + get_bool_cap(sws, SVGA3D_DEVCAP_LINE_AA, false); svgascreen->maxPointSize = get_float_cap(sws, SVGA3D_DEVCAP_MAX_POINT_SIZE, 1.0f); @@ -1293,7 +1293,7 @@ svga_screen_create(struct svga_winsys_screen *sws) /* common VGPU9 / VGPU10 caps */ svgascreen->haveLineStipple = - get_bool_cap(sws, SVGA3D_DEVCAP_LINE_STIPPLE, FALSE); + get_bool_cap(sws, SVGA3D_DEVCAP_LINE_STIPPLE, false); svgascreen->maxLineWidth = MAX2(1.0, get_float_cap(sws, SVGA3D_DEVCAP_MAX_LINE_WIDTH, 1.0f)); @@ -1317,7 +1317,7 @@ svga_screen_create(struct svga_winsys_screen *sws) svga_screen_cache_init(svgascreen); - if (debug_get_bool_option("SVGA_NO_LOGGING", FALSE) == TRUE) { + if (debug_get_bool_option("SVGA_NO_LOGGING", false) == true) { svgascreen->sws->host_log = nop_host_log; } else { init_logging(screen); diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c index a722008b1ee..088e5d9e381 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.c +++ b/src/gallium/drivers/svga/svga_screen_cache.c @@ -565,7 +565,7 @@ svga_screen_surface_create(struct svga_screen *svgascreen, key->numMipLevels, key->numFaces, key->arraySize); - *validated = TRUE; + *validated = true; } } @@ -600,7 +600,7 @@ svga_screen_surface_create(struct svga_screen *svgascreen, key->size.height, key->size.depth); - *validated = FALSE; + *validated = false; } return handle; diff --git a/src/gallium/drivers/svga/svga_shader.c b/src/gallium/drivers/svga/svga_shader.c index 4240ac9890d..4eeabf3c686 100644 --- a/src/gallium/drivers/svga/svga_shader.c +++ b/src/gallium/drivers/svga/svga_shader.c @@ -390,7 +390,7 @@ svga_init_shader_key_common(const struct svga_context *svga, */ if ((sampler->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) && !isValidSampleCFormat(view->format)) { - key->tex[i].compare_in_shader = TRUE; + key->tex[i].compare_in_shader = true; } } @@ -409,12 +409,12 @@ svga_init_shader_key_common(const struct svga_context *svga, assert(idx < (1 << 5)); /* width_height_idx:5 bitfield */ key->tex[i].width_height_idx = idx++; } - key->tex[i].unnormalized = TRUE; + key->tex[i].unnormalized = true; ++key->num_unnormalized_coords; if (sampler->magfilter == SVGA3D_TEX_FILTER_NEAREST || sampler->minfilter == SVGA3D_TEX_FILTER_NEAREST) { - key->tex[i].texel_bias = TRUE; + key->tex[i].texel_bias = true; } } diff --git a/src/gallium/drivers/svga/svga_shader.h b/src/gallium/drivers/svga/svga_shader.h index 6e216eeee6f..bdc56a32b7e 100644 --- a/src/gallium/drivers/svga/svga_shader.h +++ b/src/gallium/drivers/svga/svga_shader.h @@ -527,16 +527,16 @@ svga_shader_too_large(const struct svga_context *svga, const struct svga_shader_variant *variant) { if (svga_have_gb_objects(svga)) { - return FALSE; + return false; } if (variant->nr_tokens * sizeof(variant->tokens[0]) + sizeof(SVGA3dCmdDefineShader) + sizeof(SVGA3dCmdHeader) < SVGA_CB_MAX_COMMAND_SIZE) { - return FALSE; + return false; } - return TRUE; + return true; } @@ -613,7 +613,7 @@ svga_is_using_flat_shading(const struct svga_context *svga) { return svga->state.hw_draw.fs ? - svga_fs_variant(svga->state.hw_draw.fs)->uses_flat_interp : FALSE; + svga_fs_variant(svga->state.hw_draw.fs)->uses_flat_interp : false; } struct svga_shader_variant * diff --git a/src/gallium/drivers/svga/svga_shader_buffer.c b/src/gallium/drivers/svga/svga_shader_buffer.c index 927bac25d41..a39cbd6a4d4 100644 --- a/src/gallium/drivers/svga/svga_shader_buffer.c +++ b/src/gallium/drivers/svga/svga_shader_buffer.c @@ -72,7 +72,7 @@ svga_create_uav_buffer(struct svga_context *svga, /* Mark this buffer as a uav bound buffer */ struct svga_buffer *sbuf = svga_buffer(buf->buffer); - sbuf->uav = TRUE; + sbuf->uav = true; return uaViewId; } @@ -198,7 +198,7 @@ svga_set_hw_atomic_buffers(struct pipe_context *pipe, * the uav buffer can be updated at each draw. */ struct svga_buffer *sbuf = svga_buffer(cbuf->desc.buffer); - sbuf->uav = TRUE; + sbuf->uav = true; } else { cbuf->desc.buffer = NULL; diff --git a/src/gallium/drivers/svga/svga_state.c b/src/gallium/drivers/svga/svga_state.c index 78dfd73053c..652eb129477 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 - bool debug = TRUE; + bool debug = true; #else - bool debug = FALSE; + bool debug = false; #endif enum pipe_error ret = PIPE_OK; unsigned i; diff --git a/src/gallium/drivers/svga/svga_state_cs.c b/src/gallium/drivers/svga/svga_state_cs.c index a390188292b..bb2b7dcb679 100644 --- a/src/gallium/drivers/svga/svga_state_cs.c +++ b/src/gallium/drivers/svga/svga_state_cs.c @@ -109,7 +109,7 @@ emit_hw_cs(struct svga_context *svga, uint64_t dirty) if (ret != PIPE_OK) goto done; - svga->rebind.flags.cs = FALSE; + svga->rebind.flags.cs = false; svga->dirty |= SVGA_NEW_CS_VARIANT; svga->state.hw_draw.cs = variant; } diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c index 0ee036b5538..b5054a7ee56 100644 --- a/src/gallium/drivers/svga/svga_state_framebuffer.c +++ b/src/gallium/drivers/svga/svga_state_framebuffer.c @@ -74,7 +74,7 @@ emit_fb_vgpu9(struct svga_context *svga) /* Check to see if we need to propagate the render target surface */ if (hw->cbufs[i] && svga_surface_needs_propagation(hw->cbufs[i])) - svga_propagate_surface(svga, hw->cbufs[i], TRUE); + svga_propagate_surface(svga, hw->cbufs[i], true); ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_COLOR0 + i, curr->cbufs[i]); @@ -98,7 +98,7 @@ emit_fb_vgpu9(struct svga_context *svga) /* Check to see if we need to propagate the depth stencil surface */ if (hw->zsbuf && svga_surface_needs_propagation(hw->zsbuf)) - svga_propagate_surface(svga, hw->zsbuf, TRUE); + svga_propagate_surface(svga, hw->zsbuf, true); if (curr->zsbuf && util_format_is_depth_and_stencil(curr->zsbuf->format)) { @@ -199,7 +199,7 @@ emit_fb_vgpu10(struct svga_context *svga) * The flag is set in svga_validate_surface_view() if * a backed surface view is used. */ - svga->state.hw_draw.has_backed_views = FALSE; + svga->state.hw_draw.has_backed_views = false; /* Setup render targets array. Note that we loop over the max of the * number of previously bound buffers and the new buffers to unbind @@ -268,7 +268,7 @@ emit_fb_vgpu10(struct svga_context *svga) if (hw->cbufs[i] && svga_surface(hw->cbufs[i])->backed) { svga_propagate_surface(svga, &svga_surface(hw->cbufs[i])->backed->base, - TRUE); + true); } else if (svga->state.hw_clear.rtv[i] != hw->cbufs[i] && svga->state.hw_clear.rtv[i]) { @@ -287,7 +287,7 @@ emit_fb_vgpu10(struct svga_context *svga) if (hw->zsbuf && svga_surface(hw->zsbuf)->backed) { svga_propagate_surface(svga, &svga_surface(hw->zsbuf)->backed->base, - TRUE); + true); } else if (svga->state.hw_clear.dsv != hw->zsbuf && svga->state.hw_clear.dsv) { /* Free the alternate surface view when it is unbound. */ @@ -336,7 +336,7 @@ svga_reemit_framebuffer_bindings(struct svga_context *svga) ret = svga_reemit_framebuffer_bindings_vgpu9(svga); } - svga->rebind.flags.rendertargets = FALSE; + svga->rebind.flags.rendertargets = false; return 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; - bool degenerate = FALSE; - bool invertY = FALSE; + bool degenerate = false; + bool invertY = false; float fb_width = (float) svga->curr.framebuffer.width; float fb_height = (float) svga->curr.framebuffer.height; @@ -448,10 +448,10 @@ get_viewport_prescale(struct svga_context *svga, VGPU10 convention only if rasterization is enabled. */ if (svga->curr.rast && svga->curr.rast->templ.rasterizer_discard) { - degenerate = TRUE; + degenerate = true; goto out; } else { - prescale->enabled = TRUE; + prescale->enabled = true; } if (fw < 0) { @@ -473,7 +473,7 @@ get_viewport_prescale(struct svga_context *svga, fh = -fh; fy -= fh; prescale->scale[1] = -1.0f; - invertY = TRUE; + invertY = true; } if (fx < 0) { @@ -518,7 +518,7 @@ get_viewport_prescale(struct svga_context *svga, if (fw < 0 || fh < 0) { fw = fh = fx = fy = 0; - degenerate = TRUE; + degenerate = true; goto out; } @@ -679,7 +679,7 @@ out: rect.y = 0; rect.w = 1; rect.h = 1; - prescale->enabled = FALSE; + prescale->enabled = false; } vp->x = (float) rect.x; diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c index dc5b1e7e309..a93eaea3651 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 bool 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 */ @@ -225,7 +225,7 @@ make_fs_key(const struct svga_context *svga, i, svga->curr.sampler_views[shader][i], i, svga->curr.sampler[shader][i]); } - warned = TRUE; + warned = true; } } #endif @@ -344,7 +344,7 @@ svga_reemit_fs_bindings(struct svga_context *svga) if (ret != PIPE_OK) return ret; - svga->rebind.flags.fs = FALSE; + svga->rebind.flags.fs = false; return PIPE_OK; } @@ -380,7 +380,7 @@ emit_hw_fs(struct svga_context *svga, uint64_t dirty) if (ret != PIPE_OK) goto done; } - svga->rebind.flags.fs = FALSE; + svga->rebind.flags.fs = false; svga->state.hw_draw.fs = NULL; goto done; } @@ -412,7 +412,7 @@ emit_hw_fs(struct svga_context *svga, uint64_t dirty) if (ret != PIPE_OK) goto done; - svga->rebind.flags.fs = FALSE; + svga->rebind.flags.fs = false; svga->dirty |= SVGA_NEW_FS_VARIANT; svga->state.hw_draw.fs = variant; diff --git a/src/gallium/drivers/svga/svga_state_gs.c b/src/gallium/drivers/svga/svga_state_gs.c index 1b23f6d97c3..e9489058eed 100644 --- a/src/gallium/drivers/svga/svga_state_gs.c +++ b/src/gallium/drivers/svga/svga_state_gs.c @@ -180,7 +180,7 @@ emit_hw_gs(struct svga_context *svga, uint64_t dirty) if (ret != PIPE_OK) goto done; - svga->rebind.flags.gs = FALSE; + svga->rebind.flags.gs = false; svga->dirty |= SVGA_NEW_GS_VARIANT; svga->state.hw_draw.gs = variant; } diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c index 0c14e25fd49..5446f7a8a5e 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) { - bool need_pipeline = FALSE; + bool need_pipeline = false; struct svga_vertex_shader *vs = svga->curr.vs; const char *reason = ""; @@ -77,7 +77,7 @@ update_need_pipeline(struct svga_context *svga, uint64_t dirty) svga->curr.rast->need_pipeline_tris_str, svga->curr.rast->need_pipeline_lines_str, svga->curr.rast->need_pipeline_points_str); - need_pipeline = TRUE; + need_pipeline = true; switch (svga->curr.reduced_prim) { case MESA_PRIM_POINTS: @@ -98,7 +98,7 @@ update_need_pipeline(struct svga_context *svga, uint64_t dirty) */ if (vs && vs->base.info.writes_edgeflag) { SVGA_DBG(DEBUG_SWTNL, "%s: edgeflags\n", __func__); - need_pipeline = TRUE; + need_pipeline = true; reason = "edge flags"; } @@ -120,7 +120,7 @@ update_need_pipeline(struct svga_context *svga, uint64_t dirty) * To solve this, we have to use the draw-module's wide/sprite * point stage. */ - need_pipeline = TRUE; + need_pipeline = true; reason = "point sprite coordinate generation"; } } @@ -161,15 +161,15 @@ update_need_swtnl(struct svga_context *svga, uint64_t dirty) bool need_swtnl; if (svga->debug.no_swtnl) { - svga->state.sw.need_swvfetch = FALSE; - svga->state.sw.need_pipeline = FALSE; + svga->state.sw.need_swvfetch = false; + svga->state.sw.need_pipeline = false; } need_swtnl = (svga->state.sw.need_swvfetch || svga->state.sw.need_pipeline); if (svga->debug.force_swtnl) { - need_swtnl = TRUE; + need_swtnl = true; } /* @@ -178,7 +178,7 @@ update_need_swtnl(struct svga_context *svga, uint64_t dirty) * the wrong buffers and vertex formats. Try trivial/line-wide. */ if (svga->state.sw.in_swtnl_draw) - need_swtnl = TRUE; + need_swtnl = true; if (need_swtnl != svga->state.sw.need_swtnl) { SVGA_DBG(DEBUG_SWTNL|DEBUG_PERF, @@ -189,7 +189,7 @@ update_need_swtnl(struct svga_context *svga, uint64_t dirty) svga->state.sw.need_swtnl = need_swtnl; svga->dirty |= SVGA_NEW_NEED_SWTNL; - svga->swtnl.new_vdecl = TRUE; + svga->swtnl.new_vdecl = true; } return PIPE_OK; diff --git a/src/gallium/drivers/svga/svga_state_rss.c b/src/gallium/drivers/svga/svga_state_rss.c index 69fa5c5cf04..dea68fdbab8 100644 --- a/src/gallium/drivers/svga/svga_state_rss.c +++ b/src/gallium/drivers/svga/svga_state_rss.c @@ -146,14 +146,14 @@ emit_rss_vgpu9(struct svga_context *svga, uint64_t dirty) if (!curr->stencil[0].enabled) { /* Stencil disabled */ - EMIT_RS(svga, FALSE, STENCILENABLE); - EMIT_RS(svga, FALSE, STENCILENABLE2SIDED); + EMIT_RS(svga, false, STENCILENABLE); + EMIT_RS(svga, false, STENCILENABLE2SIDED); } else if (curr->stencil[0].enabled && !curr->stencil[1].enabled) { /* Regular stencil */ - EMIT_RS(svga, TRUE, STENCILENABLE); - EMIT_RS(svga, FALSE, STENCILENABLE2SIDED); + EMIT_RS(svga, true, STENCILENABLE); + EMIT_RS(svga, false, STENCILENABLE2SIDED); EMIT_RS(svga, curr->stencil[0].func, STENCILFUNC); EMIT_RS(svga, curr->stencil[0].fail, STENCILFAIL); @@ -181,8 +181,8 @@ emit_rss_vgpu9(struct svga_context *svga, uint64_t dirty) /* Twoside stencil */ - EMIT_RS(svga, TRUE, STENCILENABLE); - EMIT_RS(svga, TRUE, STENCILENABLE2SIDED); + EMIT_RS(svga, true, STENCILENABLE); + EMIT_RS(svga, true, STENCILENABLE2SIDED); EMIT_RS(svga, curr->stencil[cw].func, STENCILFUNC); EMIT_RS(svga, curr->stencil[cw].fail, STENCILFAIL); @@ -458,7 +458,7 @@ emit_rss_vgpu10(struct svga_context *svga, uint64_t dirty) svga->state.hw_draw.depth_stencil_id = ds->id; svga->state.hw_draw.stencil_ref = 0; } - svga->state.hw_draw.rasterizer_discard = TRUE; + svga->state.hw_draw.rasterizer_discard = true; } } else { if ((dirty & (SVGA_NEW_DEPTH_STENCIL_ALPHA | SVGA_NEW_STENCIL_REF)) || @@ -515,7 +515,7 @@ emit_rss_vgpu10(struct svga_context *svga, uint64_t dirty) svga->state.hw_draw.rasterizer_id = rastId; } } - svga->state.hw_draw.rasterizer_discard = FALSE; + svga->state.hw_draw.rasterizer_discard = false; } return PIPE_OK; } diff --git a/src/gallium/drivers/svga/svga_state_sampler.c b/src/gallium/drivers/svga/svga_state_sampler.c index b2dd923e2ab..a45e53e65eb 100644 --- a/src/gallium/drivers/svga/svga_state_sampler.c +++ b/src/gallium/drivers/svga/svga_state_sampler.c @@ -72,7 +72,7 @@ svga_check_sampler_view_resource_collision(const struct svga_context *svga, unsigned i; if (svga_screen(screen)->debug.no_surface_view) { - return FALSE; + return false; } for (i = 0; i < svga->curr.num_sampler_views[shader]; i++) { @@ -80,11 +80,11 @@ svga_check_sampler_view_resource_collision(const struct svga_context *svga, svga_pipe_sampler_view(svga->curr.sampler_views[shader][i]); if (sv && res == svga_resource_handle(sv->base.texture)) { - return TRUE; + return true; } } - return FALSE; + return false; } @@ -104,17 +104,17 @@ svga_check_sampler_framebuffer_resource_collision(struct svga_context *svga, if (surf && svga_check_sampler_view_resource_collision(svga, surf->handle, shader)) { - return TRUE; + return true; } } surf = svga_surface(svga->curr.framebuffer.zsbuf); if (surf && svga_check_sampler_view_resource_collision(svga, surf->handle, shader)) { - return TRUE; + return true; } - return FALSE; + return false; } @@ -309,7 +309,7 @@ update_sampler_resources(struct svga_context *svga, uint64_t dirty) /* Include the last sampler view in the next emit * if it is different. */ - emit = TRUE; + emit = true; numSR++; i++; } @@ -607,7 +607,7 @@ update_cs_sampler_resources(struct svga_context *svga, uint64_t dirty) /* Include the last sampler view in the next emit * if it is different. */ - emit = TRUE; + emit = true; numSR++; i++; } diff --git a/src/gallium/drivers/svga/svga_state_tgsi_transform.c b/src/gallium/drivers/svga/svga_state_tgsi_transform.c index f1052729423..98e9ee202ab 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; - bool use_existing = FALSE; + bool use_existing = false; struct svga_shader *transform_shader; const struct tgsi_shader_info *info = &shader->tgsi_info; @@ -141,7 +141,7 @@ write_vpos(struct svga_context *svga, if (shader->next) { transform_shader = svga_search_shader_token_key(shader->next, &key); if (transform_shader) { - use_existing = TRUE; + use_existing = true; } } @@ -177,7 +177,7 @@ transform_dynamic_indexing(struct svga_context *svga, struct svga_shader *shader) { struct svga_token_key key; - bool use_existing = FALSE; + bool use_existing = false; struct svga_shader *transform_shader; const struct tgsi_shader_info *info = &shader->tgsi_info; @@ -188,7 +188,7 @@ transform_dynamic_indexing(struct svga_context *svga, if (shader->next) { transform_shader = svga_search_shader_token_key(shader->next, &key); if (transform_shader) { - use_existing = TRUE; + use_existing = true; } } @@ -332,7 +332,7 @@ emulate_point_sprite(struct svga_context *svga, return NULL; } - gs->wide_point = TRUE; + gs->wide_point = true; gs->aa_point_coord_index = aa_point_coord_index; gs->base.token_key = key; gs->base.parent = &orig_gs->base; diff --git a/src/gallium/drivers/svga/svga_state_ts.c b/src/gallium/drivers/svga/svga_state_ts.c index 92a14356c7a..d78caa49ec3 100644 --- a/src/gallium/drivers/svga/svga_state_ts.c +++ b/src/gallium/drivers/svga/svga_state_ts.c @@ -125,7 +125,7 @@ emit_hw_tcs(struct svga_context *svga, uint64_t dirty) if (ret != PIPE_OK) goto done; - svga->rebind.flags.tcs = FALSE; + svga->rebind.flags.tcs = false; svga->dirty |= SVGA_NEW_TCS_VARIANT; svga->state.hw_draw.tcs = variant; } @@ -270,10 +270,10 @@ emit_hw_tes(struct svga_context *svga, uint64_t dirty) * passthough TCS in the emit_hw_tes() function. */ get_passthrough_tcs(svga); - svga->tcs.passthrough = TRUE; + svga->tcs.passthrough = true; } else { - svga->tcs.passthrough = FALSE; + svga->tcs.passthrough = false; } make_tes_key(svga, &key); @@ -293,7 +293,7 @@ emit_hw_tes(struct svga_context *svga, uint64_t dirty) if (ret != PIPE_OK) goto done; - svga->rebind.flags.tes = FALSE; + svga->rebind.flags.tes = false; svga->dirty |= SVGA_NEW_TES_VARIANT; svga->state.hw_draw.tes = variant; } diff --git a/src/gallium/drivers/svga/svga_state_tss.c b/src/gallium/drivers/svga/svga_state_tss.c index c646f23a205..edd4d94b0d5 100644 --- a/src/gallium/drivers/svga/svga_state_tss.c +++ b/src/gallium/drivers/svga/svga_state_tss.c @@ -53,7 +53,7 @@ svga_cleanup_tss_binding(struct svga_context *svga) pipe_sampler_view_reference(&svga->curr.sampler_views[shader][i], NULL); pipe_resource_reference(&view->texture, NULL); - view->dirty = TRUE; + view->dirty = true; } } } @@ -110,7 +110,7 @@ emit_tex_binding_unit(struct svga_context *svga, svga_sampler_view_reference(&view->v, NULL); pipe_resource_reference(&view->texture, texture); - view->dirty = TRUE; + view->dirty = true; view->min_lod = min_lod; view->max_lod = max_lod; @@ -210,13 +210,13 @@ update_tss_binding(struct svga_context *svga, uint64_t dirty ) handle, SVGA_RELOC_READ); - queue.bind[i].view->dirty = FALSE; + queue.bind[i].view->dirty = false; } SVGA_FIFOCommitAll(svga->swc); } - svga->rebind.flags.texture_samplers = FALSE; + svga->rebind.flags.texture_samplers = false; return PIPE_OK; @@ -294,7 +294,7 @@ svga_reemit_tss_bindings(struct svga_context *svga) SVGA_FIFOCommitAll(svga->swc); } - svga->rebind.flags.texture_samplers = FALSE; + svga->rebind.flags.texture_samplers = false; return PIPE_OK; } diff --git a/src/gallium/drivers/svga/svga_state_uav.c b/src/gallium/drivers/svga/svga_state_uav.c index 1ad6eb424ee..62cd0f4548e 100644 --- a/src/gallium/drivers/svga/svga_state_uav.c +++ b/src/gallium/drivers/svga/svga_state_uav.c @@ -69,15 +69,15 @@ image_view_desc_identical(struct pipe_image_view *img1, (img1->format != img2->format) || (img1->access != img2->access) || (img1->shader_access != img2->shader_access)) - return FALSE; + return false; if (img1->resource->target == PIPE_BUFFER) { if ((img1->u.buf.offset != img2->u.buf.offset) || (img1->u.buf.size != img2->u.buf.size)) - return FALSE; + return false; } - return TRUE; + return true; } @@ -105,7 +105,7 @@ uav_desc_identical(enum svga_uav_type uav_type, struct svga_image_view *img = (struct svga_image_view *)desc; struct svga_image_view *uav_img = (struct svga_image_view *)uav_desc; if (img->resource != uav_img->resource) - return FALSE; + return false; return image_view_desc_identical(&img->desc, &uav_img->desc); } @@ -115,10 +115,10 @@ uav_desc_identical(enum svga_uav_type uav_type, (struct svga_shader_buffer *)uav_desc; if (buf->resource != uav_buf->resource) - return FALSE; + return false; if (buf->handle != uav_buf->handle) - return FALSE; + return false; return shader_buffer_desc_identical(&buf->desc, &uav_buf->desc); } diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c index 62472950de5..609fb4e4e56 100644 --- a/src/gallium/drivers/svga/svga_state_vs.c +++ b/src/gallium/drivers/svga/svga_state_vs.c @@ -188,7 +188,7 @@ svga_reemit_vs_bindings(struct svga_context *svga) if (ret != PIPE_OK) return ret; - svga->rebind.flags.vs = FALSE; + svga->rebind.flags.vs = false; return PIPE_OK; } @@ -345,7 +345,7 @@ emit_hw_vs(struct svga_context *svga, uint64_t dirty) ret = svga_set_shader(svga, SVGA3D_SHADERTYPE_VS, variant); if (ret != PIPE_OK) goto done; - svga->rebind.flags.vs = FALSE; + svga->rebind.flags.vs = false; } svga->dirty |= SVGA_NEW_VS_VARIANT; diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c index 5b5e94753b7..b4344f1c45e 100644 --- a/src/gallium/drivers/svga/svga_surface.c +++ b/src/gallium/drivers/svga/svga_surface.c @@ -242,7 +242,7 @@ svga_texture_view_surface(struct svga_context *svga, SVGA_DBG(DEBUG_DMA, "surface_create for texture view\n"); handle = svga_screen_surface_create(ss, bind_flags, PIPE_USAGE_DEFAULT, &invalidated, key); - needCopyResource = TRUE; + needCopyResource = true; if (cacheable && !tex->backed_handle) { tex->backed_handle = handle; @@ -396,7 +396,7 @@ svga_create_surface_view(struct pipe_context *pipe, tex->key.format, surf_tmpl->u.tex.level, 1, layer, nlayers, zslice, - TRUE, &s->key); + true, &s->key); if (!s->handle) { FREE(s); goto done; @@ -436,22 +436,22 @@ 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; - bool view = FALSE; + bool view = false; SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_CREATESURFACE); if (svga_screen(screen)->debug.force_surface_view) - view = TRUE; + view = true; if (surf_tmpl->u.tex.level != 0 && svga_screen(screen)->debug.force_level_surface_view) - view = TRUE; + view = true; if (pt->target == PIPE_TEXTURE_3D) - view = TRUE; + view = true; if (svga_have_vgpu10(svga) || svga_screen(screen)->debug.no_surface_view) - view = FALSE; + view = false; surf = svga_create_surface_view(pipe, pt, surf_tmpl, view); @@ -556,10 +556,10 @@ svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s) SVGA_DBG(DEBUG_VIEWS, "same resource used in shaderResource and renderTarget 0x%x\n", s->handle); - s = create_backed_surface_view(svga, s, TRUE); + s = create_backed_surface_view(svga, s, true); if (s) - svga->state.hw_draw.has_backed_views = TRUE; + svga->state.hw_draw.has_backed_views = true; /* s may be null here if the function failed */ break; @@ -571,10 +571,10 @@ svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s) * view was created for another context. */ if (s && s->base.context != &svga->pipe) { - s = create_backed_surface_view(svga, s, FALSE); + s = create_backed_surface_view(svga, s, false); if (s) - svga->state.hw_draw.has_backed_views = TRUE; + svga->state.hw_draw.has_backed_views = true; } if (s && s->view_id == SVGA3D_INVALID_ID) { @@ -723,7 +723,7 @@ svga_mark_surface_dirty(struct pipe_surface *surf) struct svga_texture *tex = svga_texture(surf->texture); if (!s->dirty) { - s->dirty = TRUE; + s->dirty = true; if (s->handle == tex->handle) { /* hmm so 3d textures always have all their slices marked ? */ @@ -893,12 +893,12 @@ svga_propagate_rendertargets(struct svga_context *svga) for (i = 0; i < svga->state.hw_clear.num_rendertargets; i++) { struct pipe_surface *s = svga->state.hw_clear.rtv[i]; if (s) { - svga_propagate_surface(svga, s, FALSE); + svga_propagate_surface(svga, s, false); } } if (svga->state.hw_clear.dsv) { - svga_propagate_surface(svga, svga->state.hw_clear.dsv, FALSE); + svga_propagate_surface(svga, svga->state.hw_clear.dsv, false); } } diff --git a/src/gallium/drivers/svga/svga_swtnl_backend.c b/src/gallium/drivers/svga/svga_swtnl_backend.c index 07dd4d083c2..6f80cbd2387 100644 --- a/src/gallium/drivers/svga/svga_swtnl_backend.c +++ b/src/gallium/drivers/svga/svga_swtnl_backend.c @@ -65,23 +65,23 @@ 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; - bool new_vbuf = FALSE; - bool new_ibuf = FALSE; + bool new_vbuf = false; + bool new_ibuf = false; SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_VBUFRENDERALLOCVERT); if (svga_render->vertex_size != vertex_size) - svga->swtnl.new_vdecl = TRUE; + svga->swtnl.new_vdecl = true; svga_render->vertex_size = (size_t)vertex_size; if (svga->swtnl.new_vbuf) - new_ibuf = new_vbuf = TRUE; - svga->swtnl.new_vbuf = FALSE; + new_ibuf = new_vbuf = true; + svga->swtnl.new_vbuf = false; if (svga_render->vbuf_size < svga_render->vbuf_offset + svga_render->vbuf_used + size) - new_vbuf = TRUE; + new_vbuf = true; if (new_vbuf) pipe_resource_reference(&svga_render->vbuf, NULL); @@ -108,7 +108,7 @@ svga_vbuf_render_allocate_vertices(struct vbuf_render *render, svga_retry_exit(svga); } - svga->swtnl.new_vdecl = TRUE; + svga->swtnl.new_vdecl = true; svga_render->vbuf_offset = 0; } else { svga_render->vbuf_offset += svga_render->vbuf_used; @@ -121,7 +121,7 @@ svga_vbuf_render_allocate_vertices(struct vbuf_render *render, SVGA_STATS_TIME_POP(svga_sws(svga)); - return TRUE; + return true; } @@ -233,7 +233,7 @@ svga_vbuf_submit_state(struct svga_vbuf_render *svga_render) SVGA_RETRY_CHECK(svga, svga_hwtnl_flush(svga->hwtnl), retried); if (retried) { /* if we hit this path we might become synced with hw */ - svga->swtnl.new_vbuf = TRUE; + svga->swtnl.new_vbuf = true; } for (i = 0; i < svga_render->vdecl_count; i++) { @@ -260,7 +260,7 @@ svga_vbuf_submit_state(struct svga_vbuf_render *svga_render) * module use whatever is most convenient: */ if (svga->state.sw.need_pipeline) { - svga_hwtnl_set_flatshade(svga->hwtnl, FALSE, FALSE); + svga_hwtnl_set_flatshade(svga->hwtnl, false, false); svga_hwtnl_set_fillmode(svga->hwtnl, PIPE_POLYGON_MODE_FILL); } else { @@ -272,7 +272,7 @@ svga_vbuf_submit_state(struct svga_vbuf_render *svga_render) svga_hwtnl_set_fillmode(svga->hwtnl, svga->curr.rast->hw_fillmode); } - svga->swtnl.new_vdecl = FALSE; + svga->swtnl.new_vdecl = false; SVGA_STATS_TIME_POP(svga_sws(svga)); } @@ -304,7 +304,7 @@ svga_vbuf_render_draw_arrays(struct vbuf_render *render, (svga->hwtnl, svga_render->prim, start + bias, nr, start_instance, instance_count, 0), retried); if (retried) { - svga->swtnl.new_vbuf = TRUE; + svga->swtnl.new_vbuf = true; } SVGA_STATS_TIME_POP(svga_sws(svga)); @@ -356,7 +356,7 @@ svga_vbuf_render_draw_elements(struct vbuf_render *render, &draw, nr_indices), retried); if (retried) { - svga->swtnl.new_vbuf = TRUE; + svga->swtnl.new_vbuf = true; } SVGA_STATS_TIME_POP(svga_sws(svga)); diff --git a/src/gallium/drivers/svga/svga_swtnl_draw.c b/src/gallium/drivers/svga/svga_swtnl_draw.c index fdb3726ee85..d64972161b1 100644 --- a/src/gallium/drivers/svga/svga_swtnl_draw.c +++ b/src/gallium/drivers/svga/svga_swtnl_draw.c @@ -59,11 +59,11 @@ svga_swtnl_draw_vbo(struct svga_context *svga, assert(draw); /* Make sure that the need_swtnl flag does not go away */ - svga->state.sw.in_swtnl_draw = TRUE; + svga->state.sw.in_swtnl_draw = true; SVGA_RETRY_CHECK(svga, svga_update_state(svga, SVGA_STATE_SWTNL_DRAW), retried); if (retried) { - svga->swtnl.new_vbuf = TRUE; + svga->swtnl.new_vbuf = true; } /* @@ -145,7 +145,7 @@ svga_swtnl_draw_vbo(struct svga_context *svga, } /* Now safe to remove the need_swtnl flag in any update_state call */ - svga->state.sw.in_swtnl_draw = FALSE; + svga->state.sw.in_swtnl_draw = false; svga->dirty |= SVGA_NEW_NEED_PIPELINE | SVGA_NEW_NEED_SWVFETCH; SVGA_STATS_TIME_POP(svga_sws(svga)); @@ -202,10 +202,10 @@ svga_init_swtnl(struct svga_context *svga) MAX2(screen->maxLineWidth, screen->maxLineWidthAA)); - if (debug_get_bool_option("SVGA_SWTNL_FSE", FALSE)) - draw_set_driver_clipping(svga->swtnl.draw, TRUE, TRUE, TRUE, FALSE); + if (debug_get_bool_option("SVGA_SWTNL_FSE", false)) + draw_set_driver_clipping(svga->swtnl.draw, true, true, true, false); - return TRUE; + return true; fail: if (svga->blitter) @@ -217,7 +217,7 @@ fail: if (svga->swtnl.draw) draw_destroy(svga->swtnl.draw); - return FALSE; + return false; } diff --git a/src/gallium/drivers/svga/svga_swtnl_state.c b/src/gallium/drivers/svga/svga_swtnl_state.c index e87d947d90d..674ff9f29ac 100644 --- a/src/gallium/drivers/svga/svga_swtnl_state.c +++ b/src/gallium/drivers/svga/svga_swtnl_state.c @@ -344,7 +344,7 @@ svga_swtnl_update_vdecl(struct svga_context *svga) } memcpy(svga_render->vdecl, vdecl, sizeof(vdecl)); - svga->swtnl.new_vdecl = TRUE; + svga->swtnl.new_vdecl = true; done: SVGA_STATS_TIME_POP(svga_sws(svga)); diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c index 1ee4611cef8..b6a1adce83d 100644 --- a/src/gallium/drivers/svga/svga_tgsi.c +++ b/src/gallium/drivers/svga/svga_tgsi.c @@ -65,13 +65,13 @@ svga_shader_expand(struct svga_shader_emitter *emit) emit->ptr = err_buf; emit->buf = err_buf; emit->size = sizeof(err_buf); - return FALSE; + return false; } emit->size = newsize; emit->ptr = new_buf + (emit->ptr - emit->buf); emit->buf = new_buf; - return TRUE; + return true; } @@ -80,11 +80,11 @@ reserve(struct svga_shader_emitter *emit, unsigned nr_dwords) { if (emit->ptr - emit->buf + nr_dwords * sizeof(unsigned) >= emit->size) { if (!svga_shader_expand(emit)) { - return FALSE; + return false; } } - return TRUE; + return true; } @@ -92,11 +92,11 @@ bool svga_shader_emit_dword(struct svga_shader_emitter * emit, unsigned dword) { if (!reserve(emit, 1)) - return FALSE; + return false; *(unsigned *) emit->ptr = dword; emit->ptr += sizeof dword; - return TRUE; + return true; } @@ -105,11 +105,11 @@ svga_shader_emit_dwords(struct svga_shader_emitter * emit, const unsigned *dwords, unsigned nr) { if (!reserve(emit, nr)) - return FALSE; + return false; memcpy(emit->ptr, dwords, nr * sizeof *dwords); emit->ptr += nr * sizeof *dwords; - return TRUE; + return true; } @@ -119,7 +119,7 @@ svga_shader_emit_opcode(struct svga_shader_emitter * emit, unsigned opcode) SVGA3dShaderInstToken *here; if (!reserve(emit, 1)) - return FALSE; + return false; here = (SVGA3dShaderInstToken *) emit->ptr; here->value = opcode; @@ -132,7 +132,7 @@ svga_shader_emit_opcode(struct svga_shader_emitter * emit, unsigned opcode) emit->insn_offset = emit->ptr - emit->buf; emit->ptr += sizeof(unsigned); - return TRUE; + return true; } @@ -215,7 +215,7 @@ svga_tgsi_vgpu9_translate(struct svga_context *svga, goto fail; } - emit.in_main_func = TRUE; + emit.in_main_func = true; if (!svga_shader_emit_header(&emit)) { debug_printf("svga: emit header failed\n"); @@ -258,7 +258,7 @@ svga_tgsi_vgpu9_translate(struct svga_context *svga, tgsi_dump(shader->tokens, 0); if (SVGA_DEBUG & DEBUG_TGSI) { debug_printf("Shader %u compiled below\n", shader->id); - svga_shader_dump(variant->tokens, variant->nr_tokens, FALSE); + svga_shader_dump(variant->tokens, variant->nr_tokens, false); } debug_printf("#####################################\n"); } @@ -487,7 +487,7 @@ svga_tgsi_scan_shader(struct svga_shader *shader) switch (tgsi_info->output_semantic_name[i]) { case TGSI_SEMANTIC_TESSOUTER: case TGSI_SEMANTIC_TESSINNER: - info->tcs.writes_tess_factor = TRUE; + info->tcs.writes_tess_factor = true; break; default: break; @@ -506,7 +506,7 @@ svga_tgsi_scan_shader(struct svga_shader *shader) case TGSI_SEMANTIC_TESSINNER: break; default: - info->tes.reads_control_point = TRUE; + info->tes.reads_control_point = true; } } break; diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c index 9d69faf1fe7..524f38e2743 100644 --- a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c +++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c @@ -78,15 +78,15 @@ translate_vs_ps_semantic(struct svga_shader_emitter *emit, debug_warn_once("unsupported clip distance/vertex attribute\n"); *usage = SVGA3D_DECLUSAGE_TEXCOORD; *idx = 0; - return TRUE; + return true; default: assert(0); *usage = SVGA3D_DECLUSAGE_TEXCOORD; *idx = 0; - return FALSE; + return false; } - return TRUE; + return true; } @@ -133,11 +133,11 @@ emit_vface_decl(struct svga_shader_emitter *emit) dst_register(SVGA3DREG_MISCTYPE, SVGA3DMISCREG_FACE); if (!emit_decl(emit, reg, 0, 0)) - return FALSE; + return false; - emit->emitted_vface = TRUE; + emit->emitted_vface = true; } - return TRUE; + return true; } @@ -153,18 +153,18 @@ ps30_input_emit_depth_fog(struct svga_shader_emitter *emit, if (emit->emitted_depth_fog) { *out = emit->ps_depth_fog; - return TRUE; + return true; } if (emit->ps30_input_count >= SVGA3D_INPUTREG_MAX) - return FALSE; + return false; reg = src_register(SVGA3DREG_INPUT, emit->ps30_input_count++); *out = emit->ps_depth_fog = reg; - emit->emitted_depth_fog = TRUE; + emit->emitted_depth_fog = true; return emit_decl(emit, dst(reg), SVGA3D_DECLUSAGE_TEXCOORD, 0); } @@ -192,7 +192,7 @@ ps30_input(struct svga_shader_emitter *emit, TGSI_SWIZZLE_Y); reg = writemask(dst(emit->ps_true_pos), TGSI_WRITEMASK_XY); - emit->ps_reads_pos = TRUE; + emit->ps_reads_pos = true; if (emit->info.reads_z) { emit->ps_temp_pos = dst_register(SVGA3DREG_TEMP, @@ -203,7 +203,7 @@ ps30_input(struct svga_shader_emitter *emit, emit->nr_hw_temp++; if (!ps30_input_emit_depth_fog(emit, &emit->ps_depth_pos)) - return FALSE; + return false; emit->ps_depth_pos.base.swizzle = TRANSLATE_SWIZZLE(TGSI_SWIZZLE_Z, TGSI_SWIZZLE_Z, @@ -220,7 +220,7 @@ ps30_input(struct svga_shader_emitter *emit, (semantic.Name == TGSI_SEMANTIC_COLOR)) { if (!translate_vs_ps_semantic(emit, semantic, &usage, &index)) - return FALSE; + return false; emit->internal_color_idx[emit->internal_color_count] = idx; emit->input_map[idx] = @@ -231,52 +231,52 @@ ps30_input(struct svga_shader_emitter *emit, reg = dst(emit->input_map[idx]); if (!emit_decl(emit, reg, usage, index)) - return FALSE; + return false; semantic.Name = TGSI_SEMANTIC_BCOLOR; if (!translate_vs_ps_semantic(emit, semantic, &usage, &index)) - return FALSE; + return false; if (emit->ps30_input_count >= SVGA3D_INPUTREG_MAX) - return FALSE; + return false; reg = dst_register(SVGA3DREG_INPUT, emit->ps30_input_count++); if (!emit_decl(emit, reg, usage, index)) - return FALSE; + return false; if (!emit_vface_decl(emit)) - return FALSE; + return false; - return TRUE; + return true; } else if (semantic.Name == TGSI_SEMANTIC_FACE) { if (!emit_vface_decl(emit)) - return FALSE; - emit->emit_frontface = TRUE; + return false; + emit->emit_frontface = true; emit->internal_frontface_idx = idx; - return TRUE; + return true; } else if (semantic.Name == TGSI_SEMANTIC_FOG) { assert(semantic.Index == 0); if (!ps30_input_emit_depth_fog(emit, &emit->input_map[idx])) - return FALSE; + return false; emit->input_map[idx].base.swizzle = TRANSLATE_SWIZZLE(TGSI_SWIZZLE_X, TGSI_SWIZZLE_X, TGSI_SWIZZLE_X, TGSI_SWIZZLE_X); - return TRUE; + return true; } else { if (!translate_vs_ps_semantic(emit, semantic, &usage, &index)) - return FALSE; + return false; if (emit->ps30_input_count >= SVGA3D_INPUTREG_MAX) - return FALSE; + return false; emit->input_map[idx] = src_register(SVGA3DREG_INPUT, emit->ps30_input_count++); @@ -284,7 +284,7 @@ ps30_input(struct svga_shader_emitter *emit, reg = dst(emit->input_map[idx]); if (!emit_decl(emit, reg, usage, index)) - return FALSE; + return false; if (semantic.Name == TGSI_SEMANTIC_GENERIC && emit->key.sprite_origin_lower_left && @@ -312,7 +312,7 @@ ps30_input(struct svga_shader_emitter *emit, emit->input_map[idx] = emit->ps_inverted_texcoord[unit]; } - return TRUE; + return true; } } @@ -379,7 +379,7 @@ ps30_output(struct svga_shader_emitter *emit, break; } - return TRUE; + return true; } @@ -427,14 +427,14 @@ vs30_output_emit_depth_fog(struct svga_shader_emitter *emit, if (emit->emitted_depth_fog) { *out = emit->vs_depth_fog; - return TRUE; + return true; } reg = dst_register(SVGA3DREG_OUTPUT, emit->vs30_output_count++); *out = emit->vs_depth_fog = reg; - emit->emitted_depth_fog = TRUE; + emit->emitted_depth_fog = true; return emit_decl(emit, reg, SVGA3D_DECLUSAGE_TEXCOORD, 0); } @@ -459,10 +459,10 @@ vs30_output(struct svga_shader_emitter *emit, dcl.values[1] = 0; if (!translate_vs_ps_semantic(emit, semantic, &usage, &index)) - return FALSE; + return false; if (emit->vs30_output_count >= SVGA3D_OUTPUTREG_MAX) - return FALSE; + return false; dcl.dst = dst_register(SVGA3DREG_OUTPUT, emit->vs30_output_count++); dcl.usage = usage; @@ -478,7 +478,7 @@ vs30_output(struct svga_shader_emitter *emit, /* Grab an extra output for the depth output */ if (!vs30_output_emit_depth_fog(emit, &emit->depth_pos)) - return FALSE; + return false; } else if (semantic.Name == TGSI_SEMANTIC_PSIZE) { @@ -490,7 +490,7 @@ vs30_output(struct svga_shader_emitter *emit, * emitting the final MOV to true_psiz in the postamble. */ if (!emit->key.vs.allow_psiz) - return TRUE; + return true; emit->true_psiz = dcl.dst; } @@ -502,9 +502,9 @@ vs30_output(struct svga_shader_emitter *emit, emit->vs30_output_count--; if (!vs30_output_emit_depth_fog(emit, &emit->output_map[idx])) - return FALSE; + return false; - return TRUE; + return true; } else { emit->output_map[idx] = dcl.dst; @@ -564,9 +564,9 @@ svga_shader_emit_samplers_decl(struct svga_shader_emitter *emit) for (i = 0; i < emit->num_samplers; i++) { if (!ps30_sampler(emit, i)) - return FALSE; + return false; } - return TRUE; + return true; } @@ -579,7 +579,7 @@ svga_translate_decl_sm30(struct svga_shader_emitter *emit, unsigned idx; for (idx = first; idx <= last; idx++) { - bool ok = TRUE; + bool ok = true; switch (decl->Declaration.File) { case TGSI_FILE_SAMPLER: @@ -614,12 +614,12 @@ svga_translate_decl_sm30(struct svga_shader_emitter *emit, default: /* don't need to declare other vars */ - ok = TRUE; + ok = true; } if (!ok) - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index 7ac78f5155c..0f26cd47bd5 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -168,9 +168,9 @@ svga_arl_needs_adjustment( const struct svga_shader_emitter *emit ) for (i = 0; i < emit->num_arl_consts; ++i) { if (emit->arl_consts[i].arl_num == emit->current_arl) - return TRUE; + return true; } - return FALSE; + return false; } @@ -472,12 +472,12 @@ emit_repl(struct svga_shader_emitter *emit, src0->base.swizzle = SVGA3DSWIZZLE_NONE; if (!emit_op1( emit, inst_token( SVGA3DOP_MOV ), dst, *src0 )) - return FALSE; + return false; *src0 = src( dst ); src0->base.swizzle = src0_swizzle; - return TRUE; + return true; } @@ -526,7 +526,7 @@ submit_op2(struct svga_shader_emitter *emit, { SVGA3dShaderDestToken temp; SVGA3dShaderRegType type0, type1; - bool need_temp = FALSE; + bool need_temp = false; temp.value = 0; type0 = SVGA3dShaderGetRegType( src0.base.value ); @@ -535,27 +535,27 @@ submit_op2(struct svga_shader_emitter *emit, if (type0 == SVGA3DREG_CONST && type1 == SVGA3DREG_CONST && src0.base.num != src1.base.num) - need_temp = TRUE; + need_temp = true; if (type0 == SVGA3DREG_INPUT && type1 == SVGA3DREG_INPUT && src0.base.num != src1.base.num) - need_temp = TRUE; + need_temp = true; if (need_temp) { temp = get_temp( emit ); if (!emit_repl( emit, temp, &src0 )) - return FALSE; + return false; } if (!emit_op2( emit, inst, dest, src0, src1 )) - return FALSE; + return false; if (need_temp) release_temp( emit, temp ); - return TRUE; + return true; } @@ -576,8 +576,8 @@ submit_op3(struct svga_shader_emitter *emit, { SVGA3dShaderDestToken temp0; SVGA3dShaderDestToken temp1; - bool need_temp0 = FALSE; - bool need_temp1 = FALSE; + bool need_temp0 = false; + bool need_temp1 = false; SVGA3dShaderRegType type0, type1, type2; temp0.value = 0; @@ -590,44 +590,44 @@ submit_op3(struct svga_shader_emitter *emit, if (type0 == SVGA3DREG_CONST && ((type1 == SVGA3DREG_CONST && src0.base.num != src1.base.num) || (type2 == SVGA3DREG_CONST && src0.base.num != src2.base.num))) - need_temp0 = TRUE; + need_temp0 = true; if (type1 == SVGA3DREG_CONST && (type2 == SVGA3DREG_CONST && src1.base.num != src2.base.num)) - need_temp1 = TRUE; + need_temp1 = true; } if (type0 == SVGA3DREG_INPUT && ((type1 == SVGA3DREG_INPUT && src0.base.num != src1.base.num) || (type2 == SVGA3DREG_INPUT && src0.base.num != src2.base.num))) - need_temp0 = TRUE; + need_temp0 = true; if (type1 == SVGA3DREG_INPUT && (type2 == SVGA3DREG_INPUT && src1.base.num != src2.base.num)) - need_temp1 = TRUE; + need_temp1 = true; if (need_temp0) { temp0 = get_temp( emit ); if (!emit_repl( emit, temp0, &src0 )) - return FALSE; + return false; } if (need_temp1) { temp1 = get_temp( emit ); if (!emit_repl( emit, temp1, &src1 )) - return FALSE; + return false; } if (!emit_op3( emit, inst, dest, src0, src1, src2 )) - return FALSE; + return false; if (need_temp1) release_temp( emit, temp1 ); if (need_temp0) release_temp( emit, temp0 ); - return TRUE; + return true; } @@ -649,8 +649,8 @@ submit_op4(struct svga_shader_emitter *emit, { SVGA3dShaderDestToken temp0; SVGA3dShaderDestToken temp3; - bool need_temp0 = FALSE; - bool need_temp3 = FALSE; + bool need_temp0 = false; + bool need_temp3 = false; SVGA3dShaderRegType type0, type1, type2, type3; temp0.value = 0; @@ -670,43 +670,43 @@ submit_op4(struct svga_shader_emitter *emit, if (type0 == SVGA3DREG_CONST && ((type3 == SVGA3DREG_CONST && src0.base.num != src3.base.num) || (type2 == SVGA3DREG_CONST && src0.base.num != src2.base.num))) - need_temp0 = TRUE; + need_temp0 = true; if (type3 == SVGA3DREG_CONST && (type2 == SVGA3DREG_CONST && src3.base.num != src2.base.num)) - need_temp3 = TRUE; + need_temp3 = true; if (type0 == SVGA3DREG_INPUT && ((type3 == SVGA3DREG_INPUT && src0.base.num != src3.base.num) || (type2 == SVGA3DREG_INPUT && src0.base.num != src2.base.num))) - need_temp0 = TRUE; + need_temp0 = true; if (type3 == SVGA3DREG_INPUT && (type2 == SVGA3DREG_INPUT && src3.base.num != src2.base.num)) - need_temp3 = TRUE; + need_temp3 = true; if (need_temp0) { temp0 = get_temp( emit ); if (!emit_repl( emit, temp0, &src0 )) - return FALSE; + return false; } if (need_temp3) { temp3 = get_temp( emit ); if (!emit_repl( emit, temp3, &src3 )) - return FALSE; + return false; } if (!emit_op4( emit, inst, dest, src0, src1, src2, src3 )) - return FALSE; + return false; if (need_temp3) release_temp( emit, temp3 ); if (need_temp0) release_temp( emit, temp0 ); - return TRUE; + return true; } @@ -718,13 +718,13 @@ alias_src_dst(struct src_register src, SVGA3dShaderDestToken dst) { if (src.base.num != dst.num) - return FALSE; + return false; if (SVGA3dShaderGetRegType(dst.value) != SVGA3dShaderGetRegType(src.base.value)) - return FALSE; + return false; - return TRUE; + return true; } @@ -765,9 +765,9 @@ emit_def_const(struct svga_shader_emitter *emit, if (!emit_instruction(emit, opcode) || !svga_shader_emit_dwords( emit, def.values, ARRAY_SIZE(def.values))) - return FALSE; + return false; - return TRUE; + return true; } @@ -781,12 +781,12 @@ create_loop_const( struct svga_shader_emitter *emit ) 0, /* initial value */ 1, /* step size */ 0 /* not used, must be 0 */)) - return FALSE; + return false; emit->loop_const_idx = idx; - emit->created_loop_const = TRUE; + emit->created_loop_const = true; - return TRUE; + return true; } static bool @@ -822,10 +822,10 @@ create_arl_consts( struct svga_shader_emitter *emit ) if (!emit_def_const( emit, SVGA3D_CONST_TYPE_FLOAT, idx, vals[0], vals[1], vals[2], vals[3])) - return FALSE; + return false; } - return TRUE; + return true; } @@ -856,7 +856,7 @@ create_common_immediate( struct svga_shader_emitter *emit ) */ if (!emit_def_const( emit, SVGA3D_CONST_TYPE_FLOAT, idx, 0.0f, 0.5f, -1.0f, 1.0f )) - return FALSE; + return false; emit->common_immediate_idx[0] = idx; idx++; @@ -864,16 +864,16 @@ create_common_immediate( struct svga_shader_emitter *emit ) if (emit->key.vs.adjust_attrib_range) { if (!emit_def_const( emit, SVGA3D_CONST_TYPE_FLOAT, idx, 2.0f, 0.0f, 0.0f, 0.0f )) - return FALSE; + return false; emit->common_immediate_idx[1] = idx; } else { emit->common_immediate_idx[1] = -1; } - emit->created_common_immediate = TRUE; + emit->created_common_immediate = true; - return TRUE; + return true; } @@ -1033,11 +1033,11 @@ emit_fake_arl(struct svga_shader_emitter *emit, SVGA3dShaderDestToken tmp = get_temp( emit ); if (!submit_op1(emit, inst_token( SVGA3DOP_MOV ), tmp, src0)) - return FALSE; + return false; if (!submit_op2( emit, inst_token( SVGA3DOP_ADD ), tmp, src( tmp ), src1)) - return FALSE; + return false; /* replicate the original swizzle */ src1 = src(tmp); @@ -1066,7 +1066,7 @@ emit_if(struct svga_shader_emitter *emit, SVGA3dShaderDestToken tmp = get_temp( emit ); if (!submit_op1(emit, inst_token( SVGA3DOP_MOV ), tmp, src0)) - return FALSE; + return false; src0 = scalar(src( tmp ), TGSI_SWIZZLE_X); } @@ -1115,14 +1115,14 @@ emit_floor(struct svga_shader_emitter *emit, /* FRC TMP, SRC */ if (!submit_op1( emit, inst_token( SVGA3DOP_FRC ), temp, src0 )) - return FALSE; + return false; /* SUB DST, SRC, TMP */ if (!submit_op2( emit, inst_token( SVGA3DOP_ADD ), dst, src0, negate( src( temp ) ) )) - return FALSE; + return false; - return TRUE; + return true; } @@ -1144,13 +1144,13 @@ emit_ceil(struct svga_shader_emitter *emit, /* FRC TMP, -SRC */ if (!submit_op1(emit, inst_token(SVGA3DOP_FRC), temp, negate(src0))) - return FALSE; + return false; /* ADD DST, SRC, TMP */ if (!submit_op2(emit, inst_token(SVGA3DOP_ADD), dst, src0, src(temp))) - return FALSE; + return false; - return TRUE; + return true; } @@ -1184,7 +1184,7 @@ emit_div(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_RCP ), writemask(temp, channel), scalar(src1, i) )) - return FALSE; + return false; } } @@ -1193,9 +1193,9 @@ emit_div(struct svga_shader_emitter *emit, */ if (!submit_op2( emit, inst_token( SVGA3DOP_MUL ), dst, src0, src( temp ) )) - return FALSE; + return false; - return TRUE; + return true; } @@ -1220,7 +1220,7 @@ emit_dp2(struct svga_shader_emitter *emit, /* MUL TMP, SRC1, SRC2 */ if (!submit_op2( emit, inst_token( SVGA3DOP_MUL ), temp, src0, src1 )) - return FALSE; + return false; temp_src0 = scalar(src( temp ), TGSI_SWIZZLE_X); temp_src1 = scalar(src( temp ), TGSI_SWIZZLE_Y); @@ -1228,9 +1228,9 @@ emit_dp2(struct svga_shader_emitter *emit, /* ADD DST, TMP.xxxx, TMP.yyyy */ if (!submit_op2( emit, inst_token( SVGA3DOP_ADD ), dst, temp_src0, temp_src1 )) - return FALSE; + return false; - return TRUE; + return true; } @@ -1263,15 +1263,15 @@ emit_sin(struct svga_shader_emitter *emit, /* SCS TMP SRC */ if (!do_emit_sincos(emit, writemask(temp, TGSI_WRITEMASK_Y), src0)) - return FALSE; + return false; src0 = scalar(src( temp ), TGSI_SWIZZLE_Y); /* MOV DST TMP.yyyy */ if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), dst, src0 )) - return FALSE; + return false; - return TRUE; + return true; } @@ -1291,15 +1291,15 @@ emit_cos(struct svga_shader_emitter *emit, /* SCS TMP SRC */ if (!do_emit_sincos( emit, writemask(temp, TGSI_WRITEMASK_X), src0 )) - return FALSE; + return false; src0 = scalar(src( temp ), TGSI_SWIZZLE_X); /* MOV DST TMP.xxxx */ if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), dst, src0 )) - return FALSE; + return false; - return TRUE; + return true; } @@ -1329,13 +1329,13 @@ emit_ssg(struct svga_shader_emitter *emit, /* CMP TMP0, SRC0, one, zero */ if (!submit_op3( emit, inst_token( SVGA3DOP_CMP ), writemask( temp0, dst.mask ), src0, one, zero )) - return FALSE; + return false; /* CMP TMP1, negate(SRC0), negate(one), zero */ if (!submit_op3( emit, inst_token( SVGA3DOP_CMP ), writemask( temp1, dst.mask ), negate( src0 ), negate( one ), zero )) - return FALSE; + return false; /* ADD DST, TMP0, TMP1 */ return submit_op2( emit, inst_token( SVGA3DOP_ADD ), dst, src( temp0 ), @@ -1381,9 +1381,9 @@ emit_cond_discard(struct svga_shader_emitter *emit, * only used XYZ. The MSDN documentation about this is incorrect. */ if (!submit_op0( emit, inst_token( SVGA3DOP_TEXKILL ), dst(src0) )) - return FALSE; + return false; - return TRUE; + return true; } @@ -1404,7 +1404,7 @@ emit_discard(struct svga_shader_emitter *emit, temp = get_temp( emit ); if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), temp, negate( one ) )) - return FALSE; + return false; return submit_op0( emit, inst, temp ); } @@ -1479,18 +1479,18 @@ emit_conditional(struct svga_shader_emitter *emit, */ SVGA3dShaderDestToken temp = get_temp(emit); if (!submit_op1(emit, inst_token(SVGA3DOP_MOV), temp, pass)) - return FALSE; + return false; pass = src(temp); } /* SETP src0, COMPOP, src1 */ if (!submit_op2( emit, setp_token, pred_reg, src0, src1 )) - return FALSE; + return false; /* MOV dst, fail */ if (!submit_op1(emit, inst_token(SVGA3DOP_MOV), dst, fail)) - return FALSE; + return false; /* MOV dst, pass (predicated) * @@ -1500,9 +1500,9 @@ emit_conditional(struct svga_shader_emitter *emit, if (!submit_op2(emit, inst_token_predicated(SVGA3DOP_MOV), dst, src(pred_reg), pass)) - return FALSE; + return false; - return TRUE; + return true; } @@ -1637,7 +1637,7 @@ emit_tex2(struct svga_shader_emitter *emit, break; default: assert(0); - return FALSE; + return false; } texcoord = translate_src_register( emit, &insn->Src[0] ); @@ -1660,14 +1660,14 @@ emit_tex2(struct svga_shader_emitter *emit, inst_token( SVGA3DOP_MOV ), tmp, texcoord )) - return FALSE; + return false; /* MOV tmp.w, zero */ if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), writemask( tmp, TGSI_WRITEMASK_W ), zero )) - return FALSE; + return false; texcoord = src( tmp ); inst.op = SVGA3DOP_TEXLDL; @@ -1681,7 +1681,7 @@ emit_tex2(struct svga_shader_emitter *emit, /* MUL tmp, SRC0, WH */ if (!submit_op2( emit, inst_token( SVGA3DOP_MUL ), tmp, texcoord, wh )) - return FALSE; + return false; texcoord = src( tmp ); } @@ -1717,7 +1717,7 @@ emit_tex4(struct svga_shader_emitter *emit, break; default: assert(0); - return FALSE; + return false; } return submit_op4( emit, inst, dst, texcoord, sampler, ddx, ddy ); @@ -1768,7 +1768,7 @@ emit_tex_swizzle(struct svga_shader_emitter *emit, srcSwizzle[1], srcSwizzle[2], srcSwizzle[3]))) - return FALSE; + return false; } /* write 0 comps */ @@ -1777,7 +1777,7 @@ emit_tex_swizzle(struct svga_shader_emitter *emit, inst_token(SVGA3DOP_MOV), writemask(dst, zeroWritemask), get_zero_immediate(emit))) - return FALSE; + return false; } /* write 1 comps */ @@ -1786,10 +1786,10 @@ emit_tex_swizzle(struct svga_shader_emitter *emit, inst_token(SVGA3DOP_MOV), writemask(dst, oneWritemask), get_one_immediate(emit))) - return FALSE; + return false; } - return TRUE; + return true; } @@ -1838,11 +1838,11 @@ emit_tex(struct svga_shader_emitter *emit, case TGSI_OPCODE_TXP: case TGSI_OPCODE_TXL: if (!emit_tex2( emit, insn, tex_result )) - return FALSE; + return false; break; case TGSI_OPCODE_TXD: if (!emit_tex4( emit, insn, tex_result )) - return FALSE; + return false; break; default: assert(0); @@ -1869,13 +1869,13 @@ emit_tex(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_RCP ), writemask(src0_zdivw, TGSI_WRITEMASK_X), scalar(src0, TGSI_SWIZZLE_W) )) - return FALSE; + return false; if (!submit_op2( emit, inst_token( SVGA3DOP_MUL ), writemask(src0_zdivw, TGSI_WRITEMASK_X), scalar(src0, TGSI_SWIZZLE_Z), scalar(src(src0_zdivw), TGSI_SWIZZLE_X) )) - return FALSE; + return false; r_coord = scalar(src(src0_zdivw), TGSI_SWIZZLE_X); } @@ -1889,7 +1889,7 @@ emit_tex(struct svga_shader_emitter *emit, writemask( dst2, TGSI_WRITEMASK_XYZ ), r_coord, tex_src_x)) - return FALSE; + return false; } if (dst.mask & TGSI_WRITEMASK_W) { @@ -1898,14 +1898,14 @@ emit_tex(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), writemask( dst2, TGSI_WRITEMASK_W ), one )) - return FALSE; + return false; } } if (saturate && !swizzle) { /* MOV_SAT real_dst, dst */ if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), dst, src(tex_result) )) - return FALSE; + return false; } else if (swizzle) { /* swizzle from tex_result to dst (handles saturation too, if any) */ @@ -1917,7 +1917,7 @@ emit_tex(struct svga_shader_emitter *emit, emit->key.tex[unit].swizzle_a); } - return TRUE; + return true; } @@ -2016,7 +2016,7 @@ emit_simple_instruction(struct svga_shader_emitter *emit, translate_src_register( emit, &src[2] ) ); default: assert(0); - return FALSE; + return false; } } @@ -2037,7 +2037,7 @@ emit_mov(struct svga_shader_emitter *emit, dst->Register.Index == 0 && src->Register.File == TGSI_FILE_CONSTANT && !src->Register.Indirect) { - emit->constant_color_output = TRUE; + emit->constant_color_output = true; } return emit_simple_instruction(emit, SVGA3DOP_MOV, insn); @@ -2062,45 +2062,45 @@ 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); - bool ret = TRUE; + bool ret = true; if_token.control = SVGA3DOPCOMP_EQ; if (!(emit_instruction(emit, if_token) && emit_src(emit, src1) && emit_src(emit, zero))) { - ret = FALSE; + ret = false; goto cleanup; } if (!submit_op1(emit, inst_token(SVGA3DOP_MOV), dst, src1)) { - ret = FALSE; + ret = false; goto cleanup; } if (!emit_instruction(emit, inst_token(SVGA3DOP_ELSE))) { - ret = FALSE; + ret = false; goto cleanup; } if (!submit_op1(emit, inst_token(SVGA3DOP_RSQ), temp, src1)) { - ret = FALSE; + ret = false; goto cleanup; } if (!submit_op1(emit, inst_token(SVGA3DOP_RCP), dst, src(temp))) { - ret = FALSE; + ret = false; goto cleanup; } if (!emit_instruction(emit, inst_token(SVGA3DOP_ENDIF))) { - ret = FALSE; + ret = false; goto cleanup; } @@ -2131,9 +2131,9 @@ emit_deriv(struct svga_shader_emitter *emit, inst_token( SVGA3DOP_MOV ), dst, get_zero_immediate(emit))) - return FALSE; + return false; - return TRUE; + return true; } else { SVGA3dShaderOpCodeType opcode; @@ -2150,7 +2150,7 @@ emit_deriv(struct svga_shader_emitter *emit, opcode = SVGA3DOP_DSY; break; default: - return FALSE; + return false; } inst = inst_token( opcode ); @@ -2164,7 +2164,7 @@ emit_deriv(struct svga_shader_emitter *emit, SVGA3dShaderDestToken temp = get_temp( emit ); if (!emit_repl( emit, temp, &src0 )) - return FALSE; + return false; } return submit_op1( emit, inst, dst, src0 ); @@ -2188,7 +2188,7 @@ emit_arl(struct svga_shader_emitter *emit, * only used for loop counters -- and for that * we reference aL directly. */ - return TRUE; + return true; } if (svga_arl_needs_adjustment( emit )) { return emit_fake_arl( emit, insn ); @@ -2208,15 +2208,15 @@ emit_pow(struct svga_shader_emitter *emit, emit, &insn->Src[0] ); struct src_register src1 = translate_src_register( emit, &insn->Src[1] ); - bool need_tmp = FALSE; + bool need_tmp = false; /* POW can only output to a temporary */ if (insn->Dst[0].Register.File != TGSI_FILE_TEMPORARY) - need_tmp = TRUE; + need_tmp = true; /* POW src1 must not be the same register as dst */ if (alias_src_dst( src1, dst )) - need_tmp = TRUE; + need_tmp = true; /* it's a scalar op */ src0 = scalar( src0, TGSI_SWIZZLE_X ); @@ -2227,7 +2227,7 @@ emit_pow(struct svga_shader_emitter *emit, writemask(get_temp( emit ), TGSI_WRITEMASK_X ); if (!submit_op2(emit, inst_token( SVGA3DOP_POW ), tmp, src0, src1)) - return FALSE; + return false; return submit_op1(emit, inst_token( SVGA3DOP_MOV ), dst, scalar(src(tmp), 0) ); @@ -2249,13 +2249,13 @@ submit_lrp(struct svga_shader_emitter *emit, struct src_register src2) { SVGA3dShaderDestToken tmp; - bool 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 || alias_src_dst(src0, dst) || alias_src_dst(src2, dst)) - need_dst_tmp = TRUE; + need_dst_tmp = true; if (need_dst_tmp) { tmp = get_temp( emit ); @@ -2266,14 +2266,14 @@ submit_lrp(struct svga_shader_emitter *emit, } if (!submit_op3(emit, inst_token( SVGA3DOP_LRP ), tmp, src0, src1, src2)) - return FALSE; + return false; if (need_dst_tmp) { if (!submit_op1(emit, inst_token( SVGA3DOP_MOV ), dst, src( tmp ))) - return FALSE; + return false; } - return TRUE; + return true; } @@ -2319,12 +2319,12 @@ emit_dst_insn(struct svga_shader_emitter *emit, emit, &insn->Src[0] ); const struct src_register src1 = translate_src_register( emit, &insn->Src[1] ); - bool need_tmp = FALSE; + bool need_tmp = false; if (SVGA3dShaderGetRegType(dst.value) != SVGA3DREG_TEMP || alias_src_dst(src0, dst) || alias_src_dst(src1, dst)) - need_tmp = TRUE; + need_tmp = true; if (need_tmp) { tmp = get_temp( emit ); @@ -2339,7 +2339,7 @@ emit_dst_insn(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), writemask(tmp, TGSI_WRITEMASK_XW ), get_one_immediate(emit))) - return FALSE; + return false; } /* tmp.yz = src0 @@ -2348,7 +2348,7 @@ emit_dst_insn(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), writemask(tmp, TGSI_WRITEMASK_YZ ), src0)) - return FALSE; + return false; } /* tmp.yw = tmp * src1 @@ -2358,7 +2358,7 @@ emit_dst_insn(struct svga_shader_emitter *emit, writemask(tmp, TGSI_WRITEMASK_YW ), src(tmp), src1)) - return FALSE; + return false; } /* dst = tmp @@ -2367,11 +2367,11 @@ emit_dst_insn(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), dst, src(tmp))) - return FALSE; + return false; } } - return TRUE; + return true; } @@ -2397,7 +2397,7 @@ emit_exp(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_FRC ), writemask( fraction, TGSI_WRITEMASK_Y ), src0 )) - return FALSE; + return false; } /* If x is being written, fill it with 2 ^ floor(src0). @@ -2407,12 +2407,12 @@ emit_exp(struct svga_shader_emitter *emit, writemask( dst, TGSI_WRITEMASK_X ), src0, scalar( negate( src( fraction ) ), TGSI_SWIZZLE_Y ) ) ) - return FALSE; + return false; if (!submit_op1( emit, inst_token( SVGA3DOP_EXP ), writemask( dst, TGSI_WRITEMASK_X ), scalar( src( dst ), TGSI_SWIZZLE_X ) ) ) - return FALSE; + return false; if (!(dst.mask & TGSI_WRITEMASK_Y)) release_temp( emit, fraction ); @@ -2424,7 +2424,7 @@ emit_exp(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_EXPP ), writemask( dst, TGSI_WRITEMASK_Z ), src0 ) ) - return FALSE; + return false; } /* If w is being written, fill it with one. @@ -2433,10 +2433,10 @@ emit_exp(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), writemask(dst, TGSI_WRITEMASK_W), get_one_immediate(emit))) - return FALSE; + return false; } - return TRUE; + return true; } @@ -2484,7 +2484,7 @@ emit_lit(struct svga_shader_emitter *emit, tmp, scalar(src0, 1), scalar(src0, 3))) - return FALSE; + return false; } /* tmp.y = src.x @@ -2493,7 +2493,7 @@ emit_lit(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), writemask(tmp, TGSI_WRITEMASK_Y ), scalar(src0, 0))) - return FALSE; + return false; } /* Can't quite do this with emit conditional due to the extra @@ -2516,12 +2516,12 @@ emit_lit(struct svga_shader_emitter *emit, pred_reg, predsrc, get_zero_immediate(emit))) - return FALSE; + return false; /* MOV dst, fail */ if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), dst, get_immediate(emit, 1.0f, 0.0f, 0.0f, 1.0f))) - return FALSE; + return false; /* MOV dst.yz, tmp (predicated) * @@ -2533,12 +2533,12 @@ emit_lit(struct svga_shader_emitter *emit, inst_token_predicated(SVGA3DOP_MOV), writemask(dst, TGSI_WRITEMASK_YZ), src( pred_reg ), src( tmp ) )) - return FALSE; + return false; } } } - return TRUE; + return true; } @@ -2559,7 +2559,7 @@ emit_ex2(struct svga_shader_emitter *emit, SVGA3dShaderDestToken tmp = get_temp( emit ); if (!submit_op1( emit, inst, tmp, src0 )) - return FALSE; + return false; return submit_op1( emit, inst_token( SVGA3DOP_MOV ), dst, @@ -2601,7 +2601,7 @@ emit_log(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), abs_tmp, src0 ) ) - return FALSE; + return false; abs_src0 = src( abs_tmp ); } @@ -2611,7 +2611,7 @@ emit_log(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_LOG ), writemask( log2_abs, TGSI_WRITEMASK_Z ), abs_src0 ) ) - return FALSE; + return false; } if (dst.mask & TGSI_WRITEMASK_XY) { @@ -2627,13 +2627,13 @@ emit_log(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_FRC ), writemask( floor_log2, TGSI_WRITEMASK_X ), scalar( src( log2_abs ), TGSI_SWIZZLE_Z ) ) ) - return FALSE; + return false; if (!submit_op2( emit, inst_token( SVGA3DOP_ADD ), writemask( floor_log2, TGSI_WRITEMASK_X ), scalar( src( log2_abs ), TGSI_SWIZZLE_Z ), negate( src( floor_log2 ) ) ) ) - return FALSE; + return false; /* If y is being written, fill it with * abs ( src0 ) / ( 2 ^ floor( log2( abs( src0 ) ) ) ). @@ -2643,13 +2643,13 @@ emit_log(struct svga_shader_emitter *emit, writemask( dst, TGSI_WRITEMASK_Y ), negate( scalar( src( floor_log2 ), TGSI_SWIZZLE_X ) ) ) ) - return FALSE; + return false; if (!submit_op2( emit, inst_token( SVGA3DOP_MUL ), writemask( dst, TGSI_WRITEMASK_Y ), src( dst ), abs_src0 ) ) - return FALSE; + return false; } if (!(dst.mask & TGSI_WRITEMASK_X)) @@ -2669,10 +2669,10 @@ emit_log(struct svga_shader_emitter *emit, if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), writemask(dst, TGSI_WRITEMASK_W), get_one_immediate(emit))) - return FALSE; + return false; } - return TRUE; + return true; } @@ -2698,28 +2698,28 @@ emit_trunc_round(struct svga_shader_emitter *emit, /* t0 = abs(src0) + 0.5 */ if (!submit_op2(emit, inst_token(SVGA3DOP_ADD), t0, absolute(src0), half)) - return FALSE; + return false; /* t1 = fract(t0) */ if (!submit_op1(emit, inst_token(SVGA3DOP_FRC), t1, src(t0))) - return FALSE; + return false; /* t1 = t0 - t1 */ if (!submit_op2(emit, inst_token(SVGA3DOP_ADD), t1, src(t0), negate(src(t1)))) - return FALSE; + return false; } else { /* trunc */ /* t1 = fract(abs(src0)) */ if (!submit_op1(emit, inst_token(SVGA3DOP_FRC), t1, absolute(src0))) - return FALSE; + return false; /* t1 = abs(src0) - t1 */ if (!submit_op2(emit, inst_token(SVGA3DOP_ADD), t1, absolute(src0), negate(src(t1)))) - return FALSE; + return false; } /* @@ -2734,11 +2734,11 @@ emit_trunc_round(struct svga_shader_emitter *emit, /* t2 = sign(src0) */ if (!submit_op3(emit, inst_token(SVGA3DOP_SGN), t2, src0, src(t3), src(t4))) - return FALSE; + return false; /* dst = t1 * t2 */ if (!submit_op2(emit, inst_token(SVGA3DOP_MUL), dst, src(t1), src(t2))) - return FALSE; + return false; } else { /* For FS: Use CMP instruction */ @@ -2746,7 +2746,7 @@ emit_trunc_round(struct svga_shader_emitter *emit, src0, src(t1), negate(src(t1))); } - return TRUE; + return true; } @@ -2764,7 +2764,7 @@ emit_bgnsub(struct svga_shader_emitter *emit, * subroutines. This affects how we terminate the generated * shader. */ - emit->in_main_func = FALSE; + emit->in_main_func = false; for (i = 0; i < emit->nr_labels; i++) { if (emit->label[i] == position) { @@ -2775,7 +2775,7 @@ emit_bgnsub(struct svga_shader_emitter *emit, } assert(0); - return TRUE; + return true; } @@ -2795,7 +2795,7 @@ emit_call(struct svga_shader_emitter *emit, } if (emit->nr_labels == ARRAY_SIZE(emit->label)) - return FALSE; + return false; if (i == emit->nr_labels) { emit->label[i] = position; @@ -2851,7 +2851,7 @@ svga_emit_instruction(struct svga_shader_emitter *emit, return emit_bgnsub( emit, position, insn ); case TGSI_OPCODE_ENDSUB: - return TRUE; + return true; case TGSI_OPCODE_CAL: return emit_call( emit, insn ); @@ -2860,10 +2860,10 @@ svga_emit_instruction(struct svga_shader_emitter *emit, return emit_floor( emit, insn ); case TGSI_OPCODE_TRUNC: - return emit_trunc_round( emit, insn, FALSE ); + return emit_trunc_round( emit, insn, false ); case TGSI_OPCODE_ROUND: - return emit_trunc_round( emit, insn, TRUE ); + return emit_trunc_round( emit, insn, true ); case TGSI_OPCODE_CEIL: return emit_ceil( emit, insn ); @@ -2934,14 +2934,14 @@ svga_emit_instruction(struct svga_shader_emitter *emit, case TGSI_OPCODE_CONT: /* not expected (we return PIPE_SHADER_CAP_CONT_SUPPORTED = 0) */ - return FALSE; + return false; case TGSI_OPCODE_RET: /* This is a noop -- we tell mesa that we can't support RET * within a function (early return), so this will always be * followed by an ENDSUB. */ - return TRUE; + return true; /* These aren't actually used by any of the frontends we care * about: @@ -2953,7 +2953,7 @@ svga_emit_instruction(struct svga_shader_emitter *emit, case TGSI_OPCODE_SHL: case TGSI_OPCODE_ISHR: case TGSI_OPCODE_XOR: - return FALSE; + return false; case TGSI_OPCODE_IF: return emit_if( emit, insn ); @@ -2996,14 +2996,14 @@ svga_emit_instruction(struct svga_shader_emitter *emit, translate_opcode(insn->Instruction.Opcode); if (opcode == SVGA3DOP_LAST_INST) - return FALSE; + return false; if (!emit_simple_instruction( emit, opcode, insn )) - return FALSE; + return false; } } - return TRUE; + return true; } @@ -3046,11 +3046,11 @@ make_immediate(struct svga_shader_emitter *emit, if (!emit_def_const( emit, SVGA3D_CONST_TYPE_FLOAT, idx, a, b, c, d )) - return FALSE; + return false; *out = src_register( SVGA3DREG_CONST, idx ); - return TRUE; + return true; } @@ -3063,10 +3063,10 @@ emit_vs_preamble(struct svga_shader_emitter *emit) if (!emit->key.vs.need_prescale) { if (!make_immediate( emit, 0, 0, .5, .5, &emit->imm_0055)) - return FALSE; + return false; } - return TRUE; + return true; } @@ -3090,23 +3090,23 @@ emit_ps_preamble(struct svga_shader_emitter *emit) inst_token(SVGA3DOP_MOV), writemask( emit->ps_temp_pos, TGSI_WRITEMASK_XY ), emit->ps_true_pos )) - return FALSE; + return false; if (!submit_op1( emit, inst_token(SVGA3DOP_RCP), writemask( emit->ps_temp_pos, TGSI_WRITEMASK_W ), scalar( emit->ps_depth_pos, TGSI_SWIZZLE_W ) )) - return FALSE; + return false; if (!submit_op2( emit, inst_token(SVGA3DOP_MUL), writemask( emit->ps_temp_pos, TGSI_WRITEMASK_Z ), scalar( emit->ps_depth_pos, TGSI_SWIZZLE_Z ), scalar( src(emit->ps_temp_pos), TGSI_SWIZZLE_W ) )) - return FALSE; + return false; } - return TRUE; + return true; } @@ -3128,7 +3128,7 @@ emit_ps_postamble(struct svga_shader_emitter *emit) inst_token(SVGA3DOP_MOV), emit->true_pos, scalar(src(emit->temp_pos), TGSI_SWIZZLE_Z) )) - return FALSE; + return false; } for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { @@ -3144,7 +3144,7 @@ emit_ps_postamble(struct svga_shader_emitter *emit) inst_token(SVGA3DOP_MOV), emit->true_color_output[i], one )) - return FALSE; + return false; } else if (emit->unit == PIPE_SHADER_FRAGMENT && i < emit->key.fs.write_color0_to_n_cbufs) { @@ -3152,7 +3152,7 @@ emit_ps_postamble(struct svga_shader_emitter *emit) if (!submit_op1(emit, inst_token(SVGA3DOP_MOV), emit->true_color_output[i], src(emit->temp_color_output[0]))) { - return FALSE; + return false; } } else { @@ -3160,12 +3160,12 @@ emit_ps_postamble(struct svga_shader_emitter *emit) inst_token(SVGA3DOP_MOV), emit->true_color_output[i], src(emit->temp_color_output[i]) )) - return FALSE; + return false; } } } - return TRUE; + return true; } @@ -3185,7 +3185,7 @@ emit_vs_postamble(struct svga_shader_emitter *emit) inst_token(SVGA3DOP_MOV), emit->true_psiz, scalar(src(emit->temp_psiz), TGSI_SWIZZLE_X) )) - return FALSE; + return false; } /* Need to perform various manipulations on vertex position to cope @@ -3205,7 +3205,7 @@ emit_vs_postamble(struct svga_shader_emitter *emit) inst_token(SVGA3DOP_MOV), writemask(depth, TGSI_WRITEMASK_W), scalar(src(temp_pos), TGSI_SWIZZLE_W) )) - return FALSE; + return false; /* MUL temp_pos.xyz, temp_pos, prescale.scale * MAD result.position, temp_pos.wwww, prescale.trans, temp_pos @@ -3216,7 +3216,7 @@ emit_vs_postamble(struct svga_shader_emitter *emit) writemask(temp_pos, TGSI_WRITEMASK_XYZ), src(temp_pos), prescale_scale )) - return FALSE; + return false; if (!submit_op3( emit, inst_token(SVGA3DOP_MAD), @@ -3224,7 +3224,7 @@ emit_vs_postamble(struct svga_shader_emitter *emit) swizzle(src(temp_pos), 3, 3, 3, 3), prescale_trans, src(temp_pos))) - return FALSE; + return false; /* Also write to depth value */ if (!submit_op3( emit, @@ -3233,7 +3233,7 @@ emit_vs_postamble(struct svga_shader_emitter *emit) swizzle(src(temp_pos), 3, 3, 3, 3), prescale_trans, src(temp_pos) )) - return FALSE; + return false; } else { SVGA3dShaderDestToken temp_pos = emit->temp_pos; @@ -3251,23 +3251,23 @@ emit_vs_postamble(struct svga_shader_emitter *emit) writemask(temp_pos, TGSI_WRITEMASK_Z), imm_0055, src(temp_pos) )) - return FALSE; + return false; if (!submit_op1( emit, inst_token(SVGA3DOP_MOV), pos, src(temp_pos) )) - return FALSE; + return false; /* Move the manipulated depth into the extra texcoord reg */ if (!submit_op1( emit, inst_token(SVGA3DOP_MOV), writemask(depth, TGSI_WRITEMASK_ZW), src(temp_pos) )) - return FALSE; + return false; } - return TRUE; + return true; } @@ -3294,7 +3294,7 @@ emit_light_twoside(struct svga_shader_emitter *emit) SVGA3dShaderInstToken if_token; if (count == 0) - return TRUE; + return true; vface = get_vface( emit ); zero = get_zero_immediate(emit); @@ -3327,25 +3327,25 @@ emit_light_twoside(struct svga_shader_emitter *emit) if (!(emit_instruction( emit, if_token ) && emit_src( emit, vface ) && emit_src( emit, zero ) )) - return FALSE; + return false; for (i = 0; i < count; i++) { if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), color[i], front[i] )) - return FALSE; + return false; } if (!(emit_instruction( emit, inst_token( SVGA3DOP_ELSE)))) - return FALSE; + return false; for (i = 0; i < count; i++) { if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), color[i], back[i] )) - return FALSE; + return false; } if (!emit_instruction( emit, inst_token( SVGA3DOP_ENDIF ) )) - return FALSE; + return false; - return TRUE; + return true; } @@ -3381,13 +3381,13 @@ emit_frontface(struct svga_shader_emitter *emit) if (!emit_conditional(emit, PIPE_FUNC_GREATER, temp, vface, get_zero_immediate(emit), pass, fail)) - return FALSE; + return false; /* Reassign the input_map to the actual front-face color: */ emit->input_map[emit->internal_frontface_idx] = src(temp); - return TRUE; + return true; } @@ -3420,7 +3420,7 @@ emit_inverted_texcoords(struct svga_shader_emitter *emit) emit->ps_true_texcoord[unit], get_immediate(emit, 1.0f, -1.0f, 1.0f, 1.0f), get_immediate(emit, 0.0f, 1.0f, 0.0f, 0.0f))) - return FALSE; + return false; /* Reassign the input_map entry to the new texcoord register */ emit->input_map[emit->ps_inverted_texcoord_input[unit]] = @@ -3429,7 +3429,7 @@ emit_inverted_texcoords(struct svga_shader_emitter *emit) inverted_texcoords &= ~(1 << unit); } - return TRUE; + return true; } @@ -3477,7 +3477,7 @@ emit_adjusted_vertex_attribs(struct svga_shader_emitter *emit) dst(tmp), emit->input_map[index], get_two_immediate(emit))) - return FALSE; + return false; /* pred = (attrib >= 0.5) */ if (!submit_op2(emit, @@ -3485,7 +3485,7 @@ emit_adjusted_vertex_attribs(struct svga_shader_emitter *emit) pred_reg, emit->input_map[index], /* vert attrib */ get_half_immediate(emit))) /* 0.5 */ - return FALSE; + return false; /* sub(pred) tmp, tmp, 2.0 */ if (!submit_op3(emit, @@ -3494,7 +3494,7 @@ emit_adjusted_vertex_attribs(struct svga_shader_emitter *emit) src(pred_reg), tmp, get_two_immediate(emit))) - return FALSE; + return false; } else { /* just copy the vertex input attrib to the temp register */ @@ -3502,7 +3502,7 @@ emit_adjusted_vertex_attribs(struct svga_shader_emitter *emit) inst_token(SVGA3DOP_MOV), dst(tmp), emit->input_map[index])) - return FALSE; + return false; } if (emit->key.vs.adjust_attrib_w_1 & (1 << index)) { @@ -3511,14 +3511,14 @@ emit_adjusted_vertex_attribs(struct svga_shader_emitter *emit) inst_token(SVGA3DOP_MOV), writemask(dst(tmp), TGSI_WRITEMASK_W), get_one_immediate(emit))) - return FALSE; + return false; } /* Reassign the input_map entry to the new tmp register */ emit->input_map[index] = tmp; } - return TRUE; + return true; } @@ -3536,21 +3536,21 @@ needs_to_create_common_immediate(const struct svga_shader_emitter *emit) if (emit->unit == PIPE_SHADER_FRAGMENT) { if (emit->key.fs.light_twoside) - return TRUE; + return true; if (emit->key.fs.white_fragments) - return TRUE; + return true; if (emit->emit_frontface) - return TRUE; + return true; if (emit->info.opcode_count[TGSI_OPCODE_DST] >= 1 || emit->info.opcode_count[TGSI_OPCODE_SSG] >= 1 || emit->info.opcode_count[TGSI_OPCODE_LIT] >= 1) - return TRUE; + return true; if (emit->inverted_texcoords) - return TRUE; + return true; /* look for any PIPE_SWIZZLE_0/ONE terms */ for (i = 0; i < emit->key.num_textures; i++) { @@ -3558,21 +3558,21 @@ needs_to_create_common_immediate(const struct svga_shader_emitter *emit) emit->key.tex[i].swizzle_g > PIPE_SWIZZLE_W || emit->key.tex[i].swizzle_b > PIPE_SWIZZLE_W || emit->key.tex[i].swizzle_a > PIPE_SWIZZLE_W) - return TRUE; + return true; } for (i = 0; i < emit->key.num_textures; i++) { if (emit->key.tex[i].compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) - return TRUE; + return true; } } else if (emit->unit == PIPE_SHADER_VERTEX) { if (emit->info.opcode_count[TGSI_OPCODE_CMP] >= 1) - return TRUE; + return true; if (emit->key.vs.adjust_attrib_range || emit->key.vs.adjust_attrib_w_1) - return TRUE; + return true; } if (emit->info.opcode_count[TGSI_OPCODE_IF] >= 1 || @@ -3590,9 +3590,9 @@ needs_to_create_common_immediate(const struct svga_shader_emitter *emit) emit->info.opcode_count[TGSI_OPCODE_LOG] >= 1 || emit->info.opcode_count[TGSI_OPCODE_KILL] >= 1 || emit->info.opcode_count[TGSI_OPCODE_SQRT] >= 1) - return TRUE; + return true; - return FALSE; + return false; } @@ -3632,7 +3632,7 @@ pre_parse_add_indirect( struct svga_shader_emitter *emit, num : emit->arl_consts[i].number; emit->arl_consts[i].arl_num = current_arl; - return TRUE; + return true; } @@ -3665,7 +3665,7 @@ pre_parse_instruction( struct svga_shader_emitter *emit, } } - return TRUE; + return true; } @@ -3691,14 +3691,14 @@ pre_parse_tokens( struct svga_shader_emitter *emit, } if (!pre_parse_instruction( emit, &parse.FullToken.FullInstruction, current_arl )) - return FALSE; + return false; break; default: break; } } - return TRUE; + return true; } @@ -3717,22 +3717,22 @@ svga_shader_emit_helpers(struct svga_shader_emitter *emit) if (emit->unit == PIPE_SHADER_FRAGMENT) { if (!svga_shader_emit_samplers_decl( emit )) - return FALSE; + return false; if (!emit_ps_preamble( emit )) - return FALSE; + return false; if (emit->key.fs.light_twoside) { if (!emit_light_twoside( emit )) - return FALSE; + return false; } if (emit->emit_frontface) { if (!emit_frontface( emit )) - return FALSE; + return false; } if (emit->inverted_texcoords) { if (!emit_inverted_texcoords( emit )) - return FALSE; + return false; } } else { @@ -3740,12 +3740,12 @@ svga_shader_emit_helpers(struct svga_shader_emitter *emit) if (emit->key.vs.adjust_attrib_range) { if (!emit_adjusted_vertex_attribs(emit) || emit->key.vs.adjust_attrib_w_1) { - return FALSE; + return false; } } } - return TRUE; + return true; } @@ -3759,8 +3759,8 @@ svga_shader_emit_instructions(struct svga_shader_emitter *emit, { struct tgsi_parse_context parse; const struct tgsi_token *new_tokens = NULL; - bool ret = TRUE; - bool helpers_emitted = FALSE; + bool ret = true; + bool helpers_emitted = false; unsigned line_nr = 0; if (emit->unit == PIPE_SHADER_FRAGMENT && emit->key.fs.pstipple) { @@ -3814,7 +3814,7 @@ svga_shader_emit_instructions(struct svga_shader_emitter *emit, if (!helpers_emitted) { if (!svga_shader_emit_helpers( emit )) goto done; - helpers_emitted = TRUE; + helpers_emitted = true; } ret = svga_emit_instruction( emit, line_nr++, diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index c74c933aba3..21a7e3eae7a 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -552,13 +552,13 @@ expand(struct svga_shader_emitter_v10 *emit) emit->ptr = err_buf; emit->buf = err_buf; emit->size = sizeof(err_buf); - return FALSE; + return false; } emit->size = newsize; emit->ptr = new_buf + (emit->ptr - emit->buf); emit->buf = new_buf; - return TRUE; + return true; } /** @@ -598,21 +598,21 @@ reserve(struct svga_shader_emitter_v10 *emit, { while (emit->ptr - emit->buf + nr_dwords * sizeof(uint32) >= emit->size) { if (!expand(emit)) - return FALSE; + return false; } - return TRUE; + return true; } static bool emit_dword(struct svga_shader_emitter_v10 *emit, uint32 dword) { if (!reserve(emit, 1)) - return FALSE; + return false; *(uint32 *)emit->ptr = dword; emit->ptr += sizeof dword; - return TRUE; + return true; } static bool @@ -621,11 +621,11 @@ emit_dwords(struct svga_shader_emitter_v10 *emit, unsigned nr) { if (!reserve(emit, nr)) - return FALSE; + return false; memcpy(emit->ptr, dwords, nr * sizeof *dwords); emit->ptr += nr * sizeof *dwords; - return TRUE; + return true; } /** Return the number of tokens in the emitter's buffer */ @@ -655,13 +655,13 @@ check_register_index(struct svga_shader_emitter_v10 *emit, case VGPU10_OPERAND_TYPE_INDEXABLE_TEMP: case VGPU10_OPCODE_DCL_TEMPS: if (index >= VGPU10_MAX_TEMPS) { - emit->register_overflow = TRUE; + emit->register_overflow = true; } break; case VGPU10_OPERAND_TYPE_CONSTANT_BUFFER: case VGPU10_OPCODE_DCL_CONSTANT_BUFFER: if (index >= VGPU10_MAX_CONSTANT_BUFFER_ELEMENT_COUNT) { - emit->register_overflow = TRUE; + emit->register_overflow = true; } break; case VGPU10_OPERAND_TYPE_INPUT: @@ -682,7 +682,7 @@ check_register_index(struct svga_shader_emitter_v10 *emit, index >= VGPU11_MAX_HS_INPUT_CONTROL_POINTS) || (emit->unit == PIPE_SHADER_TESS_EVAL && index >= VGPU11_MAX_DS_INPUT_CONTROL_POINTS)) { - emit->register_overflow = TRUE; + emit->register_overflow = true; } break; case VGPU10_OPERAND_TYPE_OUTPUT: @@ -705,24 +705,24 @@ check_register_index(struct svga_shader_emitter_v10 *emit, index >= VGPU11_MAX_HS_OUTPUTS + 2) || (emit->unit == PIPE_SHADER_TESS_EVAL && index >= VGPU11_MAX_DS_OUTPUTS)) { - emit->register_overflow = TRUE; + emit->register_overflow = true; } break; case VGPU10_OPERAND_TYPE_SAMPLER: case VGPU10_OPCODE_DCL_SAMPLER: if (index >= VGPU10_MAX_SAMPLERS) { - emit->register_overflow = TRUE; + emit->register_overflow = true; } break; case VGPU10_OPERAND_TYPE_RESOURCE: case VGPU10_OPCODE_DCL_RESOURCE: if (index >= VGPU10_MAX_RESOURCES) { - emit->register_overflow = TRUE; + emit->register_overflow = true; } break; case VGPU10_OPERAND_TYPE_IMMEDIATE_CONSTANT_BUFFER: if (index >= MAX_IMMEDIATE_COUNT) { - emit->register_overflow = TRUE; + emit->register_overflow = true; } break; case VGPU10_OPERAND_TYPE_OUTPUT_COVERAGE_MASK: @@ -1283,7 +1283,7 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, VGPU10OperandToken0 operand0; if (file == TGSI_FILE_TEMPORARY) { - emit->temp_map[index].initialized = TRUE; + emit->temp_map[index].initialized = true; } if (file == TGSI_FILE_OUTPUT) { @@ -1325,7 +1325,7 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, */ VGPU10OpcodeToken0 *token = (VGPU10OpcodeToken0 *)emit->buf + emit->inst_start_token; - token->saturate = TRUE; + token->saturate = true; } else if (sem_name == TGSI_SEMANTIC_VIEWPORT_INDEX && emit->gs.viewport_index_out_index != INVALID_INDEX) { @@ -1382,7 +1382,7 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, */ if (emit->tcs.control_point_phase) { /* Discard writing into tessfactor in control point phase */ - emit->discard_instruction = TRUE; + emit->discard_instruction = true; } else { file = TGSI_FILE_TEMPORARY; @@ -1396,7 +1396,7 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, */ if (emit->tcs.control_point_phase) { /* Discard writing into tessfactor in control point phase */ - emit->discard_instruction = TRUE; + emit->discard_instruction = true; } else { file = TGSI_FILE_TEMPORARY; @@ -1409,7 +1409,7 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, if (emit->tcs.control_point_phase) { /* Discard writing into generic patch constant outputs in control point phase */ - emit->discard_instruction = TRUE; + emit->discard_instruction = true; } else { if (emit->reemit_instruction) { @@ -1424,14 +1424,14 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, tempArrayId = get_temp_array_id(emit, file, index); index2d = tempArrayId > 0; - emit->reemit_instruction = FALSE; + emit->reemit_instruction = false; } else { /* If per-patch outputs is been read in shader, we * reemit instruction and store results in temporaries in * patch constant phase. */ if (emit->info.reads_perpatch_outputs) { - emit->reemit_instruction = TRUE; + emit->reemit_instruction = true; } } } @@ -1441,20 +1441,20 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, if (emit->tcs.control_point_phase) { if (emit->reemit_instruction) { /* Store results of reemitted instruction in temporary register. */ - index2d = FALSE; + index2d = false; file = TGSI_FILE_TEMPORARY; index = emit->tcs.control_point_tmp_index + (index - emit->tcs.control_point_out_index); - emit->reemit_instruction = FALSE; + emit->reemit_instruction = false; } else { /* The mapped control point outputs are 1-D */ - index2d = FALSE; + index2d = false; if (emit->info.reads_pervertex_outputs) { /* If per-vertex outputs is been read in shader, we * reemit instruction and store results in temporaries * control point phase. */ - emit->reemit_instruction = TRUE; + emit->reemit_instruction = true; } } @@ -1480,7 +1480,7 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, else { /* Discard writing into control point outputs in patch constant phase */ - emit->discard_instruction = TRUE; + emit->discard_instruction = true; } } } @@ -1506,7 +1506,7 @@ emit_dst_register(struct svga_shader_emitter_v10 *emit, check_register_index(emit, operand0.operandType, index); operand0 = setup_operand0_indexing(emit, operand0, file, indirect, - index2d, FALSE); + index2d, false); /* Emit tokens */ emit_dword(emit, operand0.value); @@ -1536,11 +1536,11 @@ need_temp_reg_initialization(struct svga_shader_emitter_v10 *emit, && emit->current_loop_depth == 0) { if (!emit->temp_map[index].initialized && emit->temp_map[index].index < emit->num_shader_temps) { - return TRUE; + return true; } } - return FALSE; + return false; } @@ -1734,7 +1734,7 @@ emit_src_register(struct svga_shader_emitter_v10 *emit, index == emit->tcs.inner.tgsi_index || index == emit->tcs.outer.tgsi_index) { if (emit->tcs.control_point_phase) { - emit->discard_instruction = TRUE; + emit->discard_instruction = true; } else { /* Device doesn't allow reading from output so @@ -1765,12 +1765,12 @@ emit_src_register(struct svga_shader_emitter_v10 *emit, /* Device doesn't allow reading from output so * use corresponding temporary register as source */ file = TGSI_FILE_TEMPORARY; - index2d = FALSE; + index2d = false; index = emit->tcs.control_point_tmp_index + (index - emit->tcs.control_point_out_index); } else { - emit->discard_instruction = TRUE; + emit->discard_instruction = true; } } } @@ -1907,8 +1907,8 @@ emit_src_register(struct svga_shader_emitter_v10 *emit, emit->raw_buf_cur_tmp_index++; emit->reemit_rawbuf_instruction = REEMIT_TRUE; - emit->discard_instruction = TRUE; - emit->reemit_tgsi_instruction = TRUE; + emit->discard_instruction = true; + emit->reemit_tgsi_instruction = true; } else { /* In the reemitting process, replace the constant buffer @@ -1916,8 +1916,8 @@ emit_src_register(struct svga_shader_emitter_v10 *emit, */ file = TGSI_FILE_TEMPORARY; index = emit->raw_buf_cur_tmp_index + emit->raw_buf_tmp_index; - index2d = FALSE; - indirect = FALSE; + index2d = false; + indirect = false; emit->raw_buf_cur_tmp_index++; } } @@ -1926,7 +1926,7 @@ emit_src_register(struct svga_shader_emitter_v10 *emit, if (file == TGSI_FILE_TEMPORARY) { if (need_temp_reg_initialization(emit, index)) { emit->initialize_temp_index = index; - emit->discard_instruction = TRUE; + emit->discard_instruction = true; } } @@ -2176,7 +2176,7 @@ static void emit_opcode(struct svga_shader_emitter_v10 *emit, unsigned vgpu10_opcode, bool saturate) { - emit_opcode_precise(emit, vgpu10_opcode, saturate, FALSE); + emit_opcode_precise(emit, vgpu10_opcode, saturate, false); } @@ -2306,7 +2306,7 @@ end_emit_instruction(struct svga_shader_emitter_v10 *emit) } emit->inst_start_token = 0; /* reset to zero for error checking */ - emit->discard_instruction = FALSE; + emit->discard_instruction = false; } @@ -2859,7 +2859,7 @@ emit_vgpu10_immediate(struct svga_shader_emitter_v10 *emit, * immediate values and emit them later. */ alloc_immediate_4(emit, imm->u); - return TRUE; + return true; } @@ -2884,9 +2884,9 @@ emit_vgpu10_immediates_block(struct svga_shader_emitter_v10 *emit) emit_dword(emit, 2 + 4 * emit->num_immediates); emit_dwords(emit, (unsigned *) emit->immediates, 4 * emit->num_immediates); - emit->immediates_emitted = TRUE; + emit->immediates_emitted = true; - return TRUE; + return true; } @@ -3051,7 +3051,7 @@ emit_vgpu10_property(struct svga_shader_emitter_v10 *emit, break; case TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL: - emit->fs.forceEarlyDepthStencil = TRUE; + emit->fs.forceEarlyDepthStencil = true; break; default: @@ -3059,7 +3059,7 @@ emit_vgpu10_property(struct svga_shader_emitter_v10 *emit, tgsi_property_names[prop->Property.PropertyName]); } - return TRUE; + return true; } @@ -3408,7 +3408,7 @@ needs_control_point_phase(struct svga_shader_emitter_v10 *emit) */ if ((emit->key.tcs.vertices_per_patch != emit->key.tcs.vertices_out) && emit->key.tcs.vertices_out) - return TRUE; + return true; for (i = 0; i < emit->info.num_outputs; i++) { switch (emit->info.output_semantic_name[i]) { @@ -3417,10 +3417,10 @@ needs_control_point_phase(struct svga_shader_emitter_v10 *emit) case TGSI_SEMANTIC_TESSINNER: break; default: - return TRUE; + return true; } } - return FALSE; + return false; } @@ -3498,7 +3498,7 @@ emit_hull_shader_control_point_phase(struct svga_shader_emitter_v10 *emit) * add input signatures when we parse the tcs again in the * patch constant phase. */ - emit->tcs.fork_phase_add_signature = TRUE; + emit->tcs.fork_phase_add_signature = true; } else { /** @@ -3507,7 +3507,7 @@ emit_hull_shader_control_point_phase(struct svga_shader_emitter_v10 *emit) */ emit_passthrough_control_point_signature(emit); } - return FALSE; + return false; } /* Start the control point phase in the hull shader */ @@ -3526,7 +3526,7 @@ emit_hull_shader_control_point_phase(struct svga_shader_emitter_v10 *emit) VGPU10_NAME_UNDEFINED, VGPU10_OPERAND_0_COMPONENT, 0, 0, - VGPU10_INTERPOLATION_CONSTANT, TRUE, + VGPU10_INTERPOLATION_CONSTANT, true, SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED); if (emit->tcs.prim_id_index != INVALID_INDEX) { @@ -3538,11 +3538,11 @@ emit_hull_shader_control_point_phase(struct svga_shader_emitter_v10 *emit) VGPU10_OPERAND_0_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, 0, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, SVGADX_SIGNATURE_SEMANTIC_NAME_PRIMITIVE_ID); } - return TRUE; + return true; } @@ -3556,10 +3556,10 @@ emit_hull_shader_patch_constant_phase(struct svga_shader_emitter_v10 *emit, struct tgsi_parse_context *parse) { unsigned inst_number = 0; - bool ret = TRUE; + bool ret = true; VGPU10OpcodeToken0 opcode0; - emit->skip_instruction = FALSE; + emit->skip_instruction = false; /* Start the patch constant phase */ opcode0.value = 0; @@ -3569,7 +3569,7 @@ emit_hull_shader_patch_constant_phase(struct svga_shader_emitter_v10 *emit, end_emit_instruction(emit); /* Set the current phase to patch constant phase */ - emit->tcs.control_point_phase = FALSE; + emit->tcs.control_point_phase = false; if (emit->tcs.prim_id_index != INVALID_INDEX) { emit_input_declaration(emit, VGPU10_OPCODE_DCL_INPUT, @@ -3580,13 +3580,13 @@ emit_hull_shader_patch_constant_phase(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_0_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, 0, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, SVGADX_SIGNATURE_SEMANTIC_NAME_PRIMITIVE_ID); } /* Emit declarations for this phase */ emit->index_range.required = - emit->info.indirect_files & (1 << TGSI_FILE_INPUT) ? TRUE : FALSE; + emit->info.indirect_files & (1 << TGSI_FILE_INPUT) ? true : false; emit_tcs_input_declarations(emit); if (emit->index_range.start_index != INVALID_INDEX) { @@ -3594,13 +3594,13 @@ emit_hull_shader_patch_constant_phase(struct svga_shader_emitter_v10 *emit, } emit->index_range.required = - emit->info.indirect_files & (1 << TGSI_FILE_OUTPUT) ? TRUE : FALSE; + emit->info.indirect_files & (1 << TGSI_FILE_OUTPUT) ? true : false; emit_tcs_output_declarations(emit); if (emit->index_range.start_index != INVALID_INDEX) { emit_index_range_declaration(emit); } - emit->index_range.required = FALSE; + emit->index_range.required = false; emit_temporaries_declaration(emit); @@ -3632,10 +3632,10 @@ emit_hull_shader_patch_constant_phase(struct svga_shader_emitter_v10 *emit, } if (!ret) - return FALSE; + return false; } - return TRUE; + return true; } @@ -3665,7 +3665,7 @@ static bool emit_index_range_declaration(struct svga_shader_emitter_v10 *emit) { if (emit->version < 50) - return TRUE; + return true; assert(emit->index_range.start_index != INVALID_INDEX); assert(emit->index_range.count != 0); @@ -3715,7 +3715,7 @@ emit_index_range_declaration(struct svga_shader_emitter_v10 *emit) emit->index_range.size = 0; emit->index_range.dim = 0; - return TRUE; + return true; } @@ -4116,7 +4116,7 @@ emit_fs_output_declarations(struct svga_shader_emitter_v10 *emit) VGPU10_OPCODE_DCL_OUTPUT, semantic_index, VGPU10_NAME_UNDEFINED, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - TRUE, + true, map_tgsi_semantic_to_sgn_name(semantic_name)); if (semantic_index == 0) { @@ -4133,7 +4133,7 @@ emit_fs_output_declarations(struct svga_shader_emitter_v10 *emit) VGPU10_OPCODE_DCL_OUTPUT, idx, VGPU10_NAME_UNDEFINED, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - TRUE, + true, map_tgsi_semantic_to_sgn_name(semantic_name)); emit->info.output_semantic_index[idx] = j; } @@ -4182,7 +4182,7 @@ emit_vertex_output_declaration(struct svga_shader_emitter_v10 *emit, assert(emit->tcs.control_point_phase); type = VGPU10_OPCODE_DCL_OUTPUT; name = VGPU10_NAME_UNDEFINED; - emit_output_declaration(emit, type, index, name, final_mask, TRUE, + emit_output_declaration(emit, type, index, name, final_mask, true, SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED); return; } @@ -4227,7 +4227,7 @@ emit_vs_output_declarations(struct svga_shader_emitter_v10 *emit) { unsigned i; for (i = 0; i < emit->info.num_outputs; i++) { - emit_vertex_output_declaration(emit, i, emit->output_usage_mask[i], TRUE); + emit_vertex_output_declaration(emit, i, emit->output_usage_mask[i], true); } } @@ -4280,7 +4280,7 @@ emit_gs_output_declarations(struct svga_shader_emitter_v10 *emit) if (emit->version >= 50) { /* DCL_STREAM stream */ begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_DCL_STREAM, FALSE); + emit_opcode(emit, VGPU10_OPCODE_DCL_STREAM, false); emit_stream_register(emit, s); end_emit_instruction(emit); } @@ -4311,7 +4311,7 @@ emit_gs_output_declarations(struct svga_shader_emitter_v10 *emit) VGPU10_OPCODE_DCL_OUTPUT_SGV, i, VGPU10_NAME_PRIMITIVE_ID, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - FALSE, + false, map_tgsi_semantic_to_sgn_name(semantic_name)); break; case TGSI_SEMANTIC_LAYER: @@ -4319,7 +4319,7 @@ emit_gs_output_declarations(struct svga_shader_emitter_v10 *emit) VGPU10_OPCODE_DCL_OUTPUT_SIV, i, VGPU10_NAME_RENDER_TARGET_ARRAY_INDEX, VGPU10_OPERAND_4_COMPONENT_MASK_X, - FALSE, + false, map_tgsi_semantic_to_sgn_name(semantic_name)); break; case TGSI_SEMANTIC_VIEWPORT_INDEX: @@ -4327,12 +4327,12 @@ emit_gs_output_declarations(struct svga_shader_emitter_v10 *emit) VGPU10_OPCODE_DCL_OUTPUT_SIV, i, VGPU10_NAME_VIEWPORT_ARRAY_INDEX, VGPU10_OPERAND_4_COMPONENT_MASK_X, - FALSE, + false, map_tgsi_semantic_to_sgn_name(semantic_name)); emit->gs.viewport_index_out_index = i; break; default: - emit_vertex_output_declaration(emit, i, writemask, FALSE); + emit_vertex_output_declaration(emit, i, writemask, false); } } } @@ -4516,7 +4516,7 @@ emit_tcs_output_declarations(struct svga_shader_emitter_v10 *emit) emit_output_declaration(emit, VGPU10_OPCODE_DCL_OUTPUT, index, VGPU10_NAME_UNDEFINED, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - FALSE, + false, map_tgsi_semantic_to_sgn_name(semantic_name)); SVGA3dDXShaderSignatureEntry *sgnEntry = @@ -4540,7 +4540,7 @@ emit_tcs_output_declarations(struct svga_shader_emitter_v10 *emit) break; emit_vertex_output_declaration(emit, i, emit->output_usage_mask[i], - TRUE); + true); } } @@ -4567,14 +4567,14 @@ emit_tcs_output_declarations(struct svga_shader_emitter_v10 *emit) emit->tcs.control_point_out_index, VGPU10_NAME_POSITION, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - TRUE, + true, SVGADX_SIGNATURE_SEMANTIC_NAME_POSITION); /* If tcs does not output any control point output, * we can end the hull shader control point phase here * after emitting the default control point output. */ - emit->skip_instruction = TRUE; + emit->skip_instruction = true; } } else { @@ -4637,7 +4637,7 @@ emit_tes_output_declarations(struct svga_shader_emitter_v10 *emit) unsigned int i; for (i = 0; i < emit->info.num_outputs; i++) { - emit_vertex_output_declaration(emit, i, emit->output_usage_mask[i], TRUE); + emit_vertex_output_declaration(emit, i, emit->output_usage_mask[i], true); } } @@ -4660,7 +4660,7 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_4_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, VGPU10_OPERAND_4_COMPONENT_MASK_X, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, map_tgsi_semantic_to_sgn_name(semantic_name)); break; case TGSI_SEMANTIC_VERTEXID: @@ -4674,7 +4674,7 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_4_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, VGPU10_OPERAND_4_COMPONENT_MASK_X, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, map_tgsi_semantic_to_sgn_name(semantic_name)); break; case TGSI_SEMANTIC_SAMPLEID: @@ -4689,7 +4689,7 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_4_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, VGPU10_OPERAND_4_COMPONENT_MASK_X, - VGPU10_INTERPOLATION_CONSTANT, TRUE, + VGPU10_INTERPOLATION_CONSTANT, true, map_tgsi_semantic_to_sgn_name(semantic_name)); break; case TGSI_SEMANTIC_SAMPLEPOS: @@ -4724,7 +4724,7 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_0_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, 0, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED); } else if (emit->unit == PIPE_SHADER_TESS_CTRL) { /* The emission of the control point id will be done @@ -4749,7 +4749,7 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_1_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, 0, - VGPU10_INTERPOLATION_CONSTANT, TRUE, + VGPU10_INTERPOLATION_CONSTANT, true, SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED); break; case TGSI_SEMANTIC_TESSCOORD: @@ -4774,7 +4774,7 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_4_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, usageMask, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED); break; case TGSI_SEMANTIC_TESSINNER: @@ -4807,7 +4807,7 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_0_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, 0, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, map_tgsi_semantic_to_sgn_name(semantic_name)); } break; @@ -4823,7 +4823,7 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_4_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, map_tgsi_semantic_to_sgn_name(semantic_name)); break; case TGSI_SEMANTIC_BLOCK_ID: @@ -4838,7 +4838,7 @@ emit_system_value_declaration(struct svga_shader_emitter_v10 *emit, VGPU10_OPERAND_4_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, map_tgsi_semantic_to_sgn_name(semantic_name)); break; case TGSI_SEMANTIC_GRID_SIZE: @@ -4862,12 +4862,12 @@ emit_vgpu10_declaration(struct svga_shader_emitter_v10 *emit, switch (decl->Declaration.File) { case TGSI_FILE_INPUT: /* do nothing - see emit_input_declarations() */ - return TRUE; + return true; case TGSI_FILE_OUTPUT: assert(decl->Range.First == decl->Range.Last); emit->output_usage_mask[decl->Range.First] = decl->Declaration.UsageMask; - return TRUE; + return true; case TGSI_FILE_TEMPORARY: /* Don't declare the temps here. Just keep track of how many @@ -4889,7 +4889,7 @@ emit_vgpu10_declaration(struct svga_shader_emitter_v10 *emit, /* for all temps, indexed or not, keep track of highest index */ emit->num_shader_temps = MAX2(emit->num_shader_temps, decl->Range.Last + 1); - return TRUE; + return true; case TGSI_FILE_CONSTANT: /* Don't declare constants here. Just keep track and emit later. */ @@ -4912,40 +4912,40 @@ emit_vgpu10_declaration(struct svga_shader_emitter_v10 *emit, " but [%u] is the limit.\n", num_consts, VGPU10_MAX_CONSTANT_BUFFER_ELEMENT_COUNT); - emit->register_overflow = TRUE; + emit->register_overflow = true; } /* The linker doesn't enforce the max UBO size so we clamp here */ emit->num_shader_consts[constbuf] = MIN2(num_consts, VGPU10_MAX_CONSTANT_BUFFER_ELEMENT_COUNT); } - return TRUE; + return true; case TGSI_FILE_IMMEDIATE: assert(!"TGSI_FILE_IMMEDIATE not handled yet!"); - return FALSE; + return false; case TGSI_FILE_SYSTEM_VALUE: emit_system_value_declaration(emit, decl->Semantic.Name, decl->Range.First); - return TRUE; + return true; case TGSI_FILE_SAMPLER: /* Don't declare samplers here. Just keep track and emit later. */ emit->num_samplers = MAX2(emit->num_samplers, decl->Range.Last + 1); - return TRUE; + return true; #if 0 case TGSI_FILE_RESOURCE: /*opcode0.opcodeType = VGPU10_OPCODE_DCL_RESOURCE;*/ /* XXX more, VGPU10_RETURN_TYPE_FLOAT */ assert(!"TGSI_FILE_RESOURCE not handled yet"); - return FALSE; + return false; #endif case TGSI_FILE_ADDRESS: emit->num_address_regs = MAX2(emit->num_address_regs, decl->Range.Last + 1); - return TRUE; + return true; case TGSI_FILE_SAMPLER_VIEW: { @@ -4955,9 +4955,9 @@ emit_vgpu10_declaration(struct svga_shader_emitter_v10 *emit, /* Note: we can ignore YZW return types for now */ emit->sampler_return_type[unit] = decl->SamplerView.ReturnTypeX; - emit->sampler_view[unit] = TRUE; + emit->sampler_view[unit] = true; } - return TRUE; + return true; case TGSI_FILE_IMAGE: { @@ -4968,7 +4968,7 @@ emit_vgpu10_declaration(struct svga_shader_emitter_v10 *emit, emit->image_mask |= 1 << unit; emit->num_images++; } - return TRUE; + return true; case TGSI_FILE_HW_ATOMIC: /* Declare the atomic buffer if it is not already declared. */ @@ -4980,25 +4980,25 @@ emit_vgpu10_declaration(struct svga_shader_emitter_v10 *emit, /* Remember the maximum atomic counter index encountered */ emit->max_atomic_counter_index = MAX2(emit->max_atomic_counter_index, decl->Range.Last); - return TRUE; + return true; case TGSI_FILE_MEMORY: /* Record memory has been used. */ if (emit->unit == PIPE_SHADER_COMPUTE && decl->Declaration.MemType == TGSI_MEMORY_TYPE_SHARED) { - emit->cs.shared_memory_declared = TRUE; + emit->cs.shared_memory_declared = true; } - return TRUE; + return true; case TGSI_FILE_BUFFER: assert(emit->version >= 50); emit->num_shader_bufs++; - return TRUE; + return true; default: assert(!"Unexpected type of declaration"); - return FALSE; + return false; } } @@ -5095,7 +5095,7 @@ emit_fs_input_declarations(struct svga_shader_emitter_v10 *emit) VGPU10_OPERAND_4_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, mask, - interpolationMode, TRUE, + interpolationMode, true, map_tgsi_semantic_to_sgn_name(semantic_name)); } } @@ -5123,7 +5123,7 @@ emit_vs_input_declarations(struct svga_shader_emitter_v10 *emit) VGPU10_OPERAND_4_COMPONENT, VGPU10_OPERAND_4_COMPONENT_MASK_MODE, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED); } } @@ -5185,7 +5185,7 @@ emit_gs_input_declarations(struct svga_shader_emitter_v10 *emit) name, numComp, selMode, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - VGPU10_INTERPOLATION_UNDEFINED, TRUE, + VGPU10_INTERPOLATION_UNDEFINED, true, map_tgsi_semantic_to_sgn_name(semantic_name)); } } @@ -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; - bool addSignature = TRUE; + bool addSignature = true; if (!emit->tcs.control_point_phase) addSignature = emit->tcs.fork_phase_add_signature; @@ -5380,7 +5380,7 @@ emit_tes_input_declarations(struct svga_shader_emitter_v10 *emit) VGPU10_OPERAND_4_COMPONENT_MASK_MODE, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, VGPU10_INTERPOLATION_UNDEFINED, - TRUE, sgn_name); + true, sgn_name); } emit_tessfactor_input_declarations(emit); @@ -5409,7 +5409,7 @@ emit_tes_input_declarations(struct svga_shader_emitter_v10 *emit) VGPU10_OPERAND_4_COMPONENT_MASK_MODE, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, VGPU10_INTERPOLATION_UNDEFINED, - TRUE, + true, map_tgsi_semantic_to_sgn_name(sem_name)); } else if (sem_name != TGSI_SEMANTIC_TESSINNER && @@ -5423,7 +5423,7 @@ emit_tes_input_declarations(struct svga_shader_emitter_v10 *emit) VGPU10_OPERAND_4_COMPONENT_MASK_MODE, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, VGPU10_INTERPOLATION_UNDEFINED, - TRUE, + true, map_tgsi_semantic_to_sgn_name(sem_name)); } /* tessellation factors are taken care of in @@ -5442,7 +5442,7 @@ static bool emit_input_declarations(struct svga_shader_emitter_v10 *emit) { emit->index_range.required = - emit->info.indirect_files & (1 << TGSI_FILE_INPUT) ? TRUE : FALSE; + emit->info.indirect_files & (1 << TGSI_FILE_INPUT) ? true : false; switch (emit->unit) { case PIPE_SHADER_FRAGMENT: @@ -5470,8 +5470,8 @@ emit_input_declarations(struct svga_shader_emitter_v10 *emit) if (emit->index_range.start_index != INVALID_INDEX) { emit_index_range_declaration(emit); } - emit->index_range.required = FALSE; - return TRUE; + emit->index_range.required = false; + return true; } @@ -5482,7 +5482,7 @@ static bool emit_output_declarations(struct svga_shader_emitter_v10 *emit) { emit->index_range.required = - emit->info.indirect_files & (1 << TGSI_FILE_OUTPUT) ? TRUE : FALSE; + emit->info.indirect_files & (1 << TGSI_FILE_OUTPUT) ? true : false; switch (emit->unit) { case PIPE_SHADER_FRAGMENT: @@ -5519,7 +5519,7 @@ emit_output_declarations(struct svga_shader_emitter_v10 *emit) emit->vposition.so_index, VGPU10_NAME_UNDEFINED, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - TRUE, + true, SVGADX_SIGNATURE_SEMANTIC_NAME_POSITION); } @@ -5537,7 +5537,7 @@ emit_output_declarations(struct svga_shader_emitter_v10 *emit) emit->clip_dist_so_index, VGPU10_NAME_UNDEFINED, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - TRUE, + true, SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED); if (emit->info.num_written_clipdistance > 4) { @@ -5546,7 +5546,7 @@ emit_output_declarations(struct svga_shader_emitter_v10 *emit) emit->clip_dist_so_index + 1, VGPU10_NAME_UNDEFINED, VGPU10_OPERAND_4_COMPONENT_MASK_ALL, - TRUE, + true, SVGADX_SIGNATURE_SEMANTIC_NAME_UNDEFINED); } } @@ -5554,8 +5554,8 @@ emit_output_declarations(struct svga_shader_emitter_v10 *emit) if (emit->index_range.start_index != INVALID_INDEX) { emit_index_range_declaration(emit); } - emit->index_range.required = FALSE; - return TRUE; + emit->index_range.required = false; + return true; } @@ -5856,7 +5856,7 @@ emit_temporaries_declaration(struct svga_shader_emitter_v10 *emit) */ check_register_index(emit, VGPU10_OPCODE_DCL_TEMPS, total_temps - 1); - return TRUE; + return true; } @@ -5947,7 +5947,7 @@ emit_constant_declaration(struct svga_shader_emitter_v10 *emit) total_consts, VGPU10_MAX_CONSTANT_BUFFER_ELEMENT_COUNT); total_consts = VGPU10_MAX_CONSTANT_BUFFER_ELEMENT_COUNT; - emit->register_overflow = TRUE; + emit->register_overflow = true; } begin_emit_instruction(emit); emit_dword(emit, opcode0.value); @@ -5996,7 +5996,7 @@ emit_constant_declaration(struct svga_shader_emitter_v10 *emit) } } - return TRUE; + return true; } @@ -6030,7 +6030,7 @@ emit_sampler_declarations(struct svga_shader_emitter_v10 *emit) end_emit_instruction(emit); } - return TRUE; + return true; } @@ -6149,15 +6149,15 @@ is_integer_type(enum tgsi_return_type type) switch (type) { case TGSI_RETURN_TYPE_SINT: case TGSI_RETURN_TYPE_UINT: - return TRUE; + return true; case TGSI_RETURN_TYPE_FLOAT: case TGSI_RETURN_TYPE_UNORM: case TGSI_RETURN_TYPE_SNORM: - return FALSE; + return false; case TGSI_RETURN_TYPE_COUNT: default: assert(!"is_integer_type: Unknown tgsi_return_type"); - return FALSE; + return false; } } @@ -6190,14 +6190,14 @@ emit_resource_declarations(struct svga_shader_emitter_v10 *emit) tgsi_texture_to_resource_dimension(emit->sampler_target[i], emit->key.tex[i].num_samples, emit->key.tex[i].is_array, - FALSE); + false); } else { opcode0.resourceDimension = pipe_texture_to_resource_dimension(emit->key.tex[i].target, emit->key.tex[i].num_samples, emit->key.tex[i].is_array, - FALSE); + false); } opcode0.sampleCount = emit->key.tex[i].num_samples; operand0.value = 0; @@ -6248,7 +6248,7 @@ emit_resource_declarations(struct svga_shader_emitter_v10 *emit) end_emit_instruction(emit); } - return TRUE; + return true; } @@ -6286,7 +6286,7 @@ emit_image_declarations(struct svga_shader_emitter_v10 *emit) opcode0.uavResourceDimension = tgsi_texture_to_resource_dimension(emit->image[unit].Resource, 0, emit->key.images[unit].is_array, - TRUE); + true); if (emit->key.images[unit].is_single_layer && emit->key.images[unit].resource_target == PIPE_TEXTURE_3D) { @@ -6514,7 +6514,7 @@ emit_instruction_op1(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_dst_register *dst, const struct tgsi_full_src_register *src) { - emit_instruction_opn(emit, opcode, dst, src, NULL, NULL, FALSE, FALSE); + emit_instruction_opn(emit, opcode, dst, src, NULL, NULL, false, false); } static void @@ -6524,7 +6524,7 @@ emit_instruction_op2(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_src_register *src1, const struct tgsi_full_src_register *src2) { - emit_instruction_opn(emit, opcode, dst, src1, src2, NULL, FALSE, FALSE); + emit_instruction_opn(emit, opcode, dst, src1, src2, NULL, false, false); } static void @@ -6535,7 +6535,7 @@ emit_instruction_op3(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_src_register *src2, const struct tgsi_full_src_register *src3) { - emit_instruction_opn(emit, opcode, dst, src1, src2, src3, FALSE, FALSE); + emit_instruction_opn(emit, opcode, dst, src1, src2, src3, false, false); } static void @@ -6543,7 +6543,7 @@ emit_instruction_op0(struct svga_shader_emitter_v10 *emit, VGPU10_OPCODE_TYPE opcode) { begin_emit_instruction(emit); - emit_opcode(emit, opcode, FALSE); + emit_opcode(emit, opcode, false); end_emit_instruction(emit); } @@ -6745,14 +6745,14 @@ emit_clip_distance_declarations(struct svga_shader_emitter_v10 *emit) if (plane_mask & 0xf) { unsigned cmask = plane_mask & VGPU10_OPERAND_4_COMPONENT_MASK_ALL; emit_output_declaration(emit, VGPU10_OPCODE_DCL_OUTPUT_SIV, index, - VGPU10_NAME_CLIP_DISTANCE, cmask, TRUE, + VGPU10_NAME_CLIP_DISTANCE, cmask, true, SVGADX_SIGNATURE_SEMANTIC_NAME_CLIP_DISTANCE); emit->num_outputs++; } if (plane_mask & 0xf0) { unsigned cmask = (plane_mask >> 4) & VGPU10_OPERAND_4_COMPONENT_MASK_ALL; emit_output_declaration(emit, VGPU10_OPCODE_DCL_OUTPUT_SIV, index + 1, - VGPU10_NAME_CLIP_DISTANCE, cmask, TRUE, + VGPU10_NAME_CLIP_DISTANCE, cmask, true, SVGADX_SIGNATURE_SEMANTIC_NAME_CLIP_DISTANCE); emit->num_outputs++; } @@ -6876,7 +6876,7 @@ emit_swap_r_b(struct svga_shader_emitter_v10 *emit, swizzle_src(src, TGSI_SWIZZLE_Z, TGSI_SWIZZLE_Y, TGSI_SWIZZLE_X, TGSI_SWIZZLE_W); begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_MOV, FALSE); + emit_opcode(emit, VGPU10_OPCODE_MOV, false); emit_dst_register(emit, dst); emit_src_register(emit, &bgra_src); end_emit_instruction(emit); @@ -6999,7 +6999,7 @@ emit_arl_uarl(struct svga_shader_emitter_v10 *emit, emit_instruction_op1(emit, opcode, &dst, &inst->Src[0]); - return TRUE; + return true; } @@ -7020,7 +7020,7 @@ emit_cal(struct svga_shader_emitter_v10 *emit, emit_dword(emit, label); end_emit_instruction(emit); - return TRUE; + return true; } @@ -7043,7 +7043,7 @@ emit_iabs(struct svga_shader_emitter_v10 *emit, emit_instruction_op2(emit, VGPU10_OPCODE_IMAX, &inst->Dst[0], &inst->Src[0], &neg_src); - return TRUE; + return true; } @@ -7069,15 +7069,15 @@ emit_cmp(struct svga_shader_emitter_v10 *emit, struct tgsi_full_dst_register tmp_dst = make_dst_temp_reg(tmp); emit_instruction_opn(emit, VGPU10_OPCODE_LT, &tmp_dst, - &inst->Src[0], &zero, NULL, FALSE, + &inst->Src[0], &zero, NULL, false, inst->Instruction.Precise); emit_instruction_opn(emit, VGPU10_OPCODE_MOVC, &inst->Dst[0], &tmp_src, &inst->Src[1], &inst->Src[2], - inst->Instruction.Saturate, FALSE); + inst->Instruction.Saturate, false); free_temp_indexes(emit); - return TRUE; + return true; } @@ -7156,7 +7156,7 @@ emit_dst(struct svga_shader_emitter_v10 *emit, emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &inst->Dst[0], &move_src); free_temp_indexes(emit); - return TRUE; + return true; } @@ -7189,19 +7189,19 @@ emit_endprim(struct svga_shader_emitter_v10 *emit, /** * If there is no output for this stream, discard this instruction. */ - emit->discard_instruction = TRUE; + emit->discard_instruction = true; } else { - emit_opcode(emit, VGPU10_OPCODE_CUT_STREAM, FALSE); + emit_opcode(emit, VGPU10_OPCODE_CUT_STREAM, false); assert(inst->Src[0].Register.File == TGSI_FILE_IMMEDIATE); emit_stream_register(emit, streamIndex); } } else { - emit_opcode(emit, VGPU10_OPCODE_CUT, FALSE); + emit_opcode(emit, VGPU10_OPCODE_CUT, false); } end_emit_instruction(emit); - return TRUE; + return true; } @@ -7229,7 +7229,7 @@ emit_ex2(struct svga_shader_emitter_v10 *emit, inst->Instruction.Saturate, inst->Instruction.Precise); - return TRUE; + return true; } @@ -7316,7 +7316,7 @@ emit_exp(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -7347,7 +7347,7 @@ emit_if(struct svga_shader_emitter_v10 *emit, emit_src_register(emit, src); end_emit_instruction(emit); - return TRUE; + return true; } @@ -7395,13 +7395,13 @@ emit_cond_discard(struct svga_shader_emitter_v10 *emit, } begin_emit_instruction(emit); - emit_discard_opcode(emit, TRUE); /* discard if src0.x is non-zero */ + emit_discard_opcode(emit, true); /* discard if src0.x is non-zero */ emit_src_register(emit, &tmp_src_xxxx); end_emit_instruction(emit); free_temp_indexes(emit); - return TRUE; + return true; } @@ -7416,11 +7416,11 @@ emit_discard(struct svga_shader_emitter_v10 *emit, /* DISCARD if 0.0 is zero */ begin_emit_instruction(emit); - emit_discard_opcode(emit, FALSE); + emit_discard_opcode(emit, false); emit_src_register(emit, &zero); end_emit_instruction(emit); - return TRUE; + return true; } @@ -7448,7 +7448,7 @@ emit_lg2(struct svga_shader_emitter_v10 *emit, inst->Instruction.Saturate, inst->Instruction.Precise); - return TRUE; + return true; } @@ -7501,7 +7501,7 @@ emit_lit(struct svga_shader_emitter_v10 *emit, TGSI_SWIZZLE_X, TGSI_SWIZZLE_X); emit_instruction_opn(emit, VGPU10_OPCODE_MAX, &dst_y, &src_xxxx, - &zero, NULL, inst->Instruction.Saturate, FALSE); + &zero, NULL, inst->Instruction.Saturate, false); } /* @@ -7584,7 +7584,7 @@ emit_lit(struct svga_shader_emitter_v10 *emit, emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &inst->Dst[0], &move_src); free_temp_indexes(emit); - return TRUE; + return true; } @@ -7601,14 +7601,14 @@ emit_lodq(struct svga_shader_emitter_v10 *emit, /* LOD dst, coord, resource, sampler */ begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_LOD, FALSE); + emit_opcode(emit, VGPU10_OPCODE_LOD, false); emit_dst_register(emit, &inst->Dst[0]); emit_src_register(emit, &inst->Src[0]); /* coord */ emit_resource_register(emit, unit); emit_sampler_register(emit, unit); end_emit_instruction(emit); - return TRUE; + return true; } @@ -7649,7 +7649,7 @@ emit_log(struct svga_shader_emitter_v10 *emit, emit_instruction_opn(emit, VGPU10_OPCODE_MOV, &dst_z, &tmp_src, NULL, NULL, - inst->Instruction.Saturate, FALSE); + inst->Instruction.Saturate, false); } /* FLR tmp.x, tmp.x */ @@ -7664,7 +7664,7 @@ emit_log(struct svga_shader_emitter_v10 *emit, emit_instruction_opn(emit, VGPU10_OPCODE_MOV, &dst_x, &tmp_src, NULL, NULL, - inst->Instruction.Saturate, FALSE); + inst->Instruction.Saturate, false); } /* EXP tmp.x, tmp.x */ @@ -7675,7 +7675,7 @@ emit_log(struct svga_shader_emitter_v10 *emit, emit_instruction_op1(emit, VGPU10_OPCODE_EXP, &tmp_dst, &tmp_src); emit_instruction_opn(emit, VGPU10_OPCODE_DIV, &dst_y, &abs_src_xxxx, - &tmp_src, NULL, inst->Instruction.Saturate, FALSE); + &tmp_src, NULL, inst->Instruction.Saturate, false); } /* MOV dst.w, 1.0 */ @@ -7690,7 +7690,7 @@ emit_log(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -7714,7 +7714,7 @@ emit_lrp(struct svga_shader_emitter_v10 *emit, /* ADD tmp, s1, -s2 */ emit_instruction_opn(emit, VGPU10_OPCODE_ADD, &dst_tmp, - &inst->Src[1], &neg_src2, NULL, FALSE, + &inst->Src[1], &neg_src2, NULL, false, inst->Instruction.Precise); /* MAD dst, s1, tmp, s3 */ @@ -7725,7 +7725,7 @@ emit_lrp(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -7755,12 +7755,12 @@ emit_pow(struct svga_shader_emitter_v10 *emit, /* LOG tmp, s0.xxxx */ emit_instruction_opn(emit, VGPU10_OPCODE_LOG, &tmp_dst, &src0_xxxx, NULL, NULL, - FALSE, inst->Instruction.Precise); + false, inst->Instruction.Precise); /* MUL tmp, tmp, s1.xxxx */ emit_instruction_opn(emit, VGPU10_OPCODE_MUL, &tmp_dst, &tmp_src, &src1_xxxx, NULL, - FALSE, inst->Instruction.Precise); + false, inst->Instruction.Precise); /* EXP tmp, s0.xxxx */ emit_instruction_opn(emit, VGPU10_OPCODE_EXP, @@ -7771,7 +7771,7 @@ emit_pow(struct svga_shader_emitter_v10 *emit, /* free tmp */ free_temp_indexes(emit); - return TRUE; + return true; } @@ -7815,7 +7815,7 @@ emit_rcp(struct svga_shader_emitter_v10 *emit, /* DIV tmp.x, 1.0, s0 */ emit_instruction_opn(emit, VGPU10_OPCODE_DIV, &tmp_dst_x, &one, &inst->Src[0], NULL, - FALSE, inst->Instruction.Precise); + false, inst->Instruction.Precise); /* MOV dst, tmp.xxxx */ emit_instruction_opn(emit, VGPU10_OPCODE_MOV, @@ -7826,7 +7826,7 @@ emit_rcp(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); } - return TRUE; + return true; } @@ -7856,7 +7856,7 @@ emit_rsq(struct svga_shader_emitter_v10 *emit, /* RSQ tmp, src.x */ emit_instruction_opn(emit, VGPU10_OPCODE_RSQ, &tmp_dst_x, &inst->Src[0], NULL, NULL, - FALSE, inst->Instruction.Precise); + false, inst->Instruction.Precise); /* MOV dst, tmp.xxxx */ emit_instruction_opn(emit, VGPU10_OPCODE_MOV, @@ -7867,7 +7867,7 @@ emit_rsq(struct svga_shader_emitter_v10 *emit, /* free tmp */ free_temp_indexes(emit); - return TRUE; + return true; } @@ -7900,7 +7900,7 @@ emit_seq(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -7933,7 +7933,7 @@ emit_sge(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -7966,7 +7966,7 @@ emit_sgt(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -7987,7 +7987,7 @@ emit_sincos(struct svga_shader_emitter_v10 *emit, writemask_dst(&tmp_dst, TGSI_WRITEMASK_X); begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_SINCOS, FALSE); + emit_opcode(emit, VGPU10_OPCODE_SINCOS, false); if(inst->Instruction.Opcode == TGSI_OPCODE_SIN) { @@ -8009,7 +8009,7 @@ emit_sincos(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -8042,7 +8042,7 @@ emit_sle(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -8075,7 +8075,7 @@ emit_slt(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -8108,7 +8108,7 @@ emit_sne(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -8155,7 +8155,7 @@ emit_ssg(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -8196,7 +8196,7 @@ emit_issg(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -8213,7 +8213,7 @@ emit_comparison(struct svga_shader_emitter_v10 *emit, { struct tgsi_full_src_register immediate; VGPU10OpcodeToken0 opcode0; - bool swapSrc = FALSE; + bool swapSrc = false; /* Sanity checks for svga vs. gallium enums */ STATIC_ASSERT(SVGA3D_CMP_LESS == (PIPE_FUNC_LESS + 1)); @@ -8248,11 +8248,11 @@ emit_comparison(struct svga_shader_emitter_v10 *emit, break; case SVGA3D_CMP_LESSEQUAL: opcode0.opcodeType = VGPU10_OPCODE_GE; - swapSrc = TRUE; + swapSrc = true; break; case SVGA3D_CMP_GREATER: opcode0.opcodeType = VGPU10_OPCODE_LT; - swapSrc = TRUE; + swapSrc = true; break; case SVGA3D_CMP_NOTEQUAL: opcode0.opcodeType = VGPU10_OPCODE_NE; @@ -8485,7 +8485,7 @@ end_tex_swizzle(struct svga_shader_emitter_v10 *emit, /* AND dest, tmp, {1.0} */ begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_AND, FALSE); + emit_opcode(emit, VGPU10_OPCODE_AND, false); if (swz->swizzled) { emit_dst_register(emit, &swz->tmp_dst); } @@ -8569,7 +8569,7 @@ emit_sample(struct svga_shader_emitter_v10 *emit, int offsets[3]; struct tex_swizzle_info swz_info; - begin_tex_swizzle(emit, sampler_unit, inst, FALSE, &swz_info); + begin_tex_swizzle(emit, sampler_unit, inst, false, &swz_info); get_texel_offsets(emit, inst, offsets); @@ -8593,7 +8593,7 @@ emit_sample(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -8611,12 +8611,12 @@ is_valid_tex_instruction(struct svga_shader_emitter_v10 *emit, { const unsigned unit = inst->Src[1].Register.Index; const enum tgsi_texture_type target = inst->Texture.Texture; - bool valid = TRUE; + bool valid = true; if (tgsi_is_shadow_target(target) && is_integer_type(emit->sampler_return_type[unit])) { debug_printf("Invalid SAMPLE_C with an integer texture!\n"); - valid = FALSE; + valid = false; } /* XXX might check for other conditions in the future here */ @@ -8624,7 +8624,7 @@ is_valid_tex_instruction(struct svga_shader_emitter_v10 *emit, /* emit a MOV dst, {1,1,1,1} instruction. */ struct tgsi_full_src_register one = make_immediate_reg_float(emit, 1.0f); begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_MOV, FALSE); + emit_opcode(emit, VGPU10_OPCODE_MOV, false); emit_dst_register(emit, &inst->Dst[0]); emit_src_register(emit, &one); end_emit_instruction(emit); @@ -8651,7 +8651,7 @@ emit_tex(struct svga_shader_emitter_v10 *emit, /* check that the sampler returns a float */ if (!is_valid_tex_instruction(emit, inst)) - return TRUE; + return true; compare_in_shader = tgsi_is_shadow_target(target) && emit->key.tex[unit].compare_in_shader; @@ -8684,7 +8684,7 @@ emit_tex(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } /** @@ -8701,7 +8701,7 @@ emit_tg4(struct svga_shader_emitter_v10 *emit, /* check that the sampler returns a float */ if (!is_valid_tex_instruction(emit, inst)) - return TRUE; + return true; if (emit->version >= 50) { unsigned target = inst->Texture.Texture; @@ -8735,12 +8735,12 @@ emit_tg4(struct svga_shader_emitter_v10 *emit, if (select_swizzle == PIPE_SWIZZLE_1) { src = make_immediate_reg_float(emit, 1.0); emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &inst->Dst[0], &src); - return TRUE; + return true; } else if (select_swizzle == PIPE_SWIZZLE_0) { src = make_immediate_reg_float(emit, 0.0); emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &inst->Dst[0], &src); - return TRUE; + return true; } src = setup_texcoord(emit, unit, &inst->Src[0]); @@ -8854,7 +8854,7 @@ emit_tg4(struct svga_shader_emitter_v10 *emit, } } - return TRUE; + return true; } @@ -8876,7 +8876,7 @@ emit_tex2(struct svga_shader_emitter_v10 *emit, /* check that the sampler returns a float */ if (!is_valid_tex_instruction(emit, inst)) - return TRUE; + return true; compare_in_shader = emit->key.tex[unit].compare_in_shader; if (compare_in_shader) @@ -8908,7 +8908,7 @@ emit_tex2(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -8934,7 +8934,7 @@ emit_txp(struct svga_shader_emitter_v10 *emit, /* check that the sampler returns a float */ if (!is_valid_tex_instruction(emit, inst)) - return TRUE; + return true; compare_in_shader = tgsi_is_shadow_target(target) && emit->key.tex[unit].compare_in_shader; @@ -8974,7 +8974,7 @@ emit_txp(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -9014,7 +9014,7 @@ emit_txd(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -9031,7 +9031,7 @@ emit_txf(struct svga_shader_emitter_v10 *emit, int offsets[3]; struct tex_swizzle_info swz_info; - begin_tex_swizzle(emit, unit, inst, FALSE, &swz_info); + begin_tex_swizzle(emit, unit, inst, false, &swz_info); get_texel_offsets(emit, inst, offsets); @@ -9067,7 +9067,7 @@ emit_txf(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -9126,7 +9126,7 @@ emit_txl_txb(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -9170,7 +9170,7 @@ emit_txl2(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -9204,7 +9204,7 @@ emit_txq(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -9365,7 +9365,7 @@ emit_dabs(struct svga_shader_emitter_v10 *emit, emit_instruction_op1(emit, VGPU10_OPCODE_DMOV, &inst->Dst[0], &abs_src); free_temp_indexes(emit); - return TRUE; + return true; } @@ -9386,7 +9386,7 @@ emit_dneg(struct svga_shader_emitter_v10 *emit, emit_instruction_op1(emit, VGPU10_OPCODE_DMOV, &inst->Dst[0], &neg_src); free_temp_indexes(emit); - return TRUE; + return true; } @@ -9410,7 +9410,7 @@ emit_dmad(struct svga_shader_emitter_v10 *emit, /* DMUL tmp, src[0], src[1] */ emit_instruction_opn(emit, VGPU10_OPCODE_DMUL, &tmp_dst, &src0, &src1, NULL, - FALSE, inst->Instruction.Precise); + false, inst->Instruction.Precise); /* DADD dst, tmp, src[2] */ emit_instruction_opn(emit, VGPU10_OPCODE_DADD, @@ -9418,7 +9418,7 @@ emit_dmad(struct svga_shader_emitter_v10 *emit, inst->Instruction.Saturate, inst->Instruction.Precise); free_temp_indexes(emit); - return TRUE; + return true; } @@ -9447,7 +9447,7 @@ emit_drsq(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -9513,7 +9513,7 @@ emit_dsqrt(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -9601,7 +9601,7 @@ emit_dtrunc(struct svga_shader_emitter_v10 *emit, inst->Instruction.Saturate, inst->Instruction.Precise); free_temp_indexes(emit); - return TRUE; + return true; } @@ -9637,7 +9637,7 @@ emit_interp_offset(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -9686,7 +9686,7 @@ emit_simple(struct svga_shader_emitter_v10 *emit, end_emit_instruction(emit); free_temp_indexes(emit); - return TRUE; + return true; } @@ -9753,7 +9753,7 @@ emit_msb(struct svga_shader_emitter_v10 *emit, src_swizzle = src_swizzle + 1; } free_temp_indexes(emit); - return TRUE; + return true; } @@ -9824,7 +9824,7 @@ emit_bfe(struct svga_shader_emitter_v10 *emit, emit_instruction_op0(emit, VGPU10_OPCODE_ENDIF); free_temp_indexes(emit); - return TRUE; + return true; } @@ -9902,7 +9902,7 @@ emit_bfi(struct svga_shader_emitter_v10 *emit, emit_instruction_op0(emit, VGPU10_OPCODE_ENDIF); free_temp_indexes(emit); - return TRUE; + return true; } @@ -9922,7 +9922,7 @@ emit_mov(struct svga_shader_emitter_v10 *emit, dst->Register.Index == 0 && src->Register.File == TGSI_FILE_CONSTANT && !src->Register.Indirect) { - emit->constant_color_output = TRUE; + emit->constant_color_output = true; } return emit_simple(emit, inst); @@ -9959,7 +9959,7 @@ emit_simple_1dst(struct svga_shader_emitter_v10 *emit, } end_emit_instruction(emit); - return TRUE; + return true; } @@ -10014,7 +10014,7 @@ emit_vmware(struct svga_shader_emitter_v10 *emit, end_emit_instruction(emit); free_temp_indexes(emit); - return TRUE; + return true; } /** @@ -10405,7 +10405,7 @@ emit_load(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -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); - bool needLoad = FALSE; - bool needPerComponentStore = FALSE; + bool needLoad = false; + bool needPerComponentStore = false; unsigned swizzles = 0; /* Resolve the resource address for this resource first */ @@ -10452,14 +10452,14 @@ emit_store_instruction(struct svga_shader_emitter_v10 *emit, * in sync. */ if (resourceType == TGSI_FILE_IMAGE) { - needLoad = (writemask == TGSI_WRITEMASK_XYZW) ? FALSE : TRUE; + needLoad = (writemask == TGSI_WRITEMASK_XYZW) ? false : true; } else if (resourceType == TGSI_FILE_BUFFER || resourceType == TGSI_FILE_MEMORY) { if (!(writemask == TGSI_WRITEMASK_X || writemask == TGSI_WRITEMASK_XY || writemask == TGSI_WRITEMASK_XYZ || writemask == TGSI_WRITEMASK_XYZW)) { - needPerComponentStore = TRUE; + needPerComponentStore = true; } } @@ -10495,7 +10495,7 @@ emit_store_instruction(struct svga_shader_emitter_v10 *emit, src.Register.SwizzleW << 6; } - bool storeDone = FALSE; + bool storeDone = false; unsigned perComponentWritemask = writemask; unsigned shift = 0; struct tgsi_full_src_register shift_src; @@ -10570,7 +10570,7 @@ emit_store_instruction(struct svga_shader_emitter_v10 *emit, end_emit_instruction(emit); if (!needPerComponentStore || !perComponentWritemask) - storeDone = TRUE; + storeDone = true; } free_temp_indexes(emit); @@ -10626,7 +10626,7 @@ emit_store(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -10740,7 +10740,7 @@ emit_atomic(struct svga_shader_emitter_v10 *emit, free_temp_indexes(emit); - return TRUE; + return true; } @@ -10765,7 +10765,7 @@ emit_barrier(struct svga_shader_emitter_v10 *emit, */ util_debug_message(&emit->svga_debug_callback, INFO, "barrier instruction is not supported in tessellation control shader\n"); - return TRUE; + return true; } else if (emit->unit == PIPE_SHADER_COMPUTE) { if (emit->cs.shared_memory_declared) @@ -10786,7 +10786,7 @@ emit_barrier(struct svga_shader_emitter_v10 *emit, emit_dword(emit, token0.value); end_emit_instruction(emit); - return TRUE; + return true; } /** @@ -10841,7 +10841,7 @@ emit_memory_barrier(struct svga_shader_emitter_v10 *emit, emit_dword(emit, token0.value); end_emit_instruction(emit); - return TRUE; + return true; } @@ -10863,12 +10863,12 @@ emit_resq(struct svga_shader_emitter_v10 *emit, image_src = make_src_const_reg(emit->image_size_index + inst->Src[0].Register.Index); emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &inst->Dst[0], &image_src); - return TRUE; + return true; } begin_emit_instruction(emit); if (uav_resource == TGSI_TEXTURE_BUFFER) { - emit_opcode(emit, VGPU10_OPCODE_BUFINFO, FALSE); + emit_opcode(emit, VGPU10_OPCODE_BUFINFO, false); emit_dst_register(emit, &inst->Dst[0]); } else { @@ -10880,7 +10880,7 @@ emit_resq(struct svga_shader_emitter_v10 *emit, UAV_RESQ, inst->Src[0].Register.File, 0); end_emit_instruction(emit); - return TRUE; + return true; } @@ -10995,7 +10995,7 @@ emit_instruction(struct svga_shader_emitter_v10 *emit, return emit_arl_uarl(emit, inst); case TGSI_OPCODE_BGNSUB: /* no-op */ - return TRUE; + return true; case TGSI_OPCODE_CAL: return emit_cal(emit, inst); case TGSI_OPCODE_CMP: @@ -11128,7 +11128,7 @@ emit_instruction(struct svga_shader_emitter_v10 *emit, debug_printf("Unexpected TGSI opcode %s. " "Should have been translated away by the GLSL compiler.\n", tgsi_get_opcode_name(opcode)); - return FALSE; + return false; case TGSI_OPCODE_LOAD: return emit_load(emit, inst); @@ -11177,16 +11177,16 @@ emit_instruction(struct svga_shader_emitter_v10 *emit, case TGSI_OPCODE_END: if (!emit_post_helpers(emit)) - return FALSE; + return false; return emit_simple(emit, inst); default: debug_printf("Unimplemented tgsi instruction %s\n", tgsi_get_opcode_name(opcode)); - return FALSE; + return false; } - return TRUE; + return true; } @@ -11199,12 +11199,12 @@ emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { if (emit->skip_instruction) - return TRUE; + return true; - bool ret = TRUE; + bool ret = true; unsigned start_token = emit_get_num_tokens(emit); - emit->reemit_tgsi_instruction = FALSE; + emit->reemit_tgsi_instruction = false; ret = emit_instruction(emit, inst_number, inst); @@ -11216,7 +11216,7 @@ emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, VGPU10OpcodeToken0 *tokens = (VGPU10OpcodeToken0 *) emit->buf; emit->ptr = (char *) (tokens + start_token); - emit->reemit_tgsi_instruction = FALSE; + emit->reemit_tgsi_instruction = false; } return ret; } @@ -11352,7 +11352,7 @@ emit_vpos_instructions(struct svga_shader_emitter_v10 *emit) /* MOV pos, tmp_pos */ begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_MOV, FALSE); + emit_opcode(emit, VGPU10_OPCODE_MOV, false); emit_dst_register(emit, &pos_dst); emit_src_register(emit, &tmp_pos_src); end_emit_instruction(emit); @@ -11423,7 +11423,7 @@ static bool emit_vertex(struct svga_shader_emitter_v10 *emit, const struct tgsi_full_instruction *inst) { - unsigned ret = TRUE; + unsigned ret = true; assert(emit->unit == PIPE_SHADER_GEOMETRY); @@ -11477,15 +11477,15 @@ emit_vertex(struct svga_shader_emitter_v10 *emit, /** * If there is no output for this stream, discard this instruction. */ - emit->discard_instruction = TRUE; + emit->discard_instruction = true; } else { - emit_opcode(emit, VGPU10_OPCODE_EMIT_STREAM, FALSE); + emit_opcode(emit, VGPU10_OPCODE_EMIT_STREAM, false); emit_stream_register(emit, streamIndex); } } else { - emit_opcode(emit, VGPU10_OPCODE_EMIT, FALSE); + emit_opcode(emit, VGPU10_OPCODE_EMIT, false); } end_emit_instruction(emit); @@ -11515,7 +11515,7 @@ emit_frontface_instructions(struct svga_shader_emitter_v10 *emit) /* MOVC face_tmp, IS_FRONT_FACE.x, 1.0, -1.0 */ begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_MOVC, FALSE); + emit_opcode(emit, VGPU10_OPCODE_MOVC, false); emit_dst_register(emit, &tmp_dst); emit_face_register(emit); emit_src_register(emit, &one); @@ -11552,14 +11552,14 @@ emit_fragcoord_instructions(struct svga_shader_emitter_v10 *emit) /* MOV fragcoord_tmp.xyz, fragcoord.xyz */ begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_MOV, FALSE); + emit_opcode(emit, VGPU10_OPCODE_MOV, false); emit_dst_register(emit, &tmp_dst_xyz); emit_src_register(emit, &fragcoord); end_emit_instruction(emit); /* DIV fragcoord_tmp.w, 1.0, fragcoord.w */ begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_DIV, FALSE); + emit_opcode(emit, VGPU10_OPCODE_DIV, false); emit_dst_register(emit, &tmp_dst_w); emit_src_register(emit, &one); emit_src_register(emit, &fragcoord); @@ -11602,7 +11602,7 @@ emit_sample_position_instructions(struct svga_shader_emitter_v10 *emit) /* SAMPLE_POS dst, RASTERIZER, sampleIndex */ begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_SAMPLE_POS, FALSE); + emit_opcode(emit, VGPU10_OPCODE_SAMPLE_POS, false); emit_dst_register(emit, &tmp_dst); emit_rasterizer_register(emit); emit_src_register(emit, &sample_index_reg); @@ -11611,7 +11611,7 @@ emit_sample_position_instructions(struct svga_shader_emitter_v10 *emit) /* Convert from D3D coords to GL coords by adding 0.5 bias */ /* ADD dst, dst, half */ begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_ADD, FALSE); + emit_opcode(emit, VGPU10_OPCODE_ADD, false); emit_dst_register(emit, &tmp_dst); emit_src_register(emit, &tmp_src); emit_src_register(emit, &half); @@ -11879,8 +11879,8 @@ emit_vertex_id_nobase_instruction(struct svga_shader_emitter_v10 *emit) unsigned vertex_id_tmp_index = emit->vs.vertex_id_tmp_index; emit->vs.vertex_id_tmp_index = INVALID_INDEX; emit_instruction_opn(emit, VGPU10_OPCODE_IADD, &vertex_id_tmp_dst, - &vertex_id_sys_src_x, &vertex_id_bias_index, NULL, FALSE, - FALSE); + &vertex_id_sys_src_x, &vertex_id_bias_index, NULL, false, + false); emit->vs.vertex_id_tmp_index = vertex_id_tmp_index; } @@ -11909,7 +11909,7 @@ emit_tcs_default_control_point_output(struct svga_shader_emitter_v10 *emit) /* MOV OUTPUT 0.0f */ struct tgsi_full_src_register zero = make_immediate_reg_float(emit, 0.0f); begin_emit_instruction(emit); - emit_opcode_precise(emit, VGPU10_OPCODE_MOV, FALSE, FALSE); + emit_opcode_precise(emit, VGPU10_OPCODE_MOV, false, false); emit_dst_register(emit, &output_control_point); emit_src_register(emit, &zero); end_emit_instruction(emit); @@ -11930,7 +11930,7 @@ emit_tcs_default_control_point_output(struct svga_shader_emitter_v10 *emit) emit->tcs.invocation_id_sys_index); begin_emit_instruction(emit); - emit_opcode_precise(emit, VGPU10_OPCODE_MOV, FALSE, FALSE); + emit_opcode_precise(emit, VGPU10_OPCODE_MOV, false, false); emit_dst_register(emit, &addr_dst_x); emit_src_register(emit, &invocation_src); end_emit_instruction(emit); @@ -11948,7 +11948,7 @@ emit_tcs_default_control_point_output(struct svga_shader_emitter_v10 *emit) emit->tcs.control_point_addr_index; begin_emit_instruction(emit); - emit_opcode_precise(emit, VGPU10_OPCODE_MOV, FALSE, FALSE); + emit_opcode_precise(emit, VGPU10_OPCODE_MOV, false, false); emit_dst_register(emit, &output_control_point); emit_src_register(emit, &input_control_point); end_emit_instruction(emit); @@ -12046,7 +12046,7 @@ emit_initialize_temp_instruction(struct svga_shader_emitter_v10 *emit) src = make_immediate_reg_float(emit, 0.0f); dst = make_dst_temp_reg(vgpu10_temp_index); emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &dst, &src); - emit->temp_map[emit->initialize_temp_index].initialized = TRUE; + emit->temp_map[emit->initialize_temp_index].initialized = true; emit->initialize_temp_index = INVALID_INDEX; } @@ -12068,15 +12068,15 @@ emit_pre_helpers(struct svga_shader_emitter_v10 *emit) * do a second pass of the instructions for the patch constant phase. */ emit->tcs.instruction_token_pos = emit->cur_tgsi_token; - emit->tcs.fork_phase_add_signature = FALSE; + emit->tcs.fork_phase_add_signature = false; if (!emit_hull_shader_control_point_phase(emit)) { - emit->skip_instruction = TRUE; - return TRUE; + emit->skip_instruction = true; + return true; } /* Set the current tcs phase to control point phase */ - emit->tcs.control_point_phase = TRUE; + emit->tcs.control_point_phase = true; } else if (emit->unit == PIPE_SHADER_TESS_EVAL) { emit_domain_shader_declarations(emit); @@ -12087,11 +12087,11 @@ emit_pre_helpers(struct svga_shader_emitter_v10 *emit) /* Declare inputs */ if (!emit_input_declarations(emit)) - return FALSE; + return false; /* Declare outputs */ if (!emit_output_declarations(emit)) - return FALSE; + return false; /* Declare temporary registers */ emit_temporaries_declaration(emit); @@ -12182,7 +12182,7 @@ emit_pre_helpers(struct svga_shader_emitter_v10 *emit) if (emit->vposition.need_prescale && emit->vposition.num_prescale == 1) emit_temp_prescale_instructions(emit); - return TRUE; + return true; } @@ -12261,7 +12261,7 @@ emit_alpha_test_instructions(struct svga_shader_emitter_v10 *emit, /* DISCARD if dst.x == 0 */ begin_emit_instruction(emit); - emit_discard_opcode(emit, FALSE); /* discard if src0.x is zero */ + emit_discard_opcode(emit, false); /* discard if src0.x is zero */ emit_src_register(emit, &tmp_src_x); end_emit_instruction(emit); @@ -12368,7 +12368,7 @@ emit_post_helpers(struct svga_shader_emitter_v10 *emit) emit_vertex_instructions(emit); } - return TRUE; + return true; } @@ -12433,7 +12433,7 @@ emit_rawbuf_instruction(struct svga_shader_emitter_v10 *emit, /* LD_RAW tmp, rawbuf byte offset, rawbuf */ begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_LD_RAW, FALSE); + emit_opcode(emit, VGPU10_OPCODE_LD_RAW, false); emit_dst_register(emit, &dst_tmp); struct tgsi_full_src_register offset_x = @@ -12467,8 +12467,8 @@ emit_vgpu10_instructions(struct svga_shader_emitter_v10 *emit, const struct tgsi_token *tokens) { struct tgsi_parse_context parse; - bool ret = TRUE; - bool pre_helpers_emitted = FALSE; + bool ret = true; + bool pre_helpers_emitted = false; unsigned inst_number = 0; tgsi_parse_init(&parse, tokens); @@ -12498,7 +12498,7 @@ emit_vgpu10_instructions(struct svga_shader_emitter_v10 *emit, ret = emit_pre_helpers(emit); if (!ret) goto done; - pre_helpers_emitted = TRUE; + pre_helpers_emitted = true; } ret = emit_vgpu10_instruction(emit, inst_number++, &parse.FullToken.FullInstruction); @@ -12567,13 +12567,13 @@ emit_vgpu10_header(struct svga_shader_emitter_v10 *emit) ptoken.minorVersion = version % 10; ptoken.programType = translate_shader_type(emit->unit); if (!emit_dword(emit, ptoken.value)) - return FALSE; + return false; /* Second token: total length of shader, in tokens. We can't fill this * in until we're all done. Emit zero for now. */ if (!emit_dword(emit, 0)) - return FALSE; + return false; if (emit->version >= 50) { VGPU10OpcodeToken0 token; @@ -12595,7 +12595,7 @@ emit_vgpu10_header(struct svga_shader_emitter_v10 *emit) token.enableDoublePrecisionFloatOps = 1; /* set bit */ token.instructionLength = 1; if (!emit_dword(emit, token.value)) - return FALSE; + return false; } if (emit->version >= 40) { @@ -12611,10 +12611,10 @@ emit_vgpu10_header(struct svga_shader_emitter_v10 *emit) token.opcodeType = VGPU10_OPCODE_NOP; token.instructionLength = 1; if (!emit_dword(emit, token.value)) - return FALSE; + return false; } - return TRUE; + return true; } @@ -12646,7 +12646,7 @@ emit_vgpu10_tail(struct svga_shader_emitter_v10 *emit) ptoken->forceEarlyDepthStencil = 1; } - return TRUE; + return true; } @@ -12953,7 +12953,7 @@ svga_tgsi_vgpu10_translate(struct svga_context *svga, emit->index_range.start_index = INVALID_INDEX; emit->index_range.count = 0; - emit->index_range.required = FALSE; + emit->index_range.required = false; emit->index_range.operandType = VGPU10_NUM_OPERANDS; emit->index_range.dim = 0; emit->index_range.size = 0; diff --git a/src/gallium/drivers/svga/svgadump/svga_dump.c b/src/gallium/drivers/svga/svgadump/svga_dump.c index e93bb58de71..13fe18cc38b 100644 --- a/src/gallium/drivers/svga/svgadump/svga_dump.c +++ b/src/gallium/drivers/svga/svgadump/svga_dump.c @@ -2360,7 +2360,7 @@ svga_dump_command(uint32_t cmd_id, const void *data, uint32_t size) body = (const uint8_t *)&cmd[1]; svga_shader_dump((const uint32_t *)body, (unsigned)(next - body)/sizeof(uint32_t), - FALSE ); + false ); body = next; } break; diff --git a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c index 89e18735cf5..6a7b444029d 100644 --- a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c +++ b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c @@ -533,7 +533,7 @@ dump_inst(struct dump_info *di, const struct sh_opcode_info *info) { struct dump_op dop; - bool not_first_arg = FALSE; + bool not_first_arg = false; uint i; assert(info->num_dst <= 1); @@ -547,7 +547,7 @@ dump_inst(struct dump_info *di, parse_op(di, assem, &dop, info->num_dst, info->num_src); if (info->num_dst > 0) { dump_dstreg(dop.dst, &dop.dstind, di); - not_first_arg = TRUE; + not_first_arg = true; } for (i = 0; i < info->num_src; i++) { @@ -557,7 +557,7 @@ dump_inst(struct dump_info *di, _debug_printf(" "); } dump_srcreg(dop.src[i], &dop.srcind[i], di); - not_first_arg = TRUE; + not_first_arg = true; } _debug_printf("\n"); @@ -569,7 +569,7 @@ svga_shader_dump( unsigned dwords, unsigned do_binary ) { - bool finished = FALSE; + bool finished = false; struct dump_info di; di.version = *assem++; @@ -719,7 +719,7 @@ svga_shader_dump( break; case SVGA3DOP_END: - finished = TRUE; + finished = true; break; default: diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index 751561ca23f..f40009ad37b 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -180,7 +180,7 @@ static void virgl_attach_res_framebuffer(struct virgl_context *vctx) if (surf) { res = virgl_resource(surf->texture); if (res) { - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); virgl_resource_dirty(res, surf->u.tex.level); } } @@ -189,7 +189,7 @@ static void virgl_attach_res_framebuffer(struct virgl_context *vctx) if (surf) { res = virgl_resource(surf->texture); if (res) { - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); virgl_resource_dirty(res, surf->u.tex.level); } } @@ -206,7 +206,7 @@ static void virgl_attach_res_sampler_views(struct virgl_context *vctx, for (int i = 0; i < PIPE_MAX_SHADER_SAMPLER_VIEWS; ++i) { if (binding->views[i] && binding->views[i]->texture) { struct virgl_resource *res = virgl_resource(binding->views[i]->texture); - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); } } } @@ -220,7 +220,7 @@ static void virgl_attach_res_vertex_buffers(struct virgl_context *vctx) for (i = 0; i < vctx->num_vertex_buffers; i++) { res = virgl_resource(vctx->vertex_buffer[i].buffer.resource); if (res) - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); } } @@ -232,7 +232,7 @@ static void virgl_attach_res_index_buffer(struct virgl_context *vctx, res = virgl_resource(ib->buffer); if (res) - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); } static void virgl_attach_res_so_targets(struct virgl_context *vctx) @@ -244,7 +244,7 @@ static void virgl_attach_res_so_targets(struct virgl_context *vctx) for (i = 0; i < vctx->num_so_targets; i++) { res = virgl_resource(vctx->so_targets[i].base.buffer); if (res) - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); } } @@ -261,7 +261,7 @@ static void virgl_attach_res_uniform_buffers(struct virgl_context *vctx, int i = u_bit_scan(&remaining_mask); res = virgl_resource(binding->ubos[i].buffer); assert(res); - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); } } @@ -278,7 +278,7 @@ static void virgl_attach_res_shader_buffers(struct virgl_context *vctx, int i = u_bit_scan(&remaining_mask); res = virgl_resource(binding->ssbos[i].buffer); assert(res); - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); } } @@ -295,7 +295,7 @@ static void virgl_attach_res_shader_images(struct virgl_context *vctx, int i = u_bit_scan(&remaining_mask); res = virgl_resource(binding->images[i].resource); assert(res); - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); } } @@ -309,7 +309,7 @@ static void virgl_attach_res_atomic_buffers(struct virgl_context *vctx) int i = u_bit_scan(&remaining_mask); res = virgl_resource(vctx->atomic_buffers[i].buffer); assert(res); - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); } } @@ -563,7 +563,7 @@ static void virgl_bind_vertex_elements_state(struct pipe_context *ctx, vctx->vertex_elements = state; virgl_encode_bind_object(vctx, state ? state->handle : 0, VIRGL_OBJECT_VERTEX_ELEMENTS); - vctx->vertex_array_dirty = TRUE; + vctx->vertex_array_dirty = true; } static void virgl_set_vertex_buffers(struct pipe_context *ctx, @@ -590,7 +590,7 @@ static void virgl_set_vertex_buffers(struct pipe_context *ctx, } } - vctx->vertex_array_dirty = TRUE; + vctx->vertex_array_dirty = true; } static void virgl_hw_set_vertex_buffers(struct virgl_context *vctx) @@ -609,7 +609,7 @@ static void virgl_hw_set_vertex_buffers(struct virgl_context *vctx) virgl_attach_res_vertex_buffers(vctx); - vctx->vertex_array_dirty = FALSE; + vctx->vertex_array_dirty = false; } } diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c index 106a3e4a1b9..f0097c0d825 100644 --- a/src/gallium/drivers/virgl/virgl_encode.c +++ b/src/gallium/drivers/virgl/virgl_encode.c @@ -352,7 +352,7 @@ static void virgl_encoder_emit_resource(struct virgl_screen *vs, { struct virgl_winsys *vws = vs->vws; if (res && res->hw_res) - vws->emit_res(vws, buf, res->hw_res, TRUE); + vws->emit_res(vws, buf, res->hw_res, true); else { virgl_encoder_write_dword(buf, 0); } @@ -907,7 +907,7 @@ static void virgl_encoder_transfer3d_common(struct virgl_screen *vs, * because transfer->resource might have a different virgl_hw_res than what * this transfer targets, which is saved in xfer->hw_res. */ - vs->vws->emit_res(vs->vws, buf, xfer->hw_res, TRUE); + vs->vws->emit_res(vs->vws, buf, xfer->hw_res, true); virgl_encoder_write_dword(buf, transfer->level); virgl_encoder_write_dword(buf, transfer->usage); virgl_encoder_write_dword(buf, stride); @@ -1533,7 +1533,7 @@ void virgl_encode_copy_transfer(struct virgl_context *ctx, * from the image stride. */ virgl_encoder_transfer3d_common(vs, ctx->cbuf, trans, virgl_transfer3d_explicit_stride); - vs->vws->emit_res(vs->vws, ctx->cbuf, trans->copy_src_hw_res, TRUE); + vs->vws->emit_res(vs->vws, ctx->cbuf, trans->copy_src_hw_res, true); virgl_encoder_write_dword(ctx->cbuf, trans->copy_src_offset); virgl_encoder_write_dword(ctx->cbuf, direction_and_synchronized); } diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c index 0bd70d2be85..e5c6bbb8131 100644 --- a/src/gallium/drivers/virgl/virgl_screen.c +++ b/src/gallium/drivers/virgl/virgl_screen.c @@ -821,7 +821,7 @@ virgl_is_format_supported( struct pipe_screen *screen, if (bind & PIPE_BIND_RENDER_TARGET) { /* For ARB_framebuffer_no_attachments. */ if (format == PIPE_FORMAT_NONE) - return TRUE; + return true; if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) return false; diff --git a/src/gallium/drivers/virgl/virgl_streamout.c b/src/gallium/drivers/virgl/virgl_streamout.c index c253d561ec1..cd414c63521 100644 --- a/src/gallium/drivers/virgl/virgl_streamout.c +++ b/src/gallium/drivers/virgl/virgl_streamout.c @@ -83,7 +83,7 @@ static void virgl_set_so_targets(struct pipe_context *ctx, pipe_resource_reference(&vctx->so_targets[i].base.buffer, targets[i]->buffer); - vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE); + vws->emit_res(vws, vctx->cbuf, res->hw_res, false); } else { pipe_resource_reference(&vctx->so_targets[i].base.buffer, NULL); } diff --git a/src/gallium/frontends/d3d10umd/D3DKMT.cpp b/src/gallium/frontends/d3d10umd/D3DKMT.cpp index c9a57892187..15d68909c58 100644 --- a/src/gallium/frontends/d3d10umd/D3DKMT.cpp +++ b/src/gallium/frontends/d3d10umd/D3DKMT.cpp @@ -308,7 +308,7 @@ D3DKMTQueryAdapterInfo(CONST D3DKMT_QUERYADAPTERINFO *pData) case KMTQAITYPE_CHECKDRIVERUPDATESTATUS: { BOOL *pResult = (BOOL *)pData->pPrivateDriverData; - *pResult = FALSE; + *pResult = false; return STATUS_SUCCESS; } case KMTQAITYPE_DRIVERVERSION: @@ -320,7 +320,7 @@ D3DKMTQueryAdapterInfo(CONST D3DKMT_QUERYADAPTERINFO *pData) case KMTQAITYPE_XBOX: { BOOL *pResult = (BOOL *)pData->pPrivateDriverData; - *pResult = FALSE; + *pResult = false; return STATUS_SUCCESS; } case KMTQAITYPE_PHYSICALADAPTERCOUNT: @@ -628,7 +628,7 @@ EXTERN_C BOOLEAN APIENTRY D3DKMTCheckExclusiveOwnership(VOID) { LOG_UNSUPPORTED_ENTRYPOINT(); - return FALSE; + return false; } diff --git a/src/gallium/frontends/d3d10umd/Device.cpp b/src/gallium/frontends/d3d10umd/Device.cpp index da21005fa44..96267f8e5d6 100644 --- a/src/gallium/frontends/d3d10umd/Device.cpp +++ b/src/gallium/frontends/d3d10umd/Device.cpp @@ -455,7 +455,7 @@ CheckFormatSupport(D3D10DDI_HDEVICE hDevice, // IN *pFormatCaps = 0; - enum pipe_format format = FormatTranslate(Format, FALSE); + enum pipe_format format = FormatTranslate(Format, false); if (format == PIPE_FORMAT_NONE) { *pFormatCaps = D3D10_DDI_FORMAT_SUPPORT_NOT_SUPPORTED; return; diff --git a/src/gallium/frontends/d3d10umd/Draw.cpp b/src/gallium/frontends/d3d10umd/Draw.cpp index 5bfda0fc30e..012bb522ec7 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; - bool 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) { @@ -74,14 +74,14 @@ ResolveState(Device *pDevice) ShaderFindOutputMapping(vs, gs->state.stream_output.output[i].register_index); if (mapping != gs->state.stream_output.output[i].register_index) { gs->state.stream_output.output[i].register_index = mapping; - remapped = TRUE; + remapped = true; } } if (remapped) { pipe->delete_gs_state(pipe, gs->handle); gs->handle = pipe->create_gs_state(pipe, &gs->state); } - gs->output_resolved = TRUE; + gs->output_resolved = true; } pipe->bind_gs_state(pipe, gs->handle); } @@ -186,7 +186,7 @@ DrawIndexed(D3D10DDI_HDEVICE hDevice, // IN draw.count = IndexCount; info.index.resource = null_ib ? null_ib : pDevice->index_buffer; draw.index_bias = BaseVertexLocation; - info.primitive_restart = TRUE; + info.primitive_restart = true; info.restart_index = restart_index; pDevice->pipe->draw_vbo(pDevice->pipe, &info, 0, NULL, &draw, 1); @@ -289,7 +289,7 @@ DrawIndexedInstanced(D3D10DDI_HDEVICE hDevice, // IN draw.index_bias = BaseVertexLocation; info.start_instance = StartInstanceLocation; info.instance_count = InstanceCount; - info.primitive_restart = TRUE; + info.primitive_restart = true; info.restart_index = restart_index; pDevice->pipe->draw_vbo(pDevice->pipe, &info, 0, NULL, &draw, 1); diff --git a/src/gallium/frontends/d3d10umd/DxgiFns.cpp b/src/gallium/frontends/d3d10umd/DxgiFns.cpp index cd844a2b0fa..918d055733c 100644 --- a/src/gallium/frontends/d3d10umd/DxgiFns.cpp +++ b/src/gallium/frontends/d3d10umd/DxgiFns.cpp @@ -200,7 +200,7 @@ _GetGammaCaps( DXGI_DDI_ARG_GET_GAMMA_CONTROL_CAPS *GetCaps ) pCaps = GetCaps->pGammaCapabilities; - pCaps->ScaleAndOffsetSupported = FALSE; + pCaps->ScaleAndOffsetSupported = false; pCaps->MinConvertedValue = 0.0; pCaps->MaxConvertedValue = 1.0; pCaps->NumGammaControlPoints = 17; diff --git a/src/gallium/frontends/d3d10umd/InputAssembly.cpp b/src/gallium/frontends/d3d10umd/InputAssembly.cpp index 4ce9e03a8d5..1b6ff69d3e2 100644 --- a/src/gallium/frontends/d3d10umd/InputAssembly.cpp +++ b/src/gallium/frontends/d3d10umd/InputAssembly.cpp @@ -149,7 +149,7 @@ IaSetVertexBuffers(D3D10DDI_HDEVICE hDevice, vb->buffer_offset = pOffsets[i]; if (vb->is_user_buffer) { vb->buffer.resource = NULL; - vb->is_user_buffer = FALSE; + vb->is_user_buffer = false; } pipe_resource_reference(&vb->buffer.resource, resource); } @@ -158,7 +158,7 @@ IaSetVertexBuffers(D3D10DDI_HDEVICE hDevice, vb->buffer_offset = 0; if (!vb->is_user_buffer) { pipe_resource_reference(&vb->buffer.resource, NULL); - vb->is_user_buffer = TRUE; + vb->is_user_buffer = true; } vb->buffer.user = dummy; } @@ -171,14 +171,14 @@ IaSetVertexBuffers(D3D10DDI_HDEVICE hDevice, if (!vb->is_user_buffer && !vb->buffer.resource) { vb->stride = 0; vb->buffer_offset = 0; - vb->is_user_buffer = TRUE; + vb->is_user_buffer = true; vb->buffer.user = dummy; } } /* Resubmit old and new vertex buffers. */ - pipe->set_vertex_buffers(pipe, 0, PIPE_MAX_ATTRIBS, 0, FALSE, pDevice->vertex_buffers); + pipe->set_vertex_buffers(pipe, 0, PIPE_MAX_ATTRIBS, 0, false, pDevice->vertex_buffers); } @@ -285,7 +285,7 @@ CreateElementLayout( ve->src_offset = pVertexElement->AlignedByteOffset; ve->vertex_buffer_index = pVertexElement->InputSlot; - ve->src_format = FormatTranslate(pVertexElement->Format, FALSE); + ve->src_format = FormatTranslate(pVertexElement->Format, false); switch (pVertexElement->InputSlotClass) { case D3D10_DDI_INPUT_PER_VERTEX_DATA: diff --git a/src/gallium/frontends/d3d10umd/OutputMerger.cpp b/src/gallium/frontends/d3d10umd/OutputMerger.cpp index f90ca542275..c5748b7e2d5 100644 --- a/src/gallium/frontends/d3d10umd/OutputMerger.cpp +++ b/src/gallium/frontends/d3d10umd/OutputMerger.cpp @@ -90,7 +90,7 @@ CreateRenderTargetView( struct pipe_surface desc; memset(&desc, 0, sizeof desc); - desc.format = FormatTranslate(pCreateRenderTargetView->Format, FALSE); + desc.format = FormatTranslate(pCreateRenderTargetView->Format, false); switch (pCreateRenderTargetView->ResourceDimension) { case D3D10DDIRESOURCE_BUFFER: @@ -238,7 +238,7 @@ ClearRenderTargetView(D3D10DDI_HDEVICE hDevice, // IN 0, 0, surface->width, surface->height, - TRUE); + true); } @@ -290,7 +290,7 @@ CreateDepthStencilView( struct pipe_surface desc; memset(&desc, 0, sizeof desc); - desc.format = FormatTranslate(pCreateDepthStencilView->Format, TRUE); + desc.format = FormatTranslate(pCreateDepthStencilView->Format, true); switch (pCreateDepthStencilView->ResourceDimension) { case D3D10DDIRESOURCE_TEXTURE1D: @@ -387,7 +387,7 @@ ClearDepthStencilView(D3D10DDI_HDEVICE hDevice, // IN 0, 0, surface->width, surface->height, - TRUE); + true); } @@ -480,11 +480,11 @@ translateBlend(Device *pDevice, switch (blend) { case D3D10_DDI_BLEND_SRC1_COLOR: case D3D10_DDI_BLEND_SRC1_ALPHA: - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); return D3D10_DDI_BLEND_ZERO; case D3D10_DDI_BLEND_INV_SRC1_COLOR: case D3D10_DDI_BLEND_INV_SRC1_ALPHA: - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); return D3D10_DDI_BLEND_ONE; default: break; diff --git a/src/gallium/frontends/d3d10umd/Query.cpp b/src/gallium/frontends/d3d10umd/Query.cpp index a4aea7e0b3c..8e76023c574 100644 --- a/src/gallium/frontends/d3d10umd/Query.cpp +++ b/src/gallium/frontends/d3d10umd/Query.cpp @@ -79,7 +79,7 @@ TranslateQueryType(D3D10DDI_QUERY query) case D3D10DDI_QUERY_STREAMOVERFLOWPREDICATE: return PIPE_QUERY_SO_OVERFLOW_PREDICATE; default: - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); return PIPE_QUERY_TYPES; } } @@ -254,8 +254,8 @@ QueryGetData(D3D10DDI_HDEVICE hDevice, // IN if (state) { ret = pipe->get_query_result(pipe, state, wait, &result); } else { - LOG_UNSUPPORTED(TRUE); - ret = TRUE; + LOG_UNSUPPORTED(true); + ret = true; } if (!ret) { @@ -373,7 +373,7 @@ CheckPredicate(Device *pDevice) { Query *pQuery = pDevice->pPredicate; if (!pQuery) { - return TRUE; + return true; } assert(pQuery->Type == D3D10DDI_QUERY_OCCLUSIONPREDICATE || @@ -387,17 +387,17 @@ CheckPredicate(Device *pDevice) memset(&result, 0, sizeof result); bool ret; - ret = pipe->get_query_result(pipe, query, TRUE, &result); - assert(ret == TRUE); + ret = pipe->get_query_result(pipe, query, true, &result); + assert(ret == true); if (!ret) { - return TRUE; + return true; } if (!!result.b == !!pDevice->PredicateValue) { - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/src/gallium/frontends/d3d10umd/Resource.cpp b/src/gallium/frontends/d3d10umd/Resource.cpp index 3fa9fbc32ea..90d06226991 100644 --- a/src/gallium/frontends/d3d10umd/Resource.cpp +++ b/src/gallium/frontends/d3d10umd/Resource.cpp @@ -609,14 +609,14 @@ areResourcesCompatible(const struct pipe_resource *src_resource, // IN * Trivial. */ - return TRUE; + return true; } else if (src_resource->target == PIPE_BUFFER && dst_resource->target == PIPE_BUFFER) { /* * Buffer resources are merely a collection of bytes. */ - return TRUE; + return true; } else { /* * Check whether the formats are supported by @@ -821,7 +821,7 @@ ResourceIsStagingBusy(D3D10DDI_HDEVICE hDevice, // IN /* ignore */ - return FALSE; + return false; } diff --git a/src/gallium/frontends/d3d10umd/Shader.cpp b/src/gallium/frontends/d3d10umd/Shader.cpp index 8e0c6d42308..5e3d9338602 100644 --- a/src/gallium/frontends/d3d10umd/Shader.cpp +++ b/src/gallium/frontends/d3d10umd/Shader.cpp @@ -174,7 +174,7 @@ SetConstantBuffers(enum pipe_shader_type shader_type, // IN pipe->set_constant_buffer(pipe, shader_type, StartBuffer + i, - FALSE, + false, &cb); } } @@ -240,7 +240,7 @@ SetShaderResources(enum pipe_shader_type shader_type, // IN sampler_views[Offset + i] = sampler_view; } else { if (sampler_view) { - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); break; } } @@ -545,7 +545,7 @@ CreateVertexShader(D3D10DDI_HDEVICE hDevice, // Shader *pShader = CastShader(hShader); pShader->type = PIPE_SHADER_VERTEX; - pShader->output_resolved = TRUE; + pShader->output_resolved = true; memset(&pShader->state, 0, sizeof pShader->state); pShader->state.tokens = Shader_tgsi_translate(pCode, pShader->output_mapping); @@ -681,7 +681,7 @@ CreateGeometryShader(D3D10DDI_HDEVICE hDevice, // Shader *pShader = CastShader(hShader); pShader->type = PIPE_SHADER_GEOMETRY; - pShader->output_resolved = TRUE; + pShader->output_resolved = true; memset(&pShader->state, 0, sizeof pShader->state); pShader->state.tokens = Shader_tgsi_translate(pShaderCode, pShader->output_mapping); @@ -842,7 +842,7 @@ CreateGeometryShaderWithStreamOutput( Shader *pShader = CastShader(hShader); int total_components[PIPE_MAX_SO_BUFFERS] = {0}; unsigned num_holes = 0; - bool all_slot_zero = TRUE; + bool all_slot_zero = true; pShader->type = PIPE_SHADER_GEOMETRY; @@ -889,7 +889,7 @@ CreateGeometryShaderWithStreamOutput( pShader->state.stream_output.output[idx].dst_offset = total_components[pOutputStreamDecl->OutputSlot]; if (pOutputStreamDecl->OutputSlot != 0) - all_slot_zero = FALSE; + all_slot_zero = false; } total_components[pOutputStreamDecl->OutputSlot] += num_components; } @@ -997,7 +997,7 @@ CreatePixelShader(D3D10DDI_HDEVICE hDevice, // IN Shader *pShader = CastShader(hShader); pShader->type = PIPE_SHADER_FRAGMENT; - pShader->output_resolved = TRUE; + pShader->output_resolved = true; memset(&pShader->state, 0, sizeof pShader->state); pShader->state.tokens = Shader_tgsi_translate(pShaderCode, @@ -1203,7 +1203,7 @@ CreateShaderResourceView( struct pipe_sampler_view desc; memset(&desc, 0, sizeof desc); resource = CastPipeResource(pCreateSRView->hDrvResource); - format = FormatTranslate(pCreateSRView->Format, FALSE); + format = FormatTranslate(pCreateSRView->Format, false); u_sampler_view_default_template(&desc, resource, @@ -1283,7 +1283,7 @@ CreateShaderResourceView1( struct pipe_sampler_view desc; memset(&desc, 0, sizeof desc); resource = CastPipeResource(pCreateSRView->hDrvResource); - format = FormatTranslate(pCreateSRView->Format, FALSE); + format = FormatTranslate(pCreateSRView->Format, false); u_sampler_view_default_template(&desc, resource, diff --git a/src/gallium/frontends/d3d10umd/ShaderParse.c b/src/gallium/frontends/d3d10umd/ShaderParse.c index 0c43af5013d..5f6f56666ec 100644 --- a/src/gallium/frontends/d3d10umd/ShaderParse.c +++ b/src/gallium/frontends/d3d10umd/ShaderParse.c @@ -292,7 +292,7 @@ Shader_parse_opcode(struct Shader_parser *parser, unsigned i; if (curr >= parser->code + parser->header.size) { - return FALSE; + return false; } memset(opcode, 0, sizeof *opcode); @@ -318,7 +318,7 @@ Shader_parse_opcode(struct Shader_parser *parser, curr += opcode->customdata.u.constbuf.count; parser->curr = curr; - return TRUE; + return true; } opcode->dcl_siv_name = D3D10_SB_NAME_UNDEFINED; @@ -414,7 +414,7 @@ Shader_parse_opcode(struct Shader_parser *parser, * Should be okay to continue execution -- we have enough info * to skip to the next instruction. */ - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); opcode->num_dst = 0; opcode->num_src = 0; goto skip; @@ -596,7 +596,7 @@ skip: /* Advance to the next opcode. */ parser->curr += length; - return TRUE; + return true; } void diff --git a/src/gallium/frontends/d3d10umd/ShaderTGSI.c b/src/gallium/frontends/d3d10umd/ShaderTGSI.c index 1f3d9e13d71..25d7d458af7 100644 --- a/src/gallium/frontends/d3d10umd/ShaderTGSI.c +++ b/src/gallium/frontends/d3d10umd/ShaderTGSI.c @@ -260,12 +260,12 @@ translate_interpolation(D3D10_SB_INTERPOLATION_MODE interpolation) case D3D10_SB_INTERPOLATION_LINEAR_CENTROID: case D3D10_SB_INTERPOLATION_LINEAR_SAMPLE: // DX10.1 - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); return TGSI_INTERPOLATE_PERSPECTIVE; case D3D10_SB_INTERPOLATION_LINEAR_NOPERSPECTIVE_CENTROID: case D3D10_SB_INTERPOLATION_LINEAR_NOPERSPECTIVE_SAMPLE: // DX10.1 - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); return TGSI_INTERPOLATE_LINEAR; } @@ -298,7 +298,7 @@ translate_system_name(D3D10_SB_NAME name) case D3D10_SB_NAME_IS_FRONT_FACE: return TGSI_SEMANTIC_FACE; case D3D10_SB_NAME_SAMPLE_INDEX: - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); return TGSI_SEMANTIC_GENERIC; } @@ -351,7 +351,7 @@ trans_dcl_ret_type(D3D10_SB_RESOURCE_RETURN_TYPE d3drettype) { return TGSI_RETURN_TYPE_FLOAT; case D3D10_SB_RETURN_TYPE_MIXED: default: - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); return TGSI_RETURN_TYPE_FLOAT; } } @@ -466,7 +466,7 @@ dcl_base_input(struct Shader_xlate *sx, ureg_MOV(ureg, ureg_writemask(temp, writemask), swizzle_reg(dcl_reg, writemask, siv_name)); sx->inputs[index].reg = ureg_src(temp); - sx->inputs[index].overloaded = TRUE; + sx->inputs[index].overloaded = true; sx->inputs[index].writemask |= writemask; } else if (sx->inputs[index].overloaded) { struct ureg_dst temp = ureg_dst(sx->inputs[index].reg); @@ -477,7 +477,7 @@ dcl_base_input(struct Shader_xlate *sx, assert(!sx->inputs[index].declared); sx->inputs[index].reg = dcl_reg; - sx->inputs[index].declared = TRUE; + sx->inputs[index].declared = true; sx->inputs[index].writemask = writemask; sx->inputs[index].siv_name = siv_name; } @@ -690,7 +690,7 @@ translate_relative_operand(struct Shader_xlate *sx, case D3D10_SB_OPERAND_TYPE_NULL: case D3D10_SB_OPERAND_TYPE_RASTERIZER: case D3D10_SB_OPERAND_TYPE_OUTPUT_COVERAGE_MASK: - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); reg = ureg_src(ureg_DECL_temporary(sx->ureg)); break; @@ -770,7 +770,7 @@ translate_operand(struct Shader_xlate *sx, case D3D10_SB_OPERAND_TYPE_OUTPUT_COVERAGE_MASK: /* XXX: Translate more operands types. */ - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); reg = ureg_DECL_temporary(sx->ureg); } @@ -806,7 +806,7 @@ translate_indexable_temp(struct Shader_xlate *sx, default: /* XXX: Other index representations. */ - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); reg = ureg_src(ureg_DECL_temporary(sx->ureg)); } return reg; @@ -882,7 +882,7 @@ translate_src_operand(struct Shader_xlate *sx, default: /* XXX: Other index representations. */ - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); } } else { @@ -908,7 +908,7 @@ translate_src_operand(struct Shader_xlate *sx, default: /* XXX: Other index representations. */ - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); } switch (operand->base.index[0].index_rep) { @@ -930,7 +930,7 @@ translate_src_operand(struct Shader_xlate *sx, default: /* XXX: Other index representations. */ - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); } } break; @@ -1012,7 +1012,7 @@ translate_src_operand(struct Shader_xlate *sx, default: /* XXX: Other index representations. */ - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); } break; @@ -1036,7 +1036,7 @@ translate_src_operand(struct Shader_xlate *sx, default: /* XXX: Other index representations. */ - LOG_UNSUPPORTED(TRUE); + LOG_UNSUPPORTED(true); } break; @@ -1247,8 +1247,8 @@ Shader_tgsi_translate(const unsigned *code, struct Shader_opcode opcode; const struct tgsi_token *tokens = NULL; uint nr_tokens; - bool shader_dumped = FALSE; - bool inside_sub = FALSE; + bool shader_dumped = false; + bool inside_sub = false; uint i, j; memset(&sx, 0, sizeof sx); @@ -1257,7 +1257,7 @@ Shader_tgsi_translate(const unsigned *code, if (st_debug & ST_DEBUG_TGSI) { dx10_shader_dump_tokens(code); - shader_dumped = TRUE; + shader_dumped = true; } sx.max_calls = 64; @@ -2197,7 +2197,7 @@ Shader_tgsi_translate(const unsigned *code, } tgsi_inst_no = ureg_get_instruction_number(ureg); ureg_BGNSUB(ureg); - inside_sub = TRUE; + inside_sub = true; Shader_add_label(&sx, label, tgsi_inst_no); } break; @@ -2233,7 +2233,7 @@ Shader_tgsi_translate(const unsigned *code, if (ox->tgsi_opcode == TGSI_LOG_UNSUPPORTED) { if (!shader_dumped) { dx10_shader_dump_tokens(code); - shader_dumped = TRUE; + shader_dumped = true; } debug_printf("%s: unsupported opcode %i\n", __func__, ox->type); diff --git a/src/gallium/frontends/glx/xlib/xm_api.c b/src/gallium/frontends/glx/xlib/xm_api.c index c2a61d68c82..23e34e51251 100644 --- a/src/gallium/frontends/glx/xlib/xm_api.c +++ b/src/gallium/frontends/glx/xlib/xm_api.c @@ -1534,7 +1534,7 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer, pipe_texture_unmap(pipe, tex_xfer); st_context_teximage(st, GL_TEXTURE_2D, 0 /* level */, internal_format, - res, FALSE /* no mipmap */); + res, false /* no mipmap */); } } diff --git a/src/gallium/frontends/glx/xlib/xm_st.c b/src/gallium/frontends/glx/xlib/xm_st.c index 4428b46cb6a..ca0687bc233 100644 --- a/src/gallium/frontends/glx/xlib/xm_st.c +++ b/src/gallium/frontends/glx/xlib/xm_st.c @@ -182,7 +182,7 @@ xmesa_st_framebuffer_validate_textures(struct pipe_frontend_drawable *drawable, xstfb->textures[i] = xstfb->screen->resource_create(xstfb->screen, &templ); if (!xstfb->textures[i]) - return FALSE; + return false; } } diff --git a/src/gallium/frontends/hgl/hgl.c b/src/gallium/frontends/hgl/hgl.c index a8e57d6e770..b70a2b14a62 100644 --- a/src/gallium/frontends/hgl/hgl.c +++ b/src/gallium/frontends/hgl/hgl.c @@ -135,7 +135,7 @@ hgl_st_framebuffer_validate_textures(struct pipe_frontend_drawable *drawable, buffer->textures[i] = buffer->screen->resource_create(buffer->screen, &templat); if (!buffer->textures[i]) - return FALSE; + return false; } } } diff --git a/src/gallium/frontends/nine/adapter9.c b/src/gallium/frontends/nine/adapter9.c index 7d4ebfd64d4..87d162b0514 100644 --- a/src/gallium/frontends/nine/adapter9.c +++ b/src/gallium/frontends/nine/adapter9.c @@ -177,7 +177,7 @@ backbuffer_format( D3DFORMAT dfmt, D3DFORMAT bfmt, bool win ) { - if (dfmt == D3DFMT_A2R10G10B10 && win) { return FALSE; } + if (dfmt == D3DFMT_A2R10G10B10 && win) { return false; } if ((dfmt == D3DFMT_A2R10G10B10 && bfmt == dfmt) || (dfmt == D3DFMT_X8R8G8B8 && (bfmt == dfmt || @@ -185,10 +185,10 @@ backbuffer_format( D3DFORMAT dfmt, (dfmt == D3DFMT_X1R5G5B5 && (bfmt == dfmt || bfmt == D3DFMT_A1R5G5B5)) || (dfmt == D3DFMT_R5G6B5 && bfmt == dfmt)) { - return TRUE; + return true; } - return FALSE; + return false; } HRESULT NINE_WINAPI @@ -221,10 +221,10 @@ NineAdapter9_CheckDeviceType( struct NineAdapter9 *This, * the format passes with NINE_BIND_BACKBUFFER_FLAGS */ dfmt = d3d9_to_pipe_format_checked(screen, AdapterFormat, PIPE_TEXTURE_2D, 1, - NINE_BIND_BACKBUFFER_FLAGS, FALSE, FALSE); + NINE_BIND_BACKBUFFER_FLAGS, false, false); bfmt = d3d9_to_pipe_format_checked(screen, BackBufferFormat, PIPE_TEXTURE_2D, 1, - NINE_BIND_BACKBUFFER_FLAGS, FALSE, FALSE); + NINE_BIND_BACKBUFFER_FLAGS, false, false); if (dfmt == PIPE_FORMAT_NONE || bfmt == PIPE_FORMAT_NONE) { DBG("Unsupported Adapter/BackBufferFormat.\n"); return D3DERR_NOTAVAILABLE; @@ -246,12 +246,12 @@ display_format( D3DFORMAT fmt, }; unsigned i; - if (fmt == D3DFMT_A2R10G10B10 && win) { return FALSE; } + if (fmt == D3DFMT_A2R10G10B10 && win) { return false; } for (i = 0; i < sizeof(allowed)/sizeof(D3DFORMAT); i++) { - if (fmt == allowed[i]) { return TRUE; } + if (fmt == allowed[i]) { return true; } } - return FALSE; + return false; } static inline bool @@ -269,9 +269,9 @@ adapter_format( D3DFORMAT fmt ) unsigned i; for (i = 0; i < sizeof(allowed)/sizeof(D3DFORMAT); i++) { - if (fmt == allowed[i]) { return TRUE; } + if (fmt == allowed[i]) { return true; } } - return FALSE; + return false; } HRESULT NINE_WINAPI @@ -298,14 +298,14 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This, /* Wine tests, but suspicious. Needs more tests. */ user_assert(adapter_format(AdapterFormat), D3DERR_INVALIDCALL); - user_assert(display_format(AdapterFormat, FALSE), D3DERR_NOTAVAILABLE); + user_assert(display_format(AdapterFormat, false), D3DERR_NOTAVAILABLE); hr = NineAdapter9_GetScreen(This, DeviceType, &screen); if (FAILED(hr)) return hr; pf = d3d9_to_pipe_format_checked(screen, AdapterFormat, PIPE_TEXTURE_2D, 0, PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_SHARED, FALSE, FALSE); + PIPE_BIND_SHARED, false, false); if (pf == PIPE_FORMAT_NONE) { DBG("AdapterFormat %s not available.\n", d3dformat_to_string(AdapterFormat)); @@ -393,7 +393,7 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This, srgb = (Usage & (D3DUSAGE_QUERY_SRGBREAD | D3DUSAGE_QUERY_SRGBWRITE)) != 0; pf = d3d9_to_pipe_format_checked(screen, CheckFormat, target, - 0, bind, srgb, FALSE); + 0, bind, srgb, false); if (pf == PIPE_FORMAT_NONE) { DBG("NOT AVAILABLE\n"); return D3DERR_NOTAVAILABLE; @@ -445,7 +445,7 @@ NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This, bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; pf = d3d9_to_pipe_format_checked(screen, SurfaceFormat, PIPE_TEXTURE_2D, - 0, PIPE_BIND_SAMPLER_VIEW, FALSE, FALSE); + 0, PIPE_BIND_SAMPLER_VIEW, false, false); if (pf == PIPE_FORMAT_NONE && SurfaceFormat != D3DFMT_NULL) { DBG("%s not available.\n", d3dformat_to_string(SurfaceFormat)); @@ -453,7 +453,7 @@ NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This, } pf = d3d9_to_pipe_format_checked(screen, SurfaceFormat, PIPE_TEXTURE_2D, - MultiSampleType, bind, FALSE, FALSE); + MultiSampleType, bind, false, false); if (pf == PIPE_FORMAT_NONE && SurfaceFormat != D3DFMT_NULL) { DBG("%s with %u samples not available.\n", @@ -500,16 +500,16 @@ NineAdapter9_CheckDepthStencilMatch( struct NineAdapter9 *This, if (FAILED(hr)) { return hr; } dfmt = d3d9_to_pipe_format_checked(screen, AdapterFormat, PIPE_TEXTURE_2D, 0, - NINE_BIND_BACKBUFFER_FLAGS, FALSE, FALSE); + NINE_BIND_BACKBUFFER_FLAGS, false, false); bfmt = d3d9_to_pipe_format_checked(screen, RenderTargetFormat, PIPE_TEXTURE_2D, 0, - NINE_BIND_BACKBUFFER_FLAGS, FALSE, FALSE); + NINE_BIND_BACKBUFFER_FLAGS, false, false); if (RenderTargetFormat == D3DFMT_NULL) bfmt = dfmt; zsfmt = d3d9_to_pipe_format_checked(screen, DepthStencilFormat, PIPE_TEXTURE_2D, 0, d3d9_get_pipe_depth_format_bindings(DepthStencilFormat), - FALSE, FALSE); + false, false); if (dfmt == PIPE_FORMAT_NONE || bfmt == PIPE_FORMAT_NONE || zsfmt == PIPE_FORMAT_NONE) { @@ -536,16 +536,16 @@ NineAdapter9_CheckDeviceFormatConversion( struct NineAdapter9 *This, nine_D3DDEVTYPE_to_str(DeviceType), d3dformat_to_string(SourceFormat), d3dformat_to_string(TargetFormat)); - user_assert(backbuffer_format(TargetFormat, SourceFormat, FALSE), + user_assert(backbuffer_format(TargetFormat, SourceFormat, false), D3DERR_NOTAVAILABLE); hr = NineAdapter9_GetScreen(This, DeviceType, &screen); if (FAILED(hr)) { return hr; } dfmt = d3d9_to_pipe_format_checked(screen, TargetFormat, PIPE_TEXTURE_2D, 1, - NINE_BIND_BACKBUFFER_FLAGS, FALSE, FALSE); + NINE_BIND_BACKBUFFER_FLAGS, false, false); bfmt = d3d9_to_pipe_format_checked(screen, SourceFormat, PIPE_TEXTURE_2D, 1, - NINE_BIND_BACKBUFFER_FLAGS, FALSE, FALSE); + NINE_BIND_BACKBUFFER_FLAGS, false, false); if (dfmt == PIPE_FORMAT_NONE || bfmt == PIPE_FORMAT_NONE) { DBG("%s to %s not supported.\n", @@ -1004,7 +1004,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This, pCaps->MaxVShaderInstructionsExecuted = MAX2(65535, pCaps->MaxVertexShader30InstructionSlots * 32); pCaps->MaxPShaderInstructionsExecuted = MAX2(65535, pCaps->MaxPixelShader30InstructionSlots * 32); - if (debug_get_bool_option("NINE_DUMP_CAPS", FALSE)) + if (debug_get_bool_option("NINE_DUMP_CAPS", false)) nine_dump_D3DCAPS9(DBG_CHANNEL, pCaps); return D3D_OK; @@ -1058,7 +1058,7 @@ NineAdapter9_CreateDevice( struct NineAdapter9 *This, params.BehaviorFlags = BehaviorFlags; hr = NineDevice9_new(screen, ¶ms, &caps, pPresentationParameters, - pD3D9, pPresentationGroup, This->ctx, FALSE, NULL, + pD3D9, pPresentationGroup, This->ctx, false, NULL, (struct NineDevice9 **)ppReturnedDeviceInterface, minor); if (FAILED(hr)) { @@ -1157,5 +1157,5 @@ HRESULT NineAdapter9_new( struct d3dadapter9_context *pCTX, struct NineAdapter9 **ppOut ) { - NINE_NEW(Adapter9, ppOut, FALSE, /* args */ pCTX); + NINE_NEW(Adapter9, ppOut, false, /* args */ pCTX); } diff --git a/src/gallium/frontends/nine/basetexture9.c b/src/gallium/frontends/nine/basetexture9.c index f6109f91082..c9850405f5f 100644 --- a/src/gallium/frontends/nine/basetexture9.c +++ b/src/gallium/frontends/nine/basetexture9.c @@ -74,7 +74,7 @@ NineBaseTexture9_ctor( struct NineBaseTexture9 *This, /* Mark the texture as dirty to trigger first upload when we need the texture, * even if it wasn't set by the application */ if (Pool == D3DPOOL_MANAGED) - This->managed.dirty = TRUE; + This->managed.dirty = true; /* When a depth buffer is sampled, it is for shadow mapping, except for * D3DFMT_INTZ, D3DFMT_DF16 and D3DFMT_DF24. * In addition D3DFMT_INTZ can be used for both texturing and depth buffering @@ -156,7 +156,7 @@ NineBaseTexture9_SetAutoGenFilterType( struct NineBaseTexture9 *This, user_assert(FilterType != D3DTEXF_NONE, D3DERR_INVALIDCALL); This->mipfilter = FilterType; - This->dirty_mip = TRUE; + This->dirty_mip = true; NineBaseTexture9_GenerateMipSubLevels(This); return D3D_OK; @@ -204,7 +204,7 @@ NineBaseTexture9_UploadSelf( struct NineBaseTexture9 *This ) res = This->base.resource; if (This->managed.lod_resident == -1) {/* no levels were resident */ - This->managed.dirty = FALSE; /* We are going to upload everything. */ + This->managed.dirty = false; /* We are going to upload everything. */ This->managed.lod_resident = This->level_count; } @@ -309,7 +309,7 @@ NineBaseTexture9_UploadSelf( struct NineBaseTexture9 *This ) } else { assert(!"invalid texture type"); } - This->managed.dirty = FALSE; + This->managed.dirty = false; } /* Upload the new levels */ @@ -359,7 +359,7 @@ NineBaseTexture9_UploadSelf( struct NineBaseTexture9 *This ) } if (This->base.usage & D3DUSAGE_AUTOGENMIPMAP) - This->dirty_mip = TRUE; + This->dirty_mip = true; /* Set again the textures currently bound to update the texture data */ if (This->bind_count) { @@ -405,7 +405,7 @@ NineBaseTexture9_GenerateMipSubLevels( struct NineBaseTexture9 *This ) base_level, last_level, first_layer, last_layer, filter); - This->dirty_mip = FALSE; + This->dirty_mip = false; } HRESULT @@ -598,7 +598,7 @@ NineBaseTexture9_UnLoad( struct NineBaseTexture9 *This ) DBG("This=%p, releasing resource\n", This); pipe_resource_reference(&This->base.resource, NULL); This->managed.lod_resident = -1; - This->managed.dirty = TRUE; + This->managed.dirty = true; /* If the texture is bound, we have to re-upload it */ BASETEX_REGISTER_UPDATE(This); diff --git a/src/gallium/frontends/nine/buffer9.c b/src/gallium/frontends/nine/buffer9.c index 6a715366fc3..d5931943acb 100644 --- a/src/gallium/frontends/nine/buffer9.c +++ b/src/gallium/frontends/nine/buffer9.c @@ -153,7 +153,7 @@ NineBuffer9_ctor( struct NineBuffer9 *This, info->nr_samples = 0; info->nr_storage_samples = 0; - hr = NineResource9_ctor(&This->base, pParams, NULL, TRUE, + hr = NineResource9_ctor(&This->base, pParams, NULL, true, Type, Pool, Usage); if (FAILED(hr)) @@ -165,7 +165,7 @@ NineBuffer9_ctor( struct NineBuffer9 *This, Size, 1, 0), 32); if (!This->managed.data) return E_OUTOFMEMORY; - This->managed.dirty = TRUE; + This->managed.dirty = true; u_box_1d(0, Size, &This->managed.dirty_box); u_box_1d(0, 0, &This->managed.valid_region); u_box_1d(0, 0, &This->managed.required_valid_region); @@ -287,7 +287,7 @@ NineBuffer9_Lock( struct NineBuffer9 *This, if (!(Flags & D3DLOCK_READONLY)) { if (!This->managed.dirty) { assert(list_is_empty(&This->managed.list)); - This->managed.dirty = TRUE; + This->managed.dirty = true; This->managed.dirty_box = box; /* Flush if regions pending to be uploaded would be dirtied */ if (p_atomic_read(&This->managed.pending_upload)) { @@ -466,10 +466,10 @@ NineBuffer9_Lock( struct NineBuffer9 *This, pipe_resource_reference(&new_res, NULL); usage = PIPE_MAP_WRITE | PIPE_MAP_UNSYNCHRONIZED; NineBuffer9_RebindIfRequired(This, device, This->base.resource, 0); - This->maps[This->nmaps].is_pipe_secondary = TRUE; + This->maps[This->nmaps].is_pipe_secondary = true; } } else if (Flags & D3DLOCK_NOOVERWRITE && device->csmt_active) - This->maps[This->nmaps].is_pipe_secondary = TRUE; + This->maps[This->nmaps].is_pipe_secondary = true; if (This->maps[This->nmaps].is_pipe_secondary) pipe = device->pipe_secondary; @@ -537,7 +537,7 @@ NineBuffer9_SetDirty( struct NineBuffer9 *This ) { assert(This->base.pool != D3DPOOL_DEFAULT); - This->managed.dirty = TRUE; + This->managed.dirty = true; u_box_1d(0, This->size, &This->managed.dirty_box); BASEBUF_REGISTER_UPDATE(This); } @@ -712,5 +712,5 @@ NineBuffer9_Upload( struct NineBuffer9 *This ) box_upload.width, upload_flags, (int8_t *)This->managed.data + box_upload.x); - This->managed.dirty = FALSE; + This->managed.dirty = false; } diff --git a/src/gallium/frontends/nine/cubetexture9.c b/src/gallium/frontends/nine/cubetexture9.c index ae55d07d597..f1d9fdc8825 100644 --- a/src/gallium/frontends/nine/cubetexture9.c +++ b/src/gallium/frontends/nine/cubetexture9.c @@ -68,7 +68,7 @@ NineCubeTexture9_ctor( struct NineCubeTexture9 *This, Levels = 0; pf = d3d9_to_pipe_format_checked(screen, Format, PIPE_TEXTURE_CUBE, 0, - PIPE_BIND_SAMPLER_VIEW, FALSE, + PIPE_BIND_SAMPLER_VIEW, false, Pool == D3DPOOL_SCRATCH); if (pf == PIPE_FORMAT_NONE) @@ -273,14 +273,14 @@ NineCubeTexture9_AddDirtyRect( struct NineCubeTexture9 *This, if (This->base.base.pool != D3DPOOL_MANAGED) { if (This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP) { - This->base.dirty_mip = TRUE; + This->base.dirty_mip = true; BASETEX_REGISTER_UPDATE(&This->base); } return D3D_OK; } if (This->base.base.pool == D3DPOOL_MANAGED) { - This->base.managed.dirty = TRUE; + This->base.managed.dirty = true; BASETEX_REGISTER_UPDATE(&This->base); } diff --git a/src/gallium/frontends/nine/device9.c b/src/gallium/frontends/nine/device9.c index d33d3f1a5d1..c20c1fc25ac 100644 --- a/src/gallium/frontends/nine/device9.c +++ b/src/gallium/frontends/nine/device9.c @@ -160,8 +160,8 @@ NineDevice9_SetDefaultState( struct NineDevice9 *This, bool is_reset ) nine_context_set_scissor(This, &This->state.scissor); if (This->nswapchains && This->swapchains[0]->params.EnableAutoDepthStencil) { - nine_context_set_render_state(This, D3DRS_ZENABLE, TRUE); - This->state.rs_advertised[D3DRS_ZENABLE] = TRUE; + nine_context_set_render_state(This, D3DRS_ZENABLE, true); + This->state.rs_advertised[D3DRS_ZENABLE] = true; } if (This->state.rs_advertised[D3DRS_ZENABLE]) NineDevice9_SetDepthStencilSurface( @@ -308,11 +308,11 @@ NineDevice9_ctor( struct NineDevice9 *This, if (pFullscreenDisplayMode) mode = &(pFullscreenDisplayMode[i]); /* when this is a Device9Ex, it should create SwapChain9Exs */ - hr = NineSwapChain9Ex_new(This, TRUE, present, + hr = NineSwapChain9Ex_new(This, true, present, &pPresentationParameters[i], pCTX, This->params.hFocusWindow, mode, ret); } else { - hr = NineSwapChain9_new(This, TRUE, present, + hr = NineSwapChain9_new(This, true, present, &pPresentationParameters[i], pCTX, This->params.hFocusWindow, &This->swapchains[i]); @@ -403,11 +403,11 @@ NineDevice9_ctor( struct NineDevice9 *This, This->context.pipe->buffer_unmap(This->context.pipe, transfer); } - This->cursor.software = FALSE; + This->cursor.software = false; This->cursor.hotspot.x = -1; This->cursor.hotspot.y = -1; This->cursor.w = This->cursor.h = 0; - This->cursor.visible = FALSE; + This->cursor.visible = false; if (ID3DPresent_GetCursorPos(This->swapchains[0]->present, &This->cursor.pos) != S_OK) { This->cursor.pos.x = 0; This->cursor.pos.y = 0; @@ -493,7 +493,7 @@ NineDevice9_ctor( struct NineDevice9 *This, if (strstr(pScreen->get_name(pScreen), "AMD") || strstr(pScreen->get_name(pScreen), "ATI")) { - This->driver_bugs.buggy_barycentrics = TRUE; + This->driver_bugs.buggy_barycentrics = true; } } @@ -587,7 +587,7 @@ NineDevice9_ctor( struct NineDevice9 *This, nine_ff_init(This); /* initialize fixed function code */ - NineDevice9_SetDefaultState(This, FALSE); + NineDevice9_SetDefaultState(This, false); { struct pipe_poly_stipple stipple; @@ -625,7 +625,7 @@ NineDevice9_dtor( struct NineDevice9 *This ) if (This->csmt_active && This->csmt_ctx) { nine_csmt_process(This); nine_csmt_destroy(This, This->csmt_ctx); - This->csmt_active = FALSE; + This->csmt_active = false; This->csmt_ctx = NULL; } @@ -704,7 +704,7 @@ NineDevice9_PauseRecording( struct NineDevice9 *This ) { if (This->record) { This->update = &This->state; - This->is_recording = FALSE; + This->is_recording = false; } } @@ -713,7 +713,7 @@ NineDevice9_ResumeRecording( struct NineDevice9 *This ) { if (This->record) { This->update = &This->record->state; - This->is_recording = TRUE; + This->is_recording = true; } } @@ -721,10 +721,10 @@ HRESULT NINE_WINAPI NineDevice9_TestCooperativeLevel( struct NineDevice9 *This ) { if (NineSwapChain9_GetOccluded(This->swapchains[0])) { - This->device_needs_reset = TRUE; + This->device_needs_reset = true; return D3DERR_DEVICELOST; } else if (NineSwapChain9_ResolutionMismatch(This->swapchains[0])) { - This->device_needs_reset = TRUE; + This->device_needs_reset = true; return D3DERR_DEVICENOTRESET; } else if (This->device_needs_reset) { return D3DERR_DEVICENOTRESET; @@ -898,7 +898,7 @@ NineDevice9_SetCursorProperties( struct NineDevice9 *This, /* hide cursor if we emulate it */ if (!hw_cursor) - ID3DPresent_SetCursor(This->swapchains[0]->present, NULL, NULL, FALSE); + ID3DPresent_SetCursor(This->swapchains[0]->present, NULL, NULL, false); This->cursor.software = !hw_cursor; return D3D_OK; @@ -974,7 +974,7 @@ NineDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This, if (FAILED(hr)) return hr; - hr = NineSwapChain9_new(This, FALSE, present, pPresentationParameters, + hr = NineSwapChain9_new(This, false, present, pPresentationParameters, tmplt->actx, tmplt->params.hDeviceWindow, &swapchain); @@ -1019,7 +1019,7 @@ NineDevice9_Reset( struct NineDevice9 *This, user_assert(pPresentationParameters != NULL, D3DERR_INVALIDCALL); if (NineSwapChain9_GetOccluded(This->swapchains[0])) { - This->device_needs_reset = TRUE; + This->device_needs_reset = true; return D3DERR_DEVICELOST; } @@ -1034,7 +1034,7 @@ NineDevice9_Reset( struct NineDevice9 *This, nine_device_state_clear(This); nine_context_clear(This); - NineDevice9_SetDefaultState(This, TRUE); + NineDevice9_SetDefaultState(This, true); NineDevice9_SetRenderTarget( This, 0, (IDirect3DSurface9 *)This->swapchains[0]->buffers[0]); /* XXX: better use GetBackBuffer here ? */ @@ -1633,7 +1633,7 @@ NineDevice9_UpdateTexture( struct NineDevice9 *This, } if (dstb->base.usage & D3DUSAGE_AUTOGENMIPMAP) { - dstb->dirty_mip = TRUE; + dstb->dirty_mip = true; NineBaseTexture9_GenerateMipSubLevels(dstb); } @@ -1698,7 +1698,7 @@ NineDevice9_StretchRect( struct NineDevice9 *This, struct pipe_resource *dst_res, *src_res; bool zs; struct pipe_blit_info blit; - bool 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", @@ -1809,8 +1809,8 @@ NineDevice9_StretchRect( struct NineDevice9 *This, blit.mask = zs ? PIPE_MASK_ZS : PIPE_MASK_RGBA; blit.filter = Filter == D3DTEXF_LINEAR ? PIPE_TEX_FILTER_LINEAR : PIPE_TEX_FILTER_NEAREST; - blit.scissor_enable = FALSE; - blit.alpha_blend = FALSE; + blit.scissor_enable = false; + blit.alpha_blend = false; /* If both of a src and dst dimension are negative, flip them. */ if (blit.dst.box.width < 0 && blit.src.box.width < 0) { @@ -1986,7 +1986,7 @@ NineDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This, hr = create_zs_or_rt_surface(This, 2, Pool, Width, Height, Format, D3DMULTISAMPLE_NONE, 0, - TRUE, + true, ppSurface, pSharedHandle); if (FAILED(hr)) DBG("Failed to create surface.\n"); @@ -2086,7 +2086,7 @@ NineDevice9_BeginScene( struct NineDevice9 *This ) { DBG("This=%p\n", This); user_assert(!This->in_scene, D3DERR_INVALIDCALL); - This->in_scene = TRUE; + This->in_scene = true; /* Do we want to do anything else here ? */ return D3D_OK; } @@ -2096,7 +2096,7 @@ NineDevice9_EndScene( struct NineDevice9 *This ) { DBG("This=%p\n", This); user_assert(This->in_scene, D3DERR_INVALIDCALL); - This->in_scene = FALSE; + This->in_scene = false; This->end_scene_since_present++; /* EndScene() is supposed to flush the GPU commands. * The idea is to flush ahead of the Present() call. @@ -2166,7 +2166,7 @@ NineDevice9_SetTransform( struct NineDevice9 *This, const D3DMATRIX *pMatrix ) { struct nine_state *state = This->update; - D3DMATRIX *M = nine_state_access_transform(&state->ff, State, TRUE); + D3DMATRIX *M = nine_state_access_transform(&state->ff, State, true); DBG("This=%p State=%d pMatrix=%p\n", This, State, pMatrix); @@ -2192,7 +2192,7 @@ NineDevice9_GetTransform( struct NineDevice9 *This, D3DMATRIX *M; user_assert(!This->pure, D3DERR_INVALIDCALL); - M = nine_state_access_transform(&This->state.ff, State, FALSE); + M = nine_state_access_transform(&This->state.ff, State, false); user_assert(pMatrix, D3DERR_INVALIDCALL); user_assert(M, D3DERR_INVALIDCALL); *pMatrix = *M; @@ -2206,7 +2206,7 @@ NineDevice9_MultiplyTransform( struct NineDevice9 *This, { struct nine_state *state = This->update; D3DMATRIX T; - D3DMATRIX *M = nine_state_access_transform(&state->ff, State, TRUE); + D3DMATRIX *M = nine_state_access_transform(&state->ff, State, true); DBG("This=%p State=%d pMatrix=%p\n", This, State, pMatrix); @@ -2591,7 +2591,7 @@ NineDevice9_BeginStateBlock( struct NineDevice9 *This ) NineUnknown_ConvertRefToBind(NineUnknown(This->record)); This->update = &This->record->state; - This->is_recording = TRUE; + This->is_recording = true; return D3D_OK; } @@ -2606,7 +2606,7 @@ NineDevice9_EndStateBlock( struct NineDevice9 *This, user_assert(ppSB != NULL, D3DERR_INVALIDCALL); This->update = &This->state; - This->is_recording = FALSE; + This->is_recording = false; NineUnknown_AddRef(NineUnknown(This->record)); *ppSB = (IDirect3DStateBlock9 *)This->record; @@ -2984,7 +2984,7 @@ NineAfterDraw( struct NineDevice9 *This ) rt->desc.Usage & D3DUSAGE_AUTOGENMIPMAP) { assert(rt->texture == D3DRTYPE_TEXTURE || rt->texture == D3DRTYPE_CUBETEXTURE); - NineBaseTexture9(rt->base.base.container)->dirty_mip = TRUE; + NineBaseTexture9(rt->base.base.container)->dirty_mip = true; } } } @@ -3007,7 +3007,7 @@ NineTrackSystemmemDynamic( struct NineBuffer9 *This, unsigned start, unsigned wi u_box_union_1d(&This->managed.required_valid_region, &This->managed.required_valid_region, &box); - This->managed.dirty = TRUE; + This->managed.dirty = true; BASEBUF_REGISTER_UPDATE(This); } @@ -3323,7 +3323,7 @@ NineDevice9_ProcessVertices( struct NineDevice9 *This, draw.mode = MESA_PRIM_POINTS; sc.count = VertexCount; draw.start_instance = 0; - draw.primitive_restart = FALSE; + draw.primitive_restart = false; draw.restart_index = 0; draw.instance_count = 1; draw.index_size = 0; @@ -3711,7 +3711,7 @@ NineDevice9_GetVertexShaderConstantB( struct NineDevice9 *This, user_assert(pConstantData, D3DERR_INVALIDCALL); for (i = 0; i < BoolCount; i++) - pConstantData[i] = state->vs_const_b[StartRegister + i] != 0 ? TRUE : FALSE; + pConstantData[i] = state->vs_const_b[StartRegister + i] != 0 ? true : false; return D3D_OK; } @@ -4131,7 +4131,7 @@ NineDevice9_GetPixelShaderConstantB( struct NineDevice9 *This, user_assert(pConstantData, D3DERR_INVALIDCALL); for (i = 0; i < BoolCount; i++) - pConstantData[i] = state->ps_const_b[StartRegister + i] ? TRUE : FALSE; + pConstantData[i] = state->ps_const_b[StartRegister + i] ? true : false; return D3D_OK; } diff --git a/src/gallium/frontends/nine/device9ex.c b/src/gallium/frontends/nine/device9ex.c index a2a0599663a..cbe764b14fe 100644 --- a/src/gallium/frontends/nine/device9ex.c +++ b/src/gallium/frontends/nine/device9ex.c @@ -55,7 +55,7 @@ NineDevice9Ex_ctor( struct NineDevice9Ex *This, pScreen, pCreationParameters, pCaps, pPresentationParameters, (IDirect3D9 *)pD3D9Ex, pPresentationGroup, pCTX, - TRUE, pFullscreenDisplayMode, minorVersionNum); + true, pFullscreenDisplayMode, minorVersionNum); } static void diff --git a/src/gallium/frontends/nine/guid.c b/src/gallium/frontends/nine/guid.c index de1be8d4c3a..b5930715c25 100644 --- a/src/gallium/frontends/nine/guid.c +++ b/src/gallium/frontends/nine/guid.c @@ -55,15 +55,15 @@ GUID_equal( const GUID *a, unsigned i; if (!a || !b) - return FALSE; + return false; if (a->Data1 != b->Data1 || a->Data2 != b->Data2 || - a->Data3 != b->Data3) { return FALSE; } + a->Data3 != b->Data3) { return false; } for (i = 0; i < 8; i++) { - if (a->Data4[i] != b->Data4[i]) { return FALSE; } + if (a->Data4[i] != b->Data4[i]) { return false; } } - return TRUE; + return true; } char* GUID_sprintf(char *guid_str, REFGUID id) { diff --git a/src/gallium/frontends/nine/iunknown.c b/src/gallium/frontends/nine/iunknown.c index b94caedd8de..18f477787fd 100644 --- a/src/gallium/frontends/nine/iunknown.c +++ b/src/gallium/frontends/nine/iunknown.c @@ -212,7 +212,7 @@ NineUnknown_SetPrivateData( struct NineUnknown *This, /* data consists of a header and the actual data. avoiding 2 mallocs */ header = CALLOC_VARIANT_LENGTH_STRUCT(pheader, SizeOfData); if (!header) { DBG("Returning E_OUTOFMEMORY\n"); return E_OUTOFMEMORY; } - header->unknown = (Flags & D3DSPD_IUNKNOWN) ? TRUE : FALSE; + header->unknown = (Flags & D3DSPD_IUNKNOWN) ? true : false; /* if the refguid already exists, delete it */ NineUnknown_FreePrivateData(This, refguid); diff --git a/src/gallium/frontends/nine/nine_csmt_helper.h b/src/gallium/frontends/nine/nine_csmt_helper.h index 7286cc31140..30d80706cce 100644 --- a/src/gallium/frontends/nine/nine_csmt_helper.h +++ b/src/gallium/frontends/nine/nine_csmt_helper.h @@ -308,7 +308,7 @@ name( struct NineDevice9 *device ARGS_FOR_DECLARATION( __VA_ARGS__ ) ) \ assert(args); \ args->instr.func = &name##_rx; \ ARGS_FOR_ASSIGN( __VA_ARGS__ ) \ - ctx->processed = FALSE; \ + ctx->processed = false; \ nine_queue_flush(ctx->pool); \ nine_csmt_wait_processed(ctx); \ } \ diff --git a/src/gallium/frontends/nine/nine_debug.c b/src/gallium/frontends/nine/nine_debug.c index e61c4b192d9..270f198c060 100644 --- a/src/gallium/frontends/nine/nine_debug.c +++ b/src/gallium/frontends/nine/nine_debug.c @@ -63,12 +63,12 @@ _nine_debug_printf( unsigned long flag, const char *fmt, ... ) { - static bool first = TRUE; + static bool first = true; static unsigned long dbg_flags = DBG_ERROR | DBG_WARN; unsigned long tid = 0; if (first) { - first = FALSE; + first = false; dbg_flags |= debug_get_flags_option("NINE_DEBUG", nine_debug_flags, 0); } diff --git a/src/gallium/frontends/nine/nine_debug.h b/src/gallium/frontends/nine/nine_debug.h index 8512895abf9..6f7652ef469 100644 --- a/src/gallium/frontends/nine/nine_debug.h +++ b/src/gallium/frontends/nine/nine_debug.h @@ -38,9 +38,9 @@ _nine_debug_printf( unsigned long flag, #define WARN(fmt, ...) _nine_debug_printf(DBG_WARN, __func__, fmt, ## __VA_ARGS__) #define WARN_ONCE(fmt, ...) \ do { \ - static bool once = TRUE; \ + static bool once = true; \ if (once) { \ - once = FALSE; \ + once = false; \ _nine_debug_printf(DBG_WARN, __func__, fmt, ## __VA_ARGS__); \ } \ } while(0) @@ -107,8 +107,8 @@ _nine_stub( const char *file, * It also prints debug message if the assertion fails. */ #if defined(DEBUG) || !defined(NDEBUG) #define user_error(x) \ - (!(x) ? (DBG_FLAG(DBG_USER, "User assertion failed: `%s'\n", #x), TRUE) \ - : FALSE) + (!(x) ? (DBG_FLAG(DBG_USER, "User assertion failed: `%s'\n", #x), true) \ + : false) #else #define user_error(x) (!(x) ? TRUE : FALSE) #endif diff --git a/src/gallium/frontends/nine/nine_ff.c b/src/gallium/frontends/nine/nine_ff.c index d2ac4fcb280..a5182fbd0a8 100644 --- a/src/gallium/frontends/nine/nine_ff.c +++ b/src/gallium/frontends/nine/nine_ff.c @@ -173,7 +173,7 @@ static void nine_ff_prune_ps(struct NineDevice9 *); static void nine_ureg_tgsi_dump(struct ureg_program *ureg, bool override) { - if (debug_get_bool_option("NINE_FF_DUMP", FALSE) || override) { + if (debug_get_bool_option("NINE_FF_DUMP", false) || override) { const struct tgsi_token *toks = ureg_get_tokens(ureg, NULL); tgsi_dump(toks, 0); ureg_free_tokens(toks); @@ -354,16 +354,16 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs) for (i = 0; i < 8 * 3; i += 3) { switch ((key->tc_gen >> i) & 0x7) { case NINED3DTSS_TCI_CAMERASPACENORMAL: - need_aNrm = TRUE; + need_aNrm = true; break; case NINED3DTSS_TCI_CAMERASPACEPOSITION: - need_aVtx = TRUE; + need_aVtx = true; break; case NINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR: - need_aVtx = need_aNrm = TRUE; + need_aVtx = need_aNrm = true; break; case NINED3DTSS_TCI_SPHEREMAP: - need_aVtx = need_aNrm = TRUE; + need_aVtx = need_aNrm = true; break; default: break; @@ -1087,10 +1087,10 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs) } if (key->position_t && device->driver_caps.window_space_position_support) - ureg_property(ureg, TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION, TRUE); + ureg_property(ureg, TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION, true); ureg_END(ureg); - nine_ureg_tgsi_dump(ureg, FALSE); + nine_ureg_tgsi_dump(ureg, false); return nine_create_shader_with_so_and_destroy(ureg, device->context.pipe, NULL); } @@ -1599,7 +1599,7 @@ nine_ff_build_ps(struct NineDevice9 *device, struct nine_ff_ps_key *key) } ureg_END(ureg); - nine_ureg_tgsi_dump(ureg, FALSE); + nine_ureg_tgsi_dump(ureg, false); return nine_create_shader_with_so_and_destroy(ureg, device->context.pipe, NULL); } @@ -2013,7 +2013,7 @@ nine_ff_load_tex_matrices(struct NineDevice9 *device) return; for (s = 0; s < 8; ++s) { if (IS_D3DTS_DIRTY(context, TEXTURE0 + s)) - nine_d3d_matrix_transpose(&M[32 + s], nine_state_access_transform(&context->ff, D3DTS_TEXTURE0 + s, FALSE)); + nine_d3d_matrix_transpose(&M[32 + s], nine_state_access_transform(&context->ff, D3DTS_TEXTURE0 + s, false)); } } diff --git a/src/gallium/frontends/nine/nine_pipe.c b/src/gallium/frontends/nine/nine_pipe.c index d2ed7f3829a..7e845a2335d 100644 --- a/src/gallium/frontends/nine/nine_pipe.c +++ b/src/gallium/frontends/nine/nine_pipe.c @@ -203,7 +203,7 @@ nine_convert_blend_state(struct pipe_blend_state *blend_state, const DWORD *rs) rs[D3DRS_COLORWRITEENABLE2] != rs[D3DRS_COLORWRITEENABLE] || rs[D3DRS_COLORWRITEENABLE3] != rs[D3DRS_COLORWRITEENABLE]) { unsigned i; - blend.independent_blend_enable = TRUE; + blend.independent_blend_enable = true; for (i = 1; i < 4; ++i) blend.rt[i] = blend.rt[0]; blend.rt[1].colormask = rs[D3DRS_COLORWRITEENABLE1]; diff --git a/src/gallium/frontends/nine/nine_pipe.h b/src/gallium/frontends/nine/nine_pipe.h index 00c629bd8cc..7cd39d3aab4 100644 --- a/src/gallium/frontends/nine/nine_pipe.h +++ b/src/gallium/frontends/nine/nine_pipe.h @@ -107,9 +107,9 @@ rect_to_pipe_box_clamp(struct pipe_box *dst, const RECT *src) DBG_FLAG(DBG_UNKNOWN, "Warning: NULL box"); dst->width = MAX2(dst->width, 0); dst->height = MAX2(dst->height, 0); - return TRUE; + return true; } - return FALSE; + return false; } static inline bool @@ -118,10 +118,10 @@ rect_to_pipe_box_flip(struct pipe_box *dst, const RECT *src) rect_to_pipe_box(dst, src); if (dst->width >= 0 && dst->height >= 0) - return FALSE; + return false; if (dst->width < 0) dst->width = -dst->width; if (dst->height < 0) dst->height = -dst->height; - return TRUE; + return true; } static inline void @@ -144,9 +144,9 @@ rect_to_pipe_box_xy_only_clamp(struct pipe_box *dst, const RECT *src) DBG_FLAG(DBG_UNKNOWN, "Warning: NULL box"); dst->width = MAX2(dst->width, 0); dst->height = MAX2(dst->height, 0); - return TRUE; + return true; } - return FALSE; + return false; } static inline void @@ -198,9 +198,9 @@ fetch4_compatible_format( D3DFORMAT fmt ) unsigned i; for (i = 0; i < sizeof(allowed)/sizeof(D3DFORMAT); i++) { - if (fmt == allowed[i]) { return TRUE; } + if (fmt == allowed[i]) { return true; } } - return FALSE; + return false; } /* ATI1 and ATI2 are not officially compressed in d3d9 */ @@ -213,11 +213,11 @@ compressed_format( D3DFORMAT fmt ) case D3DFMT_DXT3: case D3DFMT_DXT4: case D3DFMT_DXT5: - return TRUE; + return true; default: break; } - return FALSE; + return false; } static inline bool @@ -241,9 +241,9 @@ depth_stencil_format( D3DFORMAT fmt ) unsigned i; for (i = 0; i < sizeof(allowed)/sizeof(D3DFORMAT); i++) { - if (fmt == allowed[i]) { return TRUE; } + if (fmt == allowed[i]) { return true; } } - return FALSE; + return false; } static inline unsigned @@ -434,7 +434,7 @@ d3dmultisample_type_check(struct pipe_screen *screen, for (i = D3DMULTISAMPLE_2_SAMPLES; i < D3DMULTISAMPLE_16_SAMPLES && multisamplequality; ++i) { if (d3d9_to_pipe_format_checked(screen, format, PIPE_TEXTURE_2D, - i, bind, FALSE, FALSE) != PIPE_FORMAT_NONE) { + i, bind, false, false) != PIPE_FORMAT_NONE) { multisamplequality--; if (levels) (*levels)++; diff --git a/src/gallium/frontends/nine/nine_queue.c b/src/gallium/frontends/nine/nine_queue.c index 464b9c433f3..386d769a4fa 100644 --- a/src/gallium/frontends/nine/nine_queue.c +++ b/src/gallium/frontends/nine/nine_queue.c @@ -247,7 +247,7 @@ nine_queue_create(void) (void) mtx_init(&ctx->mutex_push, mtx_plain); /* Block until first cmdbuf has been flushed. */ - ctx->worker_wait = TRUE; + ctx->worker_wait = true; return ctx; failed: diff --git a/src/gallium/frontends/nine/nine_quirk.c b/src/gallium/frontends/nine/nine_quirk.c index f439c832b6c..5f112a900b6 100644 --- a/src/gallium/frontends/nine/nine_quirk.c +++ b/src/gallium/frontends/nine/nine_quirk.c @@ -37,11 +37,11 @@ static const struct debug_named_value nine_quirk_table[] = { bool _nine_get_quirk( unsigned quirk ) { - static bool first = TRUE; + static bool first = true; static unsigned long flags = 0; if (first) { - first = FALSE; + first = false; flags = debug_get_flags_option("NINE_QUIRKS", nine_quirk_table, 0); } diff --git a/src/gallium/frontends/nine/nine_shader.c b/src/gallium/frontends/nine/nine_shader.c index 6691540babf..eff7a0f5de8 100644 --- a/src/gallium/frontends/nine/nine_shader.c +++ b/src/gallium/frontends/nine/nine_shader.c @@ -580,7 +580,7 @@ static struct ureg_src nine_float_constant_src(struct shader_translator *tx, int } if (!tx->info->swvp_on) - tx->slots_used[idx] = TRUE; + tx->slots_used[idx] = true; if (tx->info->const_float_slots < (idx + 1)) tx->info->const_float_slots = idx + 1; if (tx->num_slots < (idx + 1)) @@ -602,8 +602,8 @@ static struct ureg_src nine_integer_constant_src(struct shader_translator *tx, i slot_idx = tx->slot_map[slot_idx]; src = ureg_src_register(TGSI_FILE_CONSTANT, slot_idx); src = ureg_src_dimension(src, 0); - tx->slots_used[slot_idx] = TRUE; - tx->info->int_slots_used[idx] = TRUE; + tx->slots_used[slot_idx] = true; + tx->info->int_slots_used[idx] = true; if (tx->num_slots < (slot_idx + 1)) tx->num_slots = slot_idx + 1; } @@ -630,8 +630,8 @@ static struct ureg_src nine_boolean_constant_src(struct shader_translator *tx, i slot_idx = tx->slot_map[slot_idx]; src = ureg_src_register(TGSI_FILE_CONSTANT, slot_idx); src = ureg_src_dimension(src, 0); - tx->slots_used[slot_idx] = TRUE; - tx->info->bool_slots_used[idx] = TRUE; + tx->slots_used[slot_idx] = true; + tx->info->bool_slots_used[idx] = true; if (tx->num_slots < (slot_idx + 1)) tx->num_slots = slot_idx + 1; } @@ -656,7 +656,7 @@ static struct ureg_src nine_special_constant_src(struct shader_translator *tx, i src = ureg_src_dimension(src, 0); if (!tx->info->swvp_on) - tx->slots_used[slot_idx] = TRUE; + tx->slots_used[slot_idx] = true; if (tx->num_slots < (slot_idx + 1)) tx->num_slots = slot_idx + 1; @@ -669,16 +669,16 @@ tx_lconstf(struct shader_translator *tx, struct ureg_src *src, INT index) INT i; if (index < 0 || index >= tx->num_constf_allowed) { - tx->failure = TRUE; - return FALSE; + tx->failure = true; + return false; } for (i = 0; i < tx->num_lconstf; ++i) { if (tx->lconstf[i].idx == index) { *src = tx->lconstf[i].reg; - return TRUE; + return true; } } - return FALSE; + return false; } static bool tx_lconsti(struct shader_translator *tx, struct ureg_src *src, INT index) @@ -686,16 +686,16 @@ tx_lconsti(struct shader_translator *tx, struct ureg_src *src, INT index) int i; if (index < 0 || index >= tx->num_consti_allowed) { - tx->failure = TRUE; - return FALSE; + tx->failure = true; + return false; } for (i = 0; i < tx->num_lconsti; ++i) { if (tx->lconsti[i].idx == index) { *src = tx->lconsti[i].reg; - return TRUE; + return true; } } - return FALSE; + return false; } static bool tx_lconstb(struct shader_translator *tx, struct ureg_src *src, INT index) @@ -703,16 +703,16 @@ tx_lconstb(struct shader_translator *tx, struct ureg_src *src, INT index) int i; if (index < 0 || index >= tx->num_constb_allowed) { - tx->failure = TRUE; - return FALSE; + tx->failure = true; + return false; } for (i = 0; i < tx->num_lconstb; ++i) { if (tx->lconstb[i].idx == index) { *src = tx->lconstb[i].reg; - return TRUE; + return true; } } - return FALSE; + return false; } static void @@ -794,7 +794,7 @@ static inline struct ureg_dst tx_scratch(struct shader_translator *tx) { if (tx->num_scratch >= ARRAY_SIZE(tx->regs.t)) { - tx->failure = TRUE; + tx->failure = true; return tx->regs.t[0]; } if (ureg_dst_is_undef(tx->regs.t[tx->num_scratch])) @@ -1114,7 +1114,7 @@ tx_src_param(struct shader_translator *tx, const struct sm1_src_param *param) case D3DSPR_PREDICATE: if (ureg_dst_is_undef(tx->regs.predicate)) { /* Forbidden to use the predicate register before being set */ - tx->failure = TRUE; + tx->failure = true; tx->regs.predicate = ureg_DECL_temporary(tx->ureg); } src = ureg_src(tx->regs.predicate); @@ -1128,7 +1128,7 @@ tx_src_param(struct shader_translator *tx, const struct sm1_src_param *param) if (param->rel || !tx_lconstf(tx, &src, param->idx)) { src = nine_float_constant_src(tx, param->idx); if (param->rel) { - tx->indirect_const_access = TRUE; + tx->indirect_const_access = true; src = ureg_src_indirect(src, tx_src_param(tx, param->rel)); } } @@ -1827,7 +1827,7 @@ DECL_SPECIAL(LOOP) struct ureg_src ctrx; label = tx_bgnloop(tx); - ctr = tx_get_loopctr(tx, TRUE); + ctr = tx_get_loopctr(tx, true); aL = tx_get_loopal(tx); ctrx = ureg_scalar(ureg_src(ctr), TGSI_SWIZZLE_X); @@ -1874,7 +1874,7 @@ DECL_SPECIAL(RET) DECL_SPECIAL(ENDLOOP) { struct ureg_program *ureg = tx->ureg; - struct ureg_dst ctr = tx_get_loopctr(tx, TRUE); + struct ureg_dst ctr = tx_get_loopctr(tx, true); struct ureg_dst al = tx_get_loopal(tx); struct ureg_dst dst_ctrx, dst_al; struct ureg_src src_ctr, al_counter; @@ -1950,7 +1950,7 @@ DECL_SPECIAL(REP) struct ureg_src ctrx; label = tx_bgnloop(tx); - ctr = ureg_writemask(tx_get_loopctr(tx, FALSE), NINED3DSP_WRITEMASK_0); + ctr = ureg_writemask(tx_get_loopctr(tx, false), NINED3DSP_WRITEMASK_0); ctrx = ureg_scalar(ureg_src(ctr), TGSI_SWIZZLE_X); /* NOTE: rep must be constant, so we don't have to save the count */ @@ -1984,7 +1984,7 @@ DECL_SPECIAL(REP) DECL_SPECIAL(ENDREP) { struct ureg_program *ureg = tx->ureg; - struct ureg_dst ctr = tx_get_loopctr(tx, FALSE); + struct ureg_dst ctr = tx_get_loopctr(tx, false); struct ureg_dst dst_ctrx = ureg_writemask(ctr, NINED3DSP_WRITEMASK_0); struct ureg_src src_ctr = ureg_src(ctr); @@ -2326,7 +2326,7 @@ DECL_SPECIAL(DCL) /* SM2 output semantic determined by file */ assert(sem.reg.mask != 0); if (sem.usage == D3DDECLUSAGE_POSITIONT) - tx->info->position_t = TRUE; + tx->info->position_t = true; assert(sem.reg.idx < ARRAY_SIZE(tx->regs.o)); assert(ureg_dst_is_undef(tx->regs.o[sem.reg.idx]) && "Nine doesn't support yet packing"); tx->regs.o[sem.reg.idx] = ureg_DECL_output_masked( @@ -3519,7 +3519,7 @@ sm1_parse_instruction(struct shader_translator *tx) const struct sm1_op_info *info = NULL; unsigned i; - sm1_parse_comments(tx, TRUE); + sm1_parse_comments(tx, true); sm1_parse_get_skip(tx); tok = TOKEN_NEXT(tx); @@ -3601,7 +3601,7 @@ sm1_parse_instruction(struct shader_translator *tx) } if (hr != D3D_OK) - tx->failure = TRUE; + tx->failure = true; tx->num_scratch = 0; /* reset */ TOKEN_JUMP(tx); @@ -3628,8 +3628,8 @@ tx_ctor(struct shader_translator *tx, struct pipe_screen *screen, struct nine_sh info->input_map[i] = NINE_DECLUSAGE_NONE; info->num_inputs = 0; - info->position_t = FALSE; - info->point_size = FALSE; + info->position_t = false; + info->point_size = false; memset(tx->slots_used, 0, sizeof(tx->slots_used)); memset(info->int_slots_used, 0, sizeof(info->int_slots_used)); @@ -3907,7 +3907,7 @@ static void parse_shader(struct shader_translator *tx) if (tx->no_vs_window_space) { ERR("POSITIONT is not yet implemented for your device.\n"); } else { - ureg_property(tx->ureg, TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION, TRUE); + ureg_property(tx->ureg, TGSI_PROPERTY_VS_WINDOW_SPACE_POSITION, true); } } @@ -3915,11 +3915,11 @@ static void parse_shader(struct shader_translator *tx) struct ureg_dst oPts = ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_PSIZE, 0); ureg_MAX(tx->ureg, ureg_writemask(tx->regs.oPts, TGSI_WRITEMASK_X), ureg_src(tx->regs.oPts), ureg_imm1f(tx->ureg, info->point_size_min)); ureg_MIN(tx->ureg, ureg_writemask(oPts, TGSI_WRITEMASK_X), ureg_src(tx->regs.oPts), ureg_imm1f(tx->ureg, info->point_size_max)); - info->point_size = TRUE; + info->point_size = true; } else if (IS_VS && tx->always_output_pointsize) { struct ureg_dst oPts = ureg_DECL_output(tx->ureg, TGSI_SEMANTIC_PSIZE, 0); ureg_MOV(tx->ureg, ureg_writemask(oPts, TGSI_WRITEMASK_X), nine_special_constant_src(tx, 8)); - info->point_size = TRUE; + info->point_size = true; } if (IS_VS && tx->info->clip_plane_emulation > 0) { @@ -3968,14 +3968,14 @@ static inline bool nine_shader_get_debug_flag(uint64_t flag) { static uint64_t flags = 0; - static bool first_run = TRUE; + static bool first_run = true; if (unlikely(first_run)) { - first_run = FALSE; + first_run = false; flags = debug_get_flags_option("NINE_SHADER", nine_shader_debug_options, 0); // Check old TGSI dump envvar too - if (debug_get_bool_option("NINE_TGSI_DUMP", FALSE)) { + if (debug_get_bool_option("NINE_TGSI_DUMP", false)) { flags |= NINE_SHADER_DEBUG_OPTION_DUMP_TGSI; } } diff --git a/src/gallium/frontends/nine/nine_shader.h b/src/gallium/frontends/nine/nine_shader.h index 489ede9f1ff..bbf067a5638 100644 --- a/src/gallium/frontends/nine/nine_shader.h +++ b/src/gallium/frontends/nine/nine_shader.h @@ -164,13 +164,13 @@ nine_shader_variant_add(struct nine_shader_variant *list, } list->next = MALLOC_STRUCT(nine_shader_variant); if (!list->next) - return FALSE; + return false; list->next->next = NULL; list->next->key = key; list->next->cso = cso; list->next->const_ranges = const_ranges; list->next->const_used_size = const_used_size; - return TRUE; + return true; } static inline void @@ -215,7 +215,7 @@ nine_shader_variant_so_add(struct nine_shader_variant_so *list, nine_bind(&list->vdecl, vdecl); list->so = *so; list->cso = cso; - return TRUE; + return true; } while (list->next) { assert(list->vdecl != vdecl); @@ -223,12 +223,12 @@ nine_shader_variant_so_add(struct nine_shader_variant_so *list, } list->next = MALLOC_STRUCT(nine_shader_variant_so); if (!list->next) - return FALSE; + return false; list->next->next = NULL; nine_bind(&list->vdecl, vdecl); list->next->so = *so; list->next->cso = cso; - return TRUE; + return true; } static inline void @@ -272,7 +272,7 @@ nine_shader_constant_combination_key(struct nine_shader_constant_combination **l while (current) { index++; /* start at 1. 0 is for the variant without constant replacement */ - match = TRUE; + match = true; for (i = 0; i < NINE_MAX_CONST_I; ++i) { if (int_slots_used[i]) match &= !memcmp(const_i + 4*i, current->const_i[i], sizeof(current->const_i[0])); @@ -312,7 +312,7 @@ nine_shader_constant_combination_get(struct nine_shader_constant_combination *li return list; list = list->next; } - assert(FALSE); + assert(false); return NULL; } diff --git a/src/gallium/frontends/nine/nine_state.c b/src/gallium/frontends/nine/nine_state.c index 475477afa69..322b6153acc 100644 --- a/src/gallium/frontends/nine/nine_state.c +++ b/src/gallium/frontends/nine/nine_state.c @@ -108,7 +108,7 @@ nine_csmt_worker(void *arg) /* decode */ if (instr->func(ctx->device, instr)) { mtx_lock(&ctx->mutex_processed); - p_atomic_set(&ctx->processed, TRUE); + p_atomic_set(&ctx->processed, true); cnd_signal(&ctx->event_processed); mtx_unlock(&ctx->mutex_processed); } @@ -124,7 +124,7 @@ nine_csmt_worker(void *arg) mtx_unlock(&ctx->thread_running); if (p_atomic_read(&ctx->terminate)) { mtx_lock(&ctx->mutex_processed); - p_atomic_set(&ctx->processed, TRUE); + p_atomic_set(&ctx->processed, true); cnd_signal(&ctx->event_processed); mtx_unlock(&ctx->mutex_processed); break; @@ -204,7 +204,7 @@ nine_csmt_process( struct NineDevice9 *device ) assert(instr); instr->func = nop_func; - p_atomic_set(&ctx->processed, FALSE); + p_atomic_set(&ctx->processed, false); nine_queue_flush(ctx->pool); nine_csmt_wait_processed(ctx); @@ -236,9 +236,9 @@ nine_csmt_destroy( struct NineDevice9 *device, struct csmt_context *ctx ) assert(instr); instr->func = nop_func; - p_atomic_set(&ctx->processed, FALSE); + p_atomic_set(&ctx->processed, false); /* Signal worker to terminate. */ - p_atomic_set(&ctx->terminate, TRUE); + p_atomic_set(&ctx->terminate, true); nine_queue_flush(ctx->pool); nine_csmt_wait_processed(ctx); @@ -268,12 +268,12 @@ nine_csmt_pause( struct NineDevice9 *device ) return; mtx_lock(&ctx->thread_resume); - p_atomic_set(&ctx->toPause, TRUE); + p_atomic_set(&ctx->toPause, true); /* Wait the thread is paused */ mtx_lock(&ctx->thread_running); - ctx->hasPaused = TRUE; - p_atomic_set(&ctx->toPause, FALSE); + ctx->hasPaused = true; + p_atomic_set(&ctx->toPause, false); } static void @@ -287,7 +287,7 @@ nine_csmt_resume( struct NineDevice9 *device ) if (!ctx->hasPaused) return; - ctx->hasPaused = FALSE; + ctx->hasPaused = false; mtx_unlock(&ctx->thread_running); mtx_unlock(&ctx->thread_resume); } @@ -867,7 +867,7 @@ update_vertex_elements(struct NineDevice9 *device) int8_t vdecl_index_map[16]; /* vs->num_inputs <= 16 */ uint16_t used_streams = 0; int dummy_vbo_stream = -1; - BOOL need_dummy_vbo = FALSE; + BOOL need_dummy_vbo = false; struct cso_velems_state ve; context->stream_usage_mask = 0; @@ -887,12 +887,12 @@ update_vertex_elements(struct NineDevice9 *device) } } if (vdecl_index_map[n] < 0) - need_dummy_vbo = TRUE; + need_dummy_vbo = true; } } else { /* No vertex declaration. Likely will never happen in practice, * but we need not crash on this */ - need_dummy_vbo = TRUE; + need_dummy_vbo = true; } if (need_dummy_vbo) { @@ -932,7 +932,7 @@ update_vertex_elements(struct NineDevice9 *device) context->changed.vtxbuf |= 1 << context->dummy_vbo_bound_at; if (dummy_vbo_stream >= 0) { context->changed.vtxbuf |= 1 << dummy_vbo_stream; - context->vbo_bound_done = FALSE; + context->vbo_bound_done = false; } context->dummy_vbo_bound_at = dummy_vbo_stream; } @@ -960,7 +960,7 @@ update_vertex_buffers(struct NineDevice9 *device) dummy_vtxbuf.buffer_offset = 0; pipe->set_vertex_buffers(pipe, context->dummy_vbo_bound_at, 1, 0, false, &dummy_vtxbuf); - context->vbo_bound_done = TRUE; + context->vbo_bound_done = true; } mask &= ~(1 << context->dummy_vbo_bound_at); } @@ -980,16 +980,16 @@ update_vertex_buffers(struct NineDevice9 *device) static inline bool update_sampler_derived(struct nine_context *context, unsigned s) { - bool changed = FALSE; + bool changed = false; if (context->samp[s][NINED3DSAMP_SHADOW] != context->texture[s].shadow) { - changed = TRUE; + changed = true; context->samp[s][NINED3DSAMP_SHADOW] = context->texture[s].shadow; } if (context->samp[s][NINED3DSAMP_CUBETEX] != (context->texture[s].type == D3DRTYPE_CUBETEXTURE)) { - changed = TRUE; + changed = true; context->samp[s][NINED3DSAMP_CUBETEX] = context->texture[s].type == D3DRTYPE_CUBETEXTURE; } @@ -999,7 +999,7 @@ update_sampler_derived(struct nine_context *context, unsigned s) if (lod < 0) lod = 0; if (context->samp[s][NINED3DSAMP_MINLOD] != lod) { - changed = TRUE; + changed = true; context->samp[s][NINED3DSAMP_MINLOD] = lod; } } else { @@ -1021,7 +1021,7 @@ update_textures_and_samplers(struct NineDevice9 *device) uint16_t sampler_mask = context->ps ? context->ps->sampler_mask : device->ff.ps->sampler_mask; - commit_samplers = FALSE; + commit_samplers = false; const uint16_t ps_mask = sampler_mask | context->enabled_samplers_mask_ps; context->bound_samplers_mask_ps = ps_mask; num_textures = util_last_bit(ps_mask); @@ -1034,7 +1034,7 @@ update_textures_and_samplers(struct NineDevice9 *device) if (update_sampler_derived(context, s) || (context->changed.sampler[s] & 0x05fe)) { context->changed.sampler[s] = 0; - commit_samplers = TRUE; + commit_samplers = true; nine_convert_sampler_state(context->cso, s, context->samp[s]); } } @@ -1052,7 +1052,7 @@ update_textures_and_samplers(struct NineDevice9 *device) cso_single_sampler(context->cso, PIPE_SHADER_FRAGMENT, s - NINE_SAMPLER_PS(0), &device->dummy_sampler_state); - commit_samplers = TRUE; + commit_samplers = true; context->changed.sampler[s] = ~0; } /* fill in unused samplers */ @@ -1067,7 +1067,7 @@ update_textures_and_samplers(struct NineDevice9 *device) if (commit_samplers) cso_single_sampler_done(context->cso, PIPE_SHADER_FRAGMENT); - commit_samplers = FALSE; + commit_samplers = false; sampler_mask = context->programmable_vs ? context->vs->sampler_mask : 0; const uint16_t vs_mask = sampler_mask | context->enabled_samplers_mask_vs; context->bound_samplers_mask_vs = vs_mask; @@ -1080,7 +1080,7 @@ update_textures_and_samplers(struct NineDevice9 *device) if (update_sampler_derived(context, s) || (context->changed.sampler[s] & 0x05fe)) { context->changed.sampler[s] = 0; - commit_samplers = TRUE; + commit_samplers = true; nine_convert_sampler_state(context->cso, s, context->samp[s]); } } @@ -1097,7 +1097,7 @@ update_textures_and_samplers(struct NineDevice9 *device) cso_single_sampler(context->cso, PIPE_SHADER_VERTEX, s - NINE_SAMPLER_VS(0), &device->dummy_sampler_state); - commit_samplers = TRUE; + commit_samplers = true; context->changed.sampler[s] = ~0; } /* fill in unused samplers */ @@ -1263,7 +1263,7 @@ nine_update_state(struct NineDevice9 *device) if (group & (NINE_STATE_COMMON | NINE_STATE_VS)) { if (group & NINE_STATE_FB) - update_framebuffer(device, FALSE); + update_framebuffer(device, false); if (group & NINE_STATE_BLEND) prepare_blend(device); if (group & NINE_STATE_DSA) @@ -1309,7 +1309,7 @@ nine_update_state(struct NineDevice9 *device) if (unlikely(context->changed.ucp)) { pipe->set_clip_state(pipe, &context->clip); - context->changed.ucp = FALSE; + context->changed.ucp = false; } if (unlikely(group & NINE_STATE_RARE)) { @@ -1392,7 +1392,7 @@ NineDevice9_ResolveZ( struct NineDevice9 *device ) blit.mask = PIPE_MASK_ZS; blit.filter = PIPE_TEX_FILTER_NEAREST; - blit.scissor_enable = FALSE; + blit.scissor_enable = false; context->pipe->blit(context->pipe, &blit); } @@ -1736,7 +1736,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_vertex_shader_constant_f, Vector4fCount * 4 * sizeof(context->vs_const_f[0])); } - context->changed.vs_const_f = TRUE; + context->changed.vs_const_f = true; context->changed.group |= NINE_STATE_VS_CONST; } @@ -1762,7 +1762,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_vertex_shader_constant_i, } } - context->changed.vs_const_i = TRUE; + context->changed.vs_const_i = true; context->changed.group |= NINE_STATE_VS_CONST | NINE_STATE_VS_PARAMS_MISC; } @@ -1781,7 +1781,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_vertex_shader_constant_b, for (i = 0; i < BoolCount; i++) context->vs_const_b[StartRegister + i] = pConstantData[i] ? bool_true : 0; - context->changed.vs_const_b = TRUE; + context->changed.vs_const_b = true; context->changed.group |= NINE_STATE_VS_CONST | NINE_STATE_VS_PARAMS_MISC; } @@ -1819,7 +1819,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_pixel_shader_constant_f, pConstantData, pConstantData_size); - context->changed.ps_const_f = TRUE; + context->changed.ps_const_f = true; context->changed.group |= NINE_STATE_PS_CONST; } @@ -1836,7 +1836,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_pixel_shader_constant_i_transformed, pConstantData, Vector4iCount * sizeof(context->ps_const_i[0])); - context->changed.ps_const_i = TRUE; + context->changed.ps_const_i = true; context->changed.group |= NINE_STATE_PS_CONST | NINE_STATE_PS_PARAMS_MISC; } @@ -1861,7 +1861,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_pixel_shader_constant_i, context->ps_const_i[StartRegister+i][3] = fui((float)(pConstantData[4*i+3])); } } - context->changed.ps_const_i = TRUE; + context->changed.ps_const_i = true; context->changed.group |= NINE_STATE_PS_CONST | NINE_STATE_PS_PARAMS_MISC; } @@ -1880,7 +1880,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_pixel_shader_constant_b, for (i = 0; i < BoolCount; i++) context->ps_const_b[StartRegister + i] = pConstantData[i] ? bool_true : 0; - context->changed.ps_const_b = TRUE; + context->changed.ps_const_b = true; context->changed.group |= NINE_STATE_PS_CONST | NINE_STATE_PS_PARAMS_MISC; } @@ -1946,7 +1946,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_transform, ARG_COPY_REF(D3DMATRIX, pMatrix)) { struct nine_context *context = &device->context; - D3DMATRIX *M = nine_state_access_transform(&context->ff, State, TRUE); + D3DMATRIX *M = nine_state_access_transform(&context->ff, State, true); *M = *pMatrix; if (State == D3DTS_PROJECTION) { @@ -2061,7 +2061,7 @@ CSMT_ITEM_NO_WAIT(nine_context_set_clip_plane, memcpy(&context->clip.ucp[Index][0], pPlane, sizeof(context->clip.ucp[0])); if (!device->driver_caps.emulate_ucp) - context->changed.ucp = TRUE; + context->changed.ucp = true; else context->changed.group |= NINE_STATE_FF_VS_OTHER | NINE_STATE_VS_CONST; } @@ -2250,7 +2250,7 @@ nine_context_apply_stateblock(struct NineDevice9 *device, nine_context_set_transform(device, s, nine_state_access_transform( (struct nine_ff_state *)&src->ff, - s, FALSE)); + s, false)); } } } @@ -2262,7 +2262,7 @@ nine_update_state_framebuffer_clear(struct NineDevice9 *device) struct nine_context *context = &device->context; if (context->changed.group & NINE_STATE_FB) - update_framebuffer(device, TRUE); + update_framebuffer(device, true); } CSMT_ITEM_NO_WAIT(nine_context_clear_fb, @@ -2420,12 +2420,12 @@ init_draw_info(struct pipe_draw_info *info, info->instance_count = 1; if (dev->context.stream_instancedata_mask & dev->context.stream_usage_mask) info->instance_count = MAX2(dev->context.stream_freq[0] & 0x7FFFFF, 1); - info->primitive_restart = FALSE; - info->has_user_indices = FALSE; - info->take_index_buffer_ownership = FALSE; - info->index_bias_varies = FALSE; - info->increment_draw_id = FALSE; - info->was_line_loop = FALSE; + info->primitive_restart = false; + info->has_user_indices = false; + info->take_index_buffer_ownership = false; + info->index_bias_varies = false; + info->increment_draw_id = false; + info->was_line_loop = false; info->restart_index = 0; info->view_mask = 0; } @@ -2742,19 +2742,19 @@ static const DWORD nine_render_state_defaults[NINED3DRS_LAST + 1] = [D3DRS_FILLMODE] = D3DFILL_SOLID, [D3DRS_SHADEMODE] = D3DSHADE_GOURAUD, /* [D3DRS_LINEPATTERN] = 0x00000000, */ - [D3DRS_ZWRITEENABLE] = TRUE, - [D3DRS_ALPHATESTENABLE] = FALSE, - [D3DRS_LASTPIXEL] = TRUE, + [D3DRS_ZWRITEENABLE] = true, + [D3DRS_ALPHATESTENABLE] = false, + [D3DRS_LASTPIXEL] = true, [D3DRS_SRCBLEND] = D3DBLEND_ONE, [D3DRS_DESTBLEND] = D3DBLEND_ZERO, [D3DRS_CULLMODE] = D3DCULL_CCW, [D3DRS_ZFUNC] = D3DCMP_LESSEQUAL, [D3DRS_ALPHAFUNC] = D3DCMP_ALWAYS, [D3DRS_ALPHAREF] = 0, - [D3DRS_DITHERENABLE] = FALSE, - [D3DRS_ALPHABLENDENABLE] = FALSE, - [D3DRS_FOGENABLE] = FALSE, - [D3DRS_SPECULARENABLE] = FALSE, + [D3DRS_DITHERENABLE] = false, + [D3DRS_ALPHABLENDENABLE] = false, + [D3DRS_FOGENABLE] = false, + [D3DRS_SPECULARENABLE] = false, /* [D3DRS_ZVISIBLE] = 0, */ [D3DRS_FOGCOLOR] = 0, [D3DRS_FOGTABLEMODE] = D3DFOG_NONE, @@ -2762,8 +2762,8 @@ static const DWORD nine_render_state_defaults[NINED3DRS_LAST + 1] = [D3DRS_FOGEND] = 0x3F800000, [D3DRS_FOGDENSITY] = 0x3F800000, /* [D3DRS_EDGEANTIALIAS] = FALSE, */ - [D3DRS_RANGEFOGENABLE] = FALSE, - [D3DRS_STENCILENABLE] = FALSE, + [D3DRS_RANGEFOGENABLE] = false, + [D3DRS_STENCILENABLE] = false, [D3DRS_STENCILFAIL] = D3DSTENCILOP_KEEP, [D3DRS_STENCILZFAIL] = D3DSTENCILOP_KEEP, [D3DRS_STENCILPASS] = D3DSTENCILOP_KEEP, @@ -2780,13 +2780,13 @@ static const DWORD nine_render_state_defaults[NINED3DRS_LAST + 1] = [D3DRS_WRAP5] = 0, [D3DRS_WRAP6] = 0, [D3DRS_WRAP7] = 0, - [D3DRS_CLIPPING] = TRUE, - [D3DRS_LIGHTING] = TRUE, + [D3DRS_CLIPPING] = true, + [D3DRS_LIGHTING] = true, [D3DRS_AMBIENT] = 0, [D3DRS_FOGVERTEXMODE] = D3DFOG_NONE, - [D3DRS_COLORVERTEX] = TRUE, - [D3DRS_LOCALVIEWER] = TRUE, - [D3DRS_NORMALIZENORMALS] = FALSE, + [D3DRS_COLORVERTEX] = true, + [D3DRS_LOCALVIEWER] = true, + [D3DRS_NORMALIZENORMALS] = false, [D3DRS_DIFFUSEMATERIALSOURCE] = D3DMCS_COLOR1, [D3DRS_SPECULARMATERIALSOURCE] = D3DMCS_COLOR2, [D3DRS_AMBIENTMATERIALSOURCE] = D3DMCS_MATERIAL, @@ -2796,34 +2796,34 @@ static const DWORD nine_render_state_defaults[NINED3DRS_LAST + 1] = /* [D3DRS_SOFTWAREVERTEXPROCESSING] = FALSE, */ [D3DRS_POINTSIZE] = 0x3F800000, [D3DRS_POINTSIZE_MIN] = 0x3F800000, - [D3DRS_POINTSPRITEENABLE] = FALSE, - [D3DRS_POINTSCALEENABLE] = FALSE, + [D3DRS_POINTSPRITEENABLE] = false, + [D3DRS_POINTSCALEENABLE] = false, [D3DRS_POINTSCALE_A] = 0x3F800000, [D3DRS_POINTSCALE_B] = 0x00000000, [D3DRS_POINTSCALE_C] = 0x00000000, - [D3DRS_MULTISAMPLEANTIALIAS] = TRUE, + [D3DRS_MULTISAMPLEANTIALIAS] = true, [D3DRS_MULTISAMPLEMASK] = 0xFFFFFFFF, [D3DRS_PATCHEDGESTYLE] = D3DPATCHEDGE_DISCRETE, /* [D3DRS_PATCHSEGMENTS] = 0x3F800000, */ [D3DRS_DEBUGMONITORTOKEN] = 0xDEADCAFE, [D3DRS_POINTSIZE_MAX] = 0x3F800000, /* depends on cap */ - [D3DRS_INDEXEDVERTEXBLENDENABLE] = FALSE, + [D3DRS_INDEXEDVERTEXBLENDENABLE] = false, [D3DRS_COLORWRITEENABLE] = 0x0000000f, [D3DRS_TWEENFACTOR] = 0x00000000, [D3DRS_BLENDOP] = D3DBLENDOP_ADD, [D3DRS_POSITIONDEGREE] = D3DDEGREE_CUBIC, [D3DRS_NORMALDEGREE] = D3DDEGREE_LINEAR, - [D3DRS_SCISSORTESTENABLE] = FALSE, + [D3DRS_SCISSORTESTENABLE] = false, [D3DRS_SLOPESCALEDEPTHBIAS] = 0, [D3DRS_MINTESSELLATIONLEVEL] = 0x3F800000, [D3DRS_MAXTESSELLATIONLEVEL] = 0x3F800000, - [D3DRS_ANTIALIASEDLINEENABLE] = FALSE, + [D3DRS_ANTIALIASEDLINEENABLE] = false, [D3DRS_ADAPTIVETESS_X] = 0x00000000, [D3DRS_ADAPTIVETESS_Y] = 0x00000000, [D3DRS_ADAPTIVETESS_Z] = 0x3F800000, [D3DRS_ADAPTIVETESS_W] = 0x00000000, - [D3DRS_ENABLEADAPTIVETESSELLATION] = FALSE, - [D3DRS_TWOSIDEDSTENCILMODE] = FALSE, + [D3DRS_ENABLEADAPTIVETESSELLATION] = false, + [D3DRS_TWOSIDEDSTENCILMODE] = false, [D3DRS_CCW_STENCILFAIL] = D3DSTENCILOP_KEEP, [D3DRS_CCW_STENCILZFAIL] = D3DSTENCILOP_KEEP, [D3DRS_CCW_STENCILPASS] = D3DSTENCILOP_KEEP, @@ -2842,14 +2842,14 @@ static const DWORD nine_render_state_defaults[NINED3DRS_LAST + 1] = [D3DRS_WRAP13] = 0, [D3DRS_WRAP14] = 0, [D3DRS_WRAP15] = 0, - [D3DRS_SEPARATEALPHABLENDENABLE] = FALSE, + [D3DRS_SEPARATEALPHABLENDENABLE] = false, [D3DRS_SRCBLENDALPHA] = D3DBLEND_ONE, [D3DRS_DESTBLENDALPHA] = D3DBLEND_ZERO, [D3DRS_BLENDOPALPHA] = D3DBLENDOP_ADD, - [NINED3DRS_VSPOINTSIZE] = FALSE, + [NINED3DRS_VSPOINTSIZE] = false, [NINED3DRS_RTMASK] = 0xf, - [NINED3DRS_ALPHACOVERAGE] = FALSE, - [NINED3DRS_MULTISAMPLE] = FALSE, + [NINED3DRS_ALPHACOVERAGE] = false, + [NINED3DRS_MULTISAMPLE] = false, [NINED3DRS_FETCH4] = 0, [NINED3DRS_EMULATED_ALPHATEST] = 7 /* ALWAYS pass */ }; @@ -2902,7 +2902,7 @@ void nine_state_restore_non_cso(struct NineDevice9 *device) context->changed.group = NINE_STATE_ALL; /* TODO: we can remove states that have prepared commits */ context->changed.vtxbuf = (1ULL << device->caps.MaxStreams) - 1; - context->changed.ucp = TRUE; + context->changed.ucp = true; context->commit |= 0xffffffff; /* re-commit everything */ context->enabled_sampler_count_vs = 0; context->enabled_sampler_count_ps = 0; @@ -2967,7 +2967,7 @@ nine_state_set_defaults(struct NineDevice9 *device, const D3DCAPS9 *caps, */ context->changed.group = NINE_STATE_ALL; context->changed.vtxbuf = (1ULL << device->caps.MaxStreams) - 1; - context->changed.ucp = TRUE; + context->changed.ucp = true; context->ff.changed.transform[0] = ~0; context->ff.changed.transform[D3DTS_WORLD / 32] |= 1 << (D3DTS_WORLD % 32); @@ -2982,7 +2982,7 @@ nine_state_set_defaults(struct NineDevice9 *device, const D3DCAPS9 *caps, if (!is_reset) { context->dummy_vbo_bound_at = -1; - context->vbo_bound_done = FALSE; + context->vbo_bound_done = false; } } @@ -3054,7 +3054,7 @@ nine_context_clear(struct NineDevice9 *device) pipe_resource_reference(&context->pipe_data.cb_ps.buffer, NULL); for (i = 0; i < NINE_MAX_SAMPLERS; ++i) { - context->texture[i].enabled = FALSE; + context->texture[i].enabled = false; pipe_resource_reference(&context->texture[i].resource, NULL); pipe_sampler_view_reference(&context->texture[i].view[0], @@ -3110,7 +3110,7 @@ update_vertex_elements_sw(struct NineDevice9 *device) int8_t vdecl_index_map[16]; /* vs->num_inputs <= 16 */ int8_t used_streams[device->caps.MaxStreams]; int dummy_vbo_stream = -1; - BOOL need_dummy_vbo = FALSE; + BOOL need_dummy_vbo = false; struct cso_velems_state ve; bool programmable_vs = state->vs && !(state->vdecl && state->vdecl->position_t); @@ -3131,12 +3131,12 @@ update_vertex_elements_sw(struct NineDevice9 *device) } } if (vdecl_index_map[n] < 0) - need_dummy_vbo = TRUE; + need_dummy_vbo = true; } } else { /* No vertex declaration. Likely will never happen in practice, * but we need not crash on this */ - need_dummy_vbo = TRUE; + need_dummy_vbo = true; } if (need_dummy_vbo) { diff --git a/src/gallium/frontends/nine/query9.c b/src/gallium/frontends/nine/query9.c index 8058c6d577c..3f8282c43dc 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; - bool ok, wait_query_result = FALSE; + bool ok, wait_query_result = false; union pipe_query_result presult; union nine_query_result nresult; @@ -226,7 +226,7 @@ NineQuery9_GetData( struct NineQuery9 *This, * However Wine states that return value should * be S_OK, so wait for the result to return S_OK. */ NineQuery9_Issue(This, D3DISSUE_END); - wait_query_result = TRUE; + wait_query_result = true; } /* The documention mentions no special case for D3DQUERYTYPE_TIMESTAMP. @@ -234,7 +234,7 @@ NineQuery9_GetData( struct NineQuery9 *This, * D3DGETDATA_FLUSH is specified. */ if (This->type == D3DQUERYTYPE_TIMESTAMP && (dwGetDataFlags & D3DGETDATA_FLUSH)) - wait_query_result = TRUE; + wait_query_result = true; /* Note: We ignore dwGetDataFlags, because get_query_result will diff --git a/src/gallium/frontends/nine/stateblock9.c b/src/gallium/frontends/nine/stateblock9.c index b708c9dfa32..32dc5244e20 100644 --- a/src/gallium/frontends/nine/stateblock9.c +++ b/src/gallium/frontends/nine/stateblock9.c @@ -377,8 +377,8 @@ nine_state_copy_common(struct NineDevice9 *device, for (s = i * 32; s < (i * 32 + 32); ++s) { if (!(mask->ff.changed.transform[i] & (1 << (s % 32)))) continue; - *nine_state_access_transform(&dst->ff, s, TRUE) = - *nine_state_access_transform(&src->ff, s, FALSE); + *nine_state_access_transform(&dst->ff, s, true) = + *nine_state_access_transform(&src->ff, s, false); } /* if (apply) * dst->ff.changed.transform[i] |= mask->ff.changed.transform[i];*/ @@ -543,9 +543,9 @@ NineStateBlock9_Capture( struct NineStateBlock9 *This ) DBG("This=%p\n", This); if (This->type == NINESBT_ALL) - nine_state_copy_common_all(device, dst, src, dst, FALSE, NULL, MaxStreams); + nine_state_copy_common_all(device, dst, src, dst, false, NULL, MaxStreams); else - nine_state_copy_common(device, dst, src, dst, FALSE, NULL); + nine_state_copy_common(device, dst, src, dst, false, NULL); if (dst->changed.group & NINE_STATE_VDECL) nine_bind(&dst->vdecl, src->vdecl); @@ -566,9 +566,9 @@ NineStateBlock9_Apply( struct NineStateBlock9 *This ) DBG("This=%p\n", This); if (This->type == NINESBT_ALL) - nine_state_copy_common_all(device, dst, src, src, TRUE, pool, MaxStreams); + nine_state_copy_common_all(device, dst, src, src, true, pool, MaxStreams); else - nine_state_copy_common(device, dst, src, src, TRUE, pool); + nine_state_copy_common(device, dst, src, src, true, pool); nine_context_apply_stateblock(device, src); diff --git a/src/gallium/frontends/nine/surface9.c b/src/gallium/frontends/nine/surface9.c index 5fe7f51521b..970e9fe70c6 100644 --- a/src/gallium/frontends/nine/surface9.c +++ b/src/gallium/frontends/nine/surface9.c @@ -126,7 +126,7 @@ NineSurface9_ctor( struct NineSurface9 *This, This->base.info.target, This->base.info.nr_samples, This->base.info.bind, - FALSE, + false, pDesc->Pool == D3DPOOL_SCRATCH); if (This->base.info.format == PIPE_FORMAT_NONE && pDesc->Format != D3DFMT_NULL) @@ -146,8 +146,8 @@ NineSurface9_ctor( struct NineSurface9 *This, This->base.info.target, This->base.info.nr_samples, This->base.info.bind, - FALSE, - TRUE); + false, + true); if (This->base.info.format != This->format_internal || /* DYNAMIC Textures requires same stride as ram buffers. * The workaround stores a copy in RAM for locks. It eats more virtual space, @@ -358,10 +358,10 @@ NineSurface9_MarkContainerDirty( struct NineSurface9 *This ) assert(This->texture == D3DRTYPE_TEXTURE || This->texture == D3DRTYPE_CUBETEXTURE); if (This->base.pool == D3DPOOL_MANAGED) - tex->managed.dirty = TRUE; + tex->managed.dirty = true; else if (This->base.usage & D3DUSAGE_AUTOGENMIPMAP) - tex->dirty_mip = TRUE; + tex->dirty_mip = true; BASETEX_REGISTER_UPDATE(tex); } diff --git a/src/gallium/frontends/nine/swapchain9.c b/src/gallium/frontends/nine/swapchain9.c index d1fd51ebe8b..79057b2a37d 100644 --- a/src/gallium/frontends/nine/swapchain9.c +++ b/src/gallium/frontends/nine/swapchain9.c @@ -79,7 +79,7 @@ NineSwapChain9_ctor( struct NineSwapChain9 *This, if (!pPresentationParameters->hDeviceWindow) pPresentationParameters->hDeviceWindow = hFocusWindow; - This->rendering_done = FALSE; + This->rendering_done = false; This->pool = NULL; for (i = 0; i < D3DPRESENT_BACK_BUFFERS_MAX_EX + 1; i++) { This->pending_presentation[i] = calloc(1, sizeof(BOOL)); @@ -186,7 +186,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This, HRESULT hr; struct pipe_resource *resource, tmplt; enum pipe_format pf; - BOOL has_present_buffers = FALSE; + BOOL has_present_buffers = false; int depth; unsigned i, oldBufferCount, newBufferCount; D3DMULTISAMPLE_TYPE multisample_type; @@ -281,7 +281,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This, pf = d3d9_to_pipe_format_checked(This->screen, pParams->BackBufferFormat, PIPE_TEXTURE_2D, multisample_type, - PIPE_BIND_RENDER_TARGET, FALSE, FALSE); + PIPE_BIND_RENDER_TARGET, false, false); if (This->actx->linear_framebuffer || (pf != PIPE_FORMAT_B8G8R8X8_UNORM && @@ -289,7 +289,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This, pParams->SwapEffect != D3DSWAPEFFECT_DISCARD || multisample_type >= 2 || (This->actx->ref && This->actx->ref == This->screen)) - has_present_buffers = TRUE; + has_present_buffers = true; /* Note: the buffer depth has to match the window depth. * In practice, ARGB buffers can be used with windows @@ -332,7 +332,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This, if (This->enable_threadpool) This->pool = _mesa_threadpool_create(This); if (!This->pool) - This->enable_threadpool = FALSE; + This->enable_threadpool = false; for (i = 0; i < oldBufferCount; i++) { D3DWindowBuffer_release(This, This->present_handles[i]); @@ -363,7 +363,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This, pParams->BackBufferFormat, PIPE_TEXTURE_2D, tmplt.nr_samples, - tmplt.bind, FALSE, FALSE); + tmplt.bind, false, false); if (tmplt.format == PIPE_FORMAT_NONE) return D3DERR_INVALIDCALL; resource = nine_resource_create_with_retry(pDevice, This->screen, &tmplt); @@ -389,7 +389,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This, DBG("Failed to create RT surface.\n"); return hr; } - This->buffers[i]->base.base.forward = FALSE; + This->buffers[i]->base.base.forward = false; } if (has_present_buffers) { tmplt.format = PIPE_FORMAT_B8G8R8X8_UNORM; @@ -418,7 +418,7 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This, PIPE_TEXTURE_2D, tmplt.nr_samples, tmplt.bind, - FALSE, FALSE); + false, false); if (tmplt.format == PIPE_FORMAT_NONE) return D3DERR_INVALIDCALL; @@ -645,7 +645,7 @@ handle_draw_cursor_and_hud( struct NineSwapChain9 *This, struct pipe_resource *r blit.mask = PIPE_MASK_RGBA; blit.filter = PIPE_TEX_FILTER_NEAREST; - blit.scissor_enable = FALSE; + blit.scissor_enable = false; /* NOTE: blit messes up when box.x + box.width < 0, fix driver * NOTE2: device->cursor.pos contains coordinates relative to the screen. @@ -660,7 +660,7 @@ handle_draw_cursor_and_hud( struct NineSwapChain9 *This, struct pipe_resource *r blit.src.box.width, blit.src.box.height, blit.dst.box.x, blit.dst.box.y); - blit.alpha_blend = TRUE; + blit.alpha_blend = true; pipe = NineDevice9_GetPipe(This->base.device); pipe->blit(pipe, &blit); } @@ -691,7 +691,7 @@ static void work_present(void *data) work->screen->fence_reference(work->screen, &(work->fence_to_wait), NULL); } ID3DPresent_PresentBuffer(work->present, work->present_handle, work->hDestWindowOverride, NULL, NULL, NULL, 0); - p_atomic_set(work->pending_presentation, FALSE); + p_atomic_set(work->pending_presentation, false); free(work); } @@ -707,7 +707,7 @@ static void pend_present(struct NineSwapChain9 *This, work->present_handle = This->present_handles[0]; work->hDestWindowOverride = hDestWindowOverride; work->pending_presentation = This->pending_presentation[0]; - p_atomic_set(work->pending_presentation, TRUE); + p_atomic_set(work->pending_presentation, true); This->tasks[0] = _mesa_threadpool_queue_task(This->pool, work_present, work); return; @@ -875,8 +875,8 @@ present( struct NineSwapChain9 *This, blit.filter = (blit.dst.box.width == blit.src.box.width && blit.dst.box.height == blit.src.box.height) ? PIPE_TEX_FILTER_NEAREST : PIPE_TEX_FILTER_LINEAR; - blit.scissor_enable = FALSE; - blit.alpha_blend = FALSE; + blit.scissor_enable = false; + blit.alpha_blend = false; pipe->blit(pipe, &blit); } @@ -903,12 +903,12 @@ present( struct NineSwapChain9 *This, This->screen->fence_reference(This->screen, &fence, NULL); } - This->rendering_done = TRUE; + This->rendering_done = true; bypass_rendering: if (dwFlags & D3DPRESENT_DONOTWAIT) { UNTESTED(2); - BOOL still_draw = FALSE; + BOOL still_draw = false; fence = swap_fences_see_front(This); if (fence) { still_draw = !This->screen->fence_finish(This->screen, NULL, fence, 0); @@ -925,7 +925,7 @@ bypass_rendering: This->screen->fence_reference(This->screen, &fence, NULL); } - This->rendering_done = FALSE; + This->rendering_done = false; if (!This->enable_threadpool) { This->tasks[0]=NULL; @@ -968,7 +968,7 @@ NineSwapChain9_Present( struct NineSwapChain9 *This, } else { if (NineSwapChain9_GetOccluded(This) || NineSwapChain9_ResolutionMismatch(This)) { - This->base.device->device_needs_reset = TRUE; + This->base.device->device_needs_reset = true; } if (This->base.device->device_needs_reset) { DBG("Device is lost. Returning D3DERR_DEVICELOST.\n"); @@ -1249,7 +1249,7 @@ NineSwapChain9_GetOccluded( struct NineSwapChain9 *This ) return ID3DPresent_GetWindowOccluded(This->present); } - return FALSE; + return false; } BOOL @@ -1259,7 +1259,7 @@ NineSwapChain9_ResolutionMismatch( struct NineSwapChain9 *This ) return ID3DPresent_ResolutionMismatch(This->present); } - return FALSE; + return false; } HANDLE diff --git a/src/gallium/frontends/nine/texture9.c b/src/gallium/frontends/nine/texture9.c index 1f7042bdfd3..91608de305a 100644 --- a/src/gallium/frontends/nine/texture9.c +++ b/src/gallium/frontends/nine/texture9.c @@ -109,7 +109,7 @@ NineTexture9_ctor( struct NineTexture9 *This, Levels = 0; pf = d3d9_to_pipe_format_checked(screen, Format, PIPE_TEXTURE_2D, 0, - PIPE_BIND_SAMPLER_VIEW, FALSE, + PIPE_BIND_SAMPLER_VIEW, false, Pool == D3DPOOL_SCRATCH); if (Format != D3DFMT_NULL && pf == PIPE_FORMAT_NONE) @@ -315,14 +315,14 @@ NineTexture9_AddDirtyRect( struct NineTexture9 *This, */ if (This->base.base.pool == D3DPOOL_DEFAULT) { if (This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP) { - This->base.dirty_mip = TRUE; + This->base.dirty_mip = true; BASETEX_REGISTER_UPDATE(&This->base); } return D3D_OK; } if (This->base.base.pool == D3DPOOL_MANAGED) { - This->base.managed.dirty = TRUE; + This->base.managed.dirty = true; BASETEX_REGISTER_UPDATE(&This->base); } diff --git a/src/gallium/frontends/nine/threadpool.c b/src/gallium/frontends/nine/threadpool.c index e6aa3316c49..fc5eb13f32d 100644 --- a/src/gallium/frontends/nine/threadpool.c +++ b/src/gallium/frontends/nine/threadpool.c @@ -66,7 +66,7 @@ threadpool_worker(void *data) pthread_mutex_unlock(&pool->m); task->work(task->data); pthread_mutex_lock(&pool->m); - task->finished = TRUE; + task->finished = true; pthread_cond_broadcast(&task->finish); } @@ -112,7 +112,7 @@ _mesa_threadpool_destroy(struct NineSwapChain9 *swapchain, struct threadpool *po return; pthread_mutex_lock(&pool->m); - pool->shutdown = TRUE; + pool->shutdown = true; pthread_cond_broadcast(&pool->new_work); pthread_mutex_unlock(&pool->m); diff --git a/src/gallium/frontends/nine/vertexdeclaration9.c b/src/gallium/frontends/nine/vertexdeclaration9.c index 5f6bccb7af7..b1bd07e92f8 100644 --- a/src/gallium/frontends/nine/vertexdeclaration9.c +++ b/src/gallium/frontends/nine/vertexdeclaration9.c @@ -104,7 +104,7 @@ nine_d3ddeclusage_check(unsigned usage, unsigned usage_idx) case D3DDECLUSAGE_BLENDWEIGHT: case D3DDECLUSAGE_BLENDINDICES: case D3DDECLUSAGE_COLOR: - return TRUE; + return true; case D3DDECLUSAGE_PSIZE: case D3DDECLUSAGE_FOG: case D3DDECLUSAGE_SAMPLE: @@ -112,7 +112,7 @@ nine_d3ddeclusage_check(unsigned usage, unsigned usage_idx) case D3DDECLUSAGE_TEXCOORD: return usage_idx <= 15; default: - return FALSE; + return false; } } @@ -204,7 +204,7 @@ NineVertexDeclaration9_ctor( struct NineVertexDeclaration9 *This, This->usage_map[i] = usage; if (This->decls[i].Usage == D3DDECLUSAGE_POSITIONT) - This->position_t = TRUE; + This->position_t = true; This->elems[i].src_offset = This->decls[i].Offset; This->elems[i].instance_divisor = 0; diff --git a/src/gallium/frontends/nine/volume9.c b/src/gallium/frontends/nine/volume9.c index 19ad3c3f3a3..95e18026525 100644 --- a/src/gallium/frontends/nine/volume9.c +++ b/src/gallium/frontends/nine/volume9.c @@ -100,7 +100,7 @@ NineVolume9_ctor( struct NineVolume9 *This, pDesc->Format, This->info.target, This->info.nr_samples, - This->info.bind, FALSE, + This->info.bind, false, pDesc->Pool == D3DPOOL_SCRATCH); if (This->info.format == PIPE_FORMAT_NONE) @@ -116,8 +116,8 @@ NineVolume9_ctor( struct NineVolume9 *This, pDesc->Format, This->info.target, This->info.nr_samples, - This->info.bind, FALSE, - TRUE); + This->info.bind, false, + true); if (This->info.format != This->format_internal || /* See surface9.c */ (pParams->device->workarounds.dynamic_texture_workaround && @@ -201,7 +201,7 @@ NineVolume9_MarkContainerDirty( struct NineVolume9 *This ) tex = NineBaseTexture9(This->base.container); assert(tex); if (This->desc.Pool == D3DPOOL_MANAGED) - tex->managed.dirty = TRUE; + tex->managed.dirty = true; BASETEX_REGISTER_UPDATE(tex); } diff --git a/src/gallium/frontends/nine/volumetexture9.c b/src/gallium/frontends/nine/volumetexture9.c index 4d574994599..4f320b4b963 100644 --- a/src/gallium/frontends/nine/volumetexture9.c +++ b/src/gallium/frontends/nine/volumetexture9.c @@ -59,7 +59,7 @@ NineVolumeTexture9_ctor( struct NineVolumeTexture9 *This, user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP), D3DERR_INVALIDCALL); pf = d3d9_to_pipe_format_checked(screen, Format, PIPE_TEXTURE_3D, 0, - PIPE_BIND_SAMPLER_VIEW, FALSE, + PIPE_BIND_SAMPLER_VIEW, false, Pool == D3DPOOL_SCRATCH); if (pf == PIPE_FORMAT_NONE) @@ -213,7 +213,7 @@ NineVolumeTexture9_AddDirtyBox( struct NineVolumeTexture9 *This, } if (This->base.base.pool == D3DPOOL_MANAGED) { - This->base.managed.dirty = TRUE; + This->base.managed.dirty = true; BASETEX_REGISTER_UPDATE(&This->base); } diff --git a/src/gallium/frontends/omx/bellagio/vid_enc.c b/src/gallium/frontends/omx/bellagio/vid_enc.c index 10a71724010..b7eb16087fa 100644 --- a/src/gallium/frontends/omx/bellagio/vid_enc.c +++ b/src/gallium/frontends/omx/bellagio/vid_enc.c @@ -231,7 +231,7 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam priv->force_pic_type.IntraRefreshVOP = OMX_FALSE; priv->frame_num = 0; priv->pic_order_cnt = 0; - priv->restricted_b_frames = debug_get_bool_option("OMX_USE_RESTRICTED_B_FRAMES", FALSE); + priv->restricted_b_frames = debug_get_bool_option("OMX_USE_RESTRICTED_B_FRAMES", false); priv->scale.xWidth = OMX_VID_ENC_SCALING_WIDTH_DEFAULT; priv->scale.xHeight = OMX_VID_ENC_SCALING_WIDTH_DEFAULT; diff --git a/src/gallium/frontends/omx/tizonia/h264eprc.c b/src/gallium/frontends/omx/tizonia/h264eprc.c index daaa2d31b64..9ff4b71a266 100644 --- a/src/gallium/frontends/omx/tizonia/h264eprc.c +++ b/src/gallium/frontends/omx/tizonia/h264eprc.c @@ -484,7 +484,7 @@ static void * h264e_prc_ctor(void *ap_obj, va_list * app) priv->force_pic_type.IntraRefreshVOP = OMX_FALSE; priv->frame_num = 0; priv->pic_order_cnt = 0; - priv->restricted_b_frames = debug_get_bool_option("OMX_USE_RESTRICTED_B_FRAMES", FALSE); + priv->restricted_b_frames = debug_get_bool_option("OMX_USE_RESTRICTED_B_FRAMES", false); priv->scale.xWidth = OMX_VID_ENC_SCALING_WIDTH_DEFAULT; priv->scale.xHeight = OMX_VID_ENC_SCALING_WIDTH_DEFAULT; priv->in_port_disabled_ = false; diff --git a/src/gallium/frontends/osmesa/osmesa.c b/src/gallium/frontends/osmesa/osmesa.c index 2b84308804a..3cb0cba6d4c 100644 --- a/src/gallium/frontends/osmesa/osmesa.c +++ b/src/gallium/frontends/osmesa/osmesa.c @@ -660,9 +660,9 @@ OSMesaCreateContextAttribs(const int *attribList, OSMesaContext sharelist) attribs.major = version_major; attribs.minor = version_minor; attribs.flags = 0; /* ST_CONTEXT_FLAG_x */ - attribs.options.force_glsl_extensions_warn = FALSE; - attribs.options.disable_blend_func_extended = FALSE; - attribs.options.disable_glsl_line_continuations = FALSE; + attribs.options.force_glsl_extensions_warn = false; + attribs.options.disable_blend_func_extended = false; + attribs.options.disable_glsl_line_continuations = false; attribs.options.force_glsl_version = 0; osmesa_init_st_visual(&attribs.visual, @@ -782,12 +782,12 @@ OSMesaMakeCurrent(OSMesaContext osmesa, void *buffer, GLenum type, if (!osmesa->ever_used) { /* one-time init, just postprocessing for now */ - bool any_pp_enabled = FALSE; + bool any_pp_enabled = false; unsigned i; for (i = 0; i < ARRAY_SIZE(osmesa->pp_enabled); i++) { if (osmesa->pp_enabled[i]) { - any_pp_enabled = TRUE; + any_pp_enabled = true; break; } } @@ -802,7 +802,7 @@ OSMesaMakeCurrent(OSMesaContext osmesa, void *buffer, GLenum type, pp_init_fbos(osmesa->pp, width, height); } - osmesa->ever_used = TRUE; + osmesa->ever_used = true; } return GL_TRUE; diff --git a/src/gallium/frontends/vdpau/mixer.c b/src/gallium/frontends/vdpau/mixer.c index 8fa0559b6e1..73680ca0049 100644 --- a/src/gallium/frontends/vdpau/mixer.c +++ b/src/gallium/frontends/vdpau/mixer.c @@ -70,7 +70,7 @@ vlVdpVideoMixerCreate(VdpDevice device, } vl_csc_get_matrix(VL_CSC_COLOR_STANDARD_BT_601, NULL, true, &vmixer->csc); - if (!debug_get_bool_option("G3DVL_NO_CSC", FALSE)) { + if (!debug_get_bool_option("G3DVL_NO_CSC", false)) { if (!vl_compositor_set_csc_matrix(&vmixer->cstate, (const vl_csc_matrix *)&vmixer->csc, 1.0f, 0.0f)) { ret = VDP_STATUS_ERROR; goto err_csc_matrix; @@ -692,7 +692,7 @@ vlVdpVideoMixerSetFeatureEnables(VdpVideoMixer mixer, case VDP_VIDEO_MIXER_FEATURE_LUMA_KEY: vmixer->luma_key.enabled = feature_enables[i]; - if (!debug_get_bool_option("G3DVL_NO_CSC", FALSE)) + if (!debug_get_bool_option("G3DVL_NO_CSC", false)) if (!vl_compositor_set_csc_matrix(&vmixer->cstate, (const vl_csc_matrix *)&vmixer->csc, vmixer->luma_key.luma_min, vmixer->luma_key.luma_max)) { mtx_unlock(&vmixer->device->mutex); @@ -815,7 +815,7 @@ vlVdpVideoMixerSetAttributeValues(VdpVideoMixer mixer, vl_csc_get_matrix(VL_CSC_COLOR_STANDARD_BT_601, NULL, 1, &vmixer->csc); else memcpy(vmixer->csc, vdp_csc, sizeof(vl_csc_matrix)); - if (!debug_get_bool_option("G3DVL_NO_CSC", FALSE)) + if (!debug_get_bool_option("G3DVL_NO_CSC", false)) if (!vl_compositor_set_csc_matrix(&vmixer->cstate, (const vl_csc_matrix *)&vmixer->csc, vmixer->luma_key.luma_min, vmixer->luma_key.luma_max)) { ret = VDP_STATUS_ERROR; @@ -842,7 +842,7 @@ vlVdpVideoMixerSetAttributeValues(VdpVideoMixer mixer, goto fail; } vmixer->luma_key.luma_min = val; - if (!debug_get_bool_option("G3DVL_NO_CSC", FALSE)) + if (!debug_get_bool_option("G3DVL_NO_CSC", false)) if (!vl_compositor_set_csc_matrix(&vmixer->cstate, (const vl_csc_matrix *)&vmixer->csc, vmixer->luma_key.luma_min, vmixer->luma_key.luma_max)) { ret = VDP_STATUS_ERROR; @@ -857,7 +857,7 @@ vlVdpVideoMixerSetAttributeValues(VdpVideoMixer mixer, goto fail; } vmixer->luma_key.luma_max = val; - if (!debug_get_bool_option("G3DVL_NO_CSC", FALSE)) + if (!debug_get_bool_option("G3DVL_NO_CSC", false)) if (!vl_compositor_set_csc_matrix(&vmixer->cstate, (const vl_csc_matrix *)&vmixer->csc, vmixer->luma_key.luma_min, vmixer->luma_key.luma_max)) { ret = VDP_STATUS_ERROR; diff --git a/src/gallium/frontends/wgl/stw_context.c b/src/gallium/frontends/wgl/stw_context.c index 1be1ee740ca..48ee6baf175 100644 --- a/src/gallium/frontends/wgl/stw_context.c +++ b/src/gallium/frontends/wgl/stw_context.c @@ -69,10 +69,10 @@ DrvCopyContext(DHGLRC dhrcSource, DHGLRC dhrcDest, UINT fuMask) { struct stw_context *src; struct stw_context *dst; - BOOL ret = FALSE; + BOOL ret = false; if (!stw_dev) - return FALSE; + return false; stw_lock_contexts(stw_dev); @@ -98,10 +98,10 @@ DrvShareLists(DHGLRC dhglrc1, DHGLRC dhglrc2) { struct stw_context *ctx1; struct stw_context *ctx2; - BOOL ret = FALSE; + BOOL ret = false; if (!stw_dev) - return FALSE; + return false; stw_lock_contexts(stw_dev); @@ -110,8 +110,8 @@ DrvShareLists(DHGLRC dhglrc1, DHGLRC dhglrc2) if (ctx1 && ctx2) { ret = _mesa_share_state(ctx2->st->ctx, ctx1->st->ctx); - ctx1->shared = TRUE; - ctx2->shared = TRUE; + ctx1->shared = true; + ctx2->shared = true; } stw_unlock_contexts(stw_dev); @@ -173,7 +173,7 @@ stw_create_context_attribs(HDC hdc, INT iLayerPlane, struct stw_context *shareCt return 0; if (shareCtx != NULL) - shareCtx->shared = TRUE; + shareCtx->shared = true; ctx = CALLOC_STRUCT( stw_context ); if (ctx == NULL) @@ -312,10 +312,10 @@ BOOL APIENTRY DrvDeleteContext(DHGLRC dhglrc) { struct stw_context *ctx ; - BOOL ret = FALSE; + BOOL ret = false; if (!stw_dev) - return FALSE; + return false; stw_lock_contexts(stw_dev); ctx = stw_lookup_context_locked(dhglrc); @@ -330,7 +330,7 @@ DrvDeleteContext(DHGLRC dhglrc) st_api_make_current(NULL, NULL, NULL); stw_destroy_context(ctx); - ret = TRUE; + ret = true; } return ret; @@ -340,19 +340,19 @@ BOOL stw_unbind_context(struct stw_context *ctx) { if (!ctx) - return FALSE; + return false; /* The expectation is that ctx is the same context which is * current for this thread. We should check that and return False * if not the case. */ if (ctx != stw_current_context()) - return FALSE; + return false; - if (stw_make_current( NULL, NULL, NULL ) == FALSE) - return FALSE; + if (stw_make_current( NULL, NULL, NULL ) == false) + return false; - return TRUE; + return true; } BOOL APIENTRY @@ -361,7 +361,7 @@ DrvReleaseContext(DHGLRC dhglrc) struct stw_context *ctx; if (!stw_dev) - return FALSE; + return false; stw_lock_contexts(stw_dev); ctx = stw_lookup_context_locked( dhglrc ); @@ -430,17 +430,17 @@ BOOL stw_make_current(struct stw_framebuffer *fb, struct stw_framebuffer *fbRead, struct stw_context *ctx) { struct stw_context *old_ctx = NULL; - BOOL ret = FALSE; + BOOL ret = false; if (!stw_dev) - return FALSE; + return false; old_ctx = stw_current_context(); if (old_ctx != NULL) { if (old_ctx == ctx) { if (old_ctx->current_framebuffer == fb && old_ctx->current_read_framebuffer == fbRead) { /* Return if already current. */ - return TRUE; + return true; } } else { if (old_ctx->shared) { @@ -559,13 +559,13 @@ stw_make_current_by_handles(HDC hDrawDC, HDC hReadDC, DHGLRC dhglrc) struct stw_context *ctx = stw_lookup_context(dhglrc); if (dhglrc && !ctx) { stw_make_current_by_handles(NULL, NULL, 0); - return FALSE; + return false; } struct stw_framebuffer *fb = get_unlocked_refd_framebuffer_from_dc(hDrawDC); if (ctx && !fb) { stw_make_current_by_handles(NULL, NULL, 0); - return FALSE; + return false; } struct stw_framebuffer *fbRead = (hDrawDC == hReadDC || hReadDC == NULL) ? @@ -573,7 +573,7 @@ stw_make_current_by_handles(HDC hDrawDC, HDC hReadDC, DHGLRC dhglrc) if (ctx && !fbRead) { release_old_framebuffers(fb, NULL, ctx); stw_make_current_by_handles(NULL, NULL, 0); - return FALSE; + return false; } BOOL success = stw_make_current(fb, fbRead, ctx); diff --git a/src/gallium/frontends/wgl/stw_device.c b/src/gallium/frontends/wgl/stw_device.c index 9cbd6c1ae75..2f852aca0aa 100644 --- a/src/gallium/frontends/wgl/stw_device.c +++ b/src/gallium/frontends/wgl/stw_device.c @@ -170,13 +170,13 @@ stw_init(const struct stw_winsys *stw_winsys) stw_dev->initialized = true; - return TRUE; + return true; error1: FREE(stw_dev->fscreen); stw_dev = NULL; - return FALSE; + return false; } bool @@ -295,5 +295,5 @@ DrvValidateVersion(ULONG ulVersion) * ignore it. */ (void)ulVersion; - return TRUE; + return true; } diff --git a/src/gallium/frontends/wgl/stw_ext_context.c b/src/gallium/frontends/wgl/stw_ext_context.c index c81725e0e39..590530e2b9f 100644 --- a/src/gallium/frontends/wgl/stw_ext_context.c +++ b/src/gallium/frontends/wgl/stw_ext_context.c @@ -79,7 +79,7 @@ wglCreateContextAttribsARB(HDC hDC, HGLRC hShareContext, const int *attribList) int profileMask = WGL_CONTEXT_CORE_PROFILE_BIT_ARB; int resetStrategy = WGL_NO_RESET_NOTIFICATION_ARB; int i; - BOOL done = FALSE; + BOOL done = false; const int contextFlagsAll = (WGL_CONTEXT_DEBUG_BIT_ARB | WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB | WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB); @@ -111,7 +111,7 @@ wglCreateContextAttribsARB(HDC hDC, HGLRC hShareContext, const int *attribList) break; case 0: /* end of list */ - done = TRUE; + done = true; break; default: /* bad attribute */ diff --git a/src/gallium/frontends/wgl/stw_ext_pbuffer.c b/src/gallium/frontends/wgl/stw_ext_pbuffer.c index f3bb5f16cdf..b8066b6e7ba 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 bool first = TRUE; + static bool first = true; /* * Implement pbuffers through invisible windows @@ -88,7 +88,7 @@ stw_pbuffer_create(const struct stw_pixelformat_info *pfi, int iWidth, int iHeig wc.lpszClassName = "wglpbuffer"; wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW; RegisterClass(&wc); - first = FALSE; + first = false; } DWORD dwExStyle = 0; @@ -117,7 +117,7 @@ stw_pbuffer_create(const struct stw_pixelformat_info *pfi, int iWidth, int iHeig * WS_OVERLAPPEDWINDOW or WS_POPUPWINDOW as above. */ - AdjustWindowRectEx(&rect, dwStyle, FALSE, dwExStyle); + AdjustWindowRectEx(&rect, dwStyle, false, dwExStyle); HWND hWnd = CreateWindowEx(dwExStyle, "wglpbuffer", /* wc.lpszClassName */ @@ -167,7 +167,7 @@ wglCreatePbufferARB(HDC hCurrentDC, BOOL bRet; int textureFormat = WGL_NO_TEXTURE_ARB; int textureTarget = WGL_NO_TEXTURE_ARB; - BOOL textureMipmap = FALSE; + BOOL textureMipmap = false; const struct stw_pixelformat_info *pfi = stw_pixelformat_get_info(iPixelFormat); if (!pfi) { @@ -316,7 +316,7 @@ wglDestroyPbufferARB(HPBUFFERARB hPbuffer) if (!hPbuffer) { SetLastError(ERROR_INVALID_HANDLE); - return FALSE; + return false; } fb = stw_framebuffer_from_HPBUFFERARB(hPbuffer); @@ -335,7 +335,7 @@ wglQueryPbufferARB(HPBUFFERARB hPbuffer, if (!hPbuffer) { SetLastError(ERROR_INVALID_HANDLE); - return FALSE; + return false; } fb = stw_framebuffer_from_HPBUFFERARB(hPbuffer); @@ -343,32 +343,32 @@ wglQueryPbufferARB(HPBUFFERARB hPbuffer, switch (iAttribute) { case WGL_PBUFFER_WIDTH_ARB: *piValue = fb->width; - return TRUE; + return true; case WGL_PBUFFER_HEIGHT_ARB: *piValue = fb->height; - return TRUE; + return true; case WGL_PBUFFER_LOST_ARB: /* We assume that no content is ever lost due to display mode change */ - *piValue = FALSE; - return TRUE; + *piValue = false; + return true; /* WGL_ARB_render_texture */ case WGL_TEXTURE_TARGET_ARB: *piValue = fb->textureTarget; - return TRUE; + return true; case WGL_TEXTURE_FORMAT_ARB: *piValue = fb->textureFormat; - return TRUE; + return true; case WGL_MIPMAP_TEXTURE_ARB: *piValue = fb->textureMipmap; - return TRUE; + return true; case WGL_MIPMAP_LEVEL_ARB: *piValue = fb->textureLevel; - return TRUE; + return true; case WGL_CUBE_MAP_FACE_ARB: *piValue = fb->textureFace + WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; - return TRUE; + return true; default: SetLastError(ERROR_INVALID_DATA); - return FALSE; + return false; } } diff --git a/src/gallium/frontends/wgl/stw_ext_pixelformat.c b/src/gallium/frontends/wgl/stw_ext_pixelformat.c index 97d4223cd2d..fb8facb1289 100644 --- a/src/gallium/frontends/wgl/stw_ext_pixelformat.c +++ b/src/gallium/frontends/wgl/stw_ext_pixelformat.c @@ -58,30 +58,30 @@ stw_query_attrib(HDC hdc, int iPixelFormat, int iLayerPlane, int attrib, int *pv if (attrib == WGL_NUMBER_PIXEL_FORMATS_ARB) { *pvalue = (int) count; - return TRUE; + return true; } pfi = stw_pixelformat_get_info(iPixelFormat); if (!pfi) { - return FALSE; + return false; } switch (attrib) { case WGL_DRAW_TO_WINDOW_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_DRAW_TO_WINDOW ? TRUE : FALSE; - return TRUE; + *pvalue = pfi->pfd.dwFlags & PFD_DRAW_TO_WINDOW ? true : false; + return true; case WGL_DRAW_TO_BITMAP_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_DRAW_TO_BITMAP ? TRUE : FALSE; - return TRUE; + *pvalue = pfi->pfd.dwFlags & PFD_DRAW_TO_BITMAP ? true : false; + return true; case WGL_NEED_PALETTE_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_NEED_PALETTE ? TRUE : FALSE; - return TRUE; + *pvalue = pfi->pfd.dwFlags & PFD_NEED_PALETTE ? true : false; + return true; case WGL_NEED_SYSTEM_PALETTE_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_NEED_SYSTEM_PALETTE ? TRUE : FALSE; - return TRUE; + *pvalue = pfi->pfd.dwFlags & PFD_NEED_SYSTEM_PALETTE ? true : false; + return true; case WGL_SWAP_METHOD_ARB: if (pfi->pfd.dwFlags & PFD_SWAP_COPY) @@ -90,33 +90,33 @@ stw_query_attrib(HDC hdc, int iPixelFormat, int iLayerPlane, int attrib, int *pv *pvalue = WGL_SWAP_EXCHANGE_EXT; else *pvalue = WGL_SWAP_UNDEFINED_ARB; - return TRUE; + return true; case WGL_SWAP_LAYER_BUFFERS_ARB: - *pvalue = FALSE; - return TRUE; + *pvalue = false; + return true; case WGL_NUMBER_OVERLAYS_ARB: *pvalue = 0; - return TRUE; + return true; case WGL_NUMBER_UNDERLAYS_ARB: *pvalue = 0; - return TRUE; + return true; case WGL_BIND_TO_TEXTURE_RGB_ARB: /* WGL_ARB_render_texture */ *pvalue = pfi->bindToTextureRGB; - return TRUE; + return true; case WGL_BIND_TO_TEXTURE_RGBA_ARB: /* WGL_ARB_render_texture */ *pvalue = pfi->bindToTextureRGBA; - return TRUE; + return true; } if (iLayerPlane != 0) - return FALSE; + return false; switch (attrib) { case WGL_ACCELERATION_ARB: @@ -124,7 +124,7 @@ stw_query_attrib(HDC hdc, int iPixelFormat, int iLayerPlane, int attrib, int *pv break; case WGL_TRANSPARENT_ARB: - *pvalue = FALSE; + *pvalue = false; break; case WGL_TRANSPARENT_RED_VALUE_ARB: @@ -137,23 +137,23 @@ stw_query_attrib(HDC hdc, int iPixelFormat, int iLayerPlane, int attrib, int *pv case WGL_SHARE_DEPTH_ARB: case WGL_SHARE_STENCIL_ARB: case WGL_SHARE_ACCUM_ARB: - *pvalue = TRUE; + *pvalue = true; break; case WGL_SUPPORT_GDI_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_SUPPORT_GDI ? TRUE : FALSE; + *pvalue = pfi->pfd.dwFlags & PFD_SUPPORT_GDI ? true : false; break; case WGL_SUPPORT_OPENGL_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_SUPPORT_OPENGL ? TRUE : FALSE; + *pvalue = pfi->pfd.dwFlags & PFD_SUPPORT_OPENGL ? true : false; break; case WGL_DOUBLE_BUFFER_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_DOUBLEBUFFER ? TRUE : FALSE; + *pvalue = pfi->pfd.dwFlags & PFD_DOUBLEBUFFER ? true : false; break; case WGL_STEREO_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_STEREO ? TRUE : FALSE; + *pvalue = pfi->pfd.dwFlags & PFD_STEREO ? true : false; break; case WGL_PIXEL_TYPE_ARB: @@ -170,7 +170,7 @@ stw_query_attrib(HDC hdc, int iPixelFormat, int iLayerPlane, int attrib, int *pv *pvalue = WGL_TYPE_COLORINDEX_ARB; break; default: - return FALSE; + return false; } break; @@ -268,10 +268,10 @@ stw_query_attrib(HDC hdc, int iPixelFormat, int iLayerPlane, int attrib, int *pv default: - return FALSE; + return false; } - return TRUE; + return true; } struct attrib_match_info @@ -283,44 +283,44 @@ struct attrib_match_info static const struct attrib_match_info attrib_match[] = { /* WGL_ARB_pixel_format */ - { WGL_DRAW_TO_WINDOW_ARB, 0, TRUE }, - { WGL_DRAW_TO_BITMAP_ARB, 0, TRUE }, - { WGL_ACCELERATION_ARB, 0, TRUE }, - { WGL_NEED_PALETTE_ARB, 0, TRUE }, - { WGL_NEED_SYSTEM_PALETTE_ARB, 0, TRUE }, - { WGL_SWAP_LAYER_BUFFERS_ARB, 0, TRUE }, - { WGL_SWAP_METHOD_ARB, 0, TRUE }, - { WGL_NUMBER_OVERLAYS_ARB, 4, FALSE }, - { WGL_NUMBER_UNDERLAYS_ARB, 4, FALSE }, + { WGL_DRAW_TO_WINDOW_ARB, 0, true }, + { WGL_DRAW_TO_BITMAP_ARB, 0, true }, + { WGL_ACCELERATION_ARB, 0, true }, + { WGL_NEED_PALETTE_ARB, 0, true }, + { WGL_NEED_SYSTEM_PALETTE_ARB, 0, true }, + { WGL_SWAP_LAYER_BUFFERS_ARB, 0, true }, + { WGL_SWAP_METHOD_ARB, 0, true }, + { WGL_NUMBER_OVERLAYS_ARB, 4, false }, + { WGL_NUMBER_UNDERLAYS_ARB, 4, false }, /*{ WGL_SHARE_DEPTH_ARB, 0, TRUE },*/ /* no overlays -- ignore */ /*{ WGL_SHARE_STENCIL_ARB, 0, TRUE },*/ /* no overlays -- ignore */ /*{ WGL_SHARE_ACCUM_ARB, 0, TRUE },*/ /* no overlays -- ignore */ - { WGL_SUPPORT_GDI_ARB, 0, TRUE }, - { WGL_SUPPORT_OPENGL_ARB, 0, TRUE }, - { WGL_DOUBLE_BUFFER_ARB, 0, TRUE }, - { WGL_STEREO_ARB, 0, TRUE }, - { WGL_PIXEL_TYPE_ARB, 0, TRUE }, - { WGL_COLOR_BITS_ARB, 1, FALSE }, - { WGL_RED_BITS_ARB, 1, FALSE }, - { WGL_GREEN_BITS_ARB, 1, FALSE }, - { WGL_BLUE_BITS_ARB, 1, FALSE }, - { WGL_ALPHA_BITS_ARB, 1, FALSE }, - { WGL_ACCUM_BITS_ARB, 1, FALSE }, - { WGL_ACCUM_RED_BITS_ARB, 1, FALSE }, - { WGL_ACCUM_GREEN_BITS_ARB, 1, FALSE }, - { WGL_ACCUM_BLUE_BITS_ARB, 1, FALSE }, - { WGL_ACCUM_ALPHA_BITS_ARB, 1, FALSE }, - { WGL_DEPTH_BITS_ARB, 1, FALSE }, - { WGL_STENCIL_BITS_ARB, 1, FALSE }, - { WGL_AUX_BUFFERS_ARB, 2, FALSE }, + { WGL_SUPPORT_GDI_ARB, 0, true }, + { WGL_SUPPORT_OPENGL_ARB, 0, true }, + { WGL_DOUBLE_BUFFER_ARB, 0, true }, + { WGL_STEREO_ARB, 0, true }, + { WGL_PIXEL_TYPE_ARB, 0, true }, + { WGL_COLOR_BITS_ARB, 1, false }, + { WGL_RED_BITS_ARB, 1, false }, + { WGL_GREEN_BITS_ARB, 1, false }, + { WGL_BLUE_BITS_ARB, 1, false }, + { WGL_ALPHA_BITS_ARB, 1, false }, + { WGL_ACCUM_BITS_ARB, 1, false }, + { WGL_ACCUM_RED_BITS_ARB, 1, false }, + { WGL_ACCUM_GREEN_BITS_ARB, 1, false }, + { WGL_ACCUM_BLUE_BITS_ARB, 1, false }, + { WGL_ACCUM_ALPHA_BITS_ARB, 1, false }, + { WGL_DEPTH_BITS_ARB, 1, false }, + { WGL_STENCIL_BITS_ARB, 1, false }, + { WGL_AUX_BUFFERS_ARB, 2, false }, /* WGL_ARB_multisample */ - { WGL_SAMPLE_BUFFERS_ARB, 2, FALSE }, - { WGL_SAMPLES_ARB, 2, FALSE }, + { WGL_SAMPLE_BUFFERS_ARB, 2, false }, + { WGL_SAMPLES_ARB, 2, false }, /* WGL_ARB_render_texture */ - { WGL_BIND_TO_TEXTURE_RGB_ARB, 0, FALSE }, - { WGL_BIND_TO_TEXTURE_RGBA_ARB, 0, FALSE }, + { WGL_BIND_TO_TEXTURE_RGB_ARB, 0, false }, + { WGL_BIND_TO_TEXTURE_RGBA_ARB, 0, false }, }; struct stw_pixelformat_score @@ -350,7 +350,7 @@ score_pixelformats(HDC hdc, } } if (ami == NULL) - return TRUE; + return true; /* Iterate all pixelformats, query the requested attribute and calculate * score points. @@ -359,7 +359,7 @@ score_pixelformats(HDC hdc, int actual_value; if (!stw_query_attrib(hdc, index + 1, 0, attribute, &actual_value)) - return FALSE; + return false; if (ami->exact) { /* For an exact match criteria, if the actual and expected values @@ -384,7 +384,7 @@ score_pixelformats(HDC hdc, } } - return TRUE; + return true; } @@ -408,7 +408,7 @@ wglChoosePixelFormatARB(HDC hdc, const int *piAttribIList, scores = (struct stw_pixelformat_score *) MALLOC(count * sizeof(struct stw_pixelformat_score)); if (scores == NULL) - return FALSE; + return false; for (i = 0; i < count; i++) { scores[i].points = 0x7fffffff; scores[i].index = i; @@ -421,7 +421,7 @@ wglChoosePixelFormatARB(HDC hdc, const int *piAttribIList, if (!score_pixelformats(hdc, scores, count, piAttribIList[0], piAttribIList[1])) { FREE(scores); - return FALSE; + return false; } piAttribIList += 2; } @@ -431,7 +431,7 @@ wglChoosePixelFormatARB(HDC hdc, const int *piAttribIList, if (!score_pixelformats(hdc, scores, count, (int) pfAttribFList[0], (int) pfAttribFList[1])) { FREE(scores); - return FALSE; + return false; } pfAttribFList += 2; } @@ -445,14 +445,14 @@ wglChoosePixelFormatARB(HDC hdc, const int *piAttribIList, bool swapped; do { - swapped = FALSE; + swapped = false; for (i = 1; i < n; i++) { if (scores[i - 1].points < scores[i].points) { struct stw_pixelformat_score score = scores[i - 1]; scores[i - 1] = scores[i]; scores[i] = score; - swapped = TRUE; + swapped = true; } } n--; @@ -474,7 +474,7 @@ wglChoosePixelFormatARB(HDC hdc, const int *piAttribIList, } FREE(scores); - return TRUE; + return true; } @@ -490,11 +490,11 @@ wglGetPixelFormatAttribfvARB(HDC hdc, int iPixelFormat, int iLayerPlane, if (!stw_query_attrib(hdc, iPixelFormat, iLayerPlane, piAttributes[i], &value)) - return FALSE; + return false; pfValues[i] = (FLOAT) value; } - return TRUE; + return true; } @@ -508,8 +508,8 @@ wglGetPixelFormatAttribivARB(HDC hdc, int iPixelFormat, int iLayerPlane, for (i = 0; i < nAttributes; i++) { if (!stw_query_attrib(hdc, iPixelFormat, iLayerPlane, piAttributes[i], &piValues[i])) - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/src/gallium/frontends/wgl/stw_ext_rendertexture.c b/src/gallium/frontends/wgl/stw_ext_rendertexture.c index f99edb1d971..73aeeb0c419 100644 --- a/src/gallium/frontends/wgl/stw_ext_rendertexture.c +++ b/src/gallium/frontends/wgl/stw_ext_rendertexture.c @@ -131,33 +131,33 @@ wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuffer) if (!curctx) { debug_printf("No rendering context in wglBindTexImageARB()\n"); SetLastError(ERROR_INVALID_OPERATION); - return FALSE; + return false; } fb = stw_framebuffer_from_HPBUFFERARB(hPbuffer); if (!fb) { debug_printf("Invalid pbuffer handle in wglBindTexImageARB()\n"); SetLastError(ERROR_INVALID_HANDLE); - return FALSE; + return false; } srcBuffer = translate_ibuffer(iBuffer); if (srcBuffer == GL_NONE) { debug_printf("Invalid buffer 0x%x in wglBindTexImageARB()\n", iBuffer); SetLastError(ERROR_INVALID_DATA); - return FALSE; + return false; } target = translate_target(fb->textureTarget); if (target == GL_NONE) { debug_printf("no texture target in wglBindTexImageARB()\n"); - return FALSE; + return false; } texFormat = translate_texture_format(fb->textureFormat); if (texFormat == GL_NONE) { debug_printf("no texture format in wglBindTexImageARB()\n"); - return FALSE; + return false; } old_fb = curctx->current_framebuffer; @@ -177,7 +177,7 @@ wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuffer) fb->pfi = pfiSave; if (!retVal) { debug_printf("stw_make_current(#1) failed in wglBindTexImageARB()\n"); - return FALSE; + return false; } st_copy_framebuffer_to_texture(srcBuffer, fb->width, fb->height, @@ -205,17 +205,17 @@ wglReleaseTexImageARB(HPBUFFERARB hPbuffer, int iBuffer) if (!fb) { debug_printf("Invalid pbuffer handle in wglReleaseTexImageARB()\n"); SetLastError(ERROR_INVALID_HANDLE); - return FALSE; + return false; } srcBuffer = translate_ibuffer(iBuffer); if (srcBuffer == GL_NONE) { debug_printf("Invalid buffer 0x%x in wglReleaseTexImageARB()\n", iBuffer); SetLastError(ERROR_INVALID_DATA); - return FALSE; + return false; } - return TRUE; + return true; } @@ -227,7 +227,7 @@ wglSetPbufferAttribARB(HPBUFFERARB hPbuffer, const int *piAttribList) if (!fb) { SetLastError(ERROR_INVALID_HANDLE); - return FALSE; + return false; } for (i = 0; piAttribList[i]; i += 2) { @@ -246,16 +246,16 @@ wglSetPbufferAttribARB(HPBUFFERARB hPbuffer, const int *piAttribList) "wglSetPbufferAttribARB()\n", piAttribList[i]); SetLastError(ERROR_INVALID_DATA); - return FALSE; + return false; } break; default: debug_printf("Invalid attribute 0x%x in wglSetPbufferAttribARB()\n", piAttribList[i]); SetLastError(ERROR_INVALID_DATA); - return FALSE; + return false; } } - return TRUE; + return true; } diff --git a/src/gallium/frontends/wgl/stw_ext_swapinterval.c b/src/gallium/frontends/wgl/stw_ext_swapinterval.c index 3b913e7db93..87a620a8b69 100644 --- a/src/gallium/frontends/wgl/stw_ext_swapinterval.c +++ b/src/gallium/frontends/wgl/stw_ext_swapinterval.c @@ -46,12 +46,12 @@ wglSwapIntervalEXT(int interval) { if (interval < 0) { SetLastError(ERROR_INVALID_DATA); - return FALSE; + return false; } if (stw_dev && !os_get_option("WGL_SWAP_INTERVAL")) { stw_dev->swap_interval = interval; } - return TRUE; + return true; } diff --git a/src/gallium/frontends/wgl/stw_framebuffer.c b/src/gallium/frontends/wgl/stw_framebuffer.c index b1b21f57797..17f4dac0d9d 100644 --- a/src/gallium/frontends/wgl/stw_framebuffer.c +++ b/src/gallium/frontends/wgl/stw_framebuffer.c @@ -172,7 +172,7 @@ stw_framebuffer_get_size(struct stw_framebuffer *fb) } if (width != fb->width || height != fb->height) { - fb->must_resize = TRUE; + fb->must_resize = true; fb->width = width; fb->height = height; } @@ -353,7 +353,7 @@ stw_framebuffer_create(HWND hWnd, const struct stw_pixelformat_info *pfi, enum s * a non-zero framebuffer size at all times. */ - fb->must_resize = TRUE; + fb->must_resize = true; fb->width = 1; fb->height = 1; fb->client_rect.left = 0; @@ -521,12 +521,12 @@ DrvSetPixelFormat(HDC hdc, LONG iPixelFormat) struct stw_framebuffer *fb; if (!stw_dev) - return FALSE; + return false; index = (uint) iPixelFormat - 1; count = stw_pixelformat_get_count(hdc); if (index >= count) - return FALSE; + return false; fb = stw_framebuffer_from_hdc_locked(hdc); if (fb) { @@ -545,7 +545,7 @@ DrvSetPixelFormat(HDC hdc, LONG iPixelFormat) fb = stw_framebuffer_create(WindowFromDC(hdc), pfi, STW_FRAMEBUFFER_WGL_WINDOW, stw_dev->fscreen); if (!fb) { - return FALSE; + return false; } stw_framebuffer_unlock( fb ); @@ -560,7 +560,7 @@ DrvSetPixelFormat(HDC hdc, LONG iPixelFormat) } } - return TRUE; + return true; } @@ -590,11 +590,11 @@ DrvPresentBuffers(HDC hdc, LPPRESENTBUFFERS data) struct pipe_resource *res; if (!stw_dev) - return FALSE; + return false; fb = stw_framebuffer_from_hdc( hdc ); if (fb == NULL) - return FALSE; + return false; screen = stw_dev->screen; ctx = stw_current_context(); @@ -636,7 +636,7 @@ DrvPresentBuffers(HDC hdc, LPPRESENTBUFFERS data) stw_framebuffer_unlock(fb); - return TRUE; + return true; } @@ -688,7 +688,7 @@ stw_framebuffer_present_locked(HDC hdc, stw_notify_current_locked(fb); stw_framebuffer_unlock(fb); - return TRUE; + return true; } } @@ -733,7 +733,7 @@ stw_framebuffer_swap_locked(HDC hdc, struct stw_framebuffer *fb) struct stw_context *ctx; if (!(fb->pfi->pfd.dwFlags & PFD_DOUBLEBUFFER)) { stw_framebuffer_unlock(fb); - return TRUE; + return true; } ctx = stw_current_context(); @@ -767,11 +767,11 @@ DrvSwapBuffers(HDC hdc) struct stw_framebuffer *fb; if (!stw_dev) - return FALSE; + return false; fb = stw_framebuffer_from_hdc( hdc ); if (fb == NULL) - return FALSE; + return false; return stw_framebuffer_swap_locked(hdc, fb); } @@ -783,5 +783,5 @@ DrvSwapLayerBuffers(HDC hdc, UINT fuPlanes) if (fuPlanes & WGL_SWAP_MAIN_PLANE) return DrvSwapBuffers(hdc); - return FALSE; + return false; } diff --git a/src/gallium/frontends/wgl/stw_gdishim.c b/src/gallium/frontends/wgl/stw_gdishim.c index 9c7906e9c9b..84298b2290f 100644 --- a/src/gallium/frontends/wgl/stw_gdishim.c +++ b/src/gallium/frontends/wgl/stw_gdishim.c @@ -63,10 +63,10 @@ BOOL SetPixelFormat( if (fb && fb->pfi) { fb->pfi->iPixelFormat = format; stw_framebuffer_unlock(fb); - return TRUE; + return true; } #endif - return FALSE; + return false; } void StretchDIBits(HDC hdc, unsigned int xDest, unsigned int yDest, unsigned int DestWidth, unsigned int DestHeight, unsigned int xSrc, unsigned int ySrc, unsigned int SrcWidth, unsigned int SrcHeight, void* lpBits, void* lpbmi, unsigned int iUsage, DWORD rop) diff --git a/src/gallium/frontends/wgl/stw_pixelformat.c b/src/gallium/frontends/wgl/stw_pixelformat.c index 01a2d9cf93d..94d3f9844a6 100644 --- a/src/gallium/frontends/wgl/stw_pixelformat.c +++ b/src/gallium/frontends/wgl/stw_pixelformat.c @@ -110,8 +110,8 @@ stw_pf_depth_stencil[] = { static const bool stw_pf_doublebuffer[] = { - FALSE, - TRUE, + false, + true, }; @@ -220,9 +220,9 @@ stw_pixelformat_add(struct stw_device *stw_dev, /* WGL_ARB_render_texture */ if (color->bits.alpha) - pfi->bindToTextureRGBA = TRUE; + pfi->bindToTextureRGBA = true; - pfi->bindToTextureRGB = TRUE; + pfi->bindToTextureRGB = true; if (!extended) { ++stw_dev->pixelformat_count; @@ -330,12 +330,12 @@ stw_pixelformat_init(void) /* normal, displayable formats */ num_formats = add_color_format_variants(stw_pf_color, - ARRAY_SIZE(stw_pf_color), FALSE); + ARRAY_SIZE(stw_pf_color), false); assert(num_formats > 0); /* extended, pbuffer-only formats */ add_color_format_variants(stw_pf_color_extended, - ARRAY_SIZE(stw_pf_color_extended), TRUE); + ARRAY_SIZE(stw_pf_color_extended), true); assert(stw_dev->pixelformat_count <= util_dynarray_num_elements(&stw_dev->pixelformats, @@ -465,7 +465,7 @@ DrvDescribeLayerPlane(HDC hdc, INT iPixelFormat, INT iLayerPlane, UINT nBytes, LPLAYERPLANEDESCRIPTOR plpd) { assert(0); - return FALSE; + return false; } @@ -491,7 +491,7 @@ BOOL APIENTRY DrvRealizeLayerPalette(HDC hdc, INT iLayerPlane, BOOL bRealize) { assert(0); - return FALSE; + return false; } diff --git a/src/gallium/frontends/wgl/stw_st.c b/src/gallium/frontends/wgl/stw_st.c index 9a8cde87df2..19c8e942472 100644 --- a/src/gallium/frontends/wgl/stw_st.c +++ b/src/gallium/frontends/wgl/stw_st.c @@ -336,7 +336,7 @@ stw_st_framebuffer_validate(struct st_context *st, if (stwfb->fb->must_resize || stwfb->needs_fake_front || (statt_mask & ~stwfb->texture_mask)) { stw_st_framebuffer_validate_locked(st, &stwfb->base, stwfb->fb->width, stwfb->fb->height, statt_mask); - stwfb->fb->must_resize = FALSE; + stwfb->fb->must_resize = false; } struct pipe_resource **textures = diff --git a/src/gallium/frontends/wgl/stw_tls.c b/src/gallium/frontends/wgl/stw_tls.c index d0a71b502c7..e1d00dff04d 100644 --- a/src/gallium/frontends/wgl/stw_tls.c +++ b/src/gallium/frontends/wgl/stw_tls.c @@ -62,7 +62,7 @@ stw_tls_init(void) { tlsIndex = TlsAlloc(); if (tlsIndex == TLS_OUT_OF_INDEXES) { - return FALSE; + return false; } /* @@ -104,7 +104,7 @@ stw_tls_init(void) } #endif /* _GAMING_XBOX */ - return TRUE; + return true; } @@ -181,17 +181,17 @@ stw_tls_init_thread(void) struct stw_tls_data *data; if (tlsIndex == TLS_OUT_OF_INDEXES) { - return FALSE; + return false; } data = stw_tls_data_create(GetCurrentThreadId()); if (!data) { - return FALSE; + return false; } TlsSetValue(tlsIndex, data); - return TRUE; + return true; } void diff --git a/src/gallium/frontends/xa/xa_composite.c b/src/gallium/frontends/xa/xa_composite.c index 9761ee383a2..161cd3bb7d7 100644 --- a/src/gallium/frontends/xa/xa_composite.c +++ b/src/gallium/frontends/xa/xa_composite.c @@ -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; - bool supported = FALSE; + bool supported = false; /* * our default in case something goes wrong @@ -119,7 +119,7 @@ blend_for_op(struct xa_composite_blend *blend, for (i = 0; i < num_blends; ++i) { if (xa_blends[i].op == op) { *blend = xa_blends[i]; - supported = TRUE; + supported = true; break; } } @@ -128,7 +128,7 @@ blend_for_op(struct xa_composite_blend *blend, * No component alpha yet. */ if (mask_pic && mask_pic->component_alpha && blend->alpha_src) - return FALSE; + return false; if (!dst_pic->srf) return supported; @@ -186,9 +186,9 @@ xa_filter_to_gallium(int xrender_filter, int *out_filter) break; default: *out_filter = PIPE_TEX_FILTER_NEAREST; - return FALSE; + return false; } - return TRUE; + return true; } static int @@ -212,13 +212,13 @@ static bool xa_src_pict_is_accelerated(const union xa_source_pict *src_pic) { if (!src_pic) - return TRUE; + return true; if (src_pic->type == xa_src_pict_solid_fill || src_pic->type == xa_src_pict_float_solid_fill) - return TRUE; + return true; - return FALSE; + return false; } XA_EXPORT int @@ -276,8 +276,8 @@ static unsigned int picture_format_fixups(struct xa_picture *src_pic, int mask) { - bool set_alpha = FALSE; - bool 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; @@ -359,7 +359,7 @@ xa_handle_src_pict(struct xa_context *ctx, sizeof(solid_color)); break; default: - return FALSE; + return false; } if (is_mask && ctx->has_solid_src) @@ -368,11 +368,11 @@ xa_handle_src_pict(struct xa_context *ctx, memcpy(ctx->solid_color, solid_color, sizeof(solid_color)); if (is_mask) - ctx->has_solid_mask = TRUE; + ctx->has_solid_mask = true; else - ctx->has_solid_src = TRUE; + ctx->has_solid_src = true; - return TRUE; + return true; } static int @@ -384,8 +384,8 @@ bind_shaders(struct xa_context *ctx, const struct xa_composite *comp) struct xa_picture *mask_pic = comp->mask; struct xa_picture *dst_pic = comp->dst; - ctx->has_solid_src = FALSE; - ctx->has_solid_mask = FALSE; + ctx->has_solid_src = false; + ctx->has_solid_mask = false; if (dst_pic && xa_format_type(dst_pic->pict_format) != xa_format_type(xa_surface_format(dst_pic->srf))) @@ -572,8 +572,8 @@ xa_composite_done(struct xa_context *ctx) renderer_draw_flush(ctx); ctx->comp = NULL; - ctx->has_solid_src = FALSE; - ctx->has_solid_mask = FALSE; + ctx->has_solid_src = false; + ctx->has_solid_mask = false; xa_ctx_sampler_views_destroy(ctx); } diff --git a/src/gallium/frontends/xa/xa_context.c b/src/gallium/frontends/xa/xa_context.c index ab6b77d0b40..43ee7363346 100644 --- a/src/gallium/frontends/xa/xa_context.c +++ b/src/gallium/frontends/xa/xa_context.c @@ -352,7 +352,7 @@ xa_solid_done(struct xa_context *ctx) { renderer_draw_flush(ctx); ctx->comp = NULL; - ctx->has_solid_src = FALSE; + ctx->has_solid_src = false; ctx->num_bound_samplers = 0; } diff --git a/src/gallium/frontends/xa/xa_priv.h b/src/gallium/frontends/xa/xa_priv.h index f368de3b81f..cb725d2a403 100644 --- a/src/gallium/frontends/xa/xa_priv.h +++ b/src/gallium/frontends/xa/xa_priv.h @@ -129,7 +129,7 @@ xa_scissor_reset(struct xa_context *ctx) ctx->scissor.maxy = 0; ctx->scissor.minx = ~0; ctx->scissor.miny = ~0; - ctx->scissor_valid = FALSE; + ctx->scissor_valid = false; } static inline void @@ -140,7 +140,7 @@ xa_scissor_update(struct xa_context *ctx, unsigned minx, unsigned miny, ctx->scissor.maxy = MAX2(ctx->scissor.maxy, maxy); ctx->scissor.minx = MIN2(ctx->scissor.minx, minx); ctx->scissor.miny = MIN2(ctx->scissor.miny, miny); - ctx->scissor_valid = TRUE; + ctx->scissor_valid = true; } enum xa_vs_traits { diff --git a/src/gallium/targets/d3d10sw/tests/tri.cpp b/src/gallium/targets/d3d10sw/tests/tri.cpp index 2dab88208c3..d7e95d4db72 100644 --- a/src/gallium/targets/d3d10sw/tests/tri.cpp +++ b/src/gallium/targets/d3d10sw/tests/tri.cpp @@ -70,7 +70,7 @@ main(int argc, char *argv[]) DWORD dwStyle = WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW | WS_VISIBLE; RECT rect = {0, 0, WindowWidth, WindowHeight}; - AdjustWindowRect(&rect, dwStyle, FALSE); + AdjustWindowRect(&rect, dwStyle, false); HWND hWnd = CreateWindow(wc.lpszClassName, "Simple example using DirectX10", diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c index fe2371d5d1c..9d3e6a947c7 100644 --- a/src/gallium/targets/d3dadapter9/drm.c +++ b/src/gallium/targets/d3dadapter9/drm.c @@ -167,7 +167,7 @@ read_descriptor( struct d3dadapter9_context *ctx, "%s", ctx->hal->get_name(ctx->hal)); if (override_vendorid > 0) { - found = FALSE; + found = false; /* fill in device_id and card name for fake vendor */ for (i = 0; i < sizeof(fallback_cards)/sizeof(fallback_cards[0]); i++) { if (fallback_cards[i].vendor_id == override_vendorid) { @@ -179,7 +179,7 @@ read_descriptor( struct d3dadapter9_context *ctx, drvid->DeviceId = fallback_cards[i].device_id; snprintf(drvid->Description, sizeof(drvid->Description), "%s", fallback_cards[i].name); - found = TRUE; + found = true; break; } } @@ -269,9 +269,9 @@ drm_create_adapter( int fd, if (driCheckOption(&userInitOptions, "throttle_value", DRI_INT)) { throttling_value_user = driQueryOptioni(&userInitOptions, "throttle_value"); if (throttling_value_user == -1) - ctx->base.throttling = FALSE; + ctx->base.throttling = false; else if (throttling_value_user >= 0) { - ctx->base.throttling = TRUE; + ctx->base.throttling = true; ctx->base.throttling_value = throttling_value_user; } } @@ -285,7 +285,7 @@ drm_create_adapter( int fd, if (ctx->base.tearfree_discard && !ctx->base.discard_delayed_release) { ERR("tearfree_discard requires discard_delayed_release\n"); - ctx->base.tearfree_discard = FALSE; + ctx->base.tearfree_discard = false; } ctx->base.csmt_force = driQueryOptioni(&userInitOptions, "csmt_force"); diff --git a/src/gallium/targets/libgl-gdi/stw_wgl.c b/src/gallium/targets/libgl-gdi/stw_wgl.c index 25a4b18ed6f..d285f70378b 100644 --- a/src/gallium/targets/libgl-gdi/stw_wgl.c +++ b/src/gallium/targets/libgl-gdi/stw_wgl.c @@ -104,7 +104,7 @@ wglMakeCurrent( HDC hdc, HGLRC hglrc ) { - return DrvSetContext( hdc, (DHGLRC)(UINT_PTR)hglrc, NULL ) ? TRUE : FALSE; + return DrvSetContext( hdc, (DHGLRC)(UINT_PTR)hglrc, NULL ) ? true : false; } @@ -229,7 +229,7 @@ wglUseFontBitmapsW( MAT2 tra; FIXED one, minus_one, zero; void *buffer = NULL; - BOOL result = TRUE; + BOOL result = true; one.value = 1; one.fract = 0; @@ -266,7 +266,7 @@ wglUseFontBitmapsW( } } else { - result = FALSE; + result = false; } glEndList(); @@ -276,7 +276,7 @@ wglUseFontBitmapsW( return result; #else - return FALSE; + return false; #endif /* _GAMING_XBOX */ } @@ -302,7 +302,7 @@ wglUseFontOutlinesA( assert( 0 ); - return FALSE; + return false; } WINGDIAPI BOOL APIENTRY @@ -327,7 +327,7 @@ wglUseFontOutlinesW( assert( 0 ); - return FALSE; + return false; } WINGDIAPI BOOL APIENTRY @@ -375,7 +375,7 @@ wglRealizeLayerPalette( assert( 0 ); - return FALSE; + return false; } diff --git a/src/gallium/targets/wgl/wgl.c b/src/gallium/targets/wgl/wgl.c index c55f727f71c..f57ee0cd471 100644 --- a/src/gallium/targets/wgl/wgl.c +++ b/src/gallium/targets/wgl/wgl.c @@ -64,13 +64,13 @@ #endif #ifdef GALLIUM_LLVMPIPE -static bool use_llvmpipe = FALSE; +static bool use_llvmpipe = false; #endif #ifdef GALLIUM_D3D12 -static bool use_d3d12 = FALSE; +static bool use_d3d12 = false; #endif #ifdef GALLIUM_ZINK -static bool use_zink = FALSE; +static bool use_zink = false; #endif static const char *created_driver_name = NULL; @@ -84,21 +84,21 @@ wgl_screen_create_by_name(HDC hDC, const char* driver, struct sw_winsys *winsys) if (strcmp(driver, "llvmpipe") == 0) { screen = llvmpipe_create_screen(winsys); if (screen) - use_llvmpipe = TRUE; + use_llvmpipe = true; } #endif #ifdef GALLIUM_D3D12 if (strcmp(driver, "d3d12") == 0) { screen = d3d12_wgl_create_screen(winsys, hDC); if (screen) - use_d3d12 = TRUE; + use_d3d12 = true; } #endif #ifdef GALLIUM_ZINK if (strcmp(driver, "zink") == 0) { screen = zink_create_screen(winsys, NULL); if (screen) - use_zink = TRUE; + use_zink = true; } #endif #ifdef GALLIUM_SOFTPIPE @@ -309,5 +309,5 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) } break; } - return TRUE; + return true; } diff --git a/src/gallium/tests/trivial/quad-tex.c b/src/gallium/tests/trivial/quad-tex.c index d0ebcb66698..11bf0c8a7c9 100644 --- a/src/gallium/tests/trivial/quad-tex.c +++ b/src/gallium/tests/trivial/quad-tex.c @@ -275,7 +275,7 @@ static void init_prog(struct program *p) const enum tgsi_semantic semantic_names[] = { TGSI_SEMANTIC_POSITION, TGSI_SEMANTIC_GENERIC }; const uint semantic_indexes[] = { 0, 0 }; - p->vs = util_make_vertex_passthrough_shader(p->pipe, 2, semantic_names, semantic_indexes, FALSE); + p->vs = util_make_vertex_passthrough_shader(p->pipe, 2, semantic_names, semantic_indexes, false); } /* fragment shader */ diff --git a/src/gallium/tests/trivial/tri.c b/src/gallium/tests/trivial/tri.c index a936433fbe1..5681485c540 100644 --- a/src/gallium/tests/trivial/tri.c +++ b/src/gallium/tests/trivial/tri.c @@ -219,12 +219,12 @@ static void init_prog(struct program *p) const enum tgsi_semantic semantic_names[] = { TGSI_SEMANTIC_POSITION, TGSI_SEMANTIC_COLOR }; const uint semantic_indexes[] = { 0, 0 }; - p->vs = util_make_vertex_passthrough_shader(p->pipe, 2, semantic_names, semantic_indexes, FALSE); + p->vs = util_make_vertex_passthrough_shader(p->pipe, 2, semantic_names, semantic_indexes, false); } /* fragment shader */ p->fs = util_make_fragment_passthrough_shader(p->pipe, - TGSI_SEMANTIC_COLOR, TGSI_INTERPOLATE_PERSPECTIVE, TRUE); + TGSI_SEMANTIC_COLOR, TGSI_INTERPOLATE_PERSPECTIVE, true); } static void close_prog(struct program *p) diff --git a/src/gallium/tests/unit/translate_test.c b/src/gallium/tests/unit/translate_test.c index a5916f8df00..48d7dc2dd89 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; - bool input_is_float = FALSE; + bool input_is_float = false; if (!fetch_rgba || !input_format_pack->pack_rgba_float 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 81e82ffd014..e5302400d60 100644 --- a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c +++ b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c @@ -277,10 +277,10 @@ fenced_buffer_remove_locked(struct fenced_manager *fenced_mgr, if (p_atomic_dec_zero(&fenced_buf->base.reference.count)) { fenced_buffer_destroy_locked(fenced_mgr, fenced_buf); - return TRUE; + return true; } - return FALSE; + return false; } @@ -324,7 +324,7 @@ fenced_buffer_finish_locked(struct fenced_manager *fenced_mgr, * Otherwise assume the work has been already carried out by another * thread that re-acquired the lock before us. */ - proceed = fence == fenced_buf->fence ? TRUE : FALSE; + proceed = fence == fenced_buf->fence ? true : false; ops->fence_reference(ops, &fence, NULL); @@ -365,7 +365,7 @@ fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr, struct list_head *curr, *next; struct fenced_buffer *fenced_buf; struct pipe_fence_handle *prev_fence = NULL; - bool ret = FALSE; + bool ret = false; curr = fenced_mgr->fenced.next; next = curr->next; @@ -383,7 +383,7 @@ fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr, * following buffers' fences already expired, * without further waits. */ - wait = FALSE; + wait = false; } else { signaled = ops->fence_signalled(ops, fenced_buf->fence, 0); @@ -404,7 +404,7 @@ fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr, fenced_buffer_remove_locked(fenced_mgr, fenced_buf); - ret = TRUE; + ret = true; curr = next; next = curr->next; @@ -443,7 +443,7 @@ fenced_buffer_try_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, fenced_buf->buffer = provider->create_buffer(fenced_mgr->provider, fenced_buf->size, desc); - return fenced_buf->buffer ? TRUE : FALSE; + return fenced_buf->buffer ? true : false; } @@ -461,7 +461,7 @@ fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, /* * Check for signaled buffers before trying to allocate. */ - fenced_manager_check_signalled_locked(fenced_mgr, FALSE); + fenced_manager_check_signalled_locked(fenced_mgr, false); fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf, desc); @@ -471,7 +471,7 @@ fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, * - or buffers are being being swapped out from GPU memory into CPU memory. */ while(!fenced_buf->buffer && - (fenced_manager_check_signalled_locked(fenced_mgr, FALSE))) { + (fenced_manager_check_signalled_locked(fenced_mgr, false))) { fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf, desc); } @@ -482,7 +482,7 @@ fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, * necessary. */ while(!fenced_buf->buffer && - (fenced_manager_check_signalled_locked(fenced_mgr, TRUE))) { + (fenced_manager_check_signalled_locked(fenced_mgr, true))) { fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf, desc); } @@ -745,7 +745,7 @@ fenced_bufmgr_create_buffer(struct pb_manager *mgr, * Try to create GPU storage without stalling, */ ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, - desc, TRUE); + desc, true); /* * Give up. @@ -776,7 +776,7 @@ fenced_bufmgr_flush(struct pb_manager *mgr) struct fenced_manager *fenced_mgr = fenced_manager(mgr); mtx_lock(&fenced_mgr->mutex); - while(fenced_manager_check_signalled_locked(fenced_mgr, TRUE)) + while(fenced_manager_check_signalled_locked(fenced_mgr, true)) ; mtx_unlock(&fenced_mgr->mutex); @@ -800,7 +800,7 @@ fenced_bufmgr_destroy(struct pb_manager *mgr) sched_yield(); #endif mtx_lock(&fenced_mgr->mutex); - while(fenced_manager_check_signalled_locked(fenced_mgr, TRUE)) + while(fenced_manager_check_signalled_locked(fenced_mgr, true)) ; } diff --git a/src/gallium/winsys/svga/drm/vmw_buffer.c b/src/gallium/winsys/svga/drm/vmw_buffer.c index 8528b40b3e6..92e720f67d7 100644 --- a/src/gallium/winsys/svga/drm/vmw_buffer.c +++ b/src/gallium/winsys/svga/drm/vmw_buffer.c @@ -136,7 +136,7 @@ vmw_gmr_buffer_map(struct pb_buffer *_buf, ret = vmw_ioctl_syncforcpu(buf->region, !!(flags & PB_USAGE_DONTBLOCK), !(flags & PB_USAGE_CPU_WRITE), - FALSE); + false); if (ret) return NULL; } @@ -156,7 +156,7 @@ vmw_gmr_buffer_unmap(struct pb_buffer *_buf) !(flags & PB_USAGE_UNSYNCHRONIZED)) { vmw_ioctl_releasefromcpu(buf->region, !(flags & PB_USAGE_CPU_WRITE), - FALSE); + false); } assert(buf->map_count > 0); @@ -289,13 +289,13 @@ vmw_gmr_bufmgr_region_ptr(struct pb_buffer *buf, gmr_buf = vmw_gmr_buffer(base_buf); if(!gmr_buf) - return FALSE; + return false; *ptr = vmw_ioctl_region_ptr(gmr_buf->region); ptr->offset += offset; - return TRUE; + return true; } #ifdef DEBUG @@ -326,7 +326,7 @@ vmw_svga_winsys_buffer_wrap(struct pb_buffer *buffer) } buf->pb_buf = buffer; - buf->fbuf = debug_flush_buf_create(FALSE, VMW_DEBUG_FLUSH_STACK); + buf->fbuf = debug_flush_buf_create(false, VMW_DEBUG_FLUSH_STACK); return buf; } diff --git a/src/gallium/winsys/svga/drm/vmw_context.c b/src/gallium/winsys/svga/drm/vmw_context.c index ff4abc19fae..e54e636efaa 100644 --- a/src/gallium/winsys/svga/drm/vmw_context.c +++ b/src/gallium/winsys/svga/drm/vmw_context.c @@ -279,12 +279,12 @@ vmw_swc_flush(struct svga_winsys_context *swc, vswc->region.reserved = 0; #ifdef DEBUG - vswc->must_flush = FALSE; + vswc->must_flush = false; debug_flush_flush(vswc->fctx); #endif swc->hints &= ~SVGA_HINT_FLAG_CAN_PRE_FLUSH; swc->hints &= ~SVGA_HINT_FLAG_EXPORT_FENCE_FD; - vswc->preemptive_flush = FALSE; + vswc->preemptive_flush = false; vswc->seen_surfaces = 0; vswc->seen_regions = 0; vswc->seen_mobs = 0; @@ -329,7 +329,7 @@ vmw_swc_reserve(struct svga_winsys_context *swc, vswc->shader.used + nr_relocs > vswc->shader.size || vswc->region.used + nr_relocs > vswc->region.size) { #ifdef DEBUG - vswc->must_flush = TRUE; + vswc->must_flush = true; debug_backtrace_capture(vswc->must_flush_stack, 1, VMW_MUST_FLUSH_STACK); #endif @@ -403,14 +403,14 @@ vmw_swc_region_relocation(struct svga_winsys_context *swc, */ reloc->buffer = vmw_pb_buffer(buffer); reloc->offset = offset; - reloc->is_mob = FALSE; + reloc->is_mob = false; ++vswc->region.staged; if (vmw_swc_add_validate_buffer(vswc, reloc->buffer, flags)) { vswc->seen_regions += reloc->buffer->size; if ((swc->hints & SVGA_HINT_FLAG_CAN_PRE_FLUSH) && vswc->seen_regions >= VMW_GMR_POOL_SIZE/5) - vswc->preemptive_flush = TRUE; + vswc->preemptive_flush = true; } #ifdef DEBUG @@ -444,7 +444,7 @@ vmw_swc_mob_relocation(struct svga_winsys_context *swc, */ reloc->buffer = pb_buffer; reloc->offset = offset; - reloc->is_mob = TRUE; + reloc->is_mob = true; ++vswc->region.staged; } @@ -454,7 +454,7 @@ vmw_swc_mob_relocation(struct svga_winsys_context *swc, if ((swc->hints & SVGA_HINT_FLAG_CAN_PRE_FLUSH) && vswc->seen_mobs >= vswc->vws->ioctl.max_mob_memory / VMW_MAX_MOB_MEM_FACTOR) - vswc->preemptive_flush = TRUE; + vswc->preemptive_flush = true; } #ifdef DEBUG @@ -484,7 +484,7 @@ vmw_swc_surface_clear_reference(struct svga_winsys_context *swc, util_hash_table_get(vswc->hash, vsurf); if (isrf && isrf->referenced) { - isrf->referenced = FALSE; + isrf->referenced = false; p_atomic_dec(&vsurf->validated); } } @@ -504,7 +504,7 @@ vmw_swc_surface_only_relocation(struct svga_winsys_context *swc, if (isrf == NULL) { isrf = &vswc->surface.items[vswc->surface.used + vswc->surface.staged]; vmw_svga_winsys_surface_reference(&isrf->vsurf, vsurf); - isrf->referenced = FALSE; + isrf->referenced = false; _mesa_hash_table_insert(vswc->hash, vsurf, isrf); ++vswc->surface.staged; @@ -513,11 +513,11 @@ vmw_swc_surface_only_relocation(struct svga_winsys_context *swc, if ((swc->hints & SVGA_HINT_FLAG_CAN_PRE_FLUSH) && vswc->seen_surfaces >= vswc->vws->ioctl.max_surface_memory / VMW_MAX_SURF_MEM_FACTOR) - vswc->preemptive_flush = TRUE; + vswc->preemptive_flush = true; } if (!(flags & SVGA_RELOC_INTERNAL) && !isrf->referenced) { - isrf->referenced = TRUE; + isrf->referenced = true; p_atomic_inc(&vsurf->validated); } @@ -596,14 +596,14 @@ vmw_swc_shader_relocation(struct svga_winsys_context *swc, if (ishader == NULL) { ishader = &vswc->shader.items[vswc->shader.used + vswc->shader.staged]; vmw_svga_winsys_shader_reference(&ishader->vshader, vshader); - ishader->referenced = FALSE; + ishader->referenced = false; _mesa_hash_table_insert(vswc->hash, vshader, ishader); ++vswc->shader.staged; } if (!ishader->referenced) { - ishader->referenced = TRUE; + ishader->referenced = true; p_atomic_inc(&vshader->validated); } } @@ -830,7 +830,7 @@ vmw_svga_winsys_context_create(struct svga_winsys_screen *sws) goto out_no_hash; #ifdef DEBUG - vswc->fctx = debug_flush_ctx_create(TRUE, VMW_DEBUG_FLUSH_STACK); + vswc->fctx = debug_flush_ctx_create(true, VMW_DEBUG_FLUSH_STACK); #endif vswc->base.force_coherent = vws->force_coherent; diff --git a/src/gallium/winsys/svga/drm/vmw_screen.c b/src/gallium/winsys/svga/drm/vmw_screen.c index 8dd4f4dda8b..e585659da4a 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen.c +++ b/src/gallium/winsys/svga/drm/vmw_screen.c @@ -151,16 +151,16 @@ vmw_winsys_create( int fd ) vws->device = stat_buf.st_rdev; vws->open_count = 1; vws->ioctl.drm_fd = os_dupfd_cloexec(fd); - vws->force_coherent = FALSE; + vws->force_coherent = false; if (!vmw_ioctl_init(vws)) goto out_no_ioctl; vws->base.have_gb_dma = !vws->force_coherent; - vws->base.need_to_rebind_resources = FALSE; + vws->base.need_to_rebind_resources = false; vws->base.have_transfer_from_buffer_cmd = vws->base.have_vgpu10; vws->base.have_constant_buffer_offset_cmd = vws->ioctl.have_drm_2_20 && vws->base.have_sm5; - vws->base.have_index_vertex_buffer_offset_cmd = FALSE; + vws->base.have_index_vertex_buffer_offset_cmd = false; vws->base.have_rasterizer_state_v2_cmd = vws->ioctl.have_drm_2_20 && vws->base.have_sm5; diff --git a/src/gallium/winsys/svga/drm/vmw_screen_dri.c b/src/gallium/winsys/svga/drm/vmw_screen_dri.c index cf151bec0e4..73f7651a468 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_dri.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_dri.c @@ -75,9 +75,9 @@ vmw_dri1_check_version(const struct dri1_api_version *cur, const char component[]) { if (cur->major > required->major && cur->major <= compat->major) - return TRUE; + return true; if (cur->major == required->major && cur->minor >= required->minor) - return TRUE; + return true; vmw_error("%s version failure.\n", component); vmw_error("%s version is %d.%d.%d and this driver can only work\n" @@ -85,7 +85,7 @@ vmw_dri1_check_version(const struct dri1_api_version *cur, component, cur->major, cur->minor, cur->patch_level, required->major, required->minor, compat->major); - return FALSE; + return false; } /* This is actually the entrypoint to the entire driver, @@ -311,7 +311,7 @@ vmw_drm_surface_from_handle(struct svga_winsys_screen *sws, base_size.depth = size.depth; vsrf->size = svga3dsurface_get_serialized_size(rep->format, base_size, rep->mip_levels[0], - FALSE); + false); return ssrf; @@ -332,7 +332,7 @@ vmw_drm_surface_get_handle(struct svga_winsys_screen *sws, int ret; if (!surface) - return FALSE; + return false; vsrf = vmw_svga_winsys_surface(surface); whandle->handle = vsrf->sid; @@ -349,14 +349,14 @@ vmw_drm_surface_get_handle(struct svga_winsys_screen *sws, (int *)&whandle->handle); if (ret) { vmw_error("Failed to get file descriptor from prime.\n"); - return FALSE; + return false; } break; default: vmw_error("Attempt to export unsupported handle type %d.\n", whandle->type); - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c index e1f01856ac6..563e2eb72b7 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c @@ -356,7 +356,7 @@ vmw_ioctl_surface_req(const struct vmw_winsys_screen *vws, switch(whandle->type) { case WINSYS_HANDLE_TYPE_SHARED: case WINSYS_HANDLE_TYPE_KMS: - *needs_unref = FALSE; + *needs_unref = false; req->handle_type = DRM_VMW_HANDLE_LEGACY; req->sid = whandle->handle; break; @@ -371,11 +371,11 @@ vmw_ioctl_surface_req(const struct vmw_winsys_screen *vws, return -EINVAL; } - *needs_unref = TRUE; + *needs_unref = true; req->handle_type = DRM_VMW_HANDLE_LEGACY; req->sid = handle; } else { - *needs_unref = FALSE; + *needs_unref = false; req->handle_type = DRM_VMW_HANDLE_PRIME; req->sid = whandle->handle; } @@ -413,7 +413,7 @@ vmw_ioctl_gb_surface_ref(struct vmw_winsys_screen *vws, struct vmw_region **p_region) { struct vmw_region *region = NULL; - bool needs_unref = FALSE; + bool needs_unref = false; int ret; assert(p_region != NULL); @@ -519,18 +519,18 @@ vmw_ioctl_command(struct vmw_winsys_screen *vws, int32_t cid, #ifdef DEBUG { - static bool firsttime = TRUE; - static bool debug = FALSE; - static bool 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); + debug = debug_get_bool_option("SVGA_DUMP_CMD", false); + skip = debug_get_bool_option("SVGA_SKIP_CMD", false); } if (debug) { VMW_FUNC; svga_dump_commands(commands, size); } - firsttime = FALSE; + firsttime = false; if (skip) { size = 0; } @@ -587,7 +587,7 @@ vmw_ioctl_command(struct vmw_winsys_screen *vws, int32_t cid, } else { if (pfence) { vmw_fences_signal(vws->fence_ops, rep.passed_seqno, rep.seqno, - TRUE); + true); /* Older DRM module will set this to zero, but -1 is the proper FD * to use for no Fence FD support */ @@ -830,7 +830,7 @@ vmw_ioctl_fence_signalled(struct vmw_winsys_screen *vws, if (ret != 0) return ret; - vmw_fences_signal(vws->fence_ops, arg.passed_seqno, 0, FALSE); + vmw_fences_signal(vws->fence_ops, arg.passed_seqno, 0, false); return (arg.signaled) ? 0 : -1; } @@ -921,7 +921,7 @@ vmw_ioctl_parse_caps(struct vmw_winsys_screen *vws, if (vws->base.have_gb_objects) { for (i = 0; i < vws->ioctl.num_cap_3d; ++i) { - vws->ioctl.cap_3d[i].has_cap = TRUE; + vws->ioctl.cap_3d[i].has_cap = true; vws->ioctl.cap_3d[i].result.u = cap_buffer[i]; } return 0; @@ -960,7 +960,7 @@ vmw_ioctl_parse_caps(struct vmw_winsys_screen *vws, for (i = 0; i < numCaps; i++) { index = capArray[i][0]; if (index < vws->ioctl.num_cap_3d) { - vws->ioctl.cap_3d[index].has_cap = TRUE; + vws->ioctl.cap_3d[index].has_cap = true; vws->ioctl.cap_3d[index].result.u = capArray[i][1]; } else { debug_printf("Unknown devcaps seen: %d\n", index); @@ -1041,7 +1041,7 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) ret = -EINVAL; } if (ret) - vws->base.have_gb_objects = FALSE; + vws->base.have_gb_objects = false; else vws->base.have_gb_objects = !!(gp_arg.value & (uint64_t) SVGA_CAP_GBOBJECTS); @@ -1049,9 +1049,9 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) if (vws->base.have_gb_objects && !drm_gb_capable) goto out_no_3d; - vws->base.have_vgpu10 = FALSE; - vws->base.have_sm4_1 = FALSE; - vws->base.have_intra_surface_copy = FALSE; + vws->base.have_vgpu10 = false; + vws->base.have_sm4_1 = false; + vws->base.have_intra_surface_copy = false; memset(&gp_arg, 0, sizeof(gp_arg)); gp_arg.param = DRM_VMW_PARAM_DEVICE_ID; @@ -1098,11 +1098,11 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) const char *vgpu10_val; debug_printf("Have VGPU10 interface and hardware.\n"); - vws->base.have_vgpu10 = TRUE; + vws->base.have_vgpu10 = true; vgpu10_val = getenv("SVGA_VGPU10"); if (vgpu10_val && strcmp(vgpu10_val, "0") == 0) { debug_printf("Disabling VGPU10 interface.\n"); - vws->base.have_vgpu10 = FALSE; + vws->base.have_vgpu10 = false; } else { debug_printf("Enabling VGPU10 interface.\n"); } @@ -1115,7 +1115,7 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GET_PARAM, &gp_arg, sizeof(gp_arg)); if (ret == 0 && gp_arg.value != 0) { - vws->base.have_intra_surface_copy = TRUE; + vws->base.have_intra_surface_copy = true; } memset(&gp_arg, 0, sizeof(gp_arg)); @@ -1123,7 +1123,7 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GET_PARAM, &gp_arg, sizeof(gp_arg)); if (ret == 0 && gp_arg.value != 0) { - vws->base.have_sm4_1 = TRUE; + vws->base.have_sm4_1 = true; } } @@ -1133,7 +1133,7 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GET_PARAM, &gp_arg, sizeof(gp_arg)); if (ret == 0 && gp_arg.value != 0) { - vws->base.have_sm5 = TRUE; + vws->base.have_sm5 = true; } } @@ -1143,7 +1143,7 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_GET_PARAM, &gp_arg, sizeof(gp_arg)); if (ret == 0 && gp_arg.value != 0) { - vws->base.have_gl43 = TRUE; + vws->base.have_gl43 = true; } } @@ -1162,10 +1162,10 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) vws->ioctl.num_cap_3d = SVGA3D_DEVCAP_MAX; if (vws->ioctl.have_drm_2_16) { - vws->base.have_coherent = TRUE; + vws->base.have_coherent = true; getenv_val = getenv("SVGA_FORCE_COHERENT"); if (getenv_val && strcmp(getenv_val, "0") != 0) - vws->force_coherent = TRUE; + vws->force_coherent = true; } } else { vws->ioctl.num_cap_3d = SVGA3D_DEVCAP_MAX; @@ -1234,18 +1234,18 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) /* support for these commands didn't make it into vmwgfx kernel * modules before 2.10. */ - vws->base.have_generate_mipmap_cmd = TRUE; - vws->base.have_set_predication_cmd = TRUE; + vws->base.have_generate_mipmap_cmd = true; + vws->base.have_set_predication_cmd = true; } if (version->version_major == 2 && version->version_minor >= 14) { - vws->base.have_fence_fd = TRUE; + vws->base.have_fence_fd = true; } free(cap_buffer); drmFreeVersion(version); vmw_printf("%s OK\n", __func__); - return TRUE; + return true; out_no_caps: free(vws->ioctl.cap_3d); out_no_caparray: @@ -1255,7 +1255,7 @@ vmw_ioctl_init(struct vmw_winsys_screen *vws) out_no_version: vws->ioctl.num_cap_3d = 0; debug_printf("%s Failed\n", __func__); - return FALSE; + return false; } diff --git a/src/gallium/winsys/svga/drm/vmw_screen_pools.c b/src/gallium/winsys/svga/drm/vmw_screen_pools.c index 7b1171184e4..b3b169d87c2 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_pools.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_pools.c @@ -94,7 +94,7 @@ vmw_query_pools_init(struct vmw_winsys_screen *vws) VMW_QUERY_POOL_SIZE, &desc); if (!vws->pools.query_mm) - return FALSE; + return false; vws->pools.query_fenced = simple_fenced_bufmgr_create( vws->pools.query_mm, vws->fence_ops); @@ -102,11 +102,11 @@ vmw_query_pools_init(struct vmw_winsys_screen *vws) if(!vws->pools.query_fenced) goto out_no_query_fenced; - return TRUE; + return true; out_no_query_fenced: vws->pools.query_mm->destroy(vws->pools.query_mm); - return FALSE; + return false; } /** @@ -127,7 +127,7 @@ vmw_mob_pools_init(struct vmw_winsys_screen *vws) VMW_BUFFER_USAGE_SHARED, 64 * 1024 * 1024); if (!vws->pools.mob_cache) - return FALSE; + return false; vws->pools.mob_fenced = simple_fenced_bufmgr_create(vws->pools.mob_cache, @@ -153,7 +153,7 @@ vmw_mob_pools_init(struct vmw_winsys_screen *vws) if(!vws->pools.mob_shader_slab_fenced) goto out_no_mob_shader_slab_fenced; - return TRUE; + return true; out_no_mob_shader_slab_fenced: vws->pools.mob_shader_slab->destroy(vws->pools.mob_shader_slab); @@ -161,7 +161,7 @@ vmw_mob_pools_init(struct vmw_winsys_screen *vws) vws->pools.mob_fenced->destroy(vws->pools.mob_fenced); out_no_mob_fenced: vws->pools.mob_cache->destroy(vws->pools.mob_cache); - return FALSE; + return false; } /** @@ -234,9 +234,9 @@ vmw_pools_init(struct vmw_winsys_screen *vws) if (vws->base.have_gb_objects && !vmw_mob_pools_init(vws)) goto error; - return TRUE; + return true; error: vmw_pools_cleanup(vws); - return FALSE; + return false; } diff --git a/src/gallium/winsys/svga/drm/vmw_screen_svga.c b/src/gallium/winsys/svga/drm/vmw_screen_svga.c index a9289238999..ba99dd902f2 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_svga.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_svga.c @@ -467,7 +467,7 @@ vmw_svga_winsys_fence_server_sync(struct svga_winsys_screen *sws, int32_t *context_fd, struct pipe_fence_handle *fence) { - int32_t fd = sws->fence_get_fd(sws, fence, FALSE); + int32_t fd = sws->fence_get_fd(sws, fence, false); /* If we don't have fd, we don't need to merge fd into the context's fd. */ if (fd == -1) @@ -648,9 +648,9 @@ vmw_svga_winsys_surface_can_create(struct svga_winsys_screen *sws, buffer_size *= numSamples; if (buffer_size > vws->ioctl.max_texture_size) { - return FALSE; + return false; } - return TRUE; + return true; } @@ -707,10 +707,10 @@ vmw_svga_winsys_get_cap(struct svga_winsys_screen *sws, if (index > vws->ioctl.num_cap_3d || index >= SVGA3D_DEVCAP_MAX || !vws->ioctl.cap_3d[index].has_cap) - return FALSE; + return false; *result = vws->ioctl.cap_3d[index].result; - return TRUE; + return true; } struct svga_winsys_gb_shader * @@ -933,7 +933,7 @@ vmw_winsys_screen_init_svga(struct vmw_winsys_screen *vws) #endif vws->base.host_log = vmw_svga_winsys_host_log; - return TRUE; + return true; } diff --git a/src/gallium/winsys/svga/drm/vmw_surface.c b/src/gallium/winsys/svga/drm/vmw_surface.c index 163822e9706..22baf0fd943 100644 --- a/src/gallium/winsys/svga/drm/vmw_surface.c +++ b/src/gallium/winsys/svga/drm/vmw_surface.c @@ -64,7 +64,7 @@ vmw_svga_winsys_surface_init(struct svga_winsys_screen *sws, data = vmw_svga_winsys_buffer_map(&vws->base, vbuf, pb_flags); if (data) { - vsrf->rebind = TRUE; + vsrf->rebind = true; if (vsrf->buf) vmw_svga_winsys_buffer_destroy(&vws->base, vsrf->buf); vsrf->buf = vbuf; @@ -111,8 +111,8 @@ vmw_svga_winsys_surface_map(struct svga_winsys_context *swc, uint32_t pb_flags; struct vmw_winsys_screen *vws = vsrf->screen; - *retry = FALSE; - *rebind = FALSE; + *retry = false; + *rebind = false; assert((flags & (PIPE_MAP_READ | PIPE_MAP_WRITE)) != 0); mtx_lock(&vsrf->mutex); @@ -121,7 +121,7 @@ vmw_svga_winsys_surface_map(struct svga_winsys_context *swc, flags &= ~PIPE_MAP_DISCARD_WHOLE_RESOURCE; } - vsrf->rebind = FALSE; + vsrf->rebind = false; /* * If we intend to read, there's no point discarding the @@ -144,7 +144,7 @@ vmw_svga_winsys_surface_map(struct svga_winsys_context *swc, if (!(flags & (PIPE_MAP_DISCARD_WHOLE_RESOURCE | PIPE_MAP_UNSYNCHRONIZED)) && p_atomic_read(&vsrf->validated)) { - *retry = TRUE; + *retry = true; goto out_unlock; } @@ -178,7 +178,7 @@ vmw_svga_winsys_surface_map(struct svga_winsys_context *swc, data = vmw_svga_winsys_buffer_map(&vws->base, vbuf, pb_flags); if (data) { - vsrf->rebind = TRUE; + vsrf->rebind = true; /* * We've discarded data on this surface and thus * it's data is no longer consider referenced. @@ -190,8 +190,8 @@ vmw_svga_winsys_surface_map(struct svga_winsys_context *swc, /* Rebind persistent maps immediately */ if (flags & PIPE_MAP_PERSISTENT) { - *rebind = TRUE; - vsrf->rebind = FALSE; + *rebind = true; + vsrf->rebind = false; } goto out_mapped; } else @@ -205,7 +205,7 @@ vmw_svga_winsys_surface_map(struct svga_winsys_context *swc, */ if (!(flags & PIPE_MAP_UNSYNCHRONIZED) && p_atomic_read(&vsrf->validated)) { - *retry = TRUE; + *retry = true; goto out_unlock; } } @@ -234,9 +234,9 @@ vmw_svga_winsys_surface_unmap(struct svga_winsys_context *swc, mtx_lock(&vsrf->mutex); if (--vsrf->mapcount == 0) { *rebind = vsrf->rebind; - vsrf->rebind = FALSE; + vsrf->rebind = false; } else { - *rebind = FALSE; + *rebind = false; } vmw_svga_winsys_buffer_unmap(&vsrf->screen->base, vsrf->buf); mtx_unlock(&vsrf->mutex); diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index d41e5752847..f827e719139 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -119,11 +119,11 @@ static bool virgl_drm_resource_is_busy(struct virgl_winsys *vws, ret = drmIoctl(vdws->fd, DRM_IOCTL_VIRTGPU_WAIT, &waitcmd); if (ret && errno == EBUSY) - return TRUE; + return true; p_atomic_set(&res->maybe_busy, false); - return FALSE; + return false; } static void @@ -637,7 +637,7 @@ static bool virgl_drm_winsys_resource_get_handle(struct virgl_winsys *qws, struct drm_gem_flink flink; if (!res) - return FALSE; + return false; if (whandle->type == WINSYS_HANDLE_TYPE_SHARED) { if (!res->flink_name) { @@ -645,7 +645,7 @@ static bool virgl_drm_winsys_resource_get_handle(struct virgl_winsys *qws, flink.handle = res->bo_handle; if (drmIoctl(qdws->fd, DRM_IOCTL_GEM_FLINK, &flink)) { - return FALSE; + return false; } res->flink_name = flink.name; @@ -658,7 +658,7 @@ static bool virgl_drm_winsys_resource_get_handle(struct virgl_winsys *qws, whandle->handle = res->bo_handle; } else if (whandle->type == WINSYS_HANDLE_TYPE_FD) { if (drmPrimeHandleToFD(qdws->fd, res->bo_handle, DRM_CLOEXEC, (int*)&whandle->handle)) - return FALSE; + return false; mtx_lock(&qdws->bo_handles_mutex); _mesa_hash_table_insert(qdws->bo_handles, (void *)(uintptr_t)res->bo_handle, res); mtx_unlock(&qdws->bo_handles_mutex); @@ -667,7 +667,7 @@ static bool virgl_drm_winsys_resource_get_handle(struct virgl_winsys *qws, p_atomic_set(&res->external, true); whandle->stride = stride; - return TRUE; + return true; } static void *virgl_drm_resource_map(struct virgl_winsys *qws, @@ -798,7 +798,7 @@ static void virgl_drm_add_res(struct virgl_drm_winsys *qdws, cbuf->res_bo[cbuf->cres] = NULL; virgl_drm_resource_reference(&qdws->base, &cbuf->res_bo[cbuf->cres], res); cbuf->res_hlist[cbuf->cres] = res->bo_handle; - cbuf->is_handle_added[hash] = TRUE; + cbuf->is_handle_added[hash] = true; cbuf->reloc_indices_hashlist[hash] = cbuf->cres; p_atomic_inc(&res->num_cs_references); @@ -843,9 +843,9 @@ static bool virgl_drm_res_is_ref(struct virgl_winsys *qws, struct virgl_hw_res *res) { if (!p_atomic_read(&res->num_cs_references)) - return FALSE; + return false; - return TRUE; + return true; } static struct virgl_cmd_buf *virgl_drm_cmd_buf_create(struct virgl_winsys *qws, @@ -1067,14 +1067,14 @@ static bool virgl_fence_wait(struct virgl_winsys *vws, timeout /= 1000; while (virgl_drm_resource_is_busy(vws, fence->hw_res)) { if (os_time_get() - start_time >= timeout) - return FALSE; + return false; os_time_sleep(10); } - return TRUE; + return true; } virgl_drm_resource_wait(vws, fence->hw_res); - return TRUE; + return true; } static void virgl_fence_reference(struct virgl_winsys *vws, diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c index 239216e1cb9..4dcc43f4806 100644 --- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c +++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c @@ -197,9 +197,9 @@ static bool virgl_vtest_resource_is_busy(struct virgl_winsys *vws, ret = virgl_vtest_busy_wait(vtws, res->res_handle, 0); if (ret < 0) - return FALSE; + return false; - return ret == 1 ? TRUE : FALSE; + return ret == 1 ? true : false; } static void virgl_vtest_resource_reference(struct virgl_winsys *vws, @@ -469,7 +469,7 @@ static void virgl_vtest_add_res(struct virgl_vtest_winsys *vtws, cbuf->res_bo[cbuf->cres] = NULL; virgl_vtest_resource_reference(&vtws->base, &cbuf->res_bo[cbuf->cres], res); - cbuf->is_handle_added[hash] = TRUE; + cbuf->is_handle_added[hash] = true; cbuf->reloc_indices_hashlist[hash] = cbuf->cres; p_atomic_inc(&res->num_cs_references); @@ -572,9 +572,9 @@ static bool virgl_vtest_res_is_ref(struct virgl_winsys *vws, struct virgl_hw_res *res) { if (!p_atomic_read(&res->num_cs_references)) - return FALSE; + return false; - return TRUE; + return true; } static int virgl_vtest_get_caps(struct virgl_winsys *vws, @@ -611,13 +611,13 @@ static bool virgl_fence_wait(struct virgl_winsys *vws, timeout /= 1000; while (virgl_vtest_resource_is_busy(vws, res)) { if (os_time_get() - start_time >= timeout) - return FALSE; + return false; os_time_sleep(10); } - return TRUE; + return true; } virgl_vtest_resource_wait(vws, res); - return TRUE; + return true; } static void virgl_fence_reference(struct virgl_winsys *vws, diff --git a/src/glx/windows/wgl.c b/src/glx/windows/wgl.c index ffc97675072..cd59a7b98dd 100644 --- a/src/glx/windows/wgl.c +++ b/src/glx/windows/wgl.c @@ -78,7 +78,7 @@ HGLRC wglCreateContextAttribsARB(HDC hdc_, HGLRC hShareContext_, BOOL wglMakeContextCurrentARB(HDC hDrawDC_, HDC hReadDC_, HGLRC hglrc_) { - CHECK_RESOLVED(PFNWGLMAKECONTEXTCURRENTARBPROC, FALSE); + CHECK_RESOLVED(PFNWGLMAKECONTEXTCURRENTARBPROC, false); return RESOLVED_PROC(PFNWGLMAKECONTEXTCURRENTARBPROC)(hDrawDC_, hReadDC_, hglrc_); } @@ -103,6 +103,6 @@ int wglReleasePbufferDCARB(HPBUFFERARB hPbuffer_, HDC hDC_) BOOL wglDestroyPbufferARB(HPBUFFERARB hPbuffer_) { - CHECK_RESOLVED(PFNWGLDESTROYPBUFFERARBPROC, FALSE); + CHECK_RESOLVED(PFNWGLDESTROYPBUFFERARBPROC, false); return RESOLVED_PROC(PFNWGLDESTROYPBUFFERARBPROC)(hPbuffer_); } diff --git a/src/glx/windows/windows_drawable.c b/src/glx/windows/windows_drawable.c index d1d79572b87..67d86abe32f 100644 --- a/src/glx/windows/windows_drawable.c +++ b/src/glx/windows/windows_drawable.c @@ -125,7 +125,7 @@ windows_create_drawable(int type, void *handle) // Access file mapping object by a name snprintf(name, sizeof(name), "Local\\CYGWINX_WINDOWSDRI_%08x", (unsigned int)(uintptr_t)handle); - d->hSection = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, name); + d->hSection = OpenFileMapping(FILE_MAP_ALL_ACCESS, false, name); if (!d->hSection) printf("OpenFileMapping failed %x\n", (int)GetLastError()); diff --git a/src/glx/windows/windowsgl.c b/src/glx/windows/windowsgl.c index 475c2f54cb1..d9809dc902b 100644 --- a/src/glx/windows/windowsgl.c +++ b/src/glx/windows/windowsgl.c @@ -218,7 +218,7 @@ int windows_bind_context(windowsContext *context, windowsDrawable *draw, windows if (!ret) { printf("wglMakeContextCurrentARB error: %08x\n", (int)GetLastError()); - return FALSE; + return false; } } else @@ -227,7 +227,7 @@ int windows_bind_context(windowsContext *context, windowsDrawable *draw, windows BOOL ret = wglMakeCurrent(drawDc, context->ctx); if (!ret) { printf("wglMakeCurrent error: %08x\n", (int)GetLastError()); - return FALSE; + return false; } } @@ -235,7 +235,7 @@ int windows_bind_context(windowsContext *context, windowsDrawable *draw, windows windows_glapi_set_dispatch(); - return TRUE; + return true; } void windows_unbind_context(windowsContext * context) @@ -344,9 +344,9 @@ windows_check_render_test(HDC hdc, void *args) const char *gl_renderer = (const char *)proc(GL_RENDERER); if ((!gl_renderer) || (strcasecmp(gl_renderer, "GDI Generic") == 0)) - *result = FALSE; + *result = false; else - *result = TRUE; + *result = true; } int diff --git a/src/intel/tools/imgui/imgui_impl_gtk3.cpp b/src/intel/tools/imgui/imgui_impl_gtk3.cpp index 6a1a5a2484c..9267acf5c97 100644 --- a/src/intel/tools/imgui/imgui_impl_gtk3.cpp +++ b/src/intel/tools/imgui/imgui_impl_gtk3.cpp @@ -173,7 +173,7 @@ void ImGui_ImplGtk3_HandleEvent(GdkEvent *event) static gboolean handle_gdk_event(GtkWidget *widget, GdkEvent *event, void *data) { ImGui_ImplGtk3_HandleEvent(event); - return TRUE; + return true; } bool ImGui_ImplGtk3_Init(GtkWidget* gl_area, bool install_callbacks) @@ -182,7 +182,7 @@ bool ImGui_ImplGtk3_Init(GtkWidget* gl_area, bool install_callbacks) g_GtkGlArea = GTK_WIDGET(g_object_ref(gl_area)); gtk_widget_realize(g_GtkGlArea); - gtk_widget_set_can_focus(g_GtkGlArea, TRUE); + gtk_widget_set_can_focus(g_GtkGlArea, true); gtk_widget_grab_focus(g_GtkGlArea); if (install_callbacks) { @@ -215,7 +215,7 @@ static gboolean timeout_callback(gpointer data) { gtk_widget_queue_draw(g_GtkGlArea); g_RedrawTimeout = 0; - return FALSE; + return false; } static void kick_timeout_redraw(float timeout) diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c index 0b303c28388..c71aa14170a 100644 --- a/src/mesa/main/blit.c +++ b/src/mesa/main/blit.c @@ -476,7 +476,7 @@ do_blit_framebuffer(struct gl_context *ctx, blit.filter = pFilter; blit.render_condition_enable = st->has_conditional_render; - blit.alpha_blend = FALSE; + blit.alpha_blend = false; if (mask & GL_COLOR_BUFFER_BIT) { struct gl_renderbuffer_attachment *srcAtt = diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c index 5602d23c02e..17ebc0b8e9b 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 */ - bool inverted = FALSE; + bool inverted = false; st_flush_bitmap_cache(st); @@ -66,19 +66,19 @@ BeginConditionalRender(struct gl_context *ctx, struct gl_query_object *q, break; case GL_QUERY_WAIT_INVERTED: m = PIPE_RENDER_COND_WAIT; - inverted = TRUE; + inverted = true; break; case GL_QUERY_NO_WAIT_INVERTED: m = PIPE_RENDER_COND_NO_WAIT; - inverted = TRUE; + inverted = true; break; case GL_QUERY_BY_REGION_WAIT_INVERTED: m = PIPE_RENDER_COND_BY_REGION_WAIT; - inverted = TRUE; + inverted = true; break; case GL_QUERY_BY_REGION_NO_WAIT_INVERTED: m = PIPE_RENDER_COND_BY_REGION_NO_WAIT; - inverted = TRUE; + inverted = true; break; default: assert(0 && "bad mode in st_BeginConditionalRender"); @@ -96,7 +96,7 @@ EndConditionalRender(struct gl_context *ctx, struct gl_query_object *q) st_flush_bitmap_cache(st); - cso_set_render_condition(st->cso_context, NULL, FALSE, 0); + cso_set_render_condition(st->cso_context, NULL, false, 0); } static ALWAYS_INLINE void diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 1db563e6597..af02d7535a3 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -442,7 +442,7 @@ render_texture(struct gl_context *ctx, assert(pt); /* point renderbuffer at texobject */ - rb->is_rtt = TRUE; + rb->is_rtt = true; rb->rtt_face = att->CubeMapFace; rb->rtt_slice = att->Zoffset; rb->rtt_layered = att->Layered; @@ -468,7 +468,7 @@ render_texture(struct gl_context *ctx, static void finish_render_texture(struct gl_context *ctx, struct gl_renderbuffer *rb) { - rb->is_rtt = FALSE; + rb->is_rtt = false; /* restore previous framebuffer state */ st_invalidate_buffers(st_context(ctx)); diff --git a/src/mesa/main/performance_monitor.c b/src/mesa/main/performance_monitor.c index b992e1e985a..9617320b6a1 100644 --- a/src/mesa/main/performance_monitor.c +++ b/src/mesa/main/performance_monitor.c @@ -256,14 +256,14 @@ is_perf_monitor_result_available(struct gl_context *ctx, for (i = 0; i < m->num_active_counters; ++i) { struct pipe_query *query = m->active_counters[i].query; union pipe_query_result result; - if (query && !pipe->get_query_result(pipe, query, FALSE, &result)) { + if (query && !pipe->get_query_result(pipe, query, false, &result)) { /* The query is busy. */ return false; } } if (m->batch_query && - !pipe->get_query_result(pipe, m->batch_query, FALSE, m->batch_result)) + !pipe->get_query_result(pipe, m->batch_query, false, m->batch_result)) return false; return true; @@ -288,7 +288,7 @@ get_perf_monitor_result(struct gl_context *ctx, bool have_batch_query = false; if (m->batch_query) - have_batch_query = pipe->get_query_result(pipe, m->batch_query, TRUE, + have_batch_query = pipe->get_query_result(pipe, m->batch_query, true, m->batch_result); /* Read query results for each active counter. */ @@ -303,7 +303,7 @@ get_perf_monitor_result(struct gl_context *ctx, type = ctx->PerfMonitor.Groups[gid].Counters[cid].Type; if (cntr->query) { - if (!pipe->get_query_result(pipe, cntr->query, TRUE, &result)) + if (!pipe->get_query_result(pipe, cntr->query, true, &result)) continue; } else { if (!have_batch_query) diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index d0ac91a6114..be01dcb42bd 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -290,11 +290,11 @@ get_query_result(struct pipe_context *pipe, * * Return TRUE in either case so we don't spin on this forever. */ - return TRUE; + return true; } if (!pipe->get_query_result(pipe, q->pq, wait, &data)) - return FALSE; + return false; switch (q->type) { case PIPE_QUERY_PIPELINE_STATISTICS: @@ -351,13 +351,13 @@ get_query_result(struct pipe_context *pipe, q->type == PIPE_QUERY_TIMESTAMP) { /* Calculate the elapsed time from the two timestamp queries */ assert(q->pq_begin); - pipe->get_query_result(pipe, q->pq_begin, TRUE, &data); + pipe->get_query_result(pipe, q->pq_begin, true, &data); q->Result -= data.u64; } else { assert(!q->pq_begin); } - return TRUE; + return true; } @@ -370,7 +370,7 @@ _mesa_wait_query(struct gl_context *ctx, struct gl_query_object *q) assert(!q->Ready); while (!q->Ready && - !get_query_result(pipe, q, TRUE)) + !get_query_result(pipe, q, true)) { /* nothing */ } @@ -384,7 +384,7 @@ _mesa_check_query(struct gl_context *ctx, struct gl_query_object *q) { struct pipe_context *pipe = ctx->pipe; assert(!q->Ready); /* we should not get called if Ready is TRUE */ - q->Ready = get_query_result(pipe, q, FALSE); + q->Ready = get_query_result(pipe, q, false); } diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 28d78b091e9..e89886ef90a 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -287,7 +287,7 @@ renderbuffer_alloc_storage(struct gl_context * ctx, rb->texture = screen->resource_create(screen, &templ); if (!rb->texture) - return FALSE; + return false; _mesa_update_renderbuffer_surface(ctx, rb); return rb->surface != NULL; diff --git a/src/mesa/state_tracker/st_atom_clip.c b/src/mesa/state_tracker/st_atom_clip.c index 0db3a5d5431..5160a0c2229 100644 --- a/src/mesa/state_tracker/st_atom_clip.c +++ b/src/mesa/state_tracker/st_atom_clip.c @@ -45,14 +45,14 @@ void st_update_clip( struct st_context *st ) { struct pipe_clip_state clip; const struct gl_context *ctx = st->ctx; - bool use_eye = FALSE; + bool use_eye = false; STATIC_ASSERT(sizeof(clip.ucp) <= sizeof(ctx->Transform._ClipUserPlane)); /* if we have a vertex shader that writes clip vertex we need to pass the pre-projection transformed coordinates into the driver. */ if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]) - use_eye = TRUE; + use_eye = true; /* _ClipUserPlane = _NEW_TRANSFORM | _NEW_PROJECTION * EyeUserPlane = _NEW_TRANSFORM diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index a3a3858c700..11064cdd6dc 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -543,7 +543,7 @@ accum_bitmap(struct gl_context *ctx, /* PBO source... */ bitmap = _mesa_map_pbo_source(ctx, unpack, bitmap); if (!bitmap) { - return FALSE; + return false; } unpack_bitmap(st, px, py, width, height, unpack, bitmap, diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index e9bcd166993..03b9e125320 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -885,7 +885,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z, } /* viewport state: viewport matching window dims */ - cso_set_viewport_dims(cso, fb_width, fb_height, TRUE); + cso_set_viewport_dims(cso, fb_width, fb_height, true); st->util_velems.count = 3; cso_set_vertex_elements(cso, &st->util_velems); @@ -1852,8 +1852,8 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, if (type == GL_DEPTH_STENCIL) write_depth = GL_TRUE; if (type == GL_DEPTH_STENCIL_TO_RGBA_NV || type == GL_DEPTH_STENCIL_TO_BGRA_NV) { - write_depth = FALSE; - write_stencil = FALSE; + write_depth = false; + write_stencil = false; } enum pipe_format stencil_format = diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index 8e93aaf0340..dea75545665 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -86,10 +86,10 @@ needs_integer_signed_unsigned_conversion(const struct gl_context *ctx, (type == GL_INT || type == GL_SHORT || type == GL_BYTE))) { - return TRUE; + return true; } - return FALSE; + return false; } static bool @@ -152,7 +152,7 @@ try_pbo_readpixels(struct st_context *st, struct gl_renderbuffer *rb, cso_set_sample_mask(cso, ~0); cso_set_min_samples(cso, 1); - cso_set_render_condition(cso, NULL, FALSE, 0); + cso_set_render_condition(cso, NULL, false, 0); /* Set up the sampler_view */ { @@ -326,7 +326,7 @@ blit_to_staging(struct st_context *st, struct gl_renderbuffer *rb, blit.src.box.depth = blit.dst.box.depth = 1; blit.mask = st_get_blit_mask(rb->_BaseFormat, format); blit.filter = PIPE_TEX_FILTER_NEAREST; - blit.scissor_enable = FALSE; + blit.scissor_enable = false; if (invert_y) { blit.src.box.y = rb->Height - blit.src.box.y; diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index fd6c4224509..0564968397d 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -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; - bool done = FALSE; + bool done = false; pixels = _mesa_map_pbo_dest(ctx, &ctx->Pack, pixels); @@ -280,7 +280,7 @@ copy_to_staging_dest(struct gl_context * ctx, struct pipe_resource *dst, free(rgba); } - done = TRUE; + done = true; end: if (map) @@ -934,11 +934,11 @@ allocate_full_mipmap(const struct gl_texture_object *stObj, case GL_TEXTURE_2D_MULTISAMPLE: case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: /* these texture types cannot be mipmapped */ - return FALSE; + return false; } if (stImage->Level > 0 || stObj->Attrib.GenerateMipmap) - return TRUE; + return true; /* If the application has explicitly called glTextureParameter to set * GL_TEXTURE_MAX_LEVEL, such that (max - base) > 0, then they're trying @@ -949,20 +949,20 @@ allocate_full_mipmap(const struct gl_texture_object *stObj, */ if (stObj->Attrib.MaxLevel < MAX_TEXTURE_LEVELS && stObj->Attrib.MaxLevel - stObj->Attrib.BaseLevel > 0) - return TRUE; + return true; if (stImage->_BaseFormat == GL_DEPTH_COMPONENT || stImage->_BaseFormat == GL_DEPTH_STENCIL_EXT) /* depth/stencil textures are seldom mipmapped */ - return FALSE; + return false; if (stObj->Attrib.BaseLevel == 0 && stObj->Attrib.MaxLevel == 0) - return FALSE; + return false; if (stObj->Sampler.Attrib.MinFilter == GL_NEAREST || stObj->Sampler.Attrib.MinFilter == GL_LINEAR) /* not a mipmap minification filter */ - return FALSE; + return false; /* If the following sequence of GL calls is used: * glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, w, h, 0, GL_RGB, ... @@ -974,13 +974,13 @@ allocate_full_mipmap(const struct gl_texture_object *stObj, * reallocation later, but GL_NEAREST_MIPMAP_LINEAR is pretty rare. */ if (stObj->Sampler.Attrib.MinFilter == GL_NEAREST_MIPMAP_LINEAR) - return FALSE; + return false; if (stObj->Target == GL_TEXTURE_3D) /* 3D textures are seldom mipmapped */ - return FALSE; + return false; - return TRUE; + return true; } @@ -1691,7 +1691,7 @@ try_pbo_upload_common(struct gl_context *ctx, cso_set_sample_mask(cso, ~0); cso_set_min_samples(cso, 1); - cso_set_render_condition(cso, NULL, FALSE, 0); + cso_set_render_condition(cso, NULL, false, 0); /* Set up the sampler_view */ { @@ -1733,7 +1733,7 @@ try_pbo_upload_common(struct gl_context *ctx, cso_set_framebuffer(cso, &fb); } - cso_set_viewport_dims(cso, surface->width, surface->height, FALSE); + cso_set_viewport_dims(cso, surface->width, surface->height, false); /* Blend state */ cso_set_blend(cso, &st->pbo.upload_blend); @@ -1958,7 +1958,7 @@ try_pbo_download(struct st_context *st, cso_set_sample_mask(cso, ~0); cso_set_min_samples(cso, 1); - cso_set_render_condition(cso, NULL, FALSE, 0); + cso_set_render_condition(cso, NULL, false, 0); /* Set up the sampler_view */ { @@ -2018,7 +2018,7 @@ try_pbo_download(struct st_context *st, */ cso_set_blend(cso, &st->pbo.upload_blend); - cso_set_viewport_dims(cso, fb.width, fb.height, FALSE); + cso_set_viewport_dims(cso, fb.width, fb.height, false); { struct pipe_depth_stencil_alpha_state dsa; @@ -2319,7 +2319,7 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims, blit.src.box.depth = blit.dst.box.depth = depth; blit.mask = st_get_blit_mask(format, texImage->_BaseFormat); blit.filter = PIPE_TEX_FILTER_NEAREST; - blit.scissor_enable = FALSE; + blit.scissor_enable = false; st->pipe->blit(st->pipe, &blit); @@ -2600,7 +2600,7 @@ st_GetTexSubImage(struct gl_context * ctx, enum pipe_texture_target pipe_target; struct pipe_blit_info blit; unsigned bind; - bool done = FALSE; + bool done = false; assert(!_mesa_is_format_etc2(texImage->TexFormat) && !_mesa_is_format_astc_2d(texImage->TexFormat) && @@ -2706,7 +2706,7 @@ st_GetTexSubImage(struct gl_context * ctx, blit.src.box.depth = blit.dst.box.depth = depth; blit.mask = st_get_blit_mask(texImage->_BaseFormat, format); blit.filter = PIPE_TEX_FILTER_NEAREST; - blit.scissor_enable = FALSE; + blit.scissor_enable = false; /* blit/render/decompress */ st->pipe->blit(st->pipe, &blit); @@ -3192,7 +3192,7 @@ st_finalize_texture(struct gl_context *ctx, if (!tObj->_BaseComplete) { _mesa_test_texobj_completeness(ctx, tObj); if (!tObj->_BaseComplete) { - return TRUE; + return true; } } } @@ -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); - bool 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 */ @@ -3407,7 +3407,7 @@ st_texture_storage(struct gl_context *ctx, PIPE_BIND_SAMPLER_VIEW)) { /* Update the sample count in gl_texture_image as well. */ texImage->NumSamples = num_samples; - found = TRUE; + found = true; break; } } diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index c61aa17b972..0527ccd0ac8 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -69,7 +69,7 @@ #include "cso_cache/cso_context.h" #include "compiler/glsl/glsl_parser_extras.h" -DEBUG_GET_ONCE_BOOL_OPTION(mesa_mvp_dp4, "MESA_MVP_DP4", FALSE) +DEBUG_GET_ONCE_BOOL_OPTION(mesa_mvp_dp4, "MESA_MVP_DP4", false) /* The list of state update functions. */ st_update_func_t st_update_functions[ST_NUM_ATOMS]; diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index f22d3ca5223..0191d7670e8 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -403,8 +403,8 @@ st_get_draw_context(struct st_context *st) */ draw_wide_line_threshold(st->draw, 1000.0f); draw_wide_point_threshold(st->draw, 1000.0f); - draw_enable_line_stipple(st->draw, FALSE); - draw_enable_point_sprites(st->draw, FALSE); + draw_enable_line_stipple(st->draw, false); + draw_enable_point_sprites(st->draw, false); return st->draw; } diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 3d6d7ac56c7..4f737b01c4b 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -1825,5 +1825,5 @@ void st_init_extensions(struct pipe_screen *screen, extensions->ARB_stencil_texturing && screen->get_param(screen, PIPE_CAP_DOUBLES) && !(nir_options->lower_doubles_options & nir_lower_fp64_full_software)) - extensions->NV_copy_depth_to_color = TRUE; + extensions->NV_copy_depth_to_color = true; } diff --git a/src/microsoft/clc/compute_test.cpp b/src/microsoft/clc/compute_test.cpp index e5c2291f37a..5a7dd1e2a67 100644 --- a/src/microsoft/clc/compute_test.cpp +++ b/src/microsoft/clc/compute_test.cpp @@ -740,7 +740,7 @@ ComputeTest::SetUp() uav_heap_incr = dev->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); - event = CreateEvent(NULL, FALSE, FALSE, NULL); + event = CreateEvent(NULL, false, false, NULL); if (!event) throw runtime_error("Failed to create event"); fence_value = 1; diff --git a/src/microsoft/vulkan/dzn_cmd_buffer.c b/src/microsoft/vulkan/dzn_cmd_buffer.c index 2ac35c29220..8ea71d0cec9 100644 --- a/src/microsoft/vulkan/dzn_cmd_buffer.c +++ b/src/microsoft/vulkan/dzn_cmd_buffer.c @@ -2753,11 +2753,11 @@ dzn_cmd_buffer_blit_prepare_dst_view(struct dzn_cmd_buffer *cmdbuf, if (ds) { D3D12_DEPTH_STENCIL_VIEW_DESC desc = dzn_image_get_dsv_desc(img, &range, 0); D3D12_CPU_DESCRIPTOR_HANDLE handle = dzn_cmd_buffer_get_dsv(cmdbuf, img, &desc); - ID3D12GraphicsCommandList1_OMSetRenderTargets(cmdbuf->cmdlist, 0, NULL, TRUE, &handle); + ID3D12GraphicsCommandList1_OMSetRenderTargets(cmdbuf->cmdlist, 0, NULL, true, &handle); } else { D3D12_RENDER_TARGET_VIEW_DESC desc = dzn_image_get_rtv_desc(img, &range, 0); D3D12_CPU_DESCRIPTOR_HANDLE handle = dzn_cmd_buffer_get_rtv(cmdbuf, img, &desc); - ID3D12GraphicsCommandList1_OMSetRenderTargets(cmdbuf->cmdlist, 1, &handle, FALSE, NULL); + ID3D12GraphicsCommandList1_OMSetRenderTargets(cmdbuf->cmdlist, 1, &handle, false, NULL); } } @@ -4837,7 +4837,7 @@ dzn_CmdBeginRendering(VkCommandBuffer commandBuffer, ID3D12GraphicsCommandList1_OMSetRenderTargets(cmdbuf->cmdlist, pRenderingInfo->colorAttachmentCount, pRenderingInfo->colorAttachmentCount ? rt_handles : NULL, - FALSE, zs_handle.ptr ? &zs_handle : NULL); + false, zs_handle.ptr ? &zs_handle : NULL); for (uint32_t a = 0; a < pRenderingInfo->colorAttachmentCount; a++) { const VkRenderingAttachmentInfo *att = &pRenderingInfo->pColorAttachments[a]; diff --git a/src/microsoft/vulkan/dzn_device.c b/src/microsoft/vulkan/dzn_device.c index 02df6e44f35..1e49f88f7ba 100644 --- a/src/microsoft/vulkan/dzn_device.c +++ b/src/microsoft/vulkan/dzn_device.c @@ -3700,7 +3700,7 @@ dzn_GetMemoryWin32HandleKHR(VkDevice device, case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT: case VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT: if (!DuplicateHandle(GetCurrentProcess(), mem->export_handle, GetCurrentProcess(), pHandle, - 0, FALSE, DUPLICATE_SAME_ACCESS)) + 0, false, DUPLICATE_SAME_ACCESS)) return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY); return VK_SUCCESS; default: diff --git a/src/microsoft/vulkan/dzn_meta.c b/src/microsoft/vulkan/dzn_meta.c index 878abc5cb71..d6736fe9304 100644 --- a/src/microsoft/vulkan/dzn_meta.c +++ b/src/microsoft/vulkan/dzn_meta.c @@ -610,7 +610,7 @@ dzn_meta_blit_create(struct dzn_device *device, const struct dzn_meta_blit_key * .RasterizerState = { .FillMode = D3D12_FILL_MODE_SOLID, .CullMode = D3D12_CULL_MODE_NONE, - .DepthClipEnable = TRUE, + .DepthClipEnable = true, }, .PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE, .SampleDesc = { @@ -669,12 +669,12 @@ dzn_meta_blit_create(struct dzn_device *device, const struct dzn_meta_blit_key * } else { desc.DSVFormat = key->out_format; if (key->loc == FRAG_RESULT_DEPTH) { - desc.DepthStencilState.DepthEnable = TRUE; + desc.DepthStencilState.DepthEnable = true; desc.DepthStencilState.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL; desc.DepthStencilState.DepthFunc = D3D12_COMPARISON_FUNC_ALWAYS; } else { assert(key->loc == FRAG_RESULT_STENCIL); - desc.DepthStencilState.StencilEnable = TRUE; + desc.DepthStencilState.StencilEnable = true; desc.DepthStencilState.StencilWriteMask = 0xff; desc.DepthStencilState.FrontFace.StencilFailOp = D3D12_STENCIL_OP_REPLACE; desc.DepthStencilState.FrontFace.StencilDepthFailOp = D3D12_STENCIL_OP_REPLACE; diff --git a/src/microsoft/vulkan/dzn_sync.c b/src/microsoft/vulkan/dzn_sync.c index 0736401e2e4..48dff7bd97b 100644 --- a/src/microsoft/vulkan/dzn_sync.c +++ b/src/microsoft/vulkan/dzn_sync.c @@ -140,7 +140,7 @@ dzn_sync_wait(struct vk_device *device, struct dzn_device *ddev = container_of(device, struct dzn_device, vk); #ifdef _WIN32 - HANDLE event = CreateEventA(NULL, FALSE, FALSE, NULL); + HANDLE event = CreateEventA(NULL, false, false, NULL); if (event == NULL) return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY); #else @@ -253,7 +253,7 @@ dzn_sync_export_win32_handle(struct vk_device *device, struct vk_sync *sync, HAN if (dsync->export_handle) { if (!DuplicateHandle(GetCurrentProcess(), dsync->export_handle, GetCurrentProcess(), handle, - 0, FALSE, DUPLICATE_SAME_ACCESS)) + 0, false, DUPLICATE_SAME_ACCESS)) return vk_error(device, VK_ERROR_OUT_OF_DEVICE_MEMORY); return VK_SUCCESS; } diff --git a/src/util/os_misc.c b/src/util/os_misc.c index 6ae97b983bb..c378a9e919f 100644 --- a/src/util/os_misc.c +++ b/src/util/os_misc.c @@ -292,7 +292,7 @@ os_get_total_physical_memory(uint64_t *size) status.dwLength = sizeof(status); ret = GlobalMemoryStatusEx(&status); *size = status.ullTotalPhys; - return (ret == TRUE); + return (ret == true); #else #error unexpected platform in os_misc.c return false; @@ -349,7 +349,7 @@ os_get_available_system_memory(uint64_t *size) status.dwLength = sizeof(status); ret = GlobalMemoryStatusEx(&status); *size = status.ullAvailPhys; - return (ret == TRUE); + return (ret == true); #else return false; #endif diff --git a/src/util/u_debug_refcnt.c b/src/util/u_debug_refcnt.c index 6b1de06e20f..c91e2806cea 100644 --- a/src/util/u_debug_refcnt.c +++ b/src/util/u_debug_refcnt.c @@ -66,7 +66,7 @@ static bool debug_serial(void *p, unsigned *pserial) { unsigned serial; - bool found = TRUE; + bool found = true; simple_mtx_lock(&serials_mutex); if (!serials_hash) @@ -84,7 +84,7 @@ debug_serial(void *p, unsigned *pserial) } _mesa_hash_table_insert(serials_hash, p, (void *) (uintptr_t) serial); - found = FALSE; + found = false; } simple_mtx_unlock(&serials_mutex); diff --git a/src/util/u_debug_symbol.c b/src/util/u_debug_symbol.c index b85ac05b9f7..0a714a07d7a 100644 --- a/src/util/u_debug_symbol.c +++ b/src/util/u_debug_symbol.c @@ -54,7 +54,7 @@ * SymInitialize() must be called once for each process (in this case, the * current process), before any of the other functions can be called. */ -static BOOL g_bSymInitialized = FALSE; +static BOOL g_bSymInitialized = false; /** @@ -129,23 +129,23 @@ DBGHELP_DISPATCH(SymInitialize, (hProcess, UserSearchPath, fInvadeProcess)) DBGHELP_DISPATCH(SymSetOptions, - DWORD, FALSE, + DWORD, false, (DWORD SymOptions), (SymOptions)) #ifndef _GAMING_XBOX DBGHELP_DISPATCH(SymFromAddr, - BOOL, FALSE, + BOOL, false, (HANDLE hProcess, DWORD64 Address, PDWORD64 Displacement, PSYMBOL_INFO Symbol), (hProcess, Address, Displacement, Symbol)) #endif DBGHELP_DISPATCH(SymGetLineFromAddr64, - BOOL, FALSE, + BOOL, false, (HANDLE hProcess, DWORD64 dwAddr, PDWORD pdwDisplacement, PIMAGEHLP_LINE64 Line), (hProcess, dwAddr, pdwDisplacement, Line)) -DBGHELP_DISPATCH(SymCleanup, BOOL, FALSE, (HANDLE hProcess), (hProcess)) +DBGHELP_DISPATCH(SymCleanup, BOOL, false, (HANDLE hProcess), (hProcess)) #undef DBGHELP_DISPATCH @@ -182,8 +182,8 @@ debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) j_SymCleanup(hProcess); j_SymSetOptions(/* SYMOPT_UNDNAME | */ SYMOPT_LOAD_LINES); - if (j_SymInitialize(hProcess, NULL, TRUE)) { - g_bSymInitialized = TRUE; + if (j_SymInitialize(hProcess, NULL, true)) { + g_bSymInitialized = true; } } diff --git a/src/vulkan/wsi/wsi_common_win32.cpp b/src/vulkan/wsi/wsi_common_win32.cpp index 34ef5f531d8..89276a198ca 100644 --- a/src/vulkan/wsi/wsi_common_win32.cpp +++ b/src/vulkan/wsi/wsi_common_win32.cpp @@ -112,7 +112,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL wsi_GetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex) { - return TRUE; + return true; } VKAPI_ATTR VkResult VKAPI_CALL