From 897e791ee03ce31b33efe1b7839204cf461b8df5 Mon Sep 17 00:00:00 2001
From: "Gun.io Whitespace Robot"
Date: Tue, 31 Jan 2012 00:08:33 -0500
Subject: [PATCH] Remove whitespace [WhitespaceBot]
---
aclocal.m4 | 4 +-
configs/autoconf.in | 2 +-
configs/beos | 12 +-
configs/catamount-osmesa-pgi | 4 +-
configs/config.mgw | 12 +-
configs/default | 8 +-
configs/freebsd-dri | 6 +-
configs/freebsd-dri-x86 | 2 +-
configs/hpux10-static | 10 +-
configs/linux-dri | 4 +-
configs/linux-dri-debug | 2 +-
configs/linux-dri-xcb | 4 +-
configs/linux-egl | 4 +-
configs/linux-ia64-icc | 2 +-
configs/linux-indirect | 4 +-
configs/linux-static | 10 +-
configs/linux-x86-64-static | 10 +-
configs/linux-x86-debug | 2 +-
configs/linux-x86-static | 10 +-
configs/psl1ght-rsx | 4 +-
configs/sunos4-static | 10 +-
configure.ac | 2 +-
docs/COPYING | 2 +-
docs/MESA_copy_sub_buffer.spec | 2 +-
docs/MESA_swap_control.spec | 4 +-
docs/MESA_swap_frame_usage.spec | 4 +-
docs/MESA_texture_array.spec | 38 +-
docs/MESA_ycbcr_texture.spec | 6 +-
docs/README.3DFX | 12 +-
docs/README.AMIWIN | 42 +-
docs/README.BEOS | 12 +-
docs/README.CYGWIN | 20 +-
docs/README.GGI | 4 +-
docs/README.LYNXOS | 10 +-
docs/README.MINGW32 | 24 +-
docs/README.MITS | 2 +-
docs/README.OS2 | 8 +-
docs/README.OpenStep | 2 +-
docs/README.QUAKE | 8 +-
docs/README.THREADS | 2 +-
docs/README.VMS | 2 +-
docs/README.WIN32 | 2 +-
docs/README.WINDML | 6 +-
docs/RELNOTES-3.2.1 | 2 +-
docs/RELNOTES-5.1 | 2 +-
docs/RELNOTES-6.4 | 2 +-
docs/cell.html | 2 +-
docs/devinfo.html | 2 +-
docs/dispatch.html | 2 +-
docs/fbdev-dri.html | 4 +-
docs/install.html | 4 +-
docs/intro.html | 8 +-
docs/lists.html | 2 +-
docs/relnotes-6.4.1.html | 2 +-
docs/relnotes-6.4.2.html | 2 +-
docs/relnotes-6.4.html | 2 +-
docs/relnotes-6.5.2.html | 2 +-
docs/relnotes-7.8.3.html | 4 +-
docs/repository.html | 6 +-
docs/shading.html | 2 +-
docs/sourcetree.html | 2 +-
docs/versions.html | 2 +-
docs/xlibdriver.html | 4 +-
include/GL/gl.h | 4 +-
include/GL/glext.h | 6 +-
include/GL/glx.h | 22 +-
include/GL/glx_mangle.h | 44 +-
include/GL/glxext.h | 6 +-
include/GL/internal/dri_interface.h | 18 +-
include/GL/internal/sarea.h | 10 +-
include/GL/osmesa.h | 8 +-
include/GL/vms_x_fix.h | 10 +-
include/GL/wglext.h | 6 +-
include/GL/wmesa.h | 4 +-
include/VG/openvg.h | 16 +-
include/VG/vgext.h | 24 +-
include/VG/vgplatform.h | 14 +-
include/VG/vgu.h | 18 +-
src/egl/drivers/dri2/egl_dri2.c | 36 +-
src/egl/drivers/glx/egl_glx.c | 10 +-
src/egl/main/egldefines.h | 10 +-
src/egl/main/egldisplay.c | 4 +-
src/egl/main/eglmisc.c | 10 +-
src/egl/main/eglmisc.h | 10 +-
src/gallium/SConscript | 20 +-
src/gallium/auxiliary/SConscript | 14 +-
src/gallium/auxiliary/cso_cache/cso_cache.c | 2 +-
src/gallium/auxiliary/cso_cache/cso_context.c | 14 +-
src/gallium/auxiliary/cso_cache/cso_hash.c | 2 +-
src/gallium/auxiliary/cso_cache/cso_hash.h | 4 +-
.../auxiliary/draw/draw_cliptest_tmp.h | 12 +-
src/gallium/auxiliary/draw/draw_context.c | 20 +-
src/gallium/auxiliary/draw/draw_context.h | 18 +-
src/gallium/auxiliary/draw/draw_gs.c | 4 +-
src/gallium/auxiliary/draw/draw_gs.h | 12 +-
src/gallium/auxiliary/draw/draw_llvm.c | 122 +-
src/gallium/auxiliary/draw/draw_pipe.c | 18 +-
src/gallium/auxiliary/draw/draw_pipe.h | 12 +-
src/gallium/auxiliary/draw/draw_pipe_aaline.c | 24 +-
.../auxiliary/draw/draw_pipe_aapoint.c | 16 +-
src/gallium/auxiliary/draw/draw_pipe_clip.c | 46 +-
src/gallium/auxiliary/draw/draw_pipe_cull.c | 14 +-
.../auxiliary/draw/draw_pipe_flatshade.c | 18 +-
src/gallium/auxiliary/draw/draw_pipe_offset.c | 12 +-
.../auxiliary/draw/draw_pipe_pstipple.c | 24 +-
.../auxiliary/draw/draw_pipe_stipple.c | 18 +-
.../auxiliary/draw/draw_pipe_twoside.c | 16 +-
.../auxiliary/draw/draw_pipe_unfilled.c | 20 +-
src/gallium/auxiliary/draw/draw_pipe_util.c | 14 +-
.../auxiliary/draw/draw_pipe_validate.c | 38 +-
src/gallium/auxiliary/draw/draw_pipe_vbuf.c | 90 +-
.../auxiliary/draw/draw_pipe_wide_line.c | 10 +-
.../auxiliary/draw/draw_pipe_wide_point.c | 16 +-
src/gallium/auxiliary/draw/draw_private.h | 30 +-
src/gallium/auxiliary/draw/draw_pt.c | 18 +-
src/gallium/auxiliary/draw/draw_pt.h | 14 +-
src/gallium/auxiliary/draw/draw_pt_emit.c | 30 +-
src/gallium/auxiliary/draw/draw_pt_fetch.c | 8 +-
.../auxiliary/draw/draw_pt_fetch_emit.c | 82 +-
.../auxiliary/draw/draw_pt_fetch_shade_emit.c | 84 +-
.../draw/draw_pt_fetch_shade_pipeline.c | 10 +-
.../draw/draw_pt_fetch_shade_pipeline_llvm.c | 6 +-
src/gallium/auxiliary/draw/draw_pt_post_vs.c | 4 +-
src/gallium/auxiliary/draw/draw_pt_util.c | 10 +-
src/gallium/auxiliary/draw/draw_vbuf.h | 12 +-
src/gallium/auxiliary/draw/draw_vertex.c | 10 +-
src/gallium/auxiliary/draw/draw_vertex.h | 16 +-
src/gallium/auxiliary/draw/draw_vs.c | 44 +-
src/gallium/auxiliary/draw/draw_vs.h | 16 +-
src/gallium/auxiliary/draw/draw_vs_aos.c | 318 +--
src/gallium/auxiliary/draw/draw_vs_aos.h | 14 +-
src/gallium/auxiliary/draw/draw_vs_aos_io.c | 68 +-
.../auxiliary/draw/draw_vs_aos_machine.c | 40 +-
src/gallium/auxiliary/draw/draw_vs_exec.c | 20 +-
src/gallium/auxiliary/draw/draw_vs_llvm.c | 2 +-
src/gallium/auxiliary/draw/draw_vs_ppc.c | 28 +-
src/gallium/auxiliary/draw/draw_vs_sse.c | 32 +-
src/gallium/auxiliary/draw/draw_vs_varient.c | 60 +-
src/gallium/auxiliary/gallivm/f.cpp | 14 +-
src/gallium/auxiliary/gallivm/lp_bld.h | 2 +-
src/gallium/auxiliary/gallivm/lp_bld_arit.c | 64 +-
src/gallium/auxiliary/gallivm/lp_bld_const.c | 10 +-
src/gallium/auxiliary/gallivm/lp_bld_const.h | 4 +-
src/gallium/auxiliary/gallivm/lp_bld_conv.c | 6 +-
src/gallium/auxiliary/gallivm/lp_bld_flow.c | 2 +-
.../auxiliary/gallivm/lp_bld_format_aos.c | 2 +-
src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +-
src/gallium/auxiliary/gallivm/lp_bld_logic.c | 2 +-
src/gallium/auxiliary/gallivm/lp_bld_printf.c | 4 +-
src/gallium/auxiliary/gallivm/lp_bld_sample.c | 2 +-
.../auxiliary/gallivm/lp_bld_sample_aos.c | 2 +-
.../auxiliary/gallivm/lp_bld_sample_soa.c | 6 +-
.../auxiliary/gallivm/lp_bld_tgsi_aos.c | 4 +-
.../auxiliary/gallivm/lp_bld_tgsi_soa.c | 14 +-
src/gallium/auxiliary/gallivm/lp_bld_type.c | 8 +-
src/gallium/auxiliary/indices/u_indices.c | 12 +-
.../auxiliary/indices/u_unfilled_indices.c | 10 +-
src/gallium/auxiliary/os/os_memory_aligned.h | 10 +-
src/gallium/auxiliary/os/os_memory_debug.h | 10 +-
src/gallium/auxiliary/os/os_memory_stdc.h | 10 +-
src/gallium/auxiliary/os/os_memory_win32k.h | 12 +-
src/gallium/auxiliary/os/os_misc.c | 30 +-
src/gallium/auxiliary/os/os_thread.h | 8 +-
src/gallium/auxiliary/os/os_time.c | 12 +-
src/gallium/auxiliary/os/os_time.h | 2 +-
src/gallium/auxiliary/pipebuffer/pb_buffer.h | 58 +-
.../auxiliary/pipebuffer/pb_buffer_fenced.c | 2 +-
.../auxiliary/pipebuffer/pb_buffer_fenced.h | 20 +-
.../auxiliary/pipebuffer/pb_buffer_malloc.c | 34 +-
src/gallium/auxiliary/pipebuffer/pb_bufmgr.h | 80 +-
.../auxiliary/pipebuffer/pb_bufmgr_alt.c | 18 +-
.../auxiliary/pipebuffer/pb_bufmgr_cache.c | 78 +-
.../auxiliary/pipebuffer/pb_bufmgr_debug.c | 120 +-
.../auxiliary/pipebuffer/pb_bufmgr_mm.c | 74 +-
.../auxiliary/pipebuffer/pb_bufmgr_ondemand.c | 80 +-
.../auxiliary/pipebuffer/pb_bufmgr_pool.c | 72 +-
.../auxiliary/pipebuffer/pb_bufmgr_slab.c | 128 +-
.../auxiliary/pipebuffer/pb_validate.c | 26 +-
.../auxiliary/pipebuffer/pb_validate.h | 8 +-
src/gallium/auxiliary/rtasm/rtasm_cpu.c | 4 +-
src/gallium/auxiliary/rtasm/rtasm_execmem.c | 22 +-
src/gallium/auxiliary/rtasm/rtasm_execmem.h | 2 +-
src/gallium/auxiliary/rtasm/rtasm_ppc_spe.c | 22 +-
src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h | 4 +-
src/gallium/auxiliary/rtasm/rtasm_x86sse.c | 78 +-
src/gallium/auxiliary/tgsi/tgsi_build.c | 10 +-
src/gallium/auxiliary/tgsi/tgsi_build.h | 10 +-
src/gallium/auxiliary/tgsi/tgsi_dump.c | 16 +-
src/gallium/auxiliary/tgsi/tgsi_dump.h | 10 +-
src/gallium/auxiliary/tgsi/tgsi_exec.c | 14 +-
src/gallium/auxiliary/tgsi/tgsi_exec.h | 12 +-
src/gallium/auxiliary/tgsi/tgsi_info.c | 12 +-
src/gallium/auxiliary/tgsi/tgsi_info.h | 10 +-
src/gallium/auxiliary/tgsi/tgsi_iterate.c | 8 +-
src/gallium/auxiliary/tgsi/tgsi_iterate.h | 8 +-
src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h | 10 +-
src/gallium/auxiliary/tgsi/tgsi_parse.c | 12 +-
src/gallium/auxiliary/tgsi/tgsi_parse.h | 10 +-
src/gallium/auxiliary/tgsi/tgsi_ppc.c | 20 +-
src/gallium/auxiliary/tgsi/tgsi_ppc.h | 10 +-
src/gallium/auxiliary/tgsi/tgsi_sanity.c | 10 +-
src/gallium/auxiliary/tgsi/tgsi_sanity.h | 10 +-
src/gallium/auxiliary/tgsi/tgsi_scan.c | 10 +-
src/gallium/auxiliary/tgsi/tgsi_scan.h | 8 +-
src/gallium/auxiliary/tgsi/tgsi_sse2.c | 106 +-
src/gallium/auxiliary/tgsi/tgsi_sse2.h | 10 +-
src/gallium/auxiliary/tgsi/tgsi_text.c | 10 +-
src/gallium/auxiliary/tgsi/tgsi_text.h | 10 +-
src/gallium/auxiliary/tgsi/tgsi_transform.c | 12 +-
src/gallium/auxiliary/tgsi/tgsi_transform.h | 8 +-
src/gallium/auxiliary/tgsi/tgsi_ureg.c | 58 +-
src/gallium/auxiliary/tgsi/tgsi_ureg.h | 34 +-
src/gallium/auxiliary/tgsi/tgsi_util.c | 10 +-
src/gallium/auxiliary/tgsi/tgsi_util.h | 10 +-
src/gallium/auxiliary/translate/translate.c | 10 +-
src/gallium/auxiliary/translate/translate.h | 2 +-
.../auxiliary/translate/translate_generic.c | 18 +-
.../auxiliary/translate/translate_sse.c | 40 +-
src/gallium/auxiliary/util/u_atomic.h | 4 +-
src/gallium/auxiliary/util/u_bitmask.c | 74 +-
src/gallium/auxiliary/util/u_bitmask.h | 40 +-
src/gallium/auxiliary/util/u_blit.c | 12 +-
src/gallium/auxiliary/util/u_blit.h | 2 +-
src/gallium/auxiliary/util/u_cache.c | 44 +-
src/gallium/auxiliary/util/u_cache.h | 6 +-
src/gallium/auxiliary/util/u_clear.h | 10 +-
src/gallium/auxiliary/util/u_cpu_detect.c | 4 +-
src/gallium/auxiliary/util/u_cpu_detect.h | 2 +-
src/gallium/auxiliary/util/u_debug.c | 82 +-
src/gallium/auxiliary/util/u_debug.h | 72 +-
src/gallium/auxiliary/util/u_debug_memory.c | 60 +-
src/gallium/auxiliary/util/u_debug_stack.c | 34 +-
src/gallium/auxiliary/util/u_debug_stack.h | 20 +-
src/gallium/auxiliary/util/u_debug_symbol.c | 16 +-
src/gallium/auxiliary/util/u_debug_symbol.h | 12 +-
src/gallium/auxiliary/util/u_double_list.h | 16 +-
src/gallium/auxiliary/util/u_draw_quad.c | 12 +-
src/gallium/auxiliary/util/u_draw_quad.h | 4 +-
src/gallium/auxiliary/util/u_dump.h | 12 +-
src/gallium/auxiliary/util/u_dump_defines.c | 14 +-
src/gallium/auxiliary/util/u_format.csv | 24 +-
src/gallium/auxiliary/util/u_format.h | 28 +-
src/gallium/auxiliary/util/u_format_yuv.h | 6 +-
src/gallium/auxiliary/util/u_framebuffer.c | 2 +-
src/gallium/auxiliary/util/u_gen_mipmap.c | 16 +-
src/gallium/auxiliary/util/u_gen_mipmap.h | 4 +-
src/gallium/auxiliary/util/u_handle_table.c | 78 +-
src/gallium/auxiliary/util/u_handle_table.h | 22 +-
src/gallium/auxiliary/util/u_hash.c | 134 +-
src/gallium/auxiliary/util/u_hash.h | 4 +-
src/gallium/auxiliary/util/u_hash_table.c | 52 +-
src/gallium/auxiliary/util/u_hash_table.h | 6 +-
src/gallium/auxiliary/util/u_inlines.h | 24 +-
src/gallium/auxiliary/util/u_keymap.c | 20 +-
src/gallium/auxiliary/util/u_keymap.h | 10 +-
src/gallium/auxiliary/util/u_linear.c | 10 +-
src/gallium/auxiliary/util/u_linear.h | 14 +-
src/gallium/auxiliary/util/u_math.c | 12 +-
src/gallium/auxiliary/util/u_math.h | 32 +-
src/gallium/auxiliary/util/u_memory.h | 10 +-
src/gallium/auxiliary/util/u_mm.c | 30 +-
src/gallium/auxiliary/util/u_mm.h | 10 +-
src/gallium/auxiliary/util/u_pack_color.h | 6 +-
src/gallium/auxiliary/util/u_pointer.h | 10 +-
src/gallium/auxiliary/util/u_rect.c | 14 +-
src/gallium/auxiliary/util/u_rect.h | 10 +-
src/gallium/auxiliary/util/u_ringbuffer.c | 6 +-
src/gallium/auxiliary/util/u_simple_list.h | 12 +-
src/gallium/auxiliary/util/u_simple_shaders.c | 16 +-
src/gallium/auxiliary/util/u_simple_shaders.h | 2 +-
src/gallium/auxiliary/util/u_snprintf.c | 14 +-
src/gallium/auxiliary/util/u_sse.h | 6 +-
src/gallium/auxiliary/util/u_string.h | 2 +-
src/gallium/auxiliary/util/u_surface.c | 2 +-
src/gallium/auxiliary/util/u_tile.c | 10 +-
src/gallium/auxiliary/util/u_tile.h | 10 +-
src/gallium/auxiliary/util/u_time.h | 12 +-
src/gallium/auxiliary/util/u_transfer.c | 2 +-
src/gallium/auxiliary/util/u_upload_mgr.c | 32 +-
src/gallium/auxiliary/util/u_upload_mgr.h | 12 +-
src/gallium/drivers/cell/common.h | 14 +-
src/gallium/drivers/cell/ppu/cell_batch.c | 12 +-
src/gallium/drivers/cell/ppu/cell_batch.h | 10 +-
src/gallium/drivers/cell/ppu/cell_clear.c | 10 +-
src/gallium/drivers/cell/ppu/cell_clear.h | 10 +-
src/gallium/drivers/cell/ppu/cell_context.c | 14 +-
src/gallium/drivers/cell/ppu/cell_context.h | 10 +-
.../drivers/cell/ppu/cell_draw_arrays.c | 10 +-
.../drivers/cell/ppu/cell_draw_arrays.h | 10 +-
src/gallium/drivers/cell/ppu/cell_fence.c | 10 +-
src/gallium/drivers/cell/ppu/cell_fence.h | 10 +-
src/gallium/drivers/cell/ppu/cell_flush.c | 12 +-
src/gallium/drivers/cell/ppu/cell_flush.h | 10 +-
src/gallium/drivers/cell/ppu/cell_gen_fp.c | 26 +-
src/gallium/drivers/cell/ppu/cell_gen_fp.h | 10 +-
.../drivers/cell/ppu/cell_gen_fragment.c | 94 +-
.../drivers/cell/ppu/cell_gen_fragment.h | 10 +-
.../drivers/cell/ppu/cell_pipe_state.h | 8 +-
src/gallium/drivers/cell/ppu/cell_render.c | 8 +-
src/gallium/drivers/cell/ppu/cell_render.h | 8 +-
src/gallium/drivers/cell/ppu/cell_screen.c | 10 +-
src/gallium/drivers/cell/ppu/cell_screen.h | 12 +-
src/gallium/drivers/cell/ppu/cell_spu.c | 14 +-
src/gallium/drivers/cell/ppu/cell_spu.h | 10 +-
src/gallium/drivers/cell/ppu/cell_state.h | 10 +-
.../drivers/cell/ppu/cell_state_derived.c | 12 +-
.../drivers/cell/ppu/cell_state_emit.c | 12 +-
.../drivers/cell/ppu/cell_state_emit.h | 10 +-
.../drivers/cell/ppu/cell_state_shader.c | 10 +-
.../drivers/cell/ppu/cell_state_vertex.c | 8 +-
src/gallium/drivers/cell/ppu/cell_surface.c | 10 +-
src/gallium/drivers/cell/ppu/cell_surface.h | 8 +-
src/gallium/drivers/cell/ppu/cell_texture.c | 30 +-
src/gallium/drivers/cell/ppu/cell_texture.h | 10 +-
src/gallium/drivers/cell/ppu/cell_vbuf.c | 14 +-
src/gallium/drivers/cell/ppu/cell_vbuf.h | 10 +-
.../drivers/cell/ppu/cell_vertex_fetch.c | 12 +-
.../drivers/cell/ppu/cell_vertex_shader.c | 4 +-
src/gallium/drivers/cell/spu/spu_colorpack.h | 14 +-
src/gallium/drivers/cell/spu/spu_command.c | 10 +-
src/gallium/drivers/cell/spu/spu_command.h | 10 +-
src/gallium/drivers/cell/spu/spu_dcache.c | 4 +-
src/gallium/drivers/cell/spu/spu_exec.c | 12 +-
src/gallium/drivers/cell/spu/spu_exec.h | 12 +-
src/gallium/drivers/cell/spu/spu_funcs.c | 10 +-
src/gallium/drivers/cell/spu/spu_funcs.h | 10 +-
src/gallium/drivers/cell/spu/spu_main.c | 10 +-
src/gallium/drivers/cell/spu/spu_main.h | 10 +-
.../drivers/cell/spu/spu_per_fragment_op.c | 8 +-
.../drivers/cell/spu/spu_per_fragment_op.h | 8 +-
src/gallium/drivers/cell/spu/spu_render.c | 12 +-
src/gallium/drivers/cell/spu/spu_render.h | 10 +-
src/gallium/drivers/cell/spu/spu_shuffle.h | 8 +-
src/gallium/drivers/cell/spu/spu_texture.c | 16 +-
src/gallium/drivers/cell/spu/spu_texture.h | 8 +-
src/gallium/drivers/cell/spu/spu_tgsi_exec.h | 10 +-
src/gallium/drivers/cell/spu/spu_tile.c | 10 +-
src/gallium/drivers/cell/spu/spu_tile.h | 10 +-
src/gallium/drivers/cell/spu/spu_tri.c | 26 +-
src/gallium/drivers/cell/spu/spu_tri.h | 10 +-
.../drivers/cell/spu/spu_vertex_fetch.c | 18 +-
.../drivers/cell/spu/spu_vertex_shader.c | 18 +-
.../drivers/cell/spu/spu_vertex_shader.h | 4 +-
src/gallium/drivers/failover/Makefile | 2 +-
src/gallium/drivers/failover/fo_context.c | 10 +-
src/gallium/drivers/failover/fo_context.h | 8 +-
src/gallium/drivers/failover/fo_state.c | 22 +-
src/gallium/drivers/failover/fo_state_emit.c | 14 +-
src/gallium/drivers/failover/fo_winsys.h | 10 +-
src/gallium/drivers/galahad/glhd_context.c | 2 +-
src/gallium/drivers/i915/Makefile | 2 +-
src/gallium/drivers/i915/i915_batch.h | 10 +-
src/gallium/drivers/i915/i915_blit.c | 16 +-
src/gallium/drivers/i915/i915_blit.h | 10 +-
src/gallium/drivers/i915/i915_clear.c | 10 +-
src/gallium/drivers/i915/i915_context.c | 14 +-
src/gallium/drivers/i915/i915_context.h | 42 +-
src/gallium/drivers/i915/i915_debug.c | 80 +-
src/gallium/drivers/i915/i915_debug.h | 8 +-
src/gallium/drivers/i915/i915_debug_fp.c | 26 +-
src/gallium/drivers/i915/i915_debug_private.h | 12 +-
src/gallium/drivers/i915/i915_flush.c | 12 +-
src/gallium/drivers/i915/i915_fpc.h | 12 +-
src/gallium/drivers/i915/i915_fpc_emit.c | 14 +-
src/gallium/drivers/i915/i915_fpc_translate.c | 60 +-
src/gallium/drivers/i915/i915_prim_emit.c | 20 +-
src/gallium/drivers/i915/i915_prim_vbuf.c | 24 +-
src/gallium/drivers/i915/i915_reg.h | 22 +-
src/gallium/drivers/i915/i915_resource.h | 10 +-
.../drivers/i915/i915_resource_buffer.c | 12 +-
.../drivers/i915/i915_resource_texture.c | 20 +-
src/gallium/drivers/i915/i915_screen.c | 12 +-
src/gallium/drivers/i915/i915_screen.h | 10 +-
src/gallium/drivers/i915/i915_state.c | 18 +-
src/gallium/drivers/i915/i915_state.h | 8 +-
src/gallium/drivers/i915/i915_state_derived.c | 12 +-
src/gallium/drivers/i915/i915_state_emit.c | 56 +-
src/gallium/drivers/i915/i915_state_inlines.h | 10 +-
src/gallium/drivers/i915/i915_state_sampler.c | 18 +-
src/gallium/drivers/i915/i915_surface.c | 10 +-
src/gallium/drivers/i915/i915_surface.h | 10 +-
src/gallium/drivers/i965/brw_batchbuffer.c | 22 +-
src/gallium/drivers/i965/brw_cc.c | 10 +-
src/gallium/drivers/i965/brw_clip.c | 24 +-
src/gallium/drivers/i965/brw_clip.h | 22 +-
src/gallium/drivers/i965/brw_clip_line.c | 30 +-
src/gallium/drivers/i965/brw_clip_point.c | 8 +-
src/gallium/drivers/i965/brw_clip_state.c | 20 +-
src/gallium/drivers/i965/brw_clip_tri.c | 90 +-
src/gallium/drivers/i965/brw_clip_unfilled.c | 82 +-
src/gallium/drivers/i965/brw_clip_util.c | 66 +-
src/gallium/drivers/i965/brw_context.c | 8 +-
src/gallium/drivers/i965/brw_context.h | 36 +-
src/gallium/drivers/i965/brw_curbe.c | 26 +-
src/gallium/drivers/i965/brw_defines.h | 298 +--
src/gallium/drivers/i965/brw_disasm.c | 2 +-
src/gallium/drivers/i965/brw_disasm.h | 2 +-
src/gallium/drivers/i965/brw_draw.c | 24 +-
src/gallium/drivers/i965/brw_draw.h | 10 +-
src/gallium/drivers/i965/brw_draw_upload.c | 22 +-
src/gallium/drivers/i965/brw_eu.c | 16 +-
src/gallium/drivers/i965/brw_eu.h | 58 +-
src/gallium/drivers/i965/brw_eu_debug.c | 20 +-
src/gallium/drivers/i965/brw_eu_emit.c | 142 +-
src/gallium/drivers/i965/brw_eu_util.c | 18 +-
src/gallium/drivers/i965/brw_gs.c | 20 +-
src/gallium/drivers/i965/brw_gs.h | 14 +-
src/gallium/drivers/i965/brw_gs_emit.c | 38 +-
src/gallium/drivers/i965/brw_gs_state.c | 12 +-
src/gallium/drivers/i965/brw_misc_state.c | 52 +-
src/gallium/drivers/i965/brw_pipe_blend.c | 72 +-
src/gallium/drivers/i965/brw_pipe_clear.c | 16 +-
src/gallium/drivers/i965/brw_pipe_fb.c | 6 +-
src/gallium/drivers/i965/brw_pipe_flush.c | 4 +-
src/gallium/drivers/i965/brw_pipe_query.c | 14 +-
src/gallium/drivers/i965/brw_pipe_rast.c | 12 +-
src/gallium/drivers/i965/brw_pipe_sampler.c | 50 +-
src/gallium/drivers/i965/brw_pipe_shader.c | 16 +-
src/gallium/drivers/i965/brw_pipe_surface.c | 16 +-
src/gallium/drivers/i965/brw_pipe_vertex.c | 8 +-
src/gallium/drivers/i965/brw_reg.h | 10 +-
src/gallium/drivers/i965/brw_resource.h | 12 +-
.../drivers/i965/brw_resource_buffer.c | 34 +-
.../drivers/i965/brw_resource_texture.c | 48 +-
.../i965/brw_resource_texture_layout.c | 38 +-
src/gallium/drivers/i965/brw_screen.c | 16 +-
src/gallium/drivers/i965/brw_screen.h | 10 +-
src/gallium/drivers/i965/brw_sf.c | 22 +-
src/gallium/drivers/i965/brw_sf.h | 18 +-
src/gallium/drivers/i965/brw_sf_emit.c | 152 +-
src/gallium/drivers/i965/brw_sf_state.c | 22 +-
src/gallium/drivers/i965/brw_state.h | 12 +-
src/gallium/drivers/i965/brw_state_batch.c | 10 +-
src/gallium/drivers/i965/brw_state_cache.c | 22 +-
src/gallium/drivers/i965/brw_state_debug.c | 10 +-
src/gallium/drivers/i965/brw_state_upload.c | 24 +-
src/gallium/drivers/i965/brw_structs.h | 770 +++----
src/gallium/drivers/i965/brw_swtnl.c | 12 +-
src/gallium/drivers/i965/brw_urb.c | 50 +-
src/gallium/drivers/i965/brw_util.h | 10 +-
src/gallium/drivers/i965/brw_vs.c | 14 +-
src/gallium/drivers/i965/brw_vs.h | 12 +-
src/gallium/drivers/i965/brw_vs_emit.c | 198 +-
src/gallium/drivers/i965/brw_vs_state.c | 12 +-
.../drivers/i965/brw_vs_surface_state.c | 8 +-
src/gallium/drivers/i965/brw_winsys.h | 6 +-
src/gallium/drivers/i965/brw_wm.c | 24 +-
src/gallium/drivers/i965/brw_wm.h | 16 +-
.../drivers/i965/brw_wm_constant_buffer.c | 4 +-
src/gallium/drivers/i965/brw_wm_debug.c | 26 +-
src/gallium/drivers/i965/brw_wm_emit.c | 178 +-
src/gallium/drivers/i965/brw_wm_fp.c | 112 +-
src/gallium/drivers/i965/brw_wm_glsl.c | 70 +-
src/gallium/drivers/i965/brw_wm_iz.c | 140 +-
src/gallium/drivers/i965/brw_wm_pass0.c | 32 +-
src/gallium/drivers/i965/brw_wm_pass1.c | 38 +-
src/gallium/drivers/i965/brw_wm_pass2.c | 28 +-
.../drivers/i965/brw_wm_sampler_state.c | 24 +-
src/gallium/drivers/i965/brw_wm_state.c | 20 +-
.../drivers/i965/brw_wm_surface_state.c | 34 +-
src/gallium/drivers/i965/intel_structs.h | 12 +-
src/gallium/drivers/identity/id_context.c | 2 +-
src/gallium/drivers/llvmpipe/SConscript | 4 +-
src/gallium/drivers/llvmpipe/lp_bld_blend.h | 2 +-
.../drivers/llvmpipe/lp_bld_blend_aos.c | 8 +-
src/gallium/drivers/llvmpipe/lp_bld_depth.c | 4 +-
src/gallium/drivers/llvmpipe/lp_bld_depth.h | 2 +-
src/gallium/drivers/llvmpipe/lp_bld_interp.c | 10 +-
src/gallium/drivers/llvmpipe/lp_clear.c | 12 +-
src/gallium/drivers/llvmpipe/lp_clear.h | 10 +-
src/gallium/drivers/llvmpipe/lp_context.c | 12 +-
src/gallium/drivers/llvmpipe/lp_context.h | 16 +-
src/gallium/drivers/llvmpipe/lp_debug.h | 10 +-
src/gallium/drivers/llvmpipe/lp_draw_arrays.c | 10 +-
src/gallium/drivers/llvmpipe/lp_fence.h | 2 +-
src/gallium/drivers/llvmpipe/lp_flush.c | 10 +-
src/gallium/drivers/llvmpipe/lp_flush.h | 10 +-
src/gallium/drivers/llvmpipe/lp_jit.c | 2 +-
src/gallium/drivers/llvmpipe/lp_limits.h | 10 +-
src/gallium/drivers/llvmpipe/lp_memory.c | 10 +-
src/gallium/drivers/llvmpipe/lp_memory.h | 8 +-
src/gallium/drivers/llvmpipe/lp_perf.c | 4 +-
src/gallium/drivers/llvmpipe/lp_query.c | 16 +-
src/gallium/drivers/llvmpipe/lp_query.h | 10 +-
src/gallium/drivers/llvmpipe/lp_rast.c | 8 +-
src/gallium/drivers/llvmpipe/lp_rast.h | 4 +-
src/gallium/drivers/llvmpipe/lp_rast_debug.c | 12 +-
src/gallium/drivers/llvmpipe/lp_rast_priv.h | 22 +-
src/gallium/drivers/llvmpipe/lp_rast_tri.c | 18 +-
.../drivers/llvmpipe/lp_rast_tri_tmp.h | 22 +-
src/gallium/drivers/llvmpipe/lp_scene.c | 4 +-
src/gallium/drivers/llvmpipe/lp_scene.h | 10 +-
src/gallium/drivers/llvmpipe/lp_scene_queue.c | 2 +-
src/gallium/drivers/llvmpipe/lp_screen.c | 10 +-
src/gallium/drivers/llvmpipe/lp_screen.h | 8 +-
src/gallium/drivers/llvmpipe/lp_setup.c | 50 +-
src/gallium/drivers/llvmpipe/lp_setup.h | 12 +-
.../drivers/llvmpipe/lp_setup_context.h | 2 +-
src/gallium/drivers/llvmpipe/lp_setup_line.c | 92 +-
src/gallium/drivers/llvmpipe/lp_setup_point.c | 20 +-
src/gallium/drivers/llvmpipe/lp_setup_tri.c | 60 +-
src/gallium/drivers/llvmpipe/lp_setup_vbuf.c | 20 +-
src/gallium/drivers/llvmpipe/lp_state.h | 10 +-
src/gallium/drivers/llvmpipe/lp_state_blend.c | 8 +-
src/gallium/drivers/llvmpipe/lp_state_clip.c | 8 +-
.../drivers/llvmpipe/lp_state_derived.c | 16 +-
src/gallium/drivers/llvmpipe/lp_state_fs.c | 38 +-
src/gallium/drivers/llvmpipe/lp_state_gs.c | 10 +-
.../drivers/llvmpipe/lp_state_rasterizer.c | 14 +-
.../drivers/llvmpipe/lp_state_sampler.c | 8 +-
src/gallium/drivers/llvmpipe/lp_state_setup.c | 58 +-
src/gallium/drivers/llvmpipe/lp_state_setup.h | 6 +-
.../drivers/llvmpipe/lp_state_surface.c | 8 +-
.../drivers/llvmpipe/lp_state_vertex.c | 8 +-
src/gallium/drivers/llvmpipe/lp_state_vs.c | 16 +-
src/gallium/drivers/llvmpipe/lp_surface.c | 12 +-
src/gallium/drivers/llvmpipe/lp_surface.h | 8 +-
src/gallium/drivers/llvmpipe/lp_test_blend.c | 2 +-
src/gallium/drivers/llvmpipe/lp_test_conv.c | 2 +-
src/gallium/drivers/llvmpipe/lp_test_main.c | 2 +-
src/gallium/drivers/llvmpipe/lp_tex_sample.c | 10 +-
src/gallium/drivers/llvmpipe/lp_tex_sample.h | 8 +-
src/gallium/drivers/llvmpipe/lp_texture.c | 18 +-
src/gallium/drivers/llvmpipe/lp_texture.h | 10 +-
src/gallium/drivers/llvmpipe/lp_tile_image.c | 10 +-
src/gallium/drivers/llvmpipe/lp_tile_image.h | 10 +-
src/gallium/drivers/llvmpipe/lp_tile_soa.h | 10 +-
src/gallium/drivers/llvmpipe/sse_mathfun.h | 66 +-
src/gallium/drivers/noop/noop_pipe.c | 2 +-
src/gallium/drivers/nouveau/Makefile | 2 +-
src/gallium/drivers/nouveau/nouveau_screen.c | 4 +-
src/gallium/drivers/nv50/nv50_buffer.c | 4 +-
src/gallium/drivers/nv50/nv50_pc.h | 2 +-
src/gallium/drivers/nv50/nv50_pc_emit.c | 2 +-
src/gallium/drivers/nv50/nv50_pc_regalloc.c | 4 +-
src/gallium/drivers/nv50/nv50_program.c | 2 +-
src/gallium/drivers/nv50/nv50_resource.h | 2 +-
src/gallium/drivers/nv50/nv50_surface.c | 4 +-
src/gallium/drivers/nv50/nv50_tgsi_to_nc.c | 8 +-
src/gallium/drivers/nv50/nv50_vbo.c | 2 +-
src/gallium/drivers/r300/SConscript | 4 +-
src/gallium/drivers/r300/r300_emit.c | 4 +-
src/gallium/drivers/r300/r300_hyperz.c | 4 +-
src/gallium/drivers/r300/r300_screen_buffer.c | 2 +-
src/gallium/drivers/r300/r300_state.c | 6 +-
src/gallium/drivers/r300/r300_vs_draw.c | 8 +-
src/gallium/drivers/r600/SConscript | 2 +-
src/gallium/drivers/r600/eg_states_inc.h | 58 +-
src/gallium/drivers/r600/r600_asm.c | 18 +-
src/gallium/drivers/r600/r600_pipe.h | 2 +-
src/gallium/drivers/r600/r600_state_inlines.h | 2 +-
src/gallium/drivers/r600/r600_states_inc.h | 76 +-
src/gallium/drivers/r600/r600_texture.c | 12 +-
src/gallium/drivers/softpipe/sp_clear.c | 10 +-
src/gallium/drivers/softpipe/sp_clear.h | 10 +-
src/gallium/drivers/softpipe/sp_context.c | 18 +-
src/gallium/drivers/softpipe/sp_context.h | 8 +-
src/gallium/drivers/softpipe/sp_draw_arrays.c | 10 +-
src/gallium/drivers/softpipe/sp_flush.c | 14 +-
src/gallium/drivers/softpipe/sp_flush.h | 10 +-
src/gallium/drivers/softpipe/sp_fs.h | 8 +-
src/gallium/drivers/softpipe/sp_fs_exec.c | 18 +-
src/gallium/drivers/softpipe/sp_fs_sse.c | 20 +-
src/gallium/drivers/softpipe/sp_limits.h | 10 +-
src/gallium/drivers/softpipe/sp_prim_vbuf.c | 20 +-
src/gallium/drivers/softpipe/sp_prim_vbuf.h | 10 +-
src/gallium/drivers/softpipe/sp_quad.h | 10 +-
src/gallium/drivers/softpipe/sp_quad_blend.c | 52 +-
.../drivers/softpipe/sp_quad_depth_test.c | 66 +-
.../drivers/softpipe/sp_quad_depth_test_tmp.h | 14 +-
src/gallium/drivers/softpipe/sp_quad_fs.c | 18 +-
src/gallium/drivers/softpipe/sp_quad_pipe.c | 10 +-
src/gallium/drivers/softpipe/sp_quad_pipe.h | 8 +-
src/gallium/drivers/softpipe/sp_query.c | 14 +-
src/gallium/drivers/softpipe/sp_query.h | 10 +-
src/gallium/drivers/softpipe/sp_screen.c | 10 +-
src/gallium/drivers/softpipe/sp_screen.h | 10 +-
src/gallium/drivers/softpipe/sp_setup.c | 6 +-
src/gallium/drivers/softpipe/sp_setup.h | 2 +-
src/gallium/drivers/softpipe/sp_state.h | 8 +-
src/gallium/drivers/softpipe/sp_state_blend.c | 8 +-
src/gallium/drivers/softpipe/sp_state_clip.c | 8 +-
.../drivers/softpipe/sp_state_derived.c | 14 +-
.../drivers/softpipe/sp_state_rasterizer.c | 10 +-
.../drivers/softpipe/sp_state_sampler.c | 18 +-
.../drivers/softpipe/sp_state_shader.c | 16 +-
.../drivers/softpipe/sp_state_surface.c | 8 +-
.../drivers/softpipe/sp_state_vertex.c | 8 +-
src/gallium/drivers/softpipe/sp_surface.c | 10 +-
src/gallium/drivers/softpipe/sp_surface.h | 8 +-
src/gallium/drivers/softpipe/sp_tex_sample.c | 76 +-
src/gallium/drivers/softpipe/sp_tex_sample.h | 16 +-
.../drivers/softpipe/sp_tex_tile_cache.c | 28 +-
.../drivers/softpipe/sp_tex_tile_cache.h | 14 +-
src/gallium/drivers/softpipe/sp_texture.c | 24 +-
src/gallium/drivers/softpipe/sp_texture.h | 10 +-
src/gallium/drivers/softpipe/sp_tile_cache.c | 18 +-
src/gallium/drivers/softpipe/sp_tile_cache.h | 16 +-
src/gallium/drivers/svga/Makefile | 2 +-
src/gallium/drivers/svga/SConscript | 6 +-
src/gallium/drivers/svga/svga_cmd.c | 82 +-
src/gallium/drivers/svga/svga_context.c | 12 +-
src/gallium/drivers/svga/svga_context.h | 22 +-
src/gallium/drivers/svga/svga_debug.h | 2 +-
src/gallium/drivers/svga/svga_draw.c | 30 +-
src/gallium/drivers/svga/svga_draw.h | 10 +-
src/gallium/drivers/svga/svga_draw_arrays.c | 42 +-
src/gallium/drivers/svga/svga_draw_elements.c | 20 +-
src/gallium/drivers/svga/svga_draw_private.h | 22 +-
src/gallium/drivers/svga/svga_pipe_blend.c | 2 +-
src/gallium/drivers/svga/svga_pipe_clear.c | 4 +-
.../drivers/svga/svga_pipe_constants.c | 4 +-
.../drivers/svga/svga_pipe_depthstencil.c | 2 +-
src/gallium/drivers/svga/svga_pipe_draw.c | 12 +-
src/gallium/drivers/svga/svga_pipe_fs.c | 8 +-
src/gallium/drivers/svga/svga_pipe_misc.c | 6 +-
src/gallium/drivers/svga/svga_pipe_query.c | 48 +-
.../drivers/svga/svga_pipe_rasterizer.c | 12 +-
src/gallium/drivers/svga/svga_pipe_sampler.c | 22 +-
src/gallium/drivers/svga/svga_pipe_vertex.c | 2 +-
src/gallium/drivers/svga/svga_pipe_vs.c | 12 +-
src/gallium/drivers/svga/svga_resource.h | 10 +-
.../drivers/svga/svga_resource_buffer.c | 48 +-
.../drivers/svga/svga_resource_buffer.h | 24 +-
.../svga/svga_resource_buffer_upload.c | 64 +-
.../drivers/svga/svga_resource_texture.c | 38 +-
.../drivers/svga/svga_resource_texture.h | 8 +-
src/gallium/drivers/svga/svga_sampler_view.c | 2 +-
src/gallium/drivers/svga/svga_screen.c | 16 +-
src/gallium/drivers/svga/svga_screen.h | 4 +-
src/gallium/drivers/svga/svga_screen_cache.c | 70 +-
src/gallium/drivers/svga/svga_screen_cache.h | 30 +-
src/gallium/drivers/svga/svga_state.c | 24 +-
.../drivers/svga/svga_state_constants.c | 16 +-
.../drivers/svga/svga_state_framebuffer.c | 40 +-
src/gallium/drivers/svga/svga_state_fs.c | 16 +-
.../drivers/svga/svga_state_need_swtnl.c | 18 +-
src/gallium/drivers/svga/svga_state_rss.c | 16 +-
src/gallium/drivers/svga/svga_state_tss.c | 20 +-
src/gallium/drivers/svga/svga_state_vdecl.c | 8 +-
src/gallium/drivers/svga/svga_state_vs.c | 14 +-
src/gallium/drivers/svga/svga_surface.c | 14 +-
src/gallium/drivers/svga/svga_swtnl_backend.c | 4 +-
src/gallium/drivers/svga/svga_swtnl_draw.c | 6 +-
src/gallium/drivers/svga/svga_swtnl_state.c | 18 +-
src/gallium/drivers/svga/svga_tgsi.c | 20 +-
src/gallium/drivers/svga/svga_tgsi.h | 2 +-
.../drivers/svga/svga_tgsi_decl_sm20.c | 16 +-
.../drivers/svga/svga_tgsi_decl_sm30.c | 22 +-
src/gallium/drivers/svga/svga_tgsi_emit.h | 18 +-
src/gallium/drivers/svga/svga_tgsi_insn.c | 166 +-
src/gallium/drivers/svga/svga_winsys.h | 62 +-
src/gallium/drivers/svga/svgadump/svga_dump.c | 12 +-
src/gallium/drivers/svga/svgadump/svga_dump.h | 2 +-
.../drivers/svga/svgadump/svga_shader.h | 2 +-
.../drivers/svga/svgadump/svga_shader_dump.c | 2 +-
.../drivers/svga/svgadump/svga_shader_dump.h | 2 +-
.../drivers/svga/svgadump/svga_shader_op.c | 2 +-
.../drivers/svga/svgadump/svga_shader_op.h | 2 +-
src/gallium/drivers/trace/tr_context.h | 2 +-
src/gallium/drivers/trace/tr_screen.c | 2 +-
src/gallium/include/pipe/p_compiler.h | 10 +-
src/gallium/include/pipe/p_config.h | 40 +-
src/gallium/include/pipe/p_context.h | 10 +-
src/gallium/include/pipe/p_defines.h | 20 +-
src/gallium/include/pipe/p_format.h | 10 +-
src/gallium/include/pipe/p_screen.h | 12 +-
src/gallium/include/pipe/p_shader_tokens.h | 20 +-
src/gallium/include/pipe/p_state.h | 24 +-
src/gallium/include/state_tracker/sw_winsys.h | 32 +-
.../state_trackers/d3d1x/gd3d10/Makefile | 2 +-
.../d3d1x/gd3d11/d3d11_context.h | 4 +-
.../state_trackers/dri/common/dri_drawable.c | 2 +-
src/gallium/state_trackers/egl/Makefile | 2 +-
.../state_trackers/egl/common/egl_g3d.c | 2 +-
.../state_trackers/egl/common/egl_g3d_st.c | 2 +-
.../egl/psl1ght/native_psl1ght.c | 4 +-
src/gallium/state_trackers/egl/x11/glcore.h | 6 +-
src/gallium/state_trackers/glx/xlib/glx_api.c | 20 +-
.../state_trackers/glx/xlib/glx_getproc.c | 8 +-
src/gallium/state_trackers/glx/xlib/xm_api.c | 12 +-
src/gallium/state_trackers/glx/xlib/xm_api.h | 8 +-
.../state_trackers/glx/xlib/xm_public.h | 12 +-
src/gallium/state_trackers/glx/xlib/xm_st.c | 2 +-
src/gallium/state_trackers/python/st_device.c | 58 +-
src/gallium/state_trackers/python/st_device.h | 26 +-
.../python/st_hardpipe_winsys.c | 22 +-
src/gallium/state_trackers/python/st_sample.c | 46 +-
src/gallium/state_trackers/python/st_sample.h | 12 +-
.../python/st_softpipe_winsys.c | 14 +-
src/gallium/state_trackers/python/st_winsys.h | 10 +-
src/gallium/state_trackers/vega/api_params.c | 2 +-
src/gallium/state_trackers/wgl/SConscript | 2 +-
src/gallium/state_trackers/wgl/stw_context.c | 36 +-
src/gallium/state_trackers/wgl/stw_device.c | 10 +-
src/gallium/state_trackers/wgl/stw_device.h | 8 +-
.../wgl/stw_ext_extensionsstring.c | 12 +-
.../state_trackers/wgl/stw_ext_pbuffer.c | 10 +-
.../state_trackers/wgl/stw_ext_pixelformat.c | 4 +-
.../state_trackers/wgl/stw_ext_swapinterval.c | 10 +-
.../state_trackers/wgl/stw_framebuffer.c | 58 +-
.../state_trackers/wgl/stw_framebuffer.h | 48 +-
.../state_trackers/wgl/stw_pixelformat.c | 50 +-
.../state_trackers/wgl/stw_pixelformat.h | 12 +-
src/gallium/state_trackers/wgl/stw_st.c | 2 +-
src/gallium/state_trackers/wgl/stw_tls.c | 10 +-
.../state_trackers/xorg/xorg_composite.c | 2 +-
src/gallium/state_trackers/xorg/xorg_driver.c | 4 +-
src/gallium/state_trackers/xorg/xorg_exa.c | 12 +-
.../state_trackers/xorg/xorg_renderer.c | 4 +-
src/gallium/state_trackers/xorg/xorg_xv.c | 2 +-
src/gallium/targets/Makefile.dri | 2 +-
src/gallium/targets/graw-gdi/graw_gdi.c | 2 +-
src/gallium/targets/graw-null/graw_null.c | 2 +-
src/gallium/targets/graw-xlib/graw_xlib.c | 4 +-
src/gallium/targets/libgl-gdi/SConscript | 2 +-
src/gallium/targets/libgl-gdi/libgl_gdi.c | 2 +-
src/gallium/targets/libgl-xlib/Makefile | 2 +-
src/gallium/targets/libgl-xlib/SConscript | 2 +-
src/gallium/targets/libgl-xlib/xlib.c | 16 +-
src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c | 20 +-
src/gallium/tests/graw/SConscript | 2 +-
src/gallium/tests/graw/clear.c | 8 +-
src/gallium/tests/graw/fs-test.c | 26 +-
src/gallium/tests/graw/gs-test.c | 22 +-
src/gallium/tests/graw/quad-tex.c | 22 +-
src/gallium/tests/graw/shader-leak.c | 10 +-
src/gallium/tests/graw/tri-gs.c | 12 +-
src/gallium/tests/graw/tri-instanced.c | 10 +-
src/gallium/tests/graw/tri.c | 10 +-
src/gallium/tests/graw/vs-test.c | 24 +-
src/gallium/tests/unit/SConscript | 2 +-
src/gallium/winsys/i915/drm/i915_drm_buffer.c | 2 +-
src/gallium/winsys/i915/sw/i915_sw_buffer.c | 2 +-
src/gallium/winsys/i965/drm/i965_drm_buffer.c | 36 +-
src/gallium/winsys/i965/drm/i965_drm_winsys.h | 2 +-
src/gallium/winsys/i965/xlib/Makefile | 2 +-
src/gallium/winsys/i965/xlib/xlib_i965.c | 54 +-
src/gallium/winsys/psl1ght/Makefile | 2 +-
.../winsys/psl1ght/nouveau/nouveau_bo.c | 10 +-
.../winsys/psl1ght/nouveau/nouveau_grobj.c | 2 +-
.../winsys/psl1ght/nouveau/nouveau_notifier.c | 2 +-
.../winsys/psl1ght/nouveau/nouveau_pushbuf.h | 2 +-
.../winsys/psl1ght/nouveau/nouveau_resource.c | 4 +-
src/gallium/winsys/r600/drm/bof.c | 2 +-
src/gallium/winsys/r600/drm/radeon_bo.c | 4 +-
src/gallium/winsys/r600/drm/radeon_pciid.c | 76 +-
.../winsys/radeon/drm/radeon_drm_buffer.c | 2 +-
src/gallium/winsys/svga/drm/SConscript | 4 +-
src/gallium/winsys/svga/drm/vmw_buffer.c | 58 +-
src/gallium/winsys/svga/drm/vmw_buffer.h | 2 +-
src/gallium/winsys/svga/drm/vmw_context.c | 10 +-
src/gallium/winsys/svga/drm/vmw_fence.c | 4 +-
src/gallium/winsys/svga/drm/vmw_fence.h | 2 +-
.../winsys/svga/drm/vmw_screen_ioctl.c | 12 +-
src/gallium/winsys/svga/drm/vmw_surface.h | 2 +-
src/gallium/winsys/sw/gdi/gdi_sw_winsys.c | 12 +-
src/gallium/winsys/sw/null/Makefile | 2 +-
src/gallium/winsys/sw/null/null_sw_winsys.c | 14 +-
src/gallium/winsys/sw/xlib/Makefile | 2 +-
src/gallium/winsys/sw/xlib/xlib_sw_winsys.c | 16 +-
src/glsl/README | 6 +-
src/glsl/ast.h | 6 +-
src/glsl/ast_function.cpp | 2 +-
src/glsl/ast_to_hir.cpp | 2 +-
src/glsl/glcpp/glcpp-lex.c | 70 +-
src/glsl/glcpp/glcpp-parse.c | 26 +-
src/glsl/glcpp/glcpp-parse.h | 10 +-
src/glsl/glcpp/glcpp-parse.y | 16 +-
src/glsl/glsl_lexer.cpp | 66 +-
src/glsl/glsl_lexer.lpp | 4 +-
src/glsl/glsl_parser.cpp | 12 +-
src/glsl/glsl_parser.h | 10 +-
src/glsl/glsl_parser.ypp | 10 +-
src/glsl/glsl_parser_extras.cpp | 4 +-
src/glsl/glsl_parser_extras.h | 2 +-
src/glsl/glsl_symbol_table.h | 2 +-
src/glsl/ir_reader.cpp | 8 +-
src/glsl/list.h | 2 +-
src/glu/sgi/Makefile.mgw | 12 +-
src/glu/sgi/Makefile.win | 8 +-
src/glu/sgi/glu.def | 2 +-
src/glu/sgi/libnurbs/interface/bezierPatch.cc | 32 +-
src/glu/sgi/libnurbs/interface/bezierPatch.h | 10 +-
.../sgi/libnurbs/interface/bezierPatchMesh.cc | 58 +-
.../sgi/libnurbs/interface/bezierPatchMesh.h | 8 +-
src/glu/sgi/libnurbs/interface/glcurveval.cc | 26 +-
src/glu/sgi/libnurbs/interface/glcurveval.h | 6 +-
src/glu/sgi/libnurbs/interface/glinterface.cc | 70 +-
src/glu/sgi/libnurbs/interface/glrenderer.h | 22 +-
src/glu/sgi/libnurbs/interface/glsurfeval.cc | 24 +-
src/glu/sgi/libnurbs/interface/glsurfeval.h | 46 +-
src/glu/sgi/libnurbs/interface/incurveeval.cc | 28 +-
src/glu/sgi/libnurbs/interface/insurfeval.cc | 214 +-
src/glu/sgi/libnurbs/internals/arc.cc | 4 +-
src/glu/sgi/libnurbs/internals/arc.h | 4 +-
src/glu/sgi/libnurbs/internals/arcsorter.cc | 20 +-
src/glu/sgi/libnurbs/internals/arcsorter.h | 4 +-
src/glu/sgi/libnurbs/internals/arctess.cc | 22 +-
src/glu/sgi/libnurbs/internals/backend.cc | 56 +-
src/glu/sgi/libnurbs/internals/backend.h | 12 +-
.../sgi/libnurbs/internals/basicsurfeval.h | 6 +-
src/glu/sgi/libnurbs/internals/bin.cc | 10 +-
src/glu/sgi/libnurbs/internals/bin.h | 2 +-
src/glu/sgi/libnurbs/internals/bufpool.cc | 4 +-
src/glu/sgi/libnurbs/internals/bufpool.h | 8 +-
src/glu/sgi/libnurbs/internals/cachingeval.cc | 2 +-
src/glu/sgi/libnurbs/internals/cachingeval.h | 2 +-
src/glu/sgi/libnurbs/internals/ccw.cc | 28 +-
.../sgi/libnurbs/internals/coveandtiler.cc | 2 +-
src/glu/sgi/libnurbs/internals/curve.cc | 12 +-
src/glu/sgi/libnurbs/internals/curvelist.cc | 2 +-
src/glu/sgi/libnurbs/internals/curvelist.h | 2 +-
src/glu/sgi/libnurbs/internals/curvesub.cc | 2 +-
.../sgi/libnurbs/internals/dataTransform.cc | 14 +-
src/glu/sgi/libnurbs/internals/defines.h | 2 +-
src/glu/sgi/libnurbs/internals/displaylist.cc | 10 +-
src/glu/sgi/libnurbs/internals/displaylist.h | 2 +-
src/glu/sgi/libnurbs/internals/flist.cc | 4 +-
src/glu/sgi/libnurbs/internals/flistsorter.h | 6 +-
.../sgi/libnurbs/internals/gridtrimvertex.h | 2 +-
src/glu/sgi/libnurbs/internals/hull.cc | 18 +-
src/glu/sgi/libnurbs/internals/hull.h | 2 +-
src/glu/sgi/libnurbs/internals/intersect.cc | 48 +-
src/glu/sgi/libnurbs/internals/jarcloc.h | 2 +-
src/glu/sgi/libnurbs/internals/knotvector.cc | 2 +-
src/glu/sgi/libnurbs/internals/knotvector.h | 2 +-
src/glu/sgi/libnurbs/internals/mapdesc.cc | 152 +-
src/glu/sgi/libnurbs/internals/mapdesc.h | 58 +-
src/glu/sgi/libnurbs/internals/mapdescv.cc | 24 +-
src/glu/sgi/libnurbs/internals/maplist.cc | 14 +-
src/glu/sgi/libnurbs/internals/maplist.h | 2 +-
src/glu/sgi/libnurbs/internals/mesher.cc | 32 +-
.../internals/monoTriangulationBackend.cc | 60 +-
src/glu/sgi/libnurbs/internals/monotonizer.cc | 36 +-
src/glu/sgi/libnurbs/internals/monotonizer.h | 2 +-
src/glu/sgi/libnurbs/internals/mycode.cc | 8 +-
src/glu/sgi/libnurbs/internals/mymath.h | 2 +-
src/glu/sgi/libnurbs/internals/mysetjmp.h | 2 +-
src/glu/sgi/libnurbs/internals/nurbsconsts.h | 10 +-
.../sgi/libnurbs/internals/nurbsinterfac.cc | 50 +-
src/glu/sgi/libnurbs/internals/nurbstess.cc | 72 +-
src/glu/sgi/libnurbs/internals/nurbstess.h | 2 +-
src/glu/sgi/libnurbs/internals/patch.cc | 76 +-
src/glu/sgi/libnurbs/internals/patch.h | 6 +-
src/glu/sgi/libnurbs/internals/patchlist.cc | 4 +-
src/glu/sgi/libnurbs/internals/patchlist.h | 6 +-
src/glu/sgi/libnurbs/internals/quilt.cc | 56 +-
src/glu/sgi/libnurbs/internals/quilt.h | 6 +-
src/glu/sgi/libnurbs/internals/reader.cc | 14 +-
src/glu/sgi/libnurbs/internals/reader.h | 10 +-
src/glu/sgi/libnurbs/internals/renderhints.cc | 4 +-
src/glu/sgi/libnurbs/internals/simplemath.h | 6 +-
src/glu/sgi/libnurbs/internals/slicer.cc | 190 +-
src/glu/sgi/libnurbs/internals/sorter.h | 6 +-
src/glu/sgi/libnurbs/internals/splitarcs.cc | 16 +-
src/glu/sgi/libnurbs/internals/subdivider.cc | 108 +-
src/glu/sgi/libnurbs/internals/subdivider.h | 4 +-
src/glu/sgi/libnurbs/internals/tobezier.cc | 66 +-
src/glu/sgi/libnurbs/internals/trimline.cc | 28 +-
src/glu/sgi/libnurbs/internals/trimline.h | 26 +-
src/glu/sgi/libnurbs/internals/trimregion.cc | 8 +-
src/glu/sgi/libnurbs/internals/trimregion.h | 2 +-
src/glu/sgi/libnurbs/internals/trimvertex.h | 10 +-
.../sgi/libnurbs/internals/trimvertpool.cc | 8 +-
src/glu/sgi/libnurbs/internals/uarray.cc | 4 +-
src/glu/sgi/libnurbs/internals/uarray.h | 2 +-
src/glu/sgi/libnurbs/internals/varray.cc | 14 +-
src/glu/sgi/libnurbs/internals/varray.h | 4 +-
src/glu/sgi/libnurbs/nurbtess/directedLine.cc | 8 +-
src/glu/sgi/libnurbs/nurbtess/directedLine.h | 24 +-
src/glu/sgi/libnurbs/nurbtess/gridWrap.cc | 52 +-
src/glu/sgi/libnurbs/nurbtess/gridWrap.h | 14 +-
src/glu/sgi/libnurbs/nurbtess/monoChain.cc | 102 +-
src/glu/sgi/libnurbs/nurbtess/monoChain.h | 16 +-
src/glu/sgi/libnurbs/nurbtess/monoPolyPart.cc | 24 +-
src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h | 2 +-
.../libnurbs/nurbtess/monoTriangulation.cc | 224 +-
.../sgi/libnurbs/nurbtess/monoTriangulation.h | 44 +-
src/glu/sgi/libnurbs/nurbtess/partitionX.cc | 40 +-
src/glu/sgi/libnurbs/nurbtess/partitionY.cc | 116 +-
src/glu/sgi/libnurbs/nurbtess/partitionY.h | 16 +-
src/glu/sgi/libnurbs/nurbtess/polyDBG.h | 2 +-
src/glu/sgi/libnurbs/nurbtess/polyUtil.cc | 20 +-
.../sgi/libnurbs/nurbtess/primitiveStream.cc | 40 +-
.../sgi/libnurbs/nurbtess/primitiveStream.h | 16 +-
src/glu/sgi/libnurbs/nurbtess/quicksort.cc | 12 +-
src/glu/sgi/libnurbs/nurbtess/rectBlock.cc | 16 +-
src/glu/sgi/libnurbs/nurbtess/rectBlock.h | 4 +-
src/glu/sgi/libnurbs/nurbtess/sampleComp.cc | 38 +-
src/glu/sgi/libnurbs/nurbtess/sampleComp.h | 4 +-
.../sgi/libnurbs/nurbtess/sampleCompBot.cc | 108 +-
src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h | 8 +-
.../sgi/libnurbs/nurbtess/sampleCompRight.cc | 98 +-
.../sgi/libnurbs/nurbtess/sampleCompRight.h | 6 +-
.../sgi/libnurbs/nurbtess/sampleCompTop.cc | 118 +-
.../sgi/libnurbs/nurbtess/sampleMonoPoly.cc | 326 +--
.../sgi/libnurbs/nurbtess/sampleMonoPoly.h | 34 +-
src/glu/sgi/libnurbs/nurbtess/sampledLine.cc | 20 +-
src/glu/sgi/libnurbs/nurbtess/sampledLine.h | 2 +-
src/glu/sgi/libnurbs/nurbtess/searchTree.cc | 42 +-
src/glu/sgi/libnurbs/nurbtess/searchTree.h | 4 +-
src/glu/sgi/libtess/README | 44 +-
src/glu/sgi/libtess/alg-outline | 12 +-
src/glu/sgi/libtess/dict-list.h | 2 +-
src/glu/sgi/libtess/dict.h | 2 +-
src/glu/sgi/libtess/geom.c | 8 +-
src/glu/sgi/libtess/mesh.c | 18 +-
src/glu/sgi/libtess/mesh.h | 2 +-
src/glu/sgi/libtess/priorityq-heap.c | 6 +-
src/glu/sgi/libtess/priorityq-heap.h | 2 +-
src/glu/sgi/libtess/priorityq-sort.h | 2 +-
src/glu/sgi/libtess/priorityq.c | 10 +-
src/glu/sgi/libtess/priorityq.h | 2 +-
src/glu/sgi/libtess/render.c | 24 +-
src/glu/sgi/libtess/tess.c | 2 +-
src/glu/sgi/libtess/tess.h | 4 +-
src/glu/sgi/libtess/tessmono.c | 2 +-
src/glu/sgi/libtess/tessmono.h | 2 +-
src/glu/sgi/libutil/mipmap.c | 90 +-
src/glu/sgi/libutil/project.c | 16 +-
src/glu/sgi/libutil/registry.c | 6 +-
src/glu/sgi/mesaglu.opt | 134 +-
src/glw/GLwDrawA.c | 88 +-
src/glw/GLwDrawA.h | 24 +-
src/glw/GLwDrawAP.h | 22 +-
src/glw/GLwMDrawA.c | 14 +-
src/glw/GLwMDrawA.h | 14 +-
src/glw/GLwMDrawAP.h | 14 +-
src/glw/Makefile | 2 +-
src/glw/README | 14 +-
src/glx/applegl_glx.c | 2 +-
src/glx/dri2.c | 2 +-
src/glx/dri2_glx.c | 4 +-
src/glx/dri_glx.c | 4 +-
src/glx/glx_pbuffer.c | 10 +-
src/glx/glxclient.h | 2 +-
src/glx/glxcmds.c | 8 +-
src/glx/glxconfig.c | 4 +-
src/glx/glxconfig.h | 2 +-
src/glx/glxext.c | 12 +-
src/glx/glxextensions.h | 2 +-
src/glx/indirect.c | 6 +-
src/glx/indirect.h | 6 +-
src/glx/indirect_glx.c | 4 +-
src/glx/indirect_init.c | 6 +-
src/glx/indirect_size.c | 6 +-
src/glx/indirect_size.h | 6 +-
src/glx/indirect_vertex_array.h | 6 +-
src/glx/indirect_vertex_array_priv.h | 24 +-
src/glx/indirect_vertex_program.c | 8 +-
src/glx/indirect_window_pos.c | 6 +-
src/glx/pixel.c | 2 +-
src/glx/pixelstore.c | 2 +-
src/glx/renderpix.c | 8 +-
src/mapi/glapi/SConscript | 16 +-
src/mapi/glapi/gen/gl_API.dtd | 4 +-
src/mapi/glapi/glapi_entrypoint.c | 2 +-
src/mapi/glapi/glapi_getproc.c | 12 +-
src/mapi/glapi/glapi_sparc.S | 6 +-
src/mapi/glapi/glapi_x86-64.S | 6 +-
src/mapi/glapi/glapi_x86.S | 6 +-
src/mapi/glapi/glapitable.h | 6 +-
src/mapi/glapi/glapitemp.h | 6 +-
src/mapi/glapi/glprocs.h | 6 +-
src/mapi/mapi/entry.c | 2 +-
src/mapi/mapi/stub.c | 2 +-
src/mapi/mapi/table.c | 2 +-
src/mapi/mapi/u_current.c | 2 +-
src/mapi/mapi/u_thread.h | 2 +-
src/mapi/vgapi/vgapi.csv | 2 +-
src/mesa/Makefile.mgw | 16 +-
src/mesa/drivers/beos/GLView.cpp | 98 +-
src/mesa/drivers/beos/Makefile | 4 +-
src/mesa/drivers/common/driverfuncs.c | 2 +-
src/mesa/drivers/common/meta.c | 6 +-
src/mesa/drivers/dri/Makefile.template | 4 +-
src/mesa/drivers/dri/common/dri_metaops.h | 4 +-
src/mesa/drivers/dri/common/dri_util.c | 60 +-
src/mesa/drivers/dri/common/dri_util.h | 42 +-
src/mesa/drivers/dri/common/drirenderbuffer.h | 2 +-
src/mesa/drivers/dri/common/spantmp.h | 6 +-
src/mesa/drivers/dri/common/spantmp2.h | 10 +-
src/mesa/drivers/dri/common/stenciltmp.h | 8 +-
src/mesa/drivers/dri/common/texmem.c | 74 +-
src/mesa/drivers/dri/common/texmem.h | 28 +-
src/mesa/drivers/dri/common/utils.c | 48 +-
src/mesa/drivers/dri/common/utils.h | 4 +-
src/mesa/drivers/dri/common/vblank.c | 24 +-
src/mesa/drivers/dri/common/xmlconfig.c | 10 +-
src/mesa/drivers/dri/common/xmlconfig.h | 14 +-
src/mesa/drivers/dri/common/xmlpool.h | 8 +-
src/mesa/drivers/dri/common/xmlpool/Makefile | 2 +-
src/mesa/drivers/dri/common/xmlpool/options.h | 8 +-
.../drivers/dri/common/xmlpool/t_options.h | 8 +-
src/mesa/drivers/dri/i810/Makefile | 2 +-
src/mesa/drivers/dri/i810/i810context.c | 10 +-
src/mesa/drivers/dri/i810/i810context.h | 38 +-
src/mesa/drivers/dri/i810/i810ioctl.c | 90 +-
src/mesa/drivers/dri/i810/i810ioctl.h | 4 +-
src/mesa/drivers/dri/i810/i810render.c | 2 +-
src/mesa/drivers/dri/i810/i810screen.c | 2 +-
src/mesa/drivers/dri/i810/i810span.c | 2 +-
src/mesa/drivers/dri/i810/i810state.c | 8 +-
src/mesa/drivers/dri/i810/i810tex.c | 58 +-
src/mesa/drivers/dri/i810/i810tex.h | 16 +-
src/mesa/drivers/dri/i810/i810texmem.c | 22 +-
src/mesa/drivers/dri/i810/i810texstate.c | 56 +-
src/mesa/drivers/dri/i810/i810tris.c | 16 +-
src/mesa/drivers/dri/i810/i810vb.c | 2 +-
src/mesa/drivers/dri/i810/server/i810_dri.h | 2 +-
src/mesa/drivers/dri/i810/server/i810_reg.h | 30 +-
src/mesa/drivers/dri/i915/Makefile | 2 +-
src/mesa/drivers/dri/i915/i830_context.c | 10 +-
src/mesa/drivers/dri/i915/i830_context.h | 10 +-
src/mesa/drivers/dri/i915/i830_reg.h | 10 +-
src/mesa/drivers/dri/i915/i830_state.c | 36 +-
src/mesa/drivers/dri/i915/i830_texblend.c | 14 +-
src/mesa/drivers/dri/i915/i830_texstate.c | 16 +-
src/mesa/drivers/dri/i915/i830_vtbl.c | 16 +-
src/mesa/drivers/dri/i915/i915_context.c | 10 +-
src/mesa/drivers/dri/i915/i915_context.h | 12 +-
src/mesa/drivers/dri/i915/i915_debug.c | 78 +-
src/mesa/drivers/dri/i915/i915_debug.h | 10 +-
src/mesa/drivers/dri/i915/i915_debug_fp.c | 10 +-
src/mesa/drivers/dri/i915/i915_fragprog.c | 34 +-
src/mesa/drivers/dri/i915/i915_program.c | 22 +-
src/mesa/drivers/dri/i915/i915_program.h | 14 +-
src/mesa/drivers/dri/i915/i915_reg.h | 24 +-
src/mesa/drivers/dri/i915/i915_state.c | 30 +-
src/mesa/drivers/dri/i915/i915_tex_layout.c | 10 +-
src/mesa/drivers/dri/i915/i915_texstate.c | 20 +-
src/mesa/drivers/dri/i915/i915_vtbl.c | 18 +-
src/mesa/drivers/dri/i915/intel_render.c | 12 +-
src/mesa/drivers/dri/i915/intel_tris.c | 14 +-
src/mesa/drivers/dri/i915/intel_tris.h | 10 +-
src/mesa/drivers/dri/i965/Makefile | 2 +-
src/mesa/drivers/dri/i965/brw_cc.c | 8 +-
src/mesa/drivers/dri/i965/brw_clip.c | 32 +-
src/mesa/drivers/dri/i965/brw_clip.h | 20 +-
src/mesa/drivers/dri/i965/brw_clip_line.c | 30 +-
src/mesa/drivers/dri/i965/brw_clip_point.c | 8 +-
src/mesa/drivers/dri/i965/brw_clip_state.c | 12 +-
src/mesa/drivers/dri/i965/brw_clip_tri.c | 88 +-
src/mesa/drivers/dri/i965/brw_clip_unfilled.c | 82 +-
src/mesa/drivers/dri/i965/brw_clip_util.c | 58 +-
src/mesa/drivers/dri/i965/brw_context.c | 10 +-
src/mesa/drivers/dri/i965/brw_context.h | 28 +-
src/mesa/drivers/dri/i965/brw_curbe.c | 18 +-
src/mesa/drivers/dri/i965/brw_defines.h | 298 +--
src/mesa/drivers/dri/i965/brw_draw.c | 36 +-
src/mesa/drivers/dri/i965/brw_draw.h | 10 +-
src/mesa/drivers/dri/i965/brw_draw_upload.c | 22 +-
src/mesa/drivers/dri/i965/brw_eu.c | 16 +-
src/mesa/drivers/dri/i965/brw_eu.h | 56 +-
src/mesa/drivers/dri/i965/brw_eu_debug.c | 20 +-
src/mesa/drivers/dri/i965/brw_eu_emit.c | 78 +-
src/mesa/drivers/dri/i965/brw_eu_util.c | 18 +-
src/mesa/drivers/dri/i965/brw_fallback.c | 14 +-
src/mesa/drivers/dri/i965/brw_fallback.h | 10 +-
src/mesa/drivers/dri/i965/brw_gs.c | 22 +-
src/mesa/drivers/dri/i965/brw_gs.h | 14 +-
src/mesa/drivers/dri/i965/brw_gs_emit.c | 28 +-
src/mesa/drivers/dri/i965/brw_gs_state.c | 10 +-
src/mesa/drivers/dri/i965/brw_misc_state.c | 28 +-
src/mesa/drivers/dri/i965/brw_optimize.c | 4 +-
src/mesa/drivers/dri/i965/brw_program.c | 24 +-
src/mesa/drivers/dri/i965/brw_queryobj.c | 8 +-
src/mesa/drivers/dri/i965/brw_sf.c | 24 +-
src/mesa/drivers/dri/i965/brw_sf.h | 20 +-
src/mesa/drivers/dri/i965/brw_sf_emit.c | 114 +-
src/mesa/drivers/dri/i965/brw_sf_state.c | 20 +-
src/mesa/drivers/dri/i965/brw_state.h | 10 +-
src/mesa/drivers/dri/i965/brw_state_batch.c | 10 +-
src/mesa/drivers/dri/i965/brw_state_cache.c | 8 +-
src/mesa/drivers/dri/i965/brw_state_dump.c | 4 +-
src/mesa/drivers/dri/i965/brw_state_upload.c | 18 +-
src/mesa/drivers/dri/i965/brw_structs.h | 774 +++----
src/mesa/drivers/dri/i965/brw_tex.c | 10 +-
src/mesa/drivers/dri/i965/brw_tex_layout.c | 8 +-
src/mesa/drivers/dri/i965/brw_urb.c | 42 +-
src/mesa/drivers/dri/i965/brw_util.c | 76 +-
src/mesa/drivers/dri/i965/brw_util.h | 10 +-
src/mesa/drivers/dri/i965/brw_vs.c | 14 +-
src/mesa/drivers/dri/i965/brw_vs.h | 12 +-
src/mesa/drivers/dri/i965/brw_vs_constval.c | 24 +-
src/mesa/drivers/dri/i965/brw_vs_emit.c | 174 +-
src/mesa/drivers/dri/i965/brw_vs_state.c | 10 +-
src/mesa/drivers/dri/i965/brw_vtbl.c | 14 +-
src/mesa/drivers/dri/i965/brw_wm.c | 20 +-
src/mesa/drivers/dri/i965/brw_wm.h | 14 +-
src/mesa/drivers/dri/i965/brw_wm_debug.c | 20 +-
src/mesa/drivers/dri/i965/brw_wm_emit.c | 96 +-
src/mesa/drivers/dri/i965/brw_wm_fp.c | 98 +-
src/mesa/drivers/dri/i965/brw_wm_iz.c | 138 +-
src/mesa/drivers/dri/i965/brw_wm_pass0.c | 46 +-
src/mesa/drivers/dri/i965/brw_wm_pass1.c | 36 +-
src/mesa/drivers/dri/i965/brw_wm_pass2.c | 26 +-
.../drivers/dri/i965/brw_wm_sampler_state.c | 40 +-
src/mesa/drivers/dri/i965/brw_wm_state.c | 18 +-
.../drivers/dri/i965/brw_wm_surface_state.c | 38 +-
src/mesa/drivers/dri/i965/gen6_sf_state.c | 2 +-
.../drivers/dri/intel/intel_batchbuffer.c | 10 +-
src/mesa/drivers/dri/intel/intel_blit.c | 10 +-
src/mesa/drivers/dri/intel/intel_blit.h | 10 +-
.../drivers/dri/intel/intel_buffer_objects.c | 10 +-
.../drivers/dri/intel/intel_buffer_objects.h | 12 +-
src/mesa/drivers/dri/intel/intel_buffers.c | 12 +-
src/mesa/drivers/dri/intel/intel_buffers.h | 10 +-
src/mesa/drivers/dri/intel/intel_clear.c | 10 +-
src/mesa/drivers/dri/intel/intel_clear.h | 10 +-
src/mesa/drivers/dri/intel/intel_context.c | 20 +-
src/mesa/drivers/dri/intel/intel_context.h | 14 +-
src/mesa/drivers/dri/intel/intel_extensions.c | 10 +-
src/mesa/drivers/dri/intel/intel_extensions.h | 10 +-
.../drivers/dri/intel/intel_extensions_es2.c | 10 +-
src/mesa/drivers/dri/intel/intel_fbo.c | 14 +-
src/mesa/drivers/dri/intel/intel_fbo.h | 10 +-
.../drivers/dri/intel/intel_mipmap_tree.c | 14 +-
.../drivers/dri/intel/intel_mipmap_tree.h | 16 +-
src/mesa/drivers/dri/intel/intel_pixel.c | 10 +-
src/mesa/drivers/dri/intel/intel_pixel.h | 10 +-
.../drivers/dri/intel/intel_pixel_bitmap.c | 24 +-
src/mesa/drivers/dri/intel/intel_pixel_copy.c | 12 +-
src/mesa/drivers/dri/intel/intel_pixel_draw.c | 10 +-
src/mesa/drivers/dri/intel/intel_reg.h | 10 +-
src/mesa/drivers/dri/intel/intel_regions.c | 14 +-
src/mesa/drivers/dri/intel/intel_regions.h | 12 +-
src/mesa/drivers/dri/intel/intel_screen.c | 16 +-
src/mesa/drivers/dri/intel/intel_screen.h | 10 +-
src/mesa/drivers/dri/intel/intel_span.c | 10 +-
src/mesa/drivers/dri/intel/intel_span.h | 10 +-
src/mesa/drivers/dri/intel/intel_state.c | 26 +-
src/mesa/drivers/dri/intel/intel_tex.c | 2 +-
src/mesa/drivers/dri/intel/intel_tex.h | 10 +-
src/mesa/drivers/dri/intel/intel_tex_copy.c | 16 +-
src/mesa/drivers/dri/intel/intel_tex_image.c | 16 +-
src/mesa/drivers/dri/intel/intel_tex_layout.c | 10 +-
src/mesa/drivers/dri/intel/intel_tex_layout.h | 10 +-
src/mesa/drivers/dri/intel/intel_tex_obj.h | 12 +-
.../drivers/dri/intel/intel_tex_subimage.c | 12 +-
.../drivers/dri/intel/intel_tex_validate.c | 8 +-
src/mesa/drivers/dri/mach64/Makefile | 2 +-
src/mesa/drivers/dri/mach64/mach64_context.c | 12 +-
src/mesa/drivers/dri/mach64/mach64_context.h | 2 +-
src/mesa/drivers/dri/mach64/mach64_dd.c | 2 +-
src/mesa/drivers/dri/mach64/mach64_ioctl.c | 24 +-
src/mesa/drivers/dri/mach64/mach64_lock.c | 2 +-
.../drivers/dri/mach64/mach64_native_vb.c | 40 +-
.../drivers/dri/mach64/mach64_native_vbtmp.h | 46 +-
src/mesa/drivers/dri/mach64/mach64_screen.c | 10 +-
src/mesa/drivers/dri/mach64/mach64_state.c | 16 +-
src/mesa/drivers/dri/mach64/mach64_tex.c | 4 +-
src/mesa/drivers/dri/mach64/mach64_texmem.c | 4 +-
src/mesa/drivers/dri/mach64/mach64_texstate.c | 40 +-
src/mesa/drivers/dri/mach64/mach64_tris.c | 136 +-
src/mesa/drivers/dri/mach64/mach64_vb.c | 4 +-
src/mesa/drivers/dri/mach64/mach64_vbtmp.h | 56 +-
src/mesa/drivers/dri/mga/Doxyfile | 78 +-
src/mesa/drivers/dri/mga/Makefile | 4 +-
src/mesa/drivers/dri/mga/mga_texcombine.c | 6 +-
src/mesa/drivers/dri/mga/mga_texstate.c | 36 +-
src/mesa/drivers/dri/mga/mga_xmesa.c | 46 +-
src/mesa/drivers/dri/mga/mga_xmesa.h | 2 +-
src/mesa/drivers/dri/mga/mgacontext.h | 24 +-
src/mesa/drivers/dri/mga/mgadd.c | 2 +-
src/mesa/drivers/dri/mga/mgaioctl.c | 18 +-
src/mesa/drivers/dri/mga/mgaioctl.h | 4 +-
src/mesa/drivers/dri/mga/mgaregs.h | 888 +++----
src/mesa/drivers/dri/mga/mgarender.c | 22 +-
src/mesa/drivers/dri/mga/mgaspan.c | 2 +-
src/mesa/drivers/dri/mga/mgastate.c | 42 +-
src/mesa/drivers/dri/mga/mgatex.c | 18 +-
src/mesa/drivers/dri/mga/mgatexmem.c | 18 +-
src/mesa/drivers/dri/mga/mgatris.c | 78 +-
src/mesa/drivers/dri/mga/mgavb.c | 30 +-
src/mesa/drivers/dri/mga/mgavb.h | 8 +-
src/mesa/drivers/dri/mga/server/mga_macros.h | 2 +-
src/mesa/drivers/dri/r128/Makefile | 4 +-
src/mesa/drivers/dri/r128/r128_context.c | 2 +-
src/mesa/drivers/dri/r128/r128_context.h | 8 +-
src/mesa/drivers/dri/r128/r128_ioctl.c | 2 +-
src/mesa/drivers/dri/r128/r128_ioctl.h | 2 +-
src/mesa/drivers/dri/r128/r128_screen.c | 6 +-
src/mesa/drivers/dri/r128/r128_state.c | 18 +-
src/mesa/drivers/dri/r128/r128_tex.c | 4 +-
src/mesa/drivers/dri/r128/r128_texmem.c | 6 +-
src/mesa/drivers/dri/r128/r128_texstate.c | 10 +-
src/mesa/drivers/dri/r128/r128_tris.c | 28 +-
src/mesa/drivers/dri/r128/server/r128.h | 8 +-
src/mesa/drivers/dri/r200/Doxyfile | 78 +-
src/mesa/drivers/dri/r200/Makefile | 2 +-
src/mesa/drivers/dri/r200/r200_cmdbuf.c | 28 +-
src/mesa/drivers/dri/r200/r200_context.c | 12 +-
src/mesa/drivers/dri/r200/r200_context.h | 26 +-
src/mesa/drivers/dri/r200/r200_ioctl.h | 6 +-
src/mesa/drivers/dri/r200/r200_maos.c | 2 +-
src/mesa/drivers/dri/r200/r200_maos_arrays.c | 2 +-
src/mesa/drivers/dri/r200/r200_reg.h | 102 +-
src/mesa/drivers/dri/r200/r200_sanity.c | 120 +-
src/mesa/drivers/dri/r200/r200_state_init.c | 150 +-
src/mesa/drivers/dri/r200/r200_swtcl.h | 4 +-
src/mesa/drivers/dri/r200/r200_tcl.c | 40 +-
src/mesa/drivers/dri/r200/r200_tcl.h | 2 +-
src/mesa/drivers/dri/r200/r200_tex.c | 14 +-
src/mesa/drivers/dri/r200/r200_texstate.c | 34 +-
src/mesa/drivers/dri/r200/r200_vertprog.c | 14 +-
src/mesa/drivers/dri/r200/r200_vertprog.h | 2 +-
.../drivers/dri/r300/compiler/r500_fragprog.c | 10 +-
.../dri/r300/compiler/r500_fragprog_emit.c | 2 +-
.../dri/r300/compiler/radeon_opcodes.h | 2 +-
.../dri/r300/compiler/radeon_optimize.c | 2 +-
src/mesa/drivers/dri/r300/r300_blit.c | 2 +-
src/mesa/drivers/dri/r300/r300_render.c | 2 +-
src/mesa/drivers/dri/r300/r300_state.c | 2 +-
src/mesa/drivers/dri/r300/r300_texstate.c | 4 +-
src/mesa/drivers/dri/r600/evergreen_chip.c | 646 +++---
src/mesa/drivers/dri/r600/evergreen_chip.h | 766 +++---
src/mesa/drivers/dri/r600/evergreen_diff.h | 72 +-
.../drivers/dri/r600/evergreen_fragprog.c | 64 +-
.../drivers/dri/r600/evergreen_fragprog.h | 4 +-
src/mesa/drivers/dri/r600/evergreen_ioctl.c | 2 +-
src/mesa/drivers/dri/r600/evergreen_off.h | 1576 ++++++-------
src/mesa/drivers/dri/r600/evergreen_oglprog.c | 26 +-
src/mesa/drivers/dri/r600/evergreen_oglprog.h | 2 +-
src/mesa/drivers/dri/r600/evergreen_render.c | 90 +-
src/mesa/drivers/dri/r600/evergreen_sq.h | 20 +-
src/mesa/drivers/dri/r600/evergreen_state.c | 230 +-
src/mesa/drivers/dri/r600/evergreen_tex.c | 284 +--
.../drivers/dri/r600/evergreen_vertprog.c | 72 +-
.../drivers/dri/r600/evergreen_vertprog.h | 8 +-
src/mesa/drivers/dri/r600/r600_cmdbuf.c | 8 +-
src/mesa/drivers/dri/r600/r600_cmdbuf.h | 2 +-
src/mesa/drivers/dri/r600/r600_context.c | 6 +-
src/mesa/drivers/dri/r600/r600_context.h | 4 +-
src/mesa/drivers/dri/r600/r600_emit.c | 6 +-
src/mesa/drivers/dri/r600/r600_emit.h | 10 +-
src/mesa/drivers/dri/r600/r600_reg.h | 6 +-
src/mesa/drivers/dri/r600/r600_texstate.c | 8 +-
src/mesa/drivers/dri/r600/r700_assembler.c | 2044 ++++++++---------
src/mesa/drivers/dri/r600/r700_assembler.h | 108 +-
src/mesa/drivers/dri/r600/r700_chip.c | 22 +-
src/mesa/drivers/dri/r600/r700_chip.h | 14 +-
src/mesa/drivers/dri/r600/r700_clear.c | 2 +-
src/mesa/drivers/dri/r600/r700_fragprog.c | 40 +-
src/mesa/drivers/dri/r600/r700_fragprog.h | 4 +-
src/mesa/drivers/dri/r600/r700_oglprog.c | 24 +-
src/mesa/drivers/dri/r600/r700_render.c | 88 +-
src/mesa/drivers/dri/r600/r700_shader.c | 80 +-
src/mesa/drivers/dri/r600/r700_shader.h | 34 +-
src/mesa/drivers/dri/r600/r700_shaderinst.c | 16 +-
src/mesa/drivers/dri/r600/r700_shaderinst.h | 50 +-
src/mesa/drivers/dri/r600/r700_state.c | 4 +-
src/mesa/drivers/dri/r600/r700_vertprog.c | 54 +-
src/mesa/drivers/dri/r600/r700_vertprog.h | 8 +-
src/mesa/drivers/dri/radeon/Makefile | 2 +-
src/mesa/drivers/dri/radeon/radeon_bo_drm.h | 8 +-
.../drivers/dri/radeon/radeon_bo_legacy.c | 42 +-
.../drivers/dri/radeon/radeon_bo_legacy.h | 10 +-
src/mesa/drivers/dri/radeon/radeon_chipset.h | 6 +-
.../dri/radeon/radeon_common_context.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_context.c | 20 +-
src/mesa/drivers/dri/radeon/radeon_context.h | 8 +-
src/mesa/drivers/dri/radeon/radeon_cs_drm.h | 10 +-
.../drivers/dri/radeon/radeon_cs_int_drm.h | 2 +-
.../drivers/dri/radeon/radeon_cs_legacy.c | 20 +-
.../drivers/dri/radeon/radeon_cs_legacy.h | 10 +-
.../drivers/dri/radeon/radeon_cs_space_drm.c | 22 +-
src/mesa/drivers/dri/radeon/radeon_fbo.c | 26 +-
src/mesa/drivers/dri/radeon/radeon_ioctl.h | 4 +-
.../drivers/dri/radeon/radeon_maos_arrays.c | 14 +-
.../drivers/dri/radeon/radeon_maos_vbtmp.h | 28 +-
.../drivers/dri/radeon/radeon_maos_verts.c | 12 +-
.../drivers/dri/radeon/radeon_mipmap_tree.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_sanity.c | 110 +-
src/mesa/drivers/dri/radeon/radeon_screen.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_span.c | 4 +-
src/mesa/drivers/dri/radeon/radeon_state.c | 2 +-
.../drivers/dri/radeon/radeon_state_init.c | 72 +-
src/mesa/drivers/dri/radeon/radeon_swtcl.c | 34 +-
src/mesa/drivers/dri/radeon/radeon_swtcl.h | 4 +-
src/mesa/drivers/dri/radeon/radeon_tcl.c | 46 +-
src/mesa/drivers/dri/radeon/radeon_tex.c | 10 +-
src/mesa/drivers/dri/radeon/radeon_texstate.c | 20 +-
src/mesa/drivers/dri/radeon/radeon_texture.c | 2 +-
src/mesa/drivers/dri/radeon/server/radeon.h | 4 +-
.../drivers/dri/radeon/server/radeon_dri.h | 2 +-
.../drivers/dri/radeon/server/radeon_reg.h | 4 +-
src/mesa/drivers/dri/savage/Makefile | 4 +-
src/mesa/drivers/dri/savage/savage_3d_reg.h | 10 +-
src/mesa/drivers/dri/savage/savage_bci.h | 8 +-
src/mesa/drivers/dri/savage/savage_init.h | 12 +-
src/mesa/drivers/dri/savage/savage_xmesa.c | 82 +-
src/mesa/drivers/dri/savage/savagecontext.h | 26 +-
src/mesa/drivers/dri/savage/savageioctl.c | 52 +-
src/mesa/drivers/dri/savage/savageioctl.h | 2 +-
src/mesa/drivers/dri/savage/savagerender.c | 12 +-
src/mesa/drivers/dri/savage/savagestate.c | 152 +-
src/mesa/drivers/dri/savage/savagetex.c | 68 +-
src/mesa/drivers/dri/savage/savagetris.c | 26 +-
.../drivers/dri/savage/server/savage_dri.h | 2 +-
src/mesa/drivers/dri/sis/Makefile | 2 +-
src/mesa/drivers/dri/sis/sis6326_clear.c | 6 +-
src/mesa/drivers/dri/sis/sis6326_reg.h | 10 +-
src/mesa/drivers/dri/sis/sis6326_state.c | 6 +-
src/mesa/drivers/dri/sis/sis_alloc.c | 26 +-
src/mesa/drivers/dri/sis/sis_clear.c | 10 +-
src/mesa/drivers/dri/sis/sis_context.c | 8 +-
src/mesa/drivers/dri/sis/sis_context.h | 12 +-
src/mesa/drivers/dri/sis/sis_dd.c | 4 +-
src/mesa/drivers/dri/sis/sis_reg.h | 12 +-
src/mesa/drivers/dri/sis/sis_screen.c | 6 +-
src/mesa/drivers/dri/sis/sis_span.c | 6 +-
src/mesa/drivers/dri/sis/sis_span.h | 2 +-
src/mesa/drivers/dri/sis/sis_state.c | 8 +-
src/mesa/drivers/dri/sis/sis_stencil.c | 4 +-
src/mesa/drivers/dri/sis/sis_tex.c | 14 +-
src/mesa/drivers/dri/sis/sis_texstate.c | 18 +-
src/mesa/drivers/dri/sis/sis_tris.c | 16 +-
src/mesa/drivers/dri/sis/sis_tritmp.h | 14 +-
src/mesa/drivers/dri/tdfx/Makefile | 2 +-
src/mesa/drivers/dri/tdfx/tdfx_context.c | 22 +-
src/mesa/drivers/dri/tdfx/tdfx_context.h | 20 +-
src/mesa/drivers/dri/tdfx/tdfx_dd.c | 4 +-
src/mesa/drivers/dri/tdfx/tdfx_pixels.c | 10 +-
src/mesa/drivers/dri/tdfx/tdfx_screen.c | 4 +-
src/mesa/drivers/dri/tdfx/tdfx_span.c | 2 +-
src/mesa/drivers/dri/tdfx/tdfx_state.c | 6 +-
src/mesa/drivers/dri/tdfx/tdfx_tex.c | 10 +-
src/mesa/drivers/dri/tdfx/tdfx_texstate.c | 6 +-
src/mesa/drivers/dri/tdfx/tdfx_tris.c | 70 +-
src/mesa/drivers/dri/tdfx/tdfx_vb.c | 18 +-
src/mesa/drivers/dri/tdfx/tdfx_vb.h | 8 +-
src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h | 30 +-
src/mesa/drivers/dri/unichrome/Makefile | 4 +-
.../drivers/dri/unichrome/server/via_priv.h | 2 +-
src/mesa/drivers/dri/unichrome/via_3d_reg.h | 62 +-
src/mesa/drivers/dri/unichrome/via_context.c | 68 +-
src/mesa/drivers/dri/unichrome/via_context.h | 34 +-
src/mesa/drivers/dri/unichrome/via_fb.c | 44 +-
src/mesa/drivers/dri/unichrome/via_ioctl.c | 172 +-
src/mesa/drivers/dri/unichrome/via_ioctl.h | 4 +-
src/mesa/drivers/dri/unichrome/via_render.c | 14 +-
src/mesa/drivers/dri/unichrome/via_screen.c | 12 +-
src/mesa/drivers/dri/unichrome/via_screen.h | 6 +-
src/mesa/drivers/dri/unichrome/via_span.c | 8 +-
src/mesa/drivers/dri/unichrome/via_state.c | 188 +-
src/mesa/drivers/dri/unichrome/via_tex.c | 168 +-
.../drivers/dri/unichrome/via_texcombine.c | 48 +-
src/mesa/drivers/dri/unichrome/via_tris.c | 102 +-
src/mesa/drivers/osmesa/osmesa.c | 6 +-
src/mesa/drivers/windows/gdi/mesa.def | 2 +-
src/mesa/drivers/windows/gdi/wgl.c | 180 +-
src/mesa/drivers/windows/gdi/wmesa.c | 352 +--
.../drivers/windows/gldirect/dglcontext.c | 6 +-
.../drivers/windows/gldirect/dglglobals.h | 2 +-
src/mesa/drivers/windows/gldirect/dglpf.c | 30 +-
src/mesa/drivers/windows/gldirect/dglwgl.c | 130 +-
src/mesa/drivers/windows/gldirect/dglwgl.h | 2 +-
src/mesa/drivers/windows/gldirect/dll_main.c | 2 +-
.../drivers/windows/gldirect/gld_dispatch.c | 2 +-
.../drivers/windows/gldirect/gld_driver.c | 2 +-
src/mesa/drivers/windows/icd/icd.c | 2 +-
src/mesa/drivers/x11/fakeglx.c | 12 +-
src/mesa/drivers/x11/glxapi.c | 10 +-
src/mesa/drivers/x11/glxapi.h | 8 +-
src/mesa/drivers/x11/glxheader.h | 8 +-
src/mesa/drivers/x11/realglx.c | 8 +-
src/mesa/drivers/x11/realglx.h | 8 +-
src/mesa/drivers/x11/xm_api.c | 14 +-
src/mesa/drivers/x11/xm_buffer.c | 6 +-
src/mesa/drivers/x11/xm_dd.c | 6 +-
src/mesa/drivers/x11/xm_glide.c | 2 +-
src/mesa/drivers/x11/xm_span.c | 14 +-
src/mesa/drivers/x11/xm_tri.c | 2 +-
src/mesa/drivers/x11/xmesa.h | 8 +-
src/mesa/drivers/x11/xmesaP.h | 2 +-
src/mesa/main/accum.c | 2 +-
src/mesa/main/accum.h | 2 +-
src/mesa/main/api_arrayelt.c | 12 +-
src/mesa/main/api_loopback.c | 10 +-
src/mesa/main/api_noop.c | 10 +-
src/mesa/main/arbprogram.c | 14 +-
src/mesa/main/arbprogram.h | 4 +-
src/mesa/main/arrayobj.c | 16 +-
src/mesa/main/atifragshader.c | 8 +-
src/mesa/main/attrib.c | 10 +-
src/mesa/main/attrib.h | 4 +-
src/mesa/main/bitset.h | 2 +-
src/mesa/main/blend.c | 2 +-
src/mesa/main/blend.h | 2 +-
src/mesa/main/bufferobj.c | 26 +-
src/mesa/main/buffers.c | 2 +-
src/mesa/main/clear.c | 4 +-
src/mesa/main/clip.h | 4 +-
src/mesa/main/colortab.c | 4 +-
src/mesa/main/compiler.h | 4 +-
src/mesa/main/config.h | 8 +-
src/mesa/main/context.c | 36 +-
src/mesa/main/context.h | 10 +-
src/mesa/main/dd.h | 76 +-
src/mesa/main/debug.c | 4 +-
src/mesa/main/debug.h | 2 +-
src/mesa/main/depth.h | 2 +-
src/mesa/main/dispatch.h | 6 +-
src/mesa/main/dlist.c | 18 +-
src/mesa/main/drawpix.c | 2 +-
src/mesa/main/enable.c | 6 +-
src/mesa/main/enums.c | 8 +-
src/mesa/main/enums.h | 2 +-
src/mesa/main/eval.c | 6 +-
src/mesa/main/eval.h | 2 +-
src/mesa/main/execmem.c | 16 +-
src/mesa/main/extensions.h | 2 +-
src/mesa/main/fbobject.c | 14 +-
src/mesa/main/feedback.c | 14 +-
src/mesa/main/ffvertex_prog.h | 10 +-
src/mesa/main/fog.h | 2 +-
src/mesa/main/formats.c | 14 +-
src/mesa/main/formats.h | 2 +-
src/mesa/main/framebuffer.c | 6 +-
src/mesa/main/framebuffer.h | 2 +-
src/mesa/main/get.c | 38 +-
src/mesa/main/glapidispatch.h | 6 +-
src/mesa/main/hash.c | 28 +-
src/mesa/main/hash.h | 2 +-
src/mesa/main/hint.h | 4 +-
src/mesa/main/histogram.h | 2 +-
src/mesa/main/image.c | 6 +-
src/mesa/main/image.h | 2 +-
src/mesa/main/imports.c | 34 +-
src/mesa/main/light.c | 24 +-
src/mesa/main/lines.c | 2 +-
src/mesa/main/lines.h | 2 +-
src/mesa/main/matrix.c | 32 +-
src/mesa/main/matrix.h | 6 +-
src/mesa/main/mipmap.c | 10 +-
src/mesa/main/mm.c | 30 +-
src/mesa/main/mm.h | 10 +-
src/mesa/main/mtypes.h | 80 +-
src/mesa/main/nvprogram.c | 4 +-
src/mesa/main/nvprogram.h | 2 +-
src/mesa/main/pack.c | 4 +-
src/mesa/main/pixel.h | 4 +-
src/mesa/main/points.h | 2 +-
src/mesa/main/polygon.c | 6 +-
src/mesa/main/polygon.h | 2 +-
src/mesa/main/rastpos.c | 8 +-
src/mesa/main/rastpos.h | 2 +-
src/mesa/main/readpix.c | 2 +-
src/mesa/main/remap_helper.h | 6 +-
src/mesa/main/renderbuffer.c | 4 +-
src/mesa/main/scissor.c | 2 +-
src/mesa/main/scissor.h | 4 +-
src/mesa/main/shaderapi.c | 10 +-
src/mesa/main/shared.c | 2 +-
src/mesa/main/simple_list.h | 12 +-
src/mesa/main/state.c | 12 +-
src/mesa/main/state.h | 2 +-
src/mesa/main/stencil.c | 4 +-
src/mesa/main/stencil.h | 2 +-
src/mesa/main/texcompress_fxt1.c | 6 +-
src/mesa/main/texenv.c | 2 +-
src/mesa/main/texenvprogram.c | 142 +-
src/mesa/main/texfetch_tmp.h | 20 +-
src/mesa/main/texformat.c | 2 +-
src/mesa/main/texgen.c | 2 +-
src/mesa/main/texgetimage.c | 2 +-
src/mesa/main/teximage.c | 50 +-
src/mesa/main/teximage.h | 2 +-
src/mesa/main/texobj.c | 30 +-
src/mesa/main/texparam.c | 20 +-
src/mesa/main/texstate.c | 20 +-
src/mesa/main/texstate.h | 4 +-
src/mesa/main/texstore.c | 82 +-
src/mesa/main/transformfeedback.c | 6 +-
src/mesa/main/varray.c | 6 +-
src/mesa/main/varray.h | 2 +-
src/mesa/main/viewport.c | 6 +-
src/mesa/main/viewport.h | 6 +-
src/mesa/main/vtxfmt.h | 2 +-
src/mesa/math/descrip.mms | 2 +-
src/mesa/math/m_debug_util.h | 6 +-
src/mesa/math/m_matrix.c | 60 +-
src/mesa/ppc/common_ppc.c | 4 +-
src/mesa/program/arbprogparse.c | 4 +-
src/mesa/program/descrip.mms | 2 +-
src/mesa/program/hash_table.c | 2 +-
src/mesa/program/ir_to_mesa.cpp | 2 +-
src/mesa/program/lex.yy.c | 66 +-
src/mesa/program/nvfragparse.c | 12 +-
src/mesa/program/nvvertparse.c | 4 +-
src/mesa/program/prog_cache.c | 16 +-
src/mesa/program/prog_cache.h | 10 +-
src/mesa/program/prog_execute.c | 4 +-
src/mesa/program/prog_optimize.c | 2 +-
src/mesa/program/prog_parameter.c | 6 +-
src/mesa/program/prog_parameter_layout.c | 4 +-
src/mesa/program/prog_print.c | 8 +-
src/mesa/program/prog_statevars.c | 12 +-
src/mesa/program/program_lexer.l | 2 +-
src/mesa/program/program_parse.tab.c | 24 +-
src/mesa/program/program_parse.tab.h | 10 +-
src/mesa/program/program_parse.y | 26 +-
src/mesa/program/program_parser.h | 2 +-
src/mesa/program/programopt.c | 14 +-
src/mesa/program/symbol_table.c | 6 +-
src/mesa/sources.mak | 6 +-
src/mesa/sparc/clip.S | 2 +-
src/mesa/sparc/norm.S | 2 +-
src/mesa/sparc/sparc.c | 8 +-
src/mesa/sparc/sparc.h | 8 +-
src/mesa/state_tracker/st_atom.c | 18 +-
src/mesa/state_tracker/st_atom.h | 12 +-
src/mesa/state_tracker/st_atom_blend.c | 14 +-
src/mesa/state_tracker/st_atom_clip.c | 18 +-
src/mesa/state_tracker/st_atom_constbuf.c | 12 +-
src/mesa/state_tracker/st_atom_constbuf.h | 10 +-
src/mesa/state_tracker/st_atom_depth.c | 12 +-
src/mesa/state_tracker/st_atom_framebuffer.c | 12 +-
src/mesa/state_tracker/st_atom_msaa.c | 10 +-
.../state_tracker/st_atom_pixeltransfer.c | 10 +-
src/mesa/state_tracker/st_atom_rasterizer.c | 18 +-
src/mesa/state_tracker/st_atom_sampler.c | 14 +-
src/mesa/state_tracker/st_atom_scissor.c | 12 +-
src/mesa/state_tracker/st_atom_shader.c | 16 +-
src/mesa/state_tracker/st_atom_shader.h | 10 +-
src/mesa/state_tracker/st_atom_stipple.c | 14 +-
src/mesa/state_tracker/st_atom_texture.c | 18 +-
src/mesa/state_tracker/st_atom_viewport.c | 14 +-
src/mesa/state_tracker/st_cb_accum.c | 14 +-
src/mesa/state_tracker/st_cb_accum.h | 10 +-
src/mesa/state_tracker/st_cb_bitmap.c | 20 +-
src/mesa/state_tracker/st_cb_bitmap.h | 10 +-
src/mesa/state_tracker/st_cb_blit.c | 12 +-
src/mesa/state_tracker/st_cb_blit.h | 10 +-
src/mesa/state_tracker/st_cb_bufferobjects.c | 32 +-
src/mesa/state_tracker/st_cb_bufferobjects.h | 10 +-
src/mesa/state_tracker/st_cb_clear.c | 20 +-
src/mesa/state_tracker/st_cb_clear.h | 10 +-
src/mesa/state_tracker/st_cb_condrender.c | 10 +-
src/mesa/state_tracker/st_cb_condrender.h | 10 +-
src/mesa/state_tracker/st_cb_drawpixels.c | 32 +-
src/mesa/state_tracker/st_cb_drawpixels.h | 10 +-
src/mesa/state_tracker/st_cb_drawtex.c | 4 +-
src/mesa/state_tracker/st_cb_drawtex.h | 2 +-
src/mesa/state_tracker/st_cb_fbo.c | 32 +-
src/mesa/state_tracker/st_cb_fbo.h | 12 +-
src/mesa/state_tracker/st_cb_feedback.c | 10 +-
src/mesa/state_tracker/st_cb_feedback.h | 10 +-
src/mesa/state_tracker/st_cb_flush.c | 10 +-
src/mesa/state_tracker/st_cb_flush.h | 10 +-
src/mesa/state_tracker/st_cb_program.c | 26 +-
src/mesa/state_tracker/st_cb_queryobj.c | 14 +-
src/mesa/state_tracker/st_cb_queryobj.h | 10 +-
src/mesa/state_tracker/st_cb_rasterpos.c | 10 +-
src/mesa/state_tracker/st_cb_rasterpos.h | 10 +-
src/mesa/state_tracker/st_cb_readpixels.c | 10 +-
src/mesa/state_tracker/st_cb_readpixels.h | 10 +-
src/mesa/state_tracker/st_cb_strings.c | 12 +-
src/mesa/state_tracker/st_cb_strings.h | 10 +-
src/mesa/state_tracker/st_cb_texture.c | 44 +-
src/mesa/state_tracker/st_cb_texture.h | 12 +-
src/mesa/state_tracker/st_cb_xformfb.c | 10 +-
src/mesa/state_tracker/st_cb_xformfb.h | 10 +-
src/mesa/state_tracker/st_context.c | 16 +-
src/mesa/state_tracker/st_context.h | 10 +-
src/mesa/state_tracker/st_debug.c | 10 +-
src/mesa/state_tracker/st_debug.h | 10 +-
src/mesa/state_tracker/st_draw.c | 26 +-
src/mesa/state_tracker/st_draw.h | 12 +-
src/mesa/state_tracker/st_draw_feedback.c | 14 +-
src/mesa/state_tracker/st_extensions.c | 14 +-
src/mesa/state_tracker/st_extensions.h | 10 +-
src/mesa/state_tracker/st_format.c | 20 +-
src/mesa/state_tracker/st_format.h | 10 +-
src/mesa/state_tracker/st_gen_mipmap.c | 14 +-
src/mesa/state_tracker/st_gen_mipmap.h | 10 +-
src/mesa/state_tracker/st_manager.c | 4 +-
src/mesa/state_tracker/st_mesa_to_tgsi.c | 74 +-
src/mesa/state_tracker/st_mesa_to_tgsi.h | 10 +-
src/mesa/state_tracker/st_program.c | 32 +-
src/mesa/state_tracker/st_program.h | 14 +-
src/mesa/state_tracker/st_texture.c | 20 +-
src/mesa/state_tracker/st_texture.h | 12 +-
src/mesa/swrast/descrip.mms | 4 +-
src/mesa/swrast/s_aaline.c | 2 +-
src/mesa/swrast/s_aatritemp.h | 16 +-
src/mesa/swrast/s_blend.c | 2 +-
src/mesa/swrast/s_blit.c | 2 +-
src/mesa/swrast/s_clear.c | 2 +-
src/mesa/swrast/s_context.c | 4 +-
src/mesa/swrast/s_copypix.c | 2 +-
src/mesa/swrast/s_depth.c | 4 +-
src/mesa/swrast/s_drawpix.c | 6 +-
src/mesa/swrast/s_fog.c | 2 +-
src/mesa/swrast/s_linetemp.h | 4 +-
src/mesa/swrast/s_span.c | 6 +-
src/mesa/swrast/s_span.h | 2 +-
src/mesa/swrast/s_stencil.c | 8 +-
src/mesa/swrast/s_texcombine.c | 2 +-
src/mesa/swrast/s_texfilter.c | 20 +-
src/mesa/swrast/s_triangle.c | 2 +-
src/mesa/swrast/swrast.h | 2 +-
src/mesa/swrast_setup/ss_context.c | 4 +-
src/mesa/swrast_setup/swrast_setup.h | 4 +-
src/mesa/tnl/t_context.c | 4 +-
src/mesa/tnl/t_context.h | 34 +-
src/mesa/tnl/t_draw.c | 68 +-
src/mesa/tnl/t_pipeline.c | 16 +-
src/mesa/tnl/t_pipeline.h | 2 +-
src/mesa/tnl/t_rasterpos.c | 10 +-
src/mesa/tnl/t_vb_light.c | 12 +-
src/mesa/tnl/t_vb_program.c | 8 +-
src/mesa/tnl/t_vb_render.c | 10 +-
src/mesa/tnl/t_vb_texgen.c | 8 +-
src/mesa/tnl/t_vb_texmat.c | 2 +-
src/mesa/tnl/t_vb_vertex.c | 4 +-
src/mesa/tnl/t_vertex.c | 52 +-
src/mesa/tnl/t_vertex.h | 12 +-
src/mesa/tnl/t_vertex_generic.c | 140 +-
src/mesa/tnl/t_vertex_sse.c | 100 +-
src/mesa/tnl_dd/imm/NOTES.imm | 14 +-
src/mesa/tnl_dd/imm/t_dd_imm_primtmp.h | 32 +-
src/mesa/tnl_dd/imm/t_dd_imm_vapi.h | 2 +-
src/mesa/tnl_dd/imm/t_dd_imm_vb.c | 2 +-
src/mesa/tnl_dd/imm/t_dd_imm_vbtmp.h | 20 +-
src/mesa/tnl_dd/t_dd_dmatmp.h | 22 +-
src/mesa/tnl_dd/t_dd_dmatmp2.h | 52 +-
src/mesa/tnl_dd/t_dd_triemit.h | 8 +-
src/mesa/tnl_dd/t_dd_vb.c | 10 +-
src/mesa/tnl_dd/t_dd_vbtmp.h | 46 +-
src/mesa/vbo/vbo_attrib.h | 16 +-
src/mesa/vbo/vbo_context.c | 10 +-
src/mesa/vbo/vbo_context.h | 8 +-
src/mesa/vbo/vbo_exec.c | 4 +-
src/mesa/vbo/vbo_exec.h | 10 +-
src/mesa/vbo/vbo_exec_api.c | 78 +-
src/mesa/vbo/vbo_exec_array.c | 16 +-
src/mesa/vbo/vbo_exec_draw.c | 48 +-
src/mesa/vbo/vbo_exec_eval.c | 84 +-
src/mesa/vbo/vbo_rebase.c | 40 +-
src/mesa/vbo/vbo_save.c | 2 +-
src/mesa/vbo/vbo_save.h | 4 +-
src/mesa/vbo/vbo_save_api.c | 130 +-
src/mesa/vbo/vbo_save_draw.c | 30 +-
src/mesa/vbo/vbo_save_loopback.c | 14 +-
src/mesa/vbo/vbo_split.c | 2 +-
src/mesa/vbo/vbo_split_copy.c | 46 +-
src/mesa/vbo/vbo_split_inplace.c | 24 +-
src/mesa/x86-64/x86-64.c | 2 +-
src/mesa/x86-64/xform4.S | 46 +-
src/mesa/x86/3dnow_normal.S | 6 +-
src/mesa/x86/3dnow_xform1.S | 2 +-
src/mesa/x86/3dnow_xform2.S | 2 +-
src/mesa/x86/3dnow_xform3.S | 4 +-
src/mesa/x86/3dnow_xform4.S | 8 +-
src/mesa/x86/common_x86.c | 4 +-
src/mesa/x86/common_x86_asm.S | 2 +-
src/mesa/x86/mmx_blend.S | 10 +-
src/mesa/x86/mmx_blendtmp.h | 14 +-
src/mesa/x86/read_rgba_span_x86.S | 18 +-
src/mesa/x86/read_rgba_span_x86.h | 2 +-
src/mesa/x86/rtasm/x86sse.c | 66 +-
src/mesa/x86/sse_normal.S | 2 +-
src/mesa/x86/sse_xform1.S | 2 +-
src/mesa/x86/sse_xform2.S | 2 +-
src/mesa/x86/sse_xform3.S | 2 +-
src/mesa/x86/sse_xform4.S | 2 +-
src/mesa/x86/x86_cliptest.S | 2 +-
src/mesa/x86/x86_xform2.S | 2 +-
src/mesa/x86/x86_xform3.S | 2 +-
src/mesa/x86/x86_xform4.S | 2 +-
1673 files changed, 20475 insertions(+), 20475 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 165d9bc..26dbd20 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,7 +13,7 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
-#
+#
# Copyright © 2004 Scott James Remnant .
#
# This program is free software; you can redistribute it and/or modify
@@ -134,7 +134,7 @@ if test $pkg_failed = yes; then
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
- else
+ else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
diff --git a/configs/autoconf.in b/configs/autoconf.in
index 1538d9a..f7ad661 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -100,7 +100,7 @@ GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
# Driver specific build vars
-DRI_DIRS = @DRI_DIRS@
+DRI_DIRS = @DRI_DIRS@
EGL_PLATFORMS = @EGL_PLATFORMS@
EGL_CLIENT_APIS = @EGL_CLIENT_APIS@
diff --git a/configs/beos b/configs/beos
index ac8d6fc..3ffbbd0 100644
--- a/configs/beos
+++ b/configs/beos
@@ -7,7 +7,7 @@ CONFIG_NAME = beos
DEFINES = \
- -DBEOS_THREADS
+ -DBEOS_THREADS
MACHINE=$(shell uname -m)
ifeq ($(MACHINE), BePC)
@@ -25,14 +25,14 @@ ifeq ($(CPU), x86)
-DUSE_MMX_ASM \
-DUSE_3DNOW_ASM \
-DUSE_SSE_ASM
-
+
MESA_ASM_SOURCES = $(X86_SOURCES)
GLAPI_ASM_SOURCES = $(X86_API)
CC = gcc
CXX = g++
LD = gcc
-
+
CFLAGS = \
-Wall -Wno-multichar -Wno-ctor-dtor-privacy \
$(DEFINES)
@@ -75,7 +75,7 @@ else
-lroot \
/boot/develop/lib/ppc/glue-noinit.a \
/boot/develop/lib/ppc/init_term_dyn.o \
- /boot/develop/lib/ppc/start_dyn.o
+ /boot/develop/lib/ppc/start_dyn.o
ifdef DEBUG
CFLAGS += -g -O0
@@ -95,9 +95,9 @@ GLU_DIRS = sgi
DRIVER_DIRS = beos
# Library/program dependencies
-GL_LIB_DEPS =
+GL_LIB_DEPS =
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
-GLU_LIB_DEPS =
+GLU_LIB_DEPS =
GLUT_LIB_DEPS = -lgame -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
APP_LIB_DEPS = -lbe -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -l$(GLUT_LIB)
diff --git a/configs/catamount-osmesa-pgi b/configs/catamount-osmesa-pgi
index 74fd53a..097904b 100644
--- a/configs/catamount-osmesa-pgi
+++ b/configs/catamount-osmesa-pgi
@@ -1,6 +1,6 @@
# Configuration for building only libOSMesa on Cray Xt3
-# for the compute nodes running Catamount using the
-# Portland Group compiler. The Portland Group toolchain has to be
+# for the compute nodes running Catamount using the
+# Portland Group compiler. The Portland Group toolchain has to be
# enabled before using "module switch PrgEnv-gnu PrgEnv-pgi" .
# This doesn't really have a lot of dependencies, so it should be usable
# on other similar systems too.
diff --git a/configs/config.mgw b/configs/config.mgw
index af74fda..2777290 100644
--- a/configs/config.mgw
+++ b/configs/config.mgw
@@ -2,26 +2,26 @@
#
# Updated : by Heromyth, on 2007-7-21
# Email : zxpmyth@yahoo.com.cn
-# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
+# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
# The others havn't been tested yet.
# 2) The generated DLLs are *not* compatible with the ones built
-# with the other compilers like VC8, especially for GLUT.
+# with the other compilers like VC8, especially for GLUT.
# 3) Although more tests are needed, it can be used individually!
-# The generated DLLs by MingW with STDCALL are not totally compatible
+# The generated DLLs by MingW with STDCALL are not totally compatible
# with the ones linked by Microsoft's compilers.
#
# xxx_USING_STDCALL = 1 Compiling MESA with __stdcall. This is default!
-#
+#
# xxx_USING_STDCALL = 0 Compiling MESA without __stdcall. I like this:)
-#
+#
# In fact, GL_USING_STDCALL and GLUT_USING_STDCALL can be
# different. For example:
#
# GL_USING_STDCALL = 0
# GLUT_USING_STDCALL = 1
-#
+#
# Suggested setting:
#
# ALL_USING_STDCALL = 1
diff --git a/configs/default b/configs/default
index 2301a68..d180c3c 100644
--- a/configs/default
+++ b/configs/default
@@ -24,7 +24,7 @@ CFLAGS = -O
CXXFLAGS = -O
LDFLAGS =
HOST_CFLAGS = $(CFLAGS)
-GLU_CFLAGS =
+GLU_CFLAGS =
# Compiler for building demos/tests/etc
APP_CC = $(CC)
@@ -33,7 +33,7 @@ APP_CXX = $(CXX)
# Misc tools and flags
SHELL = /bin/sh
MKLIB = $(SHELL) $(TOP)/bin/mklib
-MKLIB_OPTIONS =
+MKLIB_OPTIONS =
MKDEP = makedepend
MKDEP_OPTIONS = -fdepend
MAKE = make
@@ -83,7 +83,7 @@ GLESv2_LIB_GLOB = $(GLESv2_LIB_NAME)*
VG_LIB_GLOB = $(VG_LIB_NAME)*
# Optional assembly language optimization files for libGL
-MESA_ASM_SOURCES =
+MESA_ASM_SOURCES =
# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
# order to build the Motif widget too)
@@ -101,7 +101,7 @@ DRIVER_DIRS = x11 osmesa
# EGL drivers to build
EGL_DRIVERS_DIRS = glx
-# Gallium directories and
+# Gallium directories and
GALLIUM_DIRS = auxiliary drivers state_trackers
GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a
GALLIUM_DRIVERS_DIRS = softpipe trace rbug identity galahad i915 i965 svga r300 nvfx nv50 failover
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index a4aa82e..ad7e87f 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -20,14 +20,14 @@ DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes -std=c99 -Wundef -ffast-math \
$(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
-CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi -pedantic $(ASM_FLAGS) $(X11_INCLUDES)
+CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi -pedantic $(ASM_FLAGS) $(X11_INCLUDES)
# Work around aliasing bugs - developers should comment this out
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
-ASM_SOURCES =
-MESA_ASM_SOURCES =
+ASM_SOURCES =
+MESA_ASM_SOURCES =
# Library/program dependencies
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
diff --git a/configs/freebsd-dri-x86 b/configs/freebsd-dri-x86
index 9475437..dd4b0c7 100644
--- a/configs/freebsd-dri-x86
+++ b/configs/freebsd-dri-x86
@@ -6,7 +6,7 @@ include $(TOP)/configs/freebsd-dri
CONFIG_NAME = freebsd-dri-x86
# Unnecessary on x86, generally.
-PIC_FLAGS =
+PIC_FLAGS =
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
MESA_ASM_SOURCES = $(X86_SOURCES)
diff --git a/configs/hpux10-static b/configs/hpux10-static
index 6101a4e..9f8c9aa 100644
--- a/configs/hpux10-static
+++ b/configs/hpux10-static
@@ -21,10 +21,10 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies (static libs don't have dependencies)
-GL_LIB_DEPS =
-OSMESA_LIB_DEPS =
-GLU_LIB_DEPS =
-GLUT_LIB_DEPS =
-GLW_LIB_DEPS =
+GL_LIB_DEPS =
+OSMESA_LIB_DEPS =
+GLU_LIB_DEPS =
+GLUT_LIB_DEPS =
+GLW_LIB_DEPS =
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm -lstdc++
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm -lstdc++
diff --git a/configs/linux-dri b/configs/linux-dri
index 1c94ed0..55e9455 100644
--- a/configs/linux-dri
+++ b/configs/linux-dri
@@ -38,7 +38,7 @@ GLUT_CFLAGS = -fexceptions
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
-MESA_ASM_SOURCES =
+MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
@@ -58,7 +58,7 @@ EGL_DRIVERS_DIRS = glx
DRIVER_DIRS = dri
GALLIUM_WINSYS_DIRS = sw sw/xlib drm/vmware drm/intel drm/i965
-GALLIUM_TARGET_DIRS =
+GALLIUM_TARGET_DIRS =
GALLIUM_STATE_TRACKERS_DIRS = egl
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \
diff --git a/configs/linux-dri-debug b/configs/linux-dri-debug
index 0dbf428..1ce2ff2 100644
--- a/configs/linux-dri-debug
+++ b/configs/linux-dri-debug
@@ -8,7 +8,7 @@ OPT_FLAGS = -O0 -g
ARCH_FLAGS = -DDEBUG
# Helpful to reduce the amount of stuff that gets built sometimes:
-#DRI_DIRS = i915tex i915
+#DRI_DIRS = i915tex i915
#DRI_DIRS = i965
#DRI_DIRS = radeon r200 r300
#DRI_DIRS = unichrome sis
diff --git a/configs/linux-dri-xcb b/configs/linux-dri-xcb
index 8092a04..33b680b 100644
--- a/configs/linux-dri-xcb
+++ b/configs/linux-dri-xcb
@@ -28,7 +28,7 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
X11_INCLUDES = $(shell pkg-config --cflags-only-I x11) $(shell pkg-config --cflags-only-I xcb) $(shell pkg-config --cflags-only-I x11-xcb) $(shell pkg-config --cflags-only-I xcb-glx)
CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
- $(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math
+ $(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
@@ -36,7 +36,7 @@ CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
-MESA_ASM_SOURCES =
+MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=$(shell pkg-config --libs-only-L x11)
diff --git a/configs/linux-egl b/configs/linux-egl
index 6393e94..984bf3b 100644
--- a/configs/linux-egl
+++ b/configs/linux-egl
@@ -33,7 +33,7 @@ CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
-MESA_ASM_SOURCES =
+MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
@@ -53,4 +53,4 @@ DRIVER_DIRS = dri
GALLIUM_WINSYS_DIRS = egl_drm
GALLIUM_TARGET_DIRS =
-DRI_DIRS = intel
+DRI_DIRS = intel
diff --git a/configs/linux-ia64-icc b/configs/linux-ia64-icc
index bd11897..ccb58ea 100644
--- a/configs/linux-ia64-icc
+++ b/configs/linux-ia64-icc
@@ -13,7 +13,7 @@ GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -arch icc-istatic
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lpthread
-GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
+GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
diff --git a/configs/linux-indirect b/configs/linux-indirect
index 272d34e..fd47b43 100644
--- a/configs/linux-indirect
+++ b/configs/linux-indirect
@@ -29,7 +29,7 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
X11_INCLUDES = -I/usr/X11R6/include
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
- $(ASM_FLAGS) -std=c99 -ffast-math
+ $(ASM_FLAGS) -std=c99 -ffast-math
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
@@ -37,7 +37,7 @@ CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
CFLAGS += -fno-strict-aliasing
CXXFLAGS += -fno-strict-aliasing
-MESA_ASM_SOURCES =
+MESA_ASM_SOURCES =
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/X11R6/lib
diff --git a/configs/linux-static b/configs/linux-static
index 907904b..a99363d 100644
--- a/configs/linux-static
+++ b/configs/linux-static
@@ -15,11 +15,11 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies (static libs don't have dependencies)
-GL_LIB_DEPS =
-OSMESA_LIB_DEPS =
-GLU_LIB_DEPS =
-GLUT_LIB_DEPS =
-GLW_LIB_DEPS =
+GL_LIB_DEPS =
+OSMESA_LIB_DEPS =
+GLU_LIB_DEPS =
+GLUT_LIB_DEPS =
+GLW_LIB_DEPS =
# Need to specify all libraries we may need
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) \
diff --git a/configs/linux-x86-64-static b/configs/linux-x86-64-static
index 626d579..51a231c 100644
--- a/configs/linux-x86-64-static
+++ b/configs/linux-x86-64-static
@@ -15,11 +15,11 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies (static libs don't have dependencies)
-GL_LIB_DEPS =
-OSMESA_LIB_DEPS =
-GLU_LIB_DEPS =
-GLUT_LIB_DEPS =
-GLW_LIB_DEPS =
+GL_LIB_DEPS =
+OSMESA_LIB_DEPS =
+GLU_LIB_DEPS =
+GLUT_LIB_DEPS =
+GLW_LIB_DEPS =
# Need to specify all libraries we may need
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -Wl,--start-group \
diff --git a/configs/linux-x86-debug b/configs/linux-x86-debug
index d35012f..1e66c09 100644
--- a/configs/linux-x86-debug
+++ b/configs/linux-x86-debug
@@ -1,4 +1,4 @@
-# Configuration for Linux with x86 code, but no gcc optimizations and
+# Configuration for Linux with x86 code, but no gcc optimizations and
# debugging enabled.
include $(TOP)/configs/linux-x86
diff --git a/configs/linux-x86-static b/configs/linux-x86-static
index 16c8731..2f60b54 100644
--- a/configs/linux-x86-static
+++ b/configs/linux-x86-static
@@ -15,11 +15,11 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies (static libs don't have dependencies)
-GL_LIB_DEPS =
-OSMESA_LIB_DEPS =
-GLU_LIB_DEPS =
-GLUT_LIB_DEPS =
-GLW_LIB_DEPS =
+GL_LIB_DEPS =
+OSMESA_LIB_DEPS =
+GLU_LIB_DEPS =
+GLUT_LIB_DEPS =
+GLW_LIB_DEPS =
# Need to specify all libraries we may need
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) \
diff --git a/configs/psl1ght-rsx b/configs/psl1ght-rsx
index dd236f6..d24ecc3 100644
--- a/configs/psl1ght-rsx
+++ b/configs/psl1ght-rsx
@@ -27,7 +27,7 @@ SRC_DIRS = glsl mapi/glapi mesa \
gallium gallium/winsys gallium/targets glu egl
# Build no traditional Mesa drivers:
-DRIVER_DIRS =
+DRIVER_DIRS =
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
@@ -45,7 +45,7 @@ GALLIUM_TARGET_DIRS = egl-psl1ght
GALLIUM_STATE_TRACKERS_DIRS = egl
EGL_PLATFORMS = psl1ght
-EGL_DRIVERS_DIRS =
+EGL_DRIVERS_DIRS =
EGL_LIB_DEPS = $(TOP)/src/gallium/targets/egl-psl1ght/libeglpsl1ght.a \
$(TOP)/src/gallium/state_trackers/egl/libegl.a
diff --git a/configs/sunos4-static b/configs/sunos4-static
index 9135fa7..573ec55 100644
--- a/configs/sunos4-static
+++ b/configs/sunos4-static
@@ -17,9 +17,9 @@ GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
# Library/program dependencies (static libs don't have dependencies)
-GL_LIB_DEPS =
-OSMESA_LIB_DEPS =
-GLU_LIB_DEPS =
-GLUT_LIB_DEPS =
-GLW_LIB_DEPS =
+GL_LIB_DEPS =
+OSMESA_LIB_DEPS =
+GLU_LIB_DEPS =
+GLUT_LIB_DEPS =
+GLW_LIB_DEPS =
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lpthread -lm
diff --git a/configure.ac b/configure.ac
index 6662b8a..c44bfb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1081,7 +1081,7 @@ if test "x$enable_egl" = xyes; then
[have_xcb_dri2=yes],[have_xcb_dri2=no])
PKG_CHECK_MODULES([LIBUDEV], [libudev > 150],
[have_libudev=yes],[have_libudev=no])
-
+
if test "$have_xcb_dri2" = yes; then
EGL_DRIVER_DRI2=dri2
DEFINES="$DEFINES -DHAVE_XCB_DRI2"
diff --git a/docs/COPYING b/docs/COPYING
index b88946c..4da3a14 100644
--- a/docs/COPYING
+++ b/docs/COPYING
@@ -141,7 +141,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
diff --git a/docs/MESA_copy_sub_buffer.spec b/docs/MESA_copy_sub_buffer.spec
index 752a014..138879d 100644
--- a/docs/MESA_copy_sub_buffer.spec
+++ b/docs/MESA_copy_sub_buffer.spec
@@ -73,7 +73,7 @@ Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
thread's current context, glXCopySubBufferMESA performs an
implicit glFlush before it returns. Subsequent OpenGL commands
may be issued immediately after calling glXCopySubBufferMESA, but
- are not executed until the copy is completed.
+ are not executed until the copy is completed.
GLX Protocol
diff --git a/docs/MESA_swap_control.spec b/docs/MESA_swap_control.spec
index 856978b..fbbe074 100644
--- a/docs/MESA_swap_control.spec
+++ b/docs/MESA_swap_control.spec
@@ -83,9 +83,9 @@ Additions to the GLX 1.3 Specification
takes effect when glXSwapBuffers is first called subsequent to the
glXSwapIntervalMESA call.
- A video frame period is the time required by the monitor to display a
+ A video frame period is the time required by the monitor to display a
full frame of video data. In the case of an interlaced monitor,
- this is typically the time required to display both the even and odd
+ this is typically the time required to display both the even and odd
fields of a frame of video data.
If is set to a value of 0, buffer swaps are not synchron-
diff --git a/docs/MESA_swap_frame_usage.spec b/docs/MESA_swap_frame_usage.spec
index 5023ead..610187f 100644
--- a/docs/MESA_swap_frame_usage.spec
+++ b/docs/MESA_swap_frame_usage.spec
@@ -45,7 +45,7 @@ Overview
call to enable the statistic) to when the next buffer swap completes, tf
is the entire time for a frame which may be multiple screen refreshes
depending on the swap interval as set by the GLX_SGI_swap_control or
- GLX_OML_sync_control extensions.
+ GLX_OML_sync_control extensions.
The value, percent, indicates the amount of time spent between the
completion of the two swaps. If the value is in the range [0,1], the
@@ -115,7 +115,7 @@ Additions to the GLX 1.3 Specification
MESA_swap_control are supported, the swap period is the vertical refresh
time multiplied by the swap interval (or one if the swap interval is set
to zero).
-
+
If OML_sync_control is supported, the swap period is the vertical
refresh time multiplied by the divisor parameter to
glXSwapBuffersMscOML. The frame usage in this case is less than 1.0 if
diff --git a/docs/MESA_texture_array.spec b/docs/MESA_texture_array.spec
index 9dee65b..3e65513 100644
--- a/docs/MESA_texture_array.spec
+++ b/docs/MESA_texture_array.spec
@@ -103,7 +103,7 @@ New Tokens
Accepted by the parameter of TexImage2D, TexSubImage2D,
CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D,
- CompressedTexSubImage2D, GetTexLevelParameteriv, and
+ CompressedTexSubImage2D, GetTexLevelParameteriv, and
GetTexLevelParameterfv:
TEXTURE_1D_ARRAY_EXT
@@ -189,7 +189,7 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
Change the fourth paragraph on page 156 to say (spec changes identical
to EXT_texture_array):
-
+
"The command
void TexImage2D(enum target, int level,
@@ -213,7 +213,7 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
of 1, except that
* The border depth, d_b, is zero, and the depth of the image is
- always 1 regardless of the value of border.
+ always 1 regardless of the value of border.
* The border height, h_b, is zero if is
TEXTURE_1D_ARRAY_EXT, and otherwise.
@@ -264,7 +264,7 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
specified or changed, and when applied to a fragment. Each parameter is
set by calling
- void TexParameter{if}(enum target, enum pname, T param);
+ void TexParameter{if}(enum target, enum pname, T param);
void TexParameter{if}v(enum target, enum pname, T params);
target is the target, either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
@@ -289,7 +289,7 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
-- Section 3.8.8 "Texture Minification" in the section "Mipmapping"
Change the third paragraph (page 174) to say:
-
+
"For a two-dimensional texture, two-dimensional array texture, or
cube map texture,"
@@ -369,7 +369,7 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
-- Section 3.8.12 "Texture Objects"
- Change section (page 180) to say (spec changes identical to
+ Change section (page 180) to say (spec changes identical to
EXT_texture_array):
"In addition to the default textures TEXTURE_1D, TEXTURE_2D,
@@ -421,18 +421,18 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
TEXTURE_2D_ARRAY_EXT respectively while 0 is bound to the corresponding
targets.
- Change second paragraph on page 181 to say (spec changes identical to
+ Change second paragraph on page 181 to say (spec changes identical to
EXT_texture_array):
-
+
"... If a texture that is currently bound to one of the targets
TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP,
TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT is deleted, it is as
though BindTexture had been executed with the same target and texture
zero. ..."
- Change second paragraph on page 182 to say (spec changes identical to
+ Change second paragraph on page 182 to say (spec changes identical to
EXT_texture_array):
-
+
"The texture object name space, including the initial one-, two-, and
three dimensional, cube map, and one- and two-dimensional array texture
objects, is shared among all texture units. ..."
@@ -473,7 +473,7 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
three-dimensional texture is used. If the cube map texture and any of
the three-, two-, or one-dimensional textures is enabled, then cube map
texturing is used. If one-dimensional array texture is enabled and any
- of cube map, three-, two-, or one-dimensional textures is enabled,
+ of cube map, three-, two-, or one-dimensional textures is enabled,
one-dimensional array texturing is used. If two-dimensional array
texture is enabled and any of cube map, three-, two-, one-dimensional
textures or one-dimensional array texture is enabled, two-dimensional
@@ -524,7 +524,7 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
rectangle, ARRAY1D, ARRAY2D). These texture instructions specify
how the 4-tuple is mapped into the coordinates used for sampling. The
following function is used to describe the texture sampling in the
- descriptions below:
+ descriptions below:
vec4 TextureSample(vec4 coord, float lodBias, int texImageUnit,
enum texTarget);
@@ -556,9 +556,9 @@ Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
texture comparisons."
-- Section 3.11.6.2 "TXP: Project coordinate and map to color"
-
+
Add to the end of the section:
-
+
"A program will fail to load if the TXP instruction is used in
conjunction with the SHADOWARRAY2D target."
@@ -595,7 +595,7 @@ Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment Operations)
identical to EXT_texture_array):
"* If FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT is TEXTURE and
- FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT names a one- or
+ FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT names a one- or
two-dimensional array texture, then
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT must be smaller than the
number of layers in the texture."
@@ -630,7 +630,7 @@ Additions to Chapter 6 of the OpenGL 2.0 Specification (State and State Requests
attachment point. Otherwise, will contain the value zero."
-- Section 6.1.4 "Texture Queries"
-
+
Change the first three paragraphs (page 248) to say (spec changes
identical to EXT_texture_array):
@@ -766,9 +766,9 @@ Issues
RESOLVED. A new query is added.
(5) How are array textures exposed in GLSL?
-
+
RESOLVED. Use GL_EXT_texture_array.
-
+
(6) Should a 1D array texture also be exposed?
RESOLVED. For orthogonality, yes.
@@ -781,7 +781,7 @@ Issues
two-dimensional texture.
(8) How is this extension related to GL_EXT_texture_array?
-
+
This extension adapats GL_MESAX_texture_stack to the notation,
indexing, and FBO access of GL_EXT_texture_array. This extension
replaces the GLSL support of GL_EXT_texture_array with
diff --git a/docs/MESA_ycbcr_texture.spec b/docs/MESA_ycbcr_texture.spec
index 0fa1f7b..f7b4d38 100644
--- a/docs/MESA_ycbcr_texture.spec
+++ b/docs/MESA_ycbcr_texture.spec
@@ -77,7 +77,7 @@ Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
In section 3.6.4, Rasterization of Pixel Rectangles, on page 101,
add the following to Table 3.8 (Packed pixel formats):
-
+
type Parameter GL Data Number of Matching
Token Name Type Components Pixel Formats
-------------- ------- ---------- -------------
@@ -94,7 +94,7 @@ Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
+-------------------------------+-------------------------------+
| 1st | 2nd |
+-------------------------------+-------------------------------+
-
+
UNSIGNED_SHORT_8_8_REV_MESA:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
@@ -187,7 +187,7 @@ Errors
INVALID_OPERATION is generated by CopyTexSubImage2D if the internal
image is YCBCR_MESA.
-
+
New State
Edit table 6.16 on page 231: change the type of TEXTURE_INTERNAL_FORMAT
diff --git a/docs/README.3DFX b/docs/README.3DFX
index 7feda6f..4c43a81 100644
--- a/docs/README.3DFX
+++ b/docs/README.3DFX
@@ -120,7 +120,7 @@ SSTH3_SLI_AA_CONFIGURATION
"5" - 4-way SLI enabled, AA disabled
"6" - 4-way SLI enabled, 2 sample AA enabled
"7" - 2-way SLI enabled, 4 sample AA enabled
- "8" - SLI disabled, 8 sample AA enabled
+ "8" - SLI disabled, 8 sample AA enabled
SST_DUALHEAD
OS: win32
HW: ?
@@ -338,7 +338,7 @@ Linux:
MacOS:
------
Check the WEB page at http://valerie.inf.elte.hu/~boga/Mesa.html
-
+
MS Windows:
-----------
@@ -394,7 +394,7 @@ Doing more with Mesa & Linux Glide:
setenv MESA_GLX_FX fullscreen
2. As root, run a GLX-based program (any GLUT demo on Linux).
-
+
3. Be careful: once the 3Dfx screen appears you won't be able
to see the GLUT windows on your X display. This can make using
the mouse tricky! One solution is to hook up your 3Dfx card to
@@ -403,7 +403,7 @@ Doing more with Mesa & Linux Glide:
setenv SST_VGA_PASS 1
setenv SST_NOSHUTDOWN
-
+
or for the Voodoo2:
setenv SSTV2_VGA_PASS 1
@@ -606,7 +606,7 @@ Know BUGS and Problems:
- Using polygon offset or stipple polygons;
NOTE: this is list is not yet complete.
-
+
Hints and Special Features:
---------------------------
@@ -822,7 +822,7 @@ the Mesa mailing list and my driver WEB page
David Bucciarelli (davibu@tin.it)
-Humanware s.r.l.
+Humanware s.r.l.
Via XXIV Maggio 62
Pisa, Italy
Tel./Fax +39-50-554108
diff --git a/docs/README.AMIWIN b/docs/README.AMIWIN
index 47cf696..df83f6f 100644
--- a/docs/README.AMIWIN
+++ b/docs/README.AMIWIN
@@ -1,6 +1,6 @@
AMIGA AMIWIN PORT of MESA: THE OPENGL SOFTWARE EMULATION
========================================================
-Port by Victor Ng-Thow-Hing (victorng@dgp.toronto.edu)
+Port by Victor Ng-Thow-Hing (victorng@dgp.toronto.edu)
Original Author (Brian Paul (brianp@ssec.wisc.edu)
Dec.1 , 1995: Port of release Mesa 1.2.5
@@ -11,22 +11,22 @@ Nov.25, 1995: Port of release Mesa 1.2.4
HISTORY
=======
-As a 3D graphics progammer, I was increasingly frustrated to see OpenGL
+As a 3D graphics progammer, I was increasingly frustrated to see OpenGL
appearing on so many platforms EXCEPT the Amiga. Up to now, the task
of porting OpenGL directly from native Amiga drawing routines seemed like
a daunting task. However, two important events made this port possible.
-First of all, Brian Paul wrote Mesa, the OpenGL software emulator that
-can be found on many platforms - except the Amiga and Atari (who cares
-about the latter!). This was pretty ironic considering that Mesa was
-originally prototyped on an Amiga! The second great event was when
-Holger Kruse developed AmiWin, the X11R6 server for the Amiga (definitely
+First of all, Brian Paul wrote Mesa, the OpenGL software emulator that
+can be found on many platforms - except the Amiga and Atari (who cares
+about the latter!). This was pretty ironic considering that Mesa was
+originally prototyped on an Amiga! The second great event was when
+Holger Kruse developed AmiWin, the X11R6 server for the Amiga (definitely
register for this great piece of software) and released a development kit
so one could compile X programs with SAS/C.
Since Mesa had X routines as its primitive drawing operations, this made
a marriage of Mesa and Amiwin feasible. I copied over the sources from
-an ftp site, played with the code, wrote some Smakefiles, and voila,
+an ftp site, played with the code, wrote some Smakefiles, and voila,
I had OpenGL programs displaying on my Amiga.
Although the speed is nothing to be impressed about, this port can be
@@ -34,7 +34,7 @@ potentially useful to those who want to quickly test their code in
wireframe or perhaps learn more about programming with the OpenGL API.
I hope Amiga developers will continue to write excellent software for
-their machine, especially more X clients for Amiwin. If you have any
+their machine, especially more X clients for Amiwin. If you have any
solutions so some of my problems in the porting notes, please send me
some email!
@@ -62,7 +62,7 @@ Study the Smakefiles in the demos, samples and book directories for the
proper SAS/C options and linkable libraries to use. Basically aux calls
require Mesaaux.LIB, gl calls require MesaGL.LIB, glu calls MesaGLU.LIB,
tk calls Mesatk.LIB. There is a preliminary port of MesaGLUT.LIB toolkit
-available in the lib directory with the other Mesa libraries. However,
+available in the lib directory with the other Mesa libraries. However,
it seems to cause crashes on some of the sample code. Someone else may want
to attempt a more stable port.
@@ -70,7 +70,7 @@ PORTING NOTES TO AMIWIN
=======================
My strategy of porting was to leave as much of the code untouched as
-possible. I surrounded any amiga specific changes with
+possible. I surrounded any amiga specific changes with
#ifdef AMIWIN ... #endif or #ifndef AMIWIN ... #endif preprocessor
symbols. The code was ported on an Amiga 2000, with Fusion 40 accelerator
and a Picasso II graphics card. The SAS/C 6.56 compiler was used, with
@@ -79,7 +79,7 @@ the AmiWin 2.16 X development kit.
All compilations were done for a 68040 CPU with 68882 math coprocessor for
maximum speed. Please edit the smakefile for other compilers.
I wrote smakefiles for the directories I ported. I omitted the Windows
-and Widgets directories. The former is for MS Windows and the latter
+and Widgets directories. The former is for MS Windows and the latter
requires Motif, which is not easily available for the Amiga.
Here are the changes I did per directory:
@@ -92,25 +92,25 @@ Nov. 25, 1995 v 1.2.4
* mesa/include
Dec. 1, 1995 v 1.2.5
- - added the following to GL/xmesa.h
+ - added the following to GL/xmesa.h
#ifdef AMIWIN
#include
extern struct Library *XLibBase;
#endif
NET CHANGE: xmesa.h
-* mesa/src
+* mesa/src
Nov. 25, 1995 v 1.2.4
- added the necessary pragma calls for X functions to the following:
- xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c, glx.c
- This prevents undefined symbols errors during the linking phase for
+ xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c, glx.c
+ This prevents undefined symbols errors during the linking phase for
X library calls
- created smakefile
Dec. 1, 1995 v 1.2.5
- - removed AMIWIN includes from xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c,
+ - removed AMIWIN includes from xmesa1.c, xmesa2.c, xmesa3.c, xfonts.c,
glx.c since they are now defined in include/GL/xmesa.h
NET CHANGE: smakefile
-
+
* mesa/src-tk
Nov. 25, 1995 v 1.2.4
- added the necessary pragma calls for X functions to the following:
@@ -138,7 +138,7 @@ Nov. 25, 1995 v 1.2.4
- added the necessary pragma calls for X functions to the following:
xdemo.c, glxdemo.c, offset.c
- created smakefile
- - put #ifndef AMIWIN ... #endif around sleep() calls in xdemo.c since
+ - put #ifndef AMIWIN ... #endif around sleep() calls in xdemo.c since
they are not part of AmigaDOS.
Dec. 1, 1995 v 1.2.5
- removed AMIWIN defines from xdemo.c, glxdemo.c, offset.c since
@@ -157,7 +157,7 @@ Nov. 25, 1995 v 1.2.4
- put #ifndef AMIWIN ... #endif around sleep() in blendxor.c
- removed olympic from smakefile targets since not defined
Dec. 1, 1995 v 1.2.5
- - removed AMIWIN defines from oglinfo.c, since already defined in
+ - removed AMIWIN defines from oglinfo.c, since already defined in
include/GL/xmesa.h
- modified Smakefile to include header and includes from the AmiTCP4.0
net.lib linkable library to provide unix-compatible sys/time.h and
@@ -177,5 +177,5 @@ NET CHANGE: smakefile
* mesa/windows
Dec. 1, 1995 v 1.2.5
-- Removed directory to save space since this is only needed for Windows based
+- Removed directory to save space since this is only needed for Windows based
machines.
diff --git a/docs/README.BEOS b/docs/README.BEOS
index efd84e8..857e4c6 100644
--- a/docs/README.BEOS
+++ b/docs/README.BEOS
@@ -29,7 +29,7 @@ working. No optimizations have been made at this time.
* Compiling
Since Mesa 6.x, it can be build under BeOS with both the R5 builtin gcc version
-or more recent gcc versions available for BeOS, like this gcc version 2.95.3 for BeOS
+or more recent gcc versions available for BeOS, like this gcc version 2.95.3 for BeOS
you can find at http://www.bebits.com/app/2157.
Anyway, keep in mind that to take full advantage of Mesa x86 optimizations, you better
want to use gcc 2.95.3 or sooner versions...
@@ -51,9 +51,9 @@ and force make to move on next target by adding the -k make option:
$ cd progs
$ make -k
-To install it as Be's default libGL.so replacement, put it in your
-/boot/home/config/lib/ directory. All your GL/GLUT apps will use
-the Mesa based then.
+To install it as Be's default libGL.so replacement, put it in your
+/boot/home/config/lib/ directory. All your GL/GLUT apps will use
+the Mesa based then.
By default, it build a non-debug version library.
The x86 (MMX, SSE and 3DNOW) optimizations are also supported for x86 target.
@@ -74,11 +74,11 @@ They all should have been compiled along with the Mesa library.
* GLUT
-A beta version of GLUT 3.7 port for BeOS, made by Jake Hamby, can be found at
+A beta version of GLUT 3.7 port for BeOS, made by Jake Hamby, can be found at
http://anobject.com/jehamby/Code/Glut-3.7-x86.zip.
This is the version currently included in Mesa source code, and
build in lib/libglut.so.
-
+
A previous 3.5 version of this GLUT BeOS port used to be available at
http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip.
diff --git a/docs/README.CYGWIN b/docs/README.CYGWIN
index 58d5af3..31b72ae 100644
--- a/docs/README.CYGWIN
+++ b/docs/README.CYGWIN
@@ -5,9 +5,9 @@
WARNING
=======
-If you installed X11 (packages xorg-x11-devel and xorg-x11-bin-dlls ) with the
-latest setup.exe from Cygwin the GL (Mesa) libraries and include are already
-installed in /usr/X11R6.
+If you installed X11 (packages xorg-x11-devel and xorg-x11-bin-dlls ) with the
+latest setup.exe from Cygwin the GL (Mesa) libraries and include are already
+installed in /usr/X11R6.
The following will explain how to "replace" them.
@@ -19,7 +19,7 @@ How to compile Mesa on Cygwin/X11 systems:
1. Shared libs:
type 'make cygwin-sl'.
- When finished, the Mesa DLL will be in the Mesa-x.y/lib/ and
+ When finished, the Mesa DLL will be in the Mesa-x.y/lib/ and
Mesa-x.y/bin directories.
@@ -59,10 +59,10 @@ Configuration options:
Shared libraries:
- If you compile shared libraries (Win32 DLLS) you may have to set an
- environment variable to specify where the Mesa libraries are located.
- Set the PATH variable to include /your-dir/Mesa-2.6/bin.
- Otherwise, when you try to run a demo it may fail with a message saying
+ If you compile shared libraries (Win32 DLLS) you may have to set an
+ environment variable to specify where the Mesa libraries are located.
+ Set the PATH variable to include /your-dir/Mesa-2.6/bin.
+ Otherwise, when you try to run a demo it may fail with a message saying
that one or more DLL couldn't be found.
@@ -119,7 +119,7 @@ Double buffering:
XImage is faster when Mesa has to do pixel-by-pixel rendering. If you
need depth buffering the XImage will almost surely be faster. Exper-
iment with the MESA_BACK_BUFFER variable to see which is faster for
- your application.
+ your application.
Colormaps:
@@ -196,7 +196,7 @@ Extensions
==========
There are three Mesa-specific GLX extensions at this time.
- GLX_MESA_pixmap_colormap
+ GLX_MESA_pixmap_colormap
This extension adds the GLX function:
diff --git a/docs/README.GGI b/docs/README.GGI
index ddb6772..c9425f0 100644
--- a/docs/README.GGI
+++ b/docs/README.GGI
@@ -6,7 +6,7 @@ LibGGI 2.0 or greater
Installation:
-------------
-To install GGIMesa, follow the instructions in INSTALL.GNU. If you
+To install GGIMesa, follow the instructions in INSTALL.GNU. If you
wish to install GGIGLUT as well, first install GGIMesa and then run
make
@@ -17,7 +17,7 @@ in ggi/ggiglut.
Notes:
------
-* Set the environment variables GGIMESA_DEBUG and/or GGIGLUT_DEBUG
+* Set the environment variables GGIMESA_DEBUG and/or GGIGLUT_DEBUG
to 255 to see lots of debugging output.
* GGIGLUT contains support for all of the GLUT 3.6 API except for the
diff --git a/docs/README.LYNXOS b/docs/README.LYNXOS
index e3ab980..cf26b2a 100644
--- a/docs/README.LYNXOS
+++ b/docs/README.LYNXOS
@@ -3,17 +3,17 @@ Mesa 3.0 for LynxOS builds in the following way:
make lynxos
-This will build all the libraries and demo applications. You should have
-around 400 megabytes free for everything since everything is done with
+This will build all the libraries and demo applications. You should have
+around 400 megabytes free for everything since everything is done with
static
libraries.
-Before using this make file however, you should perform the following
+Before using this make file however, you should perform the following
actions:
0) cd to the Mesa-3.0 directory
1) Copy the GL directory under the include directory to /usr/include.
2) Copy the files in the lib directory to /lib.
-3) Make links so that the Mesa libraries look like ordinary OpenGL
+3) Make links so that the Mesa libraries look like ordinary OpenGL
libraries
in /lib. This is important for compatibility with other OpenGL apps. This
is done as follows:
@@ -53,7 +53,7 @@ all: $(STANDARD_OFILES)
----cut here for Makefile-----
-I have tested Mesa under LynxOS 3.0 and 3.01. It should build fine under
+I have tested Mesa under LynxOS 3.0 and 3.01. It should build fine under
other
versions as well. Note, however, that LynxOS versions prior to 3.0 are not
binary compatible, so you will have to rebuild from source.
diff --git a/docs/README.MINGW32 b/docs/README.MINGW32
index 9477b2b..e1f4f09 100644
--- a/docs/README.MINGW32
+++ b/docs/README.MINGW32
@@ -73,7 +73,7 @@ Targets and Environment variables used for Mingw build:
X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow).
default = no
-
+
Running the Build:
Launch Mingw.
@@ -99,22 +99,22 @@ Updated on 2007-7-21
Notice:
1) The generated DLLs are *not* compatible with the ones built
-with the other compilers like VC8, especially for GLUT.
+with the other compilers like VC8, especially for GLUT.
2) Although more tests are needed, it can be used individually!
- 3) You can set the options about whether using STDCALL to build MESA. The
+ 3) You can set the options about whether using STDCALL to build MESA. The
config file is \configs\config.mgw. The default setting is that:
ALL_USING_STDCALL = 1
-, which means using STDCALL to build MESA.
+, which means using STDCALL to build MESA.
- 4) Of course, you can MESA without using STDCALL,I like this:)
+ 4) Of course, you can MESA without using STDCALL,I like this:)
The setting is :
ALL_USING_STDCALL = 0
-To do this, however, you must modify wingdi.h which is in MingW's include dir.
+To do this, however, you must modify wingdi.h which is in MingW's include dir.
For example, run:
notepad C:\MingW\include\wingdi.h
-, and delete all the lines where all the wgl*() functions are. Because they would
+, and delete all the lines where all the wgl*() functions are. Because they would
be conflicted with the ones in \include\GL\mesa_wgl.h.
>>>>>>>>>> Conflicted Functions List >>>>>>>>>>
@@ -141,13 +141,13 @@ WINGDIAPI BOOL WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,
====================
Updated on 2007-7-22
====================
- I havn't thought that I would find a better way to solve my problems so soon.
+ I havn't thought that I would find a better way to solve my problems so soon.
I changed the method in which the import-libs and DLLs are made. After this update,
-the DLLs of MESA are more optimized and more compatible.
- It seems that there is no need to keep the building way of 'NO-STDCALL'.The
-way of USING_STDCALL is so nice! The file \configs\config.mgw is
+the DLLs of MESA are more optimized and more compatible.
+ It seems that there is no need to keep the building way of 'NO-STDCALL'.The
+way of USING_STDCALL is so nice! The file \configs\config.mgw is
also not needed, and can be deleted safely!
-
+
*********************************************************************************
\ No newline at end of file
diff --git a/docs/README.MITS b/docs/README.MITS
index a89176a..4b0327d 100644
--- a/docs/README.MITS
+++ b/docs/README.MITS
@@ -14,7 +14,7 @@ http://10-dencies.zkm.de/~mesa/
Version 0.1 (Yes it's very alpha code so be warned!)
-Contributors:
+Contributors:
Emil Briggs (briggs@bucky.physics.ncsu.edu)
David Bucciarelli (tech.hmw@plus.it)
Andreas Schiffler (schiffler@zkm.de)
diff --git a/docs/README.OS2 b/docs/README.OS2
index b3374ea..306e17b 100644
--- a/docs/README.OS2
+++ b/docs/README.OS2
@@ -60,17 +60,17 @@
3) History
Initially Darren Abbott (abbott@hiwaay.net) ported Mesa versions 2.x
- to XFree86 OS/2. This port might still be available from
+ to XFree86 OS/2. This port might still be available from
http://fly.HiWAAY.net/~abbott/xfree86-os2/xfree86.html
- The current port picked up things during the beta test for 3.0.
+ The current port picked up things during the beta test for 3.0.
No major changes in the source were done. The build mechanism under OS/2
has been made very similar to other platforms (if you treat mklib-emx.cmd
as a "black box").
Advantage is that X/2 is now a valid target and all files are
integrated in the official source distribution.
Disadvantage is that this port (i.e. the DLLs' interface itself) is
- definitly NOT COMPATIBLE to those of version 2.x.
+ definitly NOT COMPATIBLE to those of version 2.x.
It's uncertain whether this would be at all possible but since there
a _very_ few those apps it's not worth to find out anyway.
Also some libs (MesaTK, MesaAUX) are withdrawn from the Mesa distribution,
@@ -89,7 +89,7 @@
http://www.mesa3d.org/
The OS/2 ports should be available from
- http://r350.ee.ntu.edu.tw/~hcchu/os2/ports
+ http://r350.ee.ntu.edu.tw/~hcchu/os2/ports
--
Alexander Mai
diff --git a/docs/README.OpenStep b/docs/README.OpenStep
index a566eca..cfad0a0 100644
--- a/docs/README.OpenStep
+++ b/docs/README.OpenStep
@@ -11,7 +11,7 @@ system, the Rhapsody/Mac OS X system and also the windows implementations
of the latter two systems. This version of the code has been compiled and
tested under the following architectures:
- NextStep 3.3
+ NextStep 3.3
OpenStep 4.2
Rhapsody DR2
WebObjects for NT 3.5
diff --git a/docs/README.QUAKE b/docs/README.QUAKE
index e90c76a..ff01f38 100644
--- a/docs/README.QUAKE
+++ b/docs/README.QUAKE
@@ -58,10 +58,10 @@ info:
> uses the libc5 libraries in /usr/i486-linux-libc5/lib for programs
> linked against libc5 while it uses the glibc libraries in /lib and
> /usr/lib for programs linked against glibc.
->
+>
> Anyway I changed line 41 of mklib.glide to
> GLIDELIBS="-L/usr/local/glide/lib -lglide2x -L/usr/i486-linux-libc5/lib"
->
+>
> And I started quake2 up with a script like this
> #!/bin/csh
> setenv LD_LIBRARY_PATH /usr/i486-linux-libc5/lib
@@ -90,7 +90,7 @@ libc5 libraries.
What can you do about it? Well there's a package called gcc5 that does
MOST of the right stuff to compile with libc5. (It brings back older
header files, makes appropriate symbolic links for libraries, and sets
-up the compiler to use the correct directories) You can find gcc5 here:
+up the compiler to use the correct directories) You can find gcc5 here:
ftp://ecg.mit.edu/pub/linux/gcc5-1.0-1.i386.rpm
No, this isn't quite enough. There are still a few tricks to getting
@@ -102,7 +102,7 @@ to use the glibc version of things)
If you get all the stuff correctly compiled with gcc5 it should work.
I've run Mesa 3.0B6 and its demos in a window with my Rush on a Red Hat
5.1 system. It is a big hassle, but it can be done. I've only made Quake
-segfault, but I think that's from my libRush using the wrong libc.
+segfault, but I think that's from my libRush using the wrong libc.
Yes, mixing libc5 and glibc is a major pain. I've been working to get
all my libraries compiling correctly with this setup. Someone should
diff --git a/docs/README.THREADS b/docs/README.THREADS
index fb6e0ff..336dd73 100644
--- a/docs/README.THREADS
+++ b/docs/README.THREADS
@@ -28,7 +28,7 @@ necessary for both Mesa and application code to use the same threads API.
So, if your application uses Sun's thread API, then you should build Mesa
using one of the targets for Sun threads.
-The mtdemos directory contains some example programs which use
+The mtdemos directory contains some example programs which use
multiple threads to render to osmesa rendering context(s).
Linux users should be aware that there exist many different POSIX
diff --git a/docs/README.VMS b/docs/README.VMS
index 6b02909..1ba73f3 100644
--- a/docs/README.VMS
+++ b/docs/README.VMS
@@ -27,7 +27,7 @@ To get a static library make it by typing MMS/MACRO=(NOSHARE=1).
On VAX platforms only static libraries can be build.
23-sep-2005
-changed default compilation to use /float=ieee/ieee=denorm. The reason for
+changed default compilation to use /float=ieee/ieee=denorm. The reason for
this is that it makes Mesa on OpenVMS better compatible with other platforms
and other packages for VMS that I maintain.
For more information see
diff --git a/docs/README.WIN32 b/docs/README.WIN32
index 204b8e6..4948160 100644
--- a/docs/README.WIN32
+++ b/docs/README.WIN32
@@ -71,7 +71,7 @@ below.
GLUT and Demos
---- --- -----
-A Visual Studio workspace can be found at
+A Visual Studio workspace can be found at
windows/VC8/progs/progs.sln
diff --git a/docs/README.WINDML b/docs/README.WINDML
index 448db71..16da9db 100644
--- a/docs/README.WINDML
+++ b/docs/README.WINDML
@@ -5,8 +5,8 @@
Requirements
------------
-Tornado 2 + WindML, Cumulative Patchs are recommended.
-
+Tornado 2 + WindML, Cumulative Patchs are recommended.
+
I suppose you have a valid WindML installation. Double buffer hardware
gives better performance than double buffer software so if you can
compile your WindML driver with this option, just do it. I/O
@@ -32,7 +32,7 @@ Installation
set MESA_BASE=C:\Mesa
OR copy the new torVars.bat in your bin path:
-c:/Mesa/src/ugl/tornado/torVars.sample ->
+c:/Mesa/src/ugl/tornado/torVars.sample ->
/mnt/nt/Tornado/host/x86-win32/bin/torVars (for example)
3. In a command prompt:
diff --git a/docs/RELNOTES-3.2.1 b/docs/RELNOTES-3.2.1
index d34efcc..40723f3 100644
--- a/docs/RELNOTES-3.2.1
+++ b/docs/RELNOTES-3.2.1
@@ -21,7 +21,7 @@ bugs.
Mesa implements GLU 1.1.
Ideally, people should use the GLU 1.3 library included in SGI's
-OpenGL Sample Implementation (SI) available from
+OpenGL Sample Implementation (SI) available from
http://oss.sgi.com/projects/ogl-sample/
People are working to make easy-to-install Linux RPMs of the
GLU library.
diff --git a/docs/RELNOTES-5.1 b/docs/RELNOTES-5.1
index aed6e10..5c9ae91 100644
--- a/docs/RELNOTES-5.1
+++ b/docs/RELNOTES-5.1
@@ -98,7 +98,7 @@ With the addition of GL_ARB_occlusion_query, GL_ARB_vertex_buffer_object,
GL_ARB_texture_non_power_of_two and GL_EXT_shadow_funcs, Mesa 5.1 supports
all the new features of OpenGL 1.5. Mesa 6.0 (the next stable release)
will advertise GL_VERSION = "1.5".
-
+
Vertex/Fragment program debugger
diff --git a/docs/RELNOTES-6.4 b/docs/RELNOTES-6.4
index 1a945a1..1e2f16b 100644
--- a/docs/RELNOTES-6.4
+++ b/docs/RELNOTES-6.4
@@ -33,7 +33,7 @@ DRI drivers varies with the driver
XMesa (Xlib) implements OpenGL 1.5
OSMesa (off-screen) implements OpenGL 1.5
Windows/Win32 implements OpenGL 1.5
-Glide (3dfx Voodoo1/2) requires updates
+Glide (3dfx Voodoo1/2) requires updates
SVGA requires updates
DJGPP requires updates
GGI requires updates
diff --git a/docs/cell.html b/docs/cell.html
index 30626b6..ceea562 100644
--- a/docs/cell.html
+++ b/docs/cell.html
@@ -11,7 +11,7 @@ Mesa/Gallium Cell Driver
The Mesa
Cell
-driver is part of the
+driver is part of the
Gallium3D
architecture.
Tungsten Graphics did the original implementation of the Cell driver.
diff --git a/docs/devinfo.html b/docs/devinfo.html
index 2d1c125..bde923b 100644
--- a/docs/devinfo.html
+++ b/docs/devinfo.html
@@ -198,7 +198,7 @@
Update the website and announce the release
-Update the web site by copying the docs/ directory's files to
+Update the web site by copying the docs/ directory's files to
/home/users/b/br/brianp/mesa-www/htdocs/ with:
diff --git a/docs/dispatch.html b/docs/dispatch.html
index e5587c1..1d1a432 100644
--- a/docs/dispatch.html
+++ b/docs/dispatch.html
@@ -75,7 +75,7 @@ 2. Overview of Mesa's Implementation
void glVertex3f(GLfloat x, GLfloat y, GLfloat z)
{
const struct _glapi_table * const dispatch = GET_DISPATCH();
-
+
(*dispatch->Vertex3f)(x, y, z);
}
Sample dispatch function |
diff --git a/docs/fbdev-dri.html b/docs/fbdev-dri.html
index 0eea5e8..c81dee6 100644
--- a/docs/fbdev-dri.html
+++ b/docs/fbdev-dri.html
@@ -67,7 +67,7 @@ 2.2 libpciaccess
sudo apt-get install autoconf
-The next step is to install the libpciaccess library.
+The next step is to install the libpciaccess library.
make
make install
@@ -136,7 +136,7 @@ 2.4 Mesa
Copy the miniglx folder from 7.1-prerelease to 7.0.3.
-You may also extract GLUT to 7.0.3 version at this step.
+You may also extract GLUT to 7.0.3 version at this step.
Edit linux-solo.conf at /conf directory, just only compile the
diff --git a/docs/install.html b/docs/install.html
index bfa3bb8..e8c594b 100644
--- a/docs/install.html
+++ b/docs/install.html
@@ -119,7 +119,7 @@
1.4 Building with traditional Makefiles
make linux-dri
-There are also linux-dri-x86
, linux-dri-x86-64
,
+There are also linux-dri-x86
, linux-dri-x86-64
,
and linux-ppc
configurations which are optimized for those
architectures.
@@ -305,7 +305,7 @@ 3. Building with SCons
This will create:
-- build/windows-x86-debug/gallium/targets/libgl-gdi/opengl32.dll — Mesa + Gallium + softpipe, binary compatible with Windows's opengl32.dll
+
- build/windows-x86-debug/gallium/targets/libgl-gdi/opengl32.dll — Mesa + Gallium + softpipe, binary compatible with Windows's opengl32.dll
- build/windows-x86-debug/glut/glx/glut32.dll
- progs/build/windows-x86-debug/wgl/wglinfo.exe
- progs/build/windows-x86-debug/trivial/tri.exe
diff --git a/docs/intro.html b/docs/intro.html
index 0806caf..ab03922 100644
--- a/docs/intro.html
+++ b/docs/intro.html
@@ -21,10 +21,10 @@
Introduction
-Mesa ties into several other open-source projects: the
-Direct Rendering
-Infrastructure and X.org to
-provide OpenGL support to users of X on Linux, FreeBSD and other operating
+Mesa ties into several other open-source projects: the
+Direct Rendering
+Infrastructure and X.org to
+provide OpenGL support to users of X on Linux, FreeBSD and other operating
systems.
diff --git a/docs/lists.html b/docs/lists.html
index 1487891..430aaf4 100644
--- a/docs/lists.html
+++ b/docs/lists.html
@@ -49,7 +49,7 @@ Mailing Lists
-For mailing lists about Direct Rendering Modules (drm) in Linux/BSD
+
For mailing lists about Direct Rendering Modules (drm) in Linux/BSD
kernels, see the
DRI wiki.
diff --git a/docs/relnotes-6.4.1.html b/docs/relnotes-6.4.1.html
index 3d6ff1c..2325d8f 100644
--- a/docs/relnotes-6.4.1.html
+++ b/docs/relnotes-6.4.1.html
@@ -55,7 +55,7 @@
Driver Status
XMesa (Xlib) implements OpenGL 1.5
OSMesa (off-screen) implements OpenGL 1.5
Windows/Win32 implements OpenGL 1.5
-Glide (3dfx Voodoo1/2) requires updates
+Glide (3dfx Voodoo1/2) requires updates
SVGA requires updates
DJGPP requires updates
GGI requires updates
diff --git a/docs/relnotes-6.4.2.html b/docs/relnotes-6.4.2.html
index f5a658f..9eee48f 100644
--- a/docs/relnotes-6.4.2.html
+++ b/docs/relnotes-6.4.2.html
@@ -62,7 +62,7 @@ Driver Status
XMesa (Xlib) implements OpenGL 1.5
OSMesa (off-screen) implements OpenGL 1.5
Windows/Win32 implements OpenGL 1.5
-Glide (3dfx Voodoo1/2) requires updates
+Glide (3dfx Voodoo1/2) requires updates
SVGA requires updates
DJGPP requires updates
GGI requires updates
diff --git a/docs/relnotes-6.4.html b/docs/relnotes-6.4.html
index 1fffa27..4e1bff7 100644
--- a/docs/relnotes-6.4.html
+++ b/docs/relnotes-6.4.html
@@ -77,7 +77,7 @@ Driver Status
XMesa (Xlib) implements OpenGL 1.5
OSMesa (off-screen) implements OpenGL 1.5
Windows/Win32 implements OpenGL 1.5
-Glide (3dfx Voodoo1/2) requires updates
+Glide (3dfx Voodoo1/2) requires updates
SVGA requires updates
DJGPP requires updates
GGI requires updates
diff --git a/docs/relnotes-6.5.2.html b/docs/relnotes-6.5.2.html
index db2038a..8d114bc 100644
--- a/docs/relnotes-6.5.2.html
+++ b/docs/relnotes-6.5.2.html
@@ -45,7 +45,7 @@ New features
- ARB_pixel_buffer_objects
- Accelerated CopyTexSubimage, DrawPixels, ReadPixels, CopyPixels
- Accelerated texture uploads from pixel buffer objects
-
- Potentially texturing directly from the pixel buffer object (zero
+
- Potentially texturing directly from the pixel buffer object (zero
copy texturing).
New Intel i965 DRI driver
diff --git a/docs/relnotes-7.8.3.html b/docs/relnotes-7.8.3.html
index 1e9f433..e733d75 100644
--- a/docs/relnotes-7.8.3.html
+++ b/docs/relnotes-7.8.3.html
@@ -51,7 +51,7 @@ Changes
Bug fixes
-- Fix unsupported FB with D24S8 (bug
+
- Fix unsupported FB with D24S8 (bug
29116)
- Fix ReadPixels crash when reading depth/stencil from an FBO
- Fixed a bug rendering to 16-bit buffers using swrast.
@@ -67,7 +67,7 @@ Bug fixes
29183)
Fix texture env generation in some cases (bug
28169)
-osmesa: a fix for calling OSMesaMakeCurrent twice was applied (bug
+osmesa: a fix for calling OSMesaMakeCurrent twice was applied (bug
10966
A bug was fixed which could cause Mesa to ignore the
MESA_EXTENSION_OVERRIDE environment variable.
diff --git a/docs/repository.html b/docs/repository.html
index 954bd0d..79924a2 100644
--- a/docs/repository.html
+++ b/docs/repository.html
@@ -25,7 +25,7 @@ Code Repository
-You may also
+You may also
browse the main Mesa git repository and the
Developer Git Tips
It is possible (and likely) that someone has changed master since
you did your last pull. Even if your changes do not conflict with
-their changes, git will make a fast-forward
+their changes, git will make a fast-forward
merge branch, branching from the point in time
where you did your last pull and merging it to a point after the other changes.
-To avoid this,
+To avoid this,
git pull --rebase
git push
diff --git a/docs/shading.html b/docs/shading.html
index aba3959..a6ff13c 100644
--- a/docs/shading.html
+++ b/docs/shading.html
@@ -256,7 +256,7 @@ Compiler Validation
The Piglit project
has many GLSL tests and the
-Glean glsl1 test
+Glean glsl1 test
tests GLSL features.
diff --git a/docs/sourcetree.html b/docs/sourcetree.html
index 08a9a50..b0c42ae 100644
--- a/docs/sourcetree.html
+++ b/docs/sourcetree.html
@@ -152,7 +152,7 @@ Mesa source code tree overview
glut - Mark Kilgard's OpenGL OpenGL Utility Toolkit library
glx - The GLX library code for building libGL. This is used for
- direct rendering drivers. It will dynamically load one of the
+ direct rendering drivers. It will dynamically load one of the
xxx_dri.so drivers.
glw - Widgets for Xt/Motif.
glew - OpenGL Extension Wrangler library (used by demo programs)
diff --git a/docs/versions.html b/docs/versions.html
index 84b40fd..5f68a6f 100644
--- a/docs/versions.html
+++ b/docs/versions.html
@@ -594,7 +594,7 @@ 2.6 February 12, 1998
v0.22 of 3Dfx Glide driver
more X86 assembly language optimizations
faster blending for some modes
-XMesaSetFXmode() to switch between 3Dfx window and full-screen mode
+XMesaSetFXmode() to switch between 3Dfx window and full-screen mode
added preliminary thread support
added GLX_MESA_copy_sub_buffer extension
some clipping optimizations
diff --git a/docs/xlibdriver.html b/docs/xlibdriver.html
index d95f4d5..7e2f4f7 100644
--- a/docs/xlibdriver.html
+++ b/docs/xlibdriver.html
@@ -110,7 +110,7 @@ Colormaps
When sharing the root colormap, Mesa may be unable to allocate the colors
it needs, resulting in poor color quality. This can happen when a
large number of colorcells in the root colormap are already allocated.
-To prevent colormap sharing in GLUT, set the
+To prevent colormap sharing in GLUT, set the
MESA_PRIVATE_CMAP environment variable. The value isn't
significant.
@@ -123,7 +123,7 @@ Gamma Correction
Mesa. Some systems, such as Silicon Graphics, support gamma
correction in hardware (man gamma) so you won't need to use Mesa's
gamma facility. Other systems, however, may need gamma adjustment
-to produce images which look correct. If you believe that
+to produce images which look correct. If you believe that
Mesa's images are too dim, read on.
diff --git a/include/GL/gl.h b/include/GL/gl.h
index 8e5f138..0fa7f65 100644
--- a/include/GL/gl.h
+++ b/include/GL/gl.h
@@ -35,7 +35,7 @@
/**********************************************************************
* Begin system-specific stuff. Do not do any of this when building
* for SciTech SNAP, as this is all done before this header file is
- * included.
+ * included.
*/
#if !defined(__SCITECH_SNAP__)
@@ -60,7 +60,7 @@
# define GLAPI extern
# endif /* _STATIC_MESA support */
# if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
-# define GLAPIENTRY
+# define GLAPIENTRY
# else
# define GLAPIENTRY __stdcall
# endif
diff --git a/include/GL/glext.h b/include/GL/glext.h
index 9818cbc..ef9387b 100644
--- a/include/GL/glext.h
+++ b/include/GL/glext.h
@@ -7,7 +7,7 @@ extern "C" {
/*
** Copyright (c) 2007-2010 The Khronos Group Inc.
-**
+**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
@@ -15,10 +15,10 @@ extern "C" {
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
-**
+**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
-**
+**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
diff --git a/include/GL/glx.h b/include/GL/glx.h
index a3a7d97..cf9ff89 100644
--- a/include/GL/glx.h
+++ b/include/GL/glx.h
@@ -1,19 +1,19 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
- *
+ *
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -465,14 +465,14 @@ typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
#define GLX_AUX0_EXT 0x20E2
-#define GLX_AUX1_EXT 0x20E3
-#define GLX_AUX2_EXT 0x20E4
-#define GLX_AUX3_EXT 0x20E5
-#define GLX_AUX4_EXT 0x20E6
-#define GLX_AUX5_EXT 0x20E7
+#define GLX_AUX1_EXT 0x20E3
+#define GLX_AUX2_EXT 0x20E4
+#define GLX_AUX3_EXT 0x20E5
+#define GLX_AUX4_EXT 0x20E6
+#define GLX_AUX5_EXT 0x20E7
#define GLX_AUX6_EXT 0x20E8
-#define GLX_AUX7_EXT 0x20E9
-#define GLX_AUX8_EXT 0x20EA
+#define GLX_AUX7_EXT 0x20E9
+#define GLX_AUX8_EXT 0x20EA
#define GLX_AUX9_EXT 0x20EB
extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
diff --git a/include/GL/glx_mangle.h b/include/GL/glx_mangle.h
index fa664a7..65e5488 100644
--- a/include/GL/glx_mangle.h
+++ b/include/GL/glx_mangle.h
@@ -1,19 +1,19 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
- *
+ *
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -53,26 +53,26 @@
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
/* GLX 1.2 */
-#define glXGetCurrentDisplay mglXGetCurrentDisplay
+#define glXGetCurrentDisplay mglXGetCurrentDisplay
/* GLX 1.3 */
-#define glXChooseFBConfig mglXChooseFBConfig
-#define glXGetFBConfigAttrib mglXGetFBConfigAttrib
-#define glXGetFBConfigs mglXGetFBConfigs
-#define glXGetVisualFromFBConfig mglXGetVisualFromFBConfig
-#define glXCreateWindow mglXCreateWindow
-#define glXDestroyWindow mglXDestroyWindow
-#define glXCreatePixmap mglXCreatePixmap
-#define glXDestroyPixmap mglXDestroyPixmap
-#define glXCreatePbuffer mglXCreatePbuffer
-#define glXDestroyPbuffer mglXDestroyPbuffer
-#define glXQueryDrawable mglXQueryDrawable
-#define glXCreateNewContext mglXCreateNewContext
-#define glXMakeContextCurrent mglXMakeContextCurrent
-#define glXGetCurrentReadDrawable mglXGetCurrentReadDrawable
-#define glXQueryContext mglXQueryContext
-#define glXSelectEvent mglXSelectEvent
-#define glXGetSelectedEvent mglXGetSelectedEvent
+#define glXChooseFBConfig mglXChooseFBConfig
+#define glXGetFBConfigAttrib mglXGetFBConfigAttrib
+#define glXGetFBConfigs mglXGetFBConfigs
+#define glXGetVisualFromFBConfig mglXGetVisualFromFBConfig
+#define glXCreateWindow mglXCreateWindow
+#define glXDestroyWindow mglXDestroyWindow
+#define glXCreatePixmap mglXCreatePixmap
+#define glXDestroyPixmap mglXDestroyPixmap
+#define glXCreatePbuffer mglXCreatePbuffer
+#define glXDestroyPbuffer mglXDestroyPbuffer
+#define glXQueryDrawable mglXQueryDrawable
+#define glXCreateNewContext mglXCreateNewContext
+#define glXMakeContextCurrent mglXMakeContextCurrent
+#define glXGetCurrentReadDrawable mglXGetCurrentReadDrawable
+#define glXQueryContext mglXQueryContext
+#define glXSelectEvent mglXSelectEvent
+#define glXGetSelectedEvent mglXGetSelectedEvent
/* GLX 1.4 */
#define glXGetProcAddress mglXGetProcAddress
diff --git a/include/GL/glxext.h b/include/GL/glxext.h
index 3c47dc3..e2851e4 100644
--- a/include/GL/glxext.h
+++ b/include/GL/glxext.h
@@ -7,7 +7,7 @@ extern "C" {
/*
** Copyright (c) 2007-2010 The Khronos Group Inc.
-**
+**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
@@ -15,10 +15,10 @@ extern "C" {
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
-**
+**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
-**
+**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 9ee039b..65ce9a3 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -31,7 +31,7 @@
* between a DRI driver and driver loader. Currently, the most common driver
* loader is the XFree86 libGL.so. However, other loaders do exist, and in
* the future the server-side libglx.a will also be a loader.
- *
+ *
* \author Kevin E. Martin
* \author Ian Romanick
* \author Kristian Høgsberg
@@ -158,14 +158,14 @@ struct __DRIframeTrackingExtensionRec {
/**
* Enable or disable frame usage tracking.
- *
+ *
* \since Internal API version 20030317.
*/
int (*frameTracking)(__DRIdrawable *drawable, GLboolean enable);
/**
* Retrieve frame usage information.
- *
+ *
* \since Internal API version 20030317.
*/
int (*queryFrameTracking)(__DRIdrawable *drawable,
@@ -232,7 +232,7 @@ struct __DRItexBufferExtensionRec {
/**
* Method to override base texture image with the contents of a
- * __DRIdrawable.
+ * __DRIdrawable.
*
* For GLX_EXT_texture_from_pixmap with AIGLX. Deprecated in favor of
* setTexBuffer2 in version 2 of this interface
@@ -335,7 +335,7 @@ struct __DRIsystemTimeExtensionRec {
/**
* Get the media stream counter (MSC) rate.
- *
+ *
* Matching the definition in GLX_OML_sync_control, this function returns
* the rate of the "media stream counter". In practical terms, this is
* the frame refresh rate of the display.
@@ -492,7 +492,7 @@ struct __DRIuseInvalidateExtensionRec {
#define __DRI_ATTRIB_YINVERTED 47
/* __DRI_ATTRIB_RENDER_TYPE */
-#define __DRI_ATTRIB_RGBA_BIT 0x01
+#define __DRI_ATTRIB_RGBA_BIT 0x01
#define __DRI_ATTRIB_COLOR_INDEX_BIT 0x02
#define __DRI_ATTRIB_LUMINANCE_BIT 0x04
@@ -566,7 +566,7 @@ struct __DRIcoreExtensionRec {
/**
* Stored version of some component (i.e., server-side DRI module, kernel-side
* DRM, etc.).
- *
+ *
* \todo
* There are several data structures that explicitly store a major version,
* minor version, and patch level. These structures should be modified to
@@ -581,7 +581,7 @@ struct __DRIversionRec {
/**
* Framebuffer information record. Used by libGL to communicate information
* about the framebuffer to the driver's \c __driCreateNewScreen function.
- *
+ *
* In XFree86, most of this information is derrived from data returned by
* calling \c XF86DRIGetDeviceInfo.
*
@@ -622,7 +622,7 @@ struct __DRIlegacyExtensionRec {
const __DRIversion *dri_version,
const __DRIversion *drm_version,
const __DRIframebuffer *frame_buffer,
- void *pSAREA, int fd,
+ void *pSAREA, int fd,
const __DRIextension **extensions,
const __DRIconfig ***driver_configs,
void *loaderPrivate);
diff --git a/include/GL/internal/sarea.h b/include/GL/internal/sarea.h
index a0d6084..74602e3 100644
--- a/include/GL/internal/sarea.h
+++ b/include/GL/internal/sarea.h
@@ -1,7 +1,7 @@
/**
- * \file sarea.h
+ * \file sarea.h
* SAREA definitions.
- *
+ *
* \author Kevin E. Martin
* \author Jens Owen
* \author Rickard E. (Rik) Faith
@@ -11,7 +11,7 @@
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
* Copyright 2000 VA Linux Systems, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -19,11 +19,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
diff --git a/include/GL/osmesa.h b/include/GL/osmesa.h
index 56fa23c..ecb43fd 100644
--- a/include/GL/osmesa.h
+++ b/include/GL/osmesa.h
@@ -1,19 +1,19 @@
/*
* Mesa 3-D graphics library
* Version: 6.5
- *
+ *
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
diff --git a/include/GL/vms_x_fix.h b/include/GL/vms_x_fix.h
index 24cba47..443291c 100644
--- a/include/GL/vms_x_fix.h
+++ b/include/GL/vms_x_fix.h
@@ -698,7 +698,7 @@
#define XtCallCallbackList XTCALLCALLBACKLIST
#define XtCallCallbacks XTCALLCALLBACKS
#define XtCallConverter XTCALLCONVERTER
-#define XtCalloc XTCALLOC
+#define XtCalloc XTCALLOC
#ifndef NOXTDISPLAY
#define XtClass XTCLASS
#endif
@@ -808,7 +808,7 @@
#define XtSetTypeConverter XTSETTYPECONVERTER
#define XtSetValues XTSETVALUES
#define XtShellStrings XTSHELLSTRINGS
-#define XtStringConversionWarning XTSTRINGCONVERSIONWARNING
+#define XtStringConversionWarning XTSTRINGCONVERSIONWARNING
#define XtStrings XTSTRINGS
#define XtToolkitInitialize XTTOOLKITINITIALIZE
#define XtTranslateCoords XTTRANSLATECOORDS
@@ -848,11 +848,11 @@
#define _XEatData _XEATDATA
#define _XFlush _XFLUSH
#define _XFreeTemp _XFREETEMP
-#define _XGetAsyncReply _XGETASYNCREPLY
+#define _XGetAsyncReply _XGETASYNCREPLY
#define _XInitImageFuncPtrs _XINITIMAGEFUNCPTRS
#define _XRead _XREAD
#define _XReadPad _XREADPAD
-#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE
+#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE
#define _XReply _XREPLY
#define _XSend _XSEND
#define _XUnregisterFilter _XUNREGISTERFILTER
@@ -1204,7 +1204,7 @@
#define xmToggleButtonGadgetClass XMTOGGLEBUTTONGADGETCLASS
#define xmToggleButtonWidgetClass XMTOGGLEBUTTONWIDGETCLASS
-#if (__VMS_VER < 80200000)
+#if (__VMS_VER < 80200000)
# define SetReqLen(req,n,badlen) \
if ((req->length + n) > (unsigned)65535) { \
n = badlen; \
diff --git a/include/GL/wglext.h b/include/GL/wglext.h
index e60c652..8e06d93 100644
--- a/include/GL/wglext.h
+++ b/include/GL/wglext.h
@@ -7,7 +7,7 @@ extern "C" {
/*
** Copyright (c) 2007-2010 The Khronos Group Inc.
-**
+**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
@@ -15,10 +15,10 @@ extern "C" {
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
-**
+**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
-**
+**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
diff --git a/include/GL/wmesa.h b/include/GL/wmesa.h
index f5f4f27..cbc538f 100644
--- a/include/GL/wmesa.h
+++ b/include/GL/wmesa.h
@@ -27,13 +27,13 @@
*
***************************************************************
* WMesa *
- * version 2.3 *
+ * version 2.3 *
* *
* By *
* Li Wei *
* Institute of Artificial Intelligence & Robotics *
* Xi'an Jiaotong University *
- * Email: liwei@aiar.xjtu.edu.cn *
+ * Email: liwei@aiar.xjtu.edu.cn *
* Web page: http://sun.aiar.xjtu.edu.cn *
* *
* July 7th, 1997 *
diff --git a/include/VG/openvg.h b/include/VG/openvg.h
index 86d54d6..0e37fe2 100644
--- a/include/VG/openvg.h
+++ b/include/VG/openvg.h
@@ -13,10 +13,10 @@
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Materials,
* and to permit persons to whom the Materials are furnished to do so,
- * subject to the following conditions:
+ * subject to the following conditions:
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
@@ -497,11 +497,11 @@ typedef enum {
#endif
#ifndef VG_API_ENTRY
-# error VG_API_ENTRY must be defined
+# error VG_API_ENTRY must be defined
#endif
#ifndef VG_API_EXIT
-# error VG_API_EXIT must be defined
+# error VG_API_EXIT must be defined
#endif
VG_API_CALL VGErrorCode VG_API_ENTRY vgGetError(void) VG_API_EXIT;
@@ -645,7 +645,7 @@ VG_API_CALL void VG_API_ENTRY vgGetImageSubData(VGImage image,
VGint width, VGint height) VG_API_EXIT;
VG_API_CALL VGImage VG_API_ENTRY vgChildImage(VGImage parent,
VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
-VG_API_CALL VGImage VG_API_ENTRY vgGetParent(VGImage image) VG_API_EXIT;
+VG_API_CALL VGImage VG_API_ENTRY vgGetParent(VGImage image) VG_API_EXIT;
VG_API_CALL void VG_API_ENTRY vgCopyImage(VGImage dst, VGint dx, VGint dy,
VGImage src, VGint sx, VGint sy,
VGint width, VGint height,
@@ -684,7 +684,7 @@ VG_API_CALL void VG_API_ENTRY vgSetGlyphToImage(VGFont font,
const VGfloat glyphOrigin [2],
const VGfloat escapement[2]) VG_API_EXIT;
VG_API_CALL void VG_API_ENTRY vgClearGlyph(VGFont font,VGuint glyphIndex) VG_API_EXIT;
-VG_API_CALL void VG_API_ENTRY vgDrawGlyph(VGFont font,
+VG_API_CALL void VG_API_ENTRY vgDrawGlyph(VGFont font,
VGuint glyphIndex,
VGbitfield paintModes,
VGboolean allowAutoHinting) VG_API_EXIT;
@@ -739,7 +739,7 @@ VG_API_CALL VGHardwareQueryResult VG_API_ENTRY vgHardwareQuery(VGHardwareQueryTy
/* Renderer and Extension Information */
VG_API_CALL const VGubyte * VG_API_ENTRY vgGetString(VGStringID name) VG_API_EXIT;
-#ifdef __cplusplus
+#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/include/VG/vgext.h b/include/VG/vgext.h
index 9ff3234..49b3bf3 100644
--- a/include/VG/vgext.h
+++ b/include/VG/vgext.h
@@ -1,7 +1,7 @@
/* $Revision: 6810 $ on $Date:: 2008-10-29 07:31:37 -0700 #$ */
/*------------------------------------------------------------------------
- *
+ *
* VG extensions Reference Implementation
* -------------------------------------
*
@@ -13,10 +13,10 @@
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Materials,
* and to permit persons to whom the Materials are furnished to do so,
- * subject to the following conditions:
+ * subject to the following conditions:
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
@@ -69,7 +69,7 @@ typedef enum {
#ifndef VG_KHR_EGL_image
#define VG_KHR_EGL_image 1
/* VGEGLImageKHR is an opaque handle to an EGLImage */
-typedef void* VGeglImageKHR;
+typedef void* VGeglImageKHR;
#ifdef VG_VGEXT_PROTOTYPES
VG_API_CALL VGImage VG_API_ENTRY vgCreateEGLImageTargetKHR(VGeglImageKHR image);
@@ -84,7 +84,7 @@ typedef VGImage (VG_API_ENTRYP PFNVGCREATEEGLIMAGETARGETKHRPROC) (VGeglImageKHR
#ifdef VG_VGEXT_PROTOTYPES
VG_API_CALL void vgIterativeAverageBlurKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
-#endif
+#endif
typedef void (VG_API_ENTRYP PFNVGITERATIVEAVERAGEBLURKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
#endif
@@ -123,7 +123,7 @@ typedef enum {
#endif
#ifndef VG_KHR_parametric_filter
-#define VG_KHR_parametric_filter 1
+#define VG_KHR_parametric_filter 1
typedef enum {
VG_PF_OBJECT_VISIBLE_FLAG_KHR = (1 << 0),
@@ -165,7 +165,7 @@ typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTBEVELKHRPROC) (VGImage dst,VG
#ifndef VG_NDS_paint_generation
#define VG_NDS_paint_generation 1
-typedef enum {
+typedef enum {
VG_PAINT_COLOR_RAMP_LINEAR_NDS = 0x1A10,
VG_COLOR_MATRIX_NDS = 0x1A11,
VG_PAINT_COLOR_TRANSFORM_LINEAR_NDS = 0x1A12,
@@ -178,7 +178,7 @@ typedef enum {
VG_IMAGE_MODE_NDS_FORCE_SIZE = VG_MAX_ENUM
} VGImageModeNds;
-#endif
+#endif
#ifndef VG_NDS_projective_geometry
@@ -204,7 +204,7 @@ typedef enum {
typedef enum {
VG_RQUAD_TO_NDS = ( 13 << 1 ),
VG_RCUBIC_TO_NDS = ( 14 << 1 ),
-
+
VG_PATH_SEGMENT_NDS_FORCE_SIZE = VG_MAX_ENUM
} VGPathSegmentNds;
@@ -220,13 +220,13 @@ typedef enum {
#ifdef VG_VGEXT_PROTOTYPES
VG_API_CALL void VG_API_ENTRY vgProjectiveMatrixNDS(VGboolean enable) ;
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguTransformClipLineNDS(const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
-#endif
+#endif
typedef void (VG_API_ENTRYP PFNVGPROJECTIVEMATRIXNDSPROC) (VGboolean enable) ;
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUTRANSFORMCLIPLINENDSPROC) (const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
#endif
-#ifdef __cplusplus
+#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/include/VG/vgplatform.h b/include/VG/vgplatform.h
index aa1829f..464b751 100644
--- a/include/VG/vgplatform.h
+++ b/include/VG/vgplatform.h
@@ -13,10 +13,10 @@
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Materials,
* and to permit persons to whom the Materials are furnished to do so,
- * subject to the following conditions:
+ * subject to the following conditions:
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
@@ -40,7 +40,7 @@
extern "C" {
#endif
-#ifndef VG_API_CALL
+#ifndef VG_API_CALL
#if defined(OPENVG_STATIC_LIBRARY)
# define VG_API_CALL
#else
@@ -48,7 +48,7 @@ extern "C" {
#endif /* defined OPENVG_STATIC_LIBRARY */
#endif /* ifndef VG_API_CALL */
-#ifndef VGU_API_CALL
+#ifndef VGU_API_CALL
#if defined(OPENVG_STATIC_LIBRARY)
# define VGU_API_CALL
#else
@@ -83,9 +83,9 @@ typedef unsigned int VGbitfield;
#ifndef VG_VGEXT_PROTOTYPES
#define VG_VGEXT_PROTOTYPES
-#endif
+#endif
-#ifdef __cplusplus
+#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/include/VG/vgu.h b/include/VG/vgu.h
index da81da9..275fb6f 100644
--- a/include/VG/vgu.h
+++ b/include/VG/vgu.h
@@ -1,7 +1,7 @@
/* $Revision: 6810 $ on $Date:: 2008-10-29 07:31:37 -0700 #$ */
/*------------------------------------------------------------------------
- *
+ *
* VGU 1.1 Reference Implementation
* -------------------------------------
*
@@ -13,10 +13,10 @@
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Materials,
* and to permit persons to whom the Materials are furnished to do so,
- * subject to the following conditions:
+ * subject to the following conditions:
*
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Materials.
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
@@ -34,8 +34,8 @@
#ifndef _VGU_H
#define _VGU_H
-#ifdef __cplusplus
-extern "C" {
+#ifdef __cplusplus
+extern "C" {
#endif
#include
@@ -48,11 +48,11 @@ extern "C" {
#endif
#ifndef VGU_API_ENTRY
-# error VGU_API_ENTRY must be defined
+# error VGU_API_ENTRY must be defined
#endif
#ifndef VGU_API_EXIT
-# error VGU_API_EXIT must be defined
+# error VGU_API_EXIT must be defined
#endif
@@ -124,7 +124,7 @@ VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToQuad(VGfloat dx0, VG
VGfloat sx3, VGfloat sy3,
VGfloat * matrix) VGU_API_EXIT;
-#ifdef __cplusplus
+#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 6f40ab9..b64d567 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -190,7 +190,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
dri2_dpy = disp->DriverData;
_eglInitConfig(&base, disp, id);
-
+
i = 0;
double_buffer = 0;
bind_to_texture_rgb = 0;
@@ -206,7 +206,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
else
/* not valid */;
_eglSetConfigKey(&base, EGL_COLOR_BUFFER_TYPE, value);
- break;
+ break;
case __DRI_ATTRIB_CONFIG_CAVEAT:
if (value & __DRI_ATTRIB_NON_CONFORMANT_CONFIG)
@@ -351,7 +351,7 @@ dri2_get_buffers(__DRIdrawable * driDrawable,
*out_count = reply->count;
dri2_surf->base.Width = *width = reply->width;
dri2_surf->base.Height = *height = reply->height;
- dri2_process_buffers(dri2_surf, buffers, *out_count);
+ dri2_process_buffers(dri2_surf, buffers, *out_count);
free(reply);
@@ -430,7 +430,7 @@ dri2_get_buffers_with_format(__DRIdrawable * driDrawable,
dri2_surf->base.Width = *width = reply->width;
dri2_surf->base.Height = *height = reply->height;
*out_count = reply->count;
- dri2_process_buffers(dri2_surf, buffers, *out_count);
+ dri2_process_buffers(dri2_surf, buffers, *out_count);
free(reply);
@@ -478,7 +478,7 @@ dri2_bind_extensions(struct dri2_egl_display *dri2_dpy,
}
}
}
-
+
for (j = 0; matches[j].name; j++) {
field = ((char *) dri2_dpy + matches[j].offset);
if (*(const __DRIextension **) field == NULL) {
@@ -524,7 +524,7 @@ dri2_connect(struct dri2_egl_display *dri2_dpy)
xfixes_query_cookie = xcb_xfixes_query_version(dri2_dpy->conn,
XCB_XFIXES_MAJOR_VERSION,
XCB_XFIXES_MINOR_VERSION);
-
+
dri2_query_cookie = xcb_dri2_query_version (dri2_dpy->conn,
XCB_DRI2_MAJOR_VERSION,
XCB_DRI2_MINOR_VERSION);
@@ -533,7 +533,7 @@ dri2_connect(struct dri2_egl_display *dri2_dpy)
connect_cookie = xcb_dri2_connect_unchecked (dri2_dpy->conn,
s.data->root,
XCB_DRI2_DRIVER_TYPE_DRI);
-
+
xfixes_query =
xcb_xfixes_query_version_reply (dri2_dpy->conn,
xfixes_query_cookie, &error);
@@ -566,7 +566,7 @@ dri2_connect(struct dri2_egl_display *dri2_dpy)
dri2_dpy->device_name =
dri2_strndup(xcb_dri2_connect_device_name (connect),
xcb_dri2_connect_device_name_length (connect));
-
+
dri2_dpy->driver_name =
dri2_strndup(xcb_dri2_connect_driver_name (connect),
xcb_dri2_connect_driver_name_length (connect));
@@ -653,7 +653,7 @@ dri2_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
}
}
- xcb_depth_next(&d);
+ xcb_depth_next(&d);
}
if (!_eglGetArraySize(disp->Configs)) {
@@ -833,7 +833,7 @@ dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp,
dri2_dpy->loader_extension.flushFrontBuffer = dri2_flush_front_buffer;
dri2_dpy->loader_extension.getBuffersWithFormat = NULL;
}
-
+
dri2_dpy->extensions[0] = &dri2_dpy->loader_extension.base;
dri2_dpy->extensions[1] = &image_lookup_extension.base;
dri2_dpy->extensions[2] = NULL;
@@ -1567,14 +1567,14 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
dri2_dpy->dri2->createNewContextForAPI(dri2_dpy->dri_screen,
api,
dri_config,
- dri2_ctx_shared ?
+ dri2_ctx_shared ?
dri2_ctx_shared->dri_context : NULL,
dri2_ctx);
} else if (api == __DRI_API_OPENGL) {
dri2_ctx->dri_context =
dri2_dpy->dri2->createNewContext(dri2_dpy->dri_screen,
dri2_config->dri_config,
- dri2_ctx_shared ?
+ dri2_ctx_shared ?
dri2_ctx_shared->dri_context : NULL,
dri2_ctx);
} else {
@@ -1603,7 +1603,7 @@ dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
return EGL_TRUE;
(*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);
-
+
xcb_dri2_destroy_drawable (dri2_dpy->conn, dri2_surf->drawable);
if (surf->Type == EGL_PBUFFER_BIT)
@@ -1700,7 +1700,7 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
_eglError(EGL_BAD_ALLOC, "dri2_create_surface");
return NULL;
}
-
+
if (!_eglInitSurface(&dri2_surf->base, disp, type, conf, attrib_list))
goto cleanup_surf;
@@ -1715,7 +1715,7 @@ dri2_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
dri2_surf->drawable = window;
}
- dri2_surf->dri_drawable =
+ dri2_surf->dri_drawable =
(*dri2_dpy->dri2->createNewDrawable) (dri2_dpy->dri_screen,
dri2_conf->dri_config, dri2_surf);
if (dri2_surf->dri_drawable == NULL) {
@@ -2103,7 +2103,7 @@ dri2_create_image_khr_renderbuffer(_EGLDisplay *disp, _EGLContext *ctx,
if (!_eglInitImage(&dri2_img->base, disp))
return EGL_NO_IMAGE_KHR;
- dri2_img->dri_image =
+ dri2_img->dri_image =
dri2_dpy->image->createImageFromRenderbuffer(dri2_ctx->dri_context,
renderbuffer,
dri2_img);
@@ -2259,7 +2259,7 @@ dri2_create_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp,
valid_mask =
EGL_DRM_BUFFER_USE_SCANOUT_MESA |
- EGL_DRM_BUFFER_USE_SHARE_MESA;
+ EGL_DRM_BUFFER_USE_SHARE_MESA;
if (attrs.DRMBufferUseMESA & ~valid_mask) {
_eglLog(_EGL_WARNING, "bad image use bit 0x%04x",
attrs.DRMBufferUseMESA & ~valid_mask);
@@ -2272,7 +2272,7 @@ dri2_create_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp,
if (attrs.DRMBufferUseMESA & EGL_DRM_BUFFER_USE_SCANOUT_MESA)
dri_use |= __DRI_IMAGE_USE_SCANOUT;
- dri2_img->dri_image =
+ dri2_img->dri_image =
dri2_dpy->image->createImage(dri2_dpy->dri_screen,
attrs.Width, attrs.Height,
format, dri_use, dri2_img);
diff --git a/src/egl/drivers/glx/egl_glx.c b/src/egl/drivers/glx/egl_glx.c
index 8ec7c48..de0128f 100644
--- a/src/egl/drivers/glx/egl_glx.c
+++ b/src/egl/drivers/glx/egl_glx.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/egl/main/egldefines.h b/src/egl/main/egldefines.h
index 4ecd4c1..03ea047 100644
--- a/src/egl/main/egldefines.h
+++ b/src/egl/main/egldefines.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 565e44d..9a7df62 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -130,7 +130,7 @@ _eglFindDisplay(_EGLPlatformType plat, void *plat_dpy)
dpy->Platform = plat;
dpy->PlatformDisplay = plat_dpy;
- /* add to the display list */
+ /* add to the display list */
dpy->Next = _eglGlobal.DisplayList;
_eglGlobal.DisplayList = dpy;
}
@@ -216,7 +216,7 @@ EGLBoolean
_eglCheckResource(void *res, _EGLResourceType type, _EGLDisplay *dpy)
{
_EGLResource *list = dpy->ResourceLists[type];
-
+
if (!res)
return EGL_FALSE;
diff --git a/src/egl/main/eglmisc.c b/src/egl/main/eglmisc.c
index bbb96a9..5e60d1d 100644
--- a/src/egl/main/eglmisc.c
+++ b/src/egl/main/eglmisc.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/egl/main/eglmisc.h b/src/egl/main/eglmisc.h
index a753307..a9688b3 100644
--- a/src/egl/main/eglmisc.h
+++ b/src/egl/main/eglmisc.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/SConscript b/src/gallium/SConscript
index 0efab83..c526251 100644
--- a/src/gallium/SConscript
+++ b/src/gallium/SConscript
@@ -1,6 +1,6 @@
Import('env')
-#
+#
# Auxiliary modules
#
@@ -11,20 +11,20 @@ SConscript('auxiliary/SConscript')
#
SConscript([
- 'drivers/failover/SConscript',
+ 'drivers/failover/SConscript',
'drivers/galahad/SConscript',
- 'drivers/identity/SConscript',
- 'drivers/llvmpipe/SConscript',
+ 'drivers/identity/SConscript',
+ 'drivers/llvmpipe/SConscript',
'drivers/rbug/SConscript',
'drivers/softpipe/SConscript',
- 'drivers/svga/SConscript',
- 'drivers/trace/SConscript',
+ 'drivers/svga/SConscript',
+ 'drivers/trace/SConscript',
])
if not env['msvc']:
# These drivers do not build on MSVC compilers
SConscript([
- 'drivers/i915/SConscript',
+ 'drivers/i915/SConscript',
'drivers/i965/SConscript',
'drivers/r300/SConscript',
])
@@ -40,8 +40,8 @@ if env['drm']:
# no nouveau target in scons
# if env['drm_nouveau']:
# SConscript([
- # 'drivers/nouveau/SConscript',
- # 'drivers/nv50/SConscript',
+ # 'drivers/nouveau/SConscript',
+ # 'drivers/nv50/SConscript',
# 'drivers/nvfx/SConscript',
# ])
@@ -73,7 +73,7 @@ if env['platform'] == 'windows':
#
# Winsys
-#
+#
SConscript('winsys/SConscript')
diff --git a/src/gallium/auxiliary/SConscript b/src/gallium/auxiliary/SConscript
index fca7e5f..602ac2b 100644
--- a/src/gallium/auxiliary/SConscript
+++ b/src/gallium/auxiliary/SConscript
@@ -8,22 +8,22 @@ env.Append(CPPPATH = [
])
env.CodeGenerate(
- target = 'indices/u_indices_gen.c',
- script = 'indices/u_indices_gen.py',
+ target = 'indices/u_indices_gen.c',
+ script = 'indices/u_indices_gen.py',
source = [],
command = python_cmd + ' $SCRIPT > $TARGET'
)
env.CodeGenerate(
- target = 'indices/u_unfilled_gen.c',
- script = 'indices/u_unfilled_gen.py',
+ target = 'indices/u_unfilled_gen.c',
+ script = 'indices/u_unfilled_gen.py',
source = [],
command = python_cmd + ' $SCRIPT > $TARGET'
)
env.CodeGenerate(
- target = 'util/u_format_srgb.c',
- script = 'util/u_format_srgb.py',
+ target = 'util/u_format_srgb.c',
+ script = 'util/u_format_srgb.py',
source = [],
command = python_cmd + ' $SCRIPT > $TARGET'
)
@@ -44,7 +44,7 @@ env.CodeGenerate(
env.Depends('util/u_format_table.c', [
'#src/gallium/auxiliary/util/u_format_parse.py',
- 'util/u_format_pack.py',
+ 'util/u_format_pack.py',
])
source = [
diff --git a/src/gallium/auxiliary/cso_cache/cso_cache.c b/src/gallium/auxiliary/cso_cache/cso_cache.c
index 900c64d..05f2306 100644
--- a/src/gallium/auxiliary/cso_cache/cso_cache.c
+++ b/src/gallium/auxiliary/cso_cache/cso_cache.c
@@ -256,7 +256,7 @@ cso_find_state(struct cso_cache *sc,
void *cso_hash_find_data_from_template( struct cso_hash *hash,
- unsigned hash_key,
+ unsigned hash_key,
void *templ,
int size )
{
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index b983fa6..4372a7b 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -27,7 +27,7 @@
/**
* @file
- *
+ *
* Wrap the cso cache & hash mechanisms in a simplified
* pipe-driver-specific interface.
*
@@ -267,7 +267,7 @@ struct cso_context *cso_create_context( struct pipe_context *pipe )
return ctx;
out:
- cso_destroy_context( ctx );
+ cso_destroy_context( ctx );
return NULL;
}
@@ -278,7 +278,7 @@ struct cso_context *cso_create_context( struct pipe_context *pipe )
void cso_release_all( struct cso_context *ctx )
{
unsigned i;
-
+
if (ctx->pipe) {
ctx->pipe->bind_blend_state( ctx->pipe, NULL );
ctx->pipe->bind_rasterizer_state( ctx->pipe, NULL );
@@ -491,7 +491,7 @@ void cso_single_sampler_done( struct cso_context *ctx )
if (ctx->hw.nr_samplers != ctx->nr_samplers ||
memcmp(ctx->hw.samplers,
ctx->samplers,
- ctx->nr_samplers * sizeof(void *)) != 0)
+ ctx->nr_samplers * sizeof(void *)) != 0)
{
memcpy(ctx->hw.samplers, ctx->samplers, ctx->nr_samplers * sizeof(void *));
ctx->hw.nr_samplers = ctx->nr_samplers;
@@ -516,7 +516,7 @@ cso_single_vertex_sampler_done(struct cso_context *ctx)
if (ctx->hw.nr_vertex_samplers != ctx->nr_vertex_samplers ||
memcmp(ctx->hw.vertex_samplers,
ctx->vertex_samplers,
- ctx->nr_vertex_samplers * sizeof(void *)) != 0)
+ ctx->nr_vertex_samplers * sizeof(void *)) != 0)
{
memcpy(ctx->hw.vertex_samplers,
ctx->vertex_samplers,
@@ -628,7 +628,7 @@ enum pipe_error cso_set_depth_stencil_alpha(struct cso_context *ctx,
unsigned key_size = sizeof(struct pipe_depth_stencil_alpha_state);
unsigned hash_key = cso_construct_key((void*)templ, key_size);
struct cso_hash_iter iter = cso_find_state_template(ctx->cache,
- hash_key,
+ hash_key,
CSO_DEPTH_STENCIL_ALPHA,
(void*)templ, key_size);
void *handle;
@@ -766,7 +766,7 @@ enum pipe_error cso_set_fragment_shader(struct cso_context *ctx,
size_t tokens_size = num_tokens*sizeof(struct tgsi_token);
unsigned hash_key = cso_construct_key((void*)tokens, tokens_size);
struct cso_hash_iter iter = cso_find_state_template(ctx->cache,
- hash_key,
+ hash_key,
CSO_FRAGMENT_SHADER,
(void*)tokens,
sizeof(*templ)); /* XXX correct? tokens_size? */
diff --git a/src/gallium/auxiliary/cso_cache/cso_hash.c b/src/gallium/auxiliary/cso_cache/cso_hash.c
index 288cef7..3e0b14a 100644
--- a/src/gallium/auxiliary/cso_cache/cso_hash.c
+++ b/src/gallium/auxiliary/cso_cache/cso_hash.c
@@ -155,7 +155,7 @@ static void cso_data_rehash(struct cso_hash_data *hash, int hint)
struct cso_node *lastNode = firstNode;
struct cso_node *afterLastNode;
struct cso_node **beforeFirstNode;
-
+
while (lastNode->next != e && lastNode->next->key == h)
lastNode = lastNode->next;
diff --git a/src/gallium/auxiliary/cso_cache/cso_hash.h b/src/gallium/auxiliary/cso_cache/cso_hash.h
index 5891c32..a6b99fd 100644
--- a/src/gallium/auxiliary/cso_cache/cso_hash.h
+++ b/src/gallium/auxiliary/cso_cache/cso_hash.h
@@ -28,7 +28,7 @@
/**
* @file
* Hash table implementation.
- *
+ *
* This file provides a hash implementation that is capable of dealing
* with collisions. It stores colliding entries in linked list. All
* functions operating on the hash return an iterator. The iterator
@@ -37,7 +37,7 @@
* iterate over the entries to find the exact entry among ones that
* had the same key (e.g. memcmp could be used on the data to check
* that)
- *
+ *
* @author Zack Rusin
*/
diff --git a/src/gallium/auxiliary/draw/draw_cliptest_tmp.h b/src/gallium/auxiliary/draw/draw_cliptest_tmp.h
index 958ed20..1c23fe9 100644
--- a/src/gallium/auxiliary/draw/draw_cliptest_tmp.h
+++ b/src/gallium/auxiliary/draw/draw_cliptest_tmp.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2010, VMware, inc.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -44,7 +44,7 @@ static boolean TAG(do_cliptest)( struct pt_post_vs *pvs,
for (j = 0; j < info->count; j++) {
float *position = out->data[pos];
unsigned mask = 0x0;
-
+
initialize_vertex_header(out);
if (flags & (DO_CLIP_XY | DO_CLIP_FULL_Z | DO_CLIP_HALF_Z | DO_CLIP_USER)) {
@@ -76,7 +76,7 @@ static boolean TAG(do_cliptest)( struct pt_post_vs *pvs,
if (flags & DO_CLIP_USER) {
unsigned i;
for (i = 6; i < nr; i++) {
- if (dot4(position, plane[i]) < 0)
+ if (dot4(position, plane[i]) < 0)
mask |= (1<render)
draw->render->destroy( draw->render );
*/
@@ -229,7 +229,7 @@ void draw_set_rasterizer_state( struct draw_context *draw,
}
/* With a little more work, llvmpipe will be able to turn this off and
- * do its own x/y clipping.
+ * do its own x/y clipping.
*
* Some hardware can turn off clipping altogether - in particular any
* hardware with a TNL unit can do its own clipping, even if it is
@@ -247,7 +247,7 @@ void draw_set_driver_clipping( struct draw_context *draw,
}
-/**
+/**
* Plug in the primitive rendering/rasterization stage (which is the last
* stage in the drawing pipeline).
* This is provided by the device driver.
@@ -562,7 +562,7 @@ draw_texture_samplers(struct draw_context *draw,
-void draw_set_render( struct draw_context *draw,
+void draw_set_render( struct draw_context *draw,
struct vbuf_render *render )
{
draw->render = render;
@@ -604,7 +604,7 @@ void draw_do_flush( struct draw_context *draw, unsigned flags )
draw_pipeline_flush( draw, flags );
draw->reduced_prim = ~0; /* is reduced_prim needed any more? */
-
+
draw->flushing = FALSE;
}
}
diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
index a0b217e..e105251 100644
--- a/src/gallium/auxiliary/draw/draw_context.h
+++ b/src/gallium/auxiliary/draw/draw_context.h
@@ -1,6 +1,6 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -203,7 +203,7 @@ draw_set_so_state(struct draw_context *draw,
/***********************************************************************
- * draw_pt.c
+ * draw_pt.c
*/
void draw_vbo(struct draw_context *draw,
@@ -222,21 +222,21 @@ draw_arrays_instanced(struct draw_context *draw,
/*******************************************************************************
- * Driver backend interface
+ * Driver backend interface
*/
struct vbuf_render;
-void draw_set_render( struct draw_context *draw,
+void draw_set_render( struct draw_context *draw,
struct vbuf_render *render );
void draw_set_driver_clipping( struct draw_context *draw,
boolean bypass_clip_xy,
boolean bypass_clip_z );
-void draw_set_force_passthrough( struct draw_context *draw,
+void draw_set_force_passthrough( struct draw_context *draw,
boolean enable );
/*******************************************************************************
- * Draw pipeline
+ * Draw pipeline
*/
boolean draw_need_pipeline(const struct draw_context *draw,
const struct pipe_rasterizer_state *rasterizer,
diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c
index 50a03ac..b8f954c 100644
--- a/src/gallium/auxiliary/draw/draw_gs.c
+++ b/src/gallium/auxiliary/draw/draw_gs.c
@@ -388,8 +388,8 @@ static void gs_tri_adj(struct draw_geometry_shader *shader,
* Execute geometry shader using TGSI interpreter.
*/
int draw_geometry_shader_run(struct draw_geometry_shader *shader,
- const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
- const unsigned constants_size[PIPE_MAX_CONSTANT_BUFFERS],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
+ const unsigned constants_size[PIPE_MAX_CONSTANT_BUFFERS],
const struct draw_vertex_info *input_verts,
const struct draw_prim_info *input_prim,
struct draw_vertex_info *output_verts,
diff --git a/src/gallium/auxiliary/draw/draw_gs.h b/src/gallium/auxiliary/draw/draw_gs.h
index 67bc1aa..11e2297 100644
--- a/src/gallium/auxiliary/draw/draw_gs.h
+++ b/src/gallium/auxiliary/draw/draw_gs.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef DRAW_GS_H
@@ -72,8 +72,8 @@ struct draw_geometry_shader {
* smaller than the GS_MAX_OUTPUT_VERTICES shader property.
*/
int draw_geometry_shader_run(struct draw_geometry_shader *shader,
- const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
- const unsigned constants_size[PIPE_MAX_CONSTANT_BUFFERS],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
+ const unsigned constants_size[PIPE_MAX_CONSTANT_BUFFERS],
const struct draw_vertex_info *input_verts,
const struct draw_prim_info *input_prim,
struct draw_vertex_info *output_verts,
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 3b8286f..3019711 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -116,7 +116,7 @@ create_jit_texture_type(struct gallivm_state *gallivm)
elem_types[DRAW_JIT_TEXTURE_MIN_LOD] =
elem_types[DRAW_JIT_TEXTURE_MAX_LOD] =
elem_types[DRAW_JIT_TEXTURE_LOD_BIAS] = LLVMFloatTypeInContext(gallivm->context);
- elem_types[DRAW_JIT_TEXTURE_BORDER_COLOR] =
+ elem_types[DRAW_JIT_TEXTURE_BORDER_COLOR] =
LLVMArrayType(LLVMFloatTypeInContext(gallivm->context), 4);
texture_type = LLVMStructTypeInContext(gallivm->context, elem_types,
@@ -669,8 +669,8 @@ store_aos(struct gallivm_state *gallivm,
val = lp_build_const_int32(gallivm, 0xffff1);
shift = lp_build_const_int32(gallivm, 12);
val = LLVMBuildShl(builder, val, shift, "");
- /* add clipmask:12 */
- val = LLVMBuildOr(builder, val, clipmask, "");
+ /* add clipmask:12 */
+ val = LLVMBuildOr(builder, val, clipmask, "");
/* store vertex header */
LLVMBuildStore(builder, val, id_ptr);
@@ -740,7 +740,7 @@ store_aos_array(struct gallivm_state *gallivm,
LLVMValueRef ind3 = lp_build_const_int32(gallivm, 3);
LLVMValueRef io0_ptr, io1_ptr, io2_ptr, io3_ptr;
LLVMValueRef clipmask0, clipmask1, clipmask2, clipmask3;
-
+
debug_assert(NUM_CHANNELS == 4);
io0_ptr = LLVMBuildGEP(builder, io_ptr,
@@ -821,15 +821,15 @@ convert_to_aos(struct gallivm_state *gallivm,
*/
static void
store_clip(struct gallivm_state *gallivm,
- LLVMValueRef io_ptr,
+ LLVMValueRef io_ptr,
LLVMValueRef (*outputs)[NUM_CHANNELS])
{
LLVMBuilderRef builder = gallivm->builder;
LLVMValueRef out[4];
- LLVMValueRef indices[2];
+ LLVMValueRef indices[2];
LLVMValueRef io0_ptr, io1_ptr, io2_ptr, io3_ptr;
LLVMValueRef clip_ptr0, clip_ptr1, clip_ptr2, clip_ptr3;
- LLVMValueRef clip0_ptr, clip1_ptr, clip2_ptr, clip3_ptr;
+ LLVMValueRef clip0_ptr, clip1_ptr, clip2_ptr, clip3_ptr;
LLVMValueRef out0elem, out1elem, out2elem, out3elem;
int i;
@@ -837,14 +837,14 @@ store_clip(struct gallivm_state *gallivm,
LLVMValueRef ind1 = lp_build_const_int32(gallivm, 1);
LLVMValueRef ind2 = lp_build_const_int32(gallivm, 2);
LLVMValueRef ind3 = lp_build_const_int32(gallivm, 3);
-
+
indices[0] =
indices[1] = lp_build_const_int32(gallivm, 0);
-
+
out[0] = LLVMBuildLoad(builder, outputs[0][0], ""); /*x0 x1 x2 x3*/
out[1] = LLVMBuildLoad(builder, outputs[0][1], ""); /*y0 y1 y2 y3*/
out[2] = LLVMBuildLoad(builder, outputs[0][2], ""); /*z0 z1 z2 z3*/
- out[3] = LLVMBuildLoad(builder, outputs[0][3], ""); /*w0 w1 w2 w3*/
+ out[3] = LLVMBuildLoad(builder, outputs[0][3], ""); /*w0 w1 w2 w3*/
io0_ptr = LLVMBuildGEP(builder, io_ptr, &ind0, 1, "");
io1_ptr = LLVMBuildGEP(builder, io_ptr, &ind1, 1, "");
@@ -866,7 +866,7 @@ store_clip(struct gallivm_state *gallivm,
out1elem = LLVMBuildExtractElement(builder, out[i], ind1, ""); /* x1 */
out2elem = LLVMBuildExtractElement(builder, out[i], ind2, ""); /* x2 */
out3elem = LLVMBuildExtractElement(builder, out[i], ind3, ""); /* x3 */
-
+
LLVMBuildStore(builder, out0elem, clip0_ptr);
LLVMBuildStore(builder, out1elem, clip1_ptr);
LLVMBuildStore(builder, out2elem, clip2_ptr);
@@ -909,14 +909,14 @@ generate_viewport(struct draw_llvm *llvm,
int i;
struct gallivm_state *gallivm = llvm->gallivm;
struct lp_type f32_type = lp_type_float_vec(32);
- LLVMValueRef out3 = LLVMBuildLoad(builder, outputs[0][3], ""); /*w0 w1 w2 w3*/
- LLVMValueRef const1 = lp_build_const_vec(gallivm, f32_type, 1.0); /*1.0 1.0 1.0 1.0*/
+ LLVMValueRef out3 = LLVMBuildLoad(builder, outputs[0][3], ""); /*w0 w1 w2 w3*/
+ LLVMValueRef const1 = lp_build_const_vec(gallivm, f32_type, 1.0); /*1.0 1.0 1.0 1.0*/
LLVMValueRef vp_ptr = draw_jit_context_viewport(gallivm, context_ptr);
/* for 1/w convention*/
out3 = LLVMBuildFDiv(builder, const1, out3, "");
LLVMBuildStore(builder, out3, outputs[0][3]);
-
+
/* Viewport Mapping */
for (i=0; i<3; i++){
LLVMValueRef out = LLVMBuildLoad(builder, outputs[0][i], ""); /*x0 x1 x2 x3*/
@@ -925,7 +925,7 @@ generate_viewport(struct draw_llvm *llvm,
LLVMValueRef scale_i;
LLVMValueRef trans_i;
LLVMValueRef index;
-
+
index = lp_build_const_int32(gallivm, i);
scale_i = LLVMBuildGEP(builder, vp_ptr, &index, 1, "");
@@ -945,14 +945,14 @@ generate_viewport(struct draw_llvm *llvm,
/* store transformed outputs */
LLVMBuildStore(builder, out, outputs[0][i]);
}
-
+
}
/*
* Returns clipmask as 4xi32 bitmask for the 4 vertices
*/
-static LLVMValueRef
+static LLVMValueRef
generate_clipmask(struct gallivm_state *gallivm,
LLVMValueRef (*outputs)[NUM_CHANNELS],
boolean clip_xy,
@@ -963,15 +963,15 @@ generate_clipmask(struct gallivm_state *gallivm,
LLVMValueRef context_ptr)
{
LLVMBuilderRef builder = gallivm->builder;
- LLVMValueRef mask; /* stores the <4xi32> clipmasks */
- LLVMValueRef test, temp;
+ LLVMValueRef mask; /* stores the <4xi32> clipmasks */
+ LLVMValueRef test, temp;
LLVMValueRef zero, shift;
LLVMValueRef pos_x, pos_y, pos_z, pos_w;
LLVMValueRef plane1, planes, plane_ptr, sum;
unsigned i;
- struct lp_type f32_type = lp_type_float_vec(32);
+ struct lp_type f32_type = lp_type_float_vec(32);
mask = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0);
temp = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0);
@@ -982,34 +982,34 @@ generate_clipmask(struct gallivm_state *gallivm,
pos_x = LLVMBuildLoad(builder, outputs[0][0], ""); /*x0 x1 x2 x3*/
pos_y = LLVMBuildLoad(builder, outputs[0][1], ""); /*y0 y1 y2 y3*/
pos_z = LLVMBuildLoad(builder, outputs[0][2], ""); /*z0 z1 z2 z3*/
- pos_w = LLVMBuildLoad(builder, outputs[0][3], ""); /*w0 w1 w2 w3*/
+ pos_w = LLVMBuildLoad(builder, outputs[0][3], ""); /*w0 w1 w2 w3*/
/* Cliptest, for hardwired planes */
if (clip_xy){
/* plane 1 */
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, pos_x , pos_w);
temp = shift;
- test = LLVMBuildAnd(builder, test, temp, "");
+ test = LLVMBuildAnd(builder, test, temp, "");
mask = test;
-
+
/* plane 2 */
test = LLVMBuildFAdd(builder, pos_x, pos_w, "");
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, test);
temp = LLVMBuildShl(builder, temp, shift, "");
- test = LLVMBuildAnd(builder, test, temp, "");
+ test = LLVMBuildAnd(builder, test, temp, "");
mask = LLVMBuildOr(builder, mask, test, "");
-
+
/* plane 3 */
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, pos_y, pos_w);
temp = LLVMBuildShl(builder, temp, shift, "");
- test = LLVMBuildAnd(builder, test, temp, "");
+ test = LLVMBuildAnd(builder, test, temp, "");
mask = LLVMBuildOr(builder, mask, test, "");
/* plane 4 */
test = LLVMBuildFAdd(builder, pos_y, pos_w, "");
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, test);
temp = LLVMBuildShl(builder, temp, shift, "");
- test = LLVMBuildAnd(builder, test, temp, "");
+ test = LLVMBuildAnd(builder, test, temp, "");
mask = LLVMBuildOr(builder, mask, test, "");
}
@@ -1018,22 +1018,22 @@ generate_clipmask(struct gallivm_state *gallivm,
if (clip_halfz){
/* plane 5 */
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, pos_z);
- test = LLVMBuildAnd(builder, test, temp, "");
+ test = LLVMBuildAnd(builder, test, temp, "");
mask = LLVMBuildOr(builder, mask, test, "");
- }
+ }
else{
/* plane 5 */
test = LLVMBuildFAdd(builder, pos_z, pos_w, "");
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, test);
- test = LLVMBuildAnd(builder, test, temp, "");
+ test = LLVMBuildAnd(builder, test, temp, "");
mask = LLVMBuildOr(builder, mask, test, "");
}
/* plane 6 */
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, pos_z, pos_w);
temp = LLVMBuildShl(builder, temp, shift, "");
- test = LLVMBuildAnd(builder, test, temp, "");
+ test = LLVMBuildAnd(builder, test, temp, "");
mask = LLVMBuildOr(builder, mask, test, "");
- }
+ }
if (clip_user){
LLVMValueRef planes_ptr = draw_jit_context_planes(gallivm, context_ptr);
@@ -1053,28 +1053,28 @@ generate_clipmask(struct gallivm_state *gallivm,
indices[2] = lp_build_const_int32(gallivm, 1);
plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
- plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_y");
+ plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_y");
planes = vec4f_from_scalar(gallivm, plane1, "plane4_y");
test = LLVMBuildFMul(builder, planes, pos_y, "");
sum = LLVMBuildFAdd(builder, sum, test, "");
-
+
indices[2] = lp_build_const_int32(gallivm, 2);
plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
- plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_z");
+ plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_z");
planes = vec4f_from_scalar(gallivm, plane1, "plane4_z");
test = LLVMBuildFMul(builder, planes, pos_z, "");
sum = LLVMBuildFAdd(builder, sum, test, "");
indices[2] = lp_build_const_int32(gallivm, 3);
plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, "");
- plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_w");
+ plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_w");
planes = vec4f_from_scalar(gallivm, plane1, "plane4_w");
test = LLVMBuildFMul(builder, planes, pos_w, "");
sum = LLVMBuildFAdd(builder, sum, test, "");
test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, sum);
temp = LLVMBuildShl(builder, temp, shift, "");
- test = LLVMBuildAnd(builder, test, temp, "");
+ test = LLVMBuildAnd(builder, test, temp, "");
mask = LLVMBuildOr(builder, mask, test, "");
}
}
@@ -1083,7 +1083,7 @@ generate_clipmask(struct gallivm_state *gallivm,
/*
* Returns boolean if any clipping has occurred
- * Used zero/non-zero i32 value to represent boolean
+ * Used zero/non-zero i32 value to represent boolean
*/
static void
clipmask_bool(struct gallivm_state *gallivm,
@@ -1091,16 +1091,16 @@ clipmask_bool(struct gallivm_state *gallivm,
LLVMValueRef ret_ptr)
{
LLVMBuilderRef builder = gallivm->builder;
- LLVMValueRef ret = LLVMBuildLoad(builder, ret_ptr, "");
+ LLVMValueRef ret = LLVMBuildLoad(builder, ret_ptr, "");
LLVMValueRef temp;
int i;
- for (i=0; i<4; i++){
+ for (i=0; i<4; i++){
temp = LLVMBuildExtractElement(builder, clipmask,
lp_build_const_int32(gallivm, i) , "");
ret = LLVMBuildOr(builder, ret, temp, "");
}
-
+
LLVMBuildStore(builder, ret, ret_ptr);
}
@@ -1128,10 +1128,10 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
struct lp_build_sampler_soa *sampler = 0;
LLVMValueRef ret, ret_ptr;
boolean bypass_viewport = variant->key.bypass_viewport;
- boolean enable_cliptest = variant->key.clip_xy ||
+ boolean enable_cliptest = variant->key.clip_xy ||
variant->key.clip_z ||
variant->key.clip_user;
-
+
arg_types[0] = get_context_ptr_type(llvm); /* context */
arg_types[1] = get_vertex_header_ptr_type(llvm); /* vertex_header */
arg_types[2] = get_buffer_ptr_type(llvm); /* vbuffers */
@@ -1183,8 +1183,8 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
step = lp_build_const_int32(gallivm, max_vertices);
- /* function will return non-zero i32 value if any clipped vertices */
- ret_ptr = lp_build_alloca(gallivm, int32_type, "");
+ /* function will return non-zero i32 value if any clipped vertices */
+ ret_ptr = lp_build_alloca(gallivm, int32_type, "");
LLVMBuildStore(builder, lp_build_const_int32(gallivm, 0), ret_ptr);
/* code generated texture sampling */
@@ -1244,7 +1244,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
/* allocate clipmask, assign it integer type */
clipmask = generate_clipmask(gallivm, outputs,
variant->key.clip_xy,
- variant->key.clip_z,
+ variant->key.clip_z,
variant->key.clip_user,
variant->key.clip_halfz,
variant->key.nr_planes,
@@ -1253,9 +1253,9 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
clipmask_bool(gallivm, clipmask, ret_ptr);
}
else{
- clipmask = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0);
+ clipmask = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0);
}
-
+
/* do viewport mapping */
if (!bypass_viewport){
generate_viewport(llvm, builder, outputs, context_ptr);
@@ -1273,7 +1273,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
ret = LLVMBuildLoad(builder, ret_ptr,"");
LLVMBuildRet(builder, ret);
-
+
/*
* Translate the LLVM IR into machine code.
*/
@@ -1326,10 +1326,10 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
struct lp_build_sampler_soa *sampler = 0;
LLVMValueRef ret, ret_ptr;
boolean bypass_viewport = variant->key.bypass_viewport;
- boolean enable_cliptest = variant->key.clip_xy ||
+ boolean enable_cliptest = variant->key.clip_xy ||
variant->key.clip_z ||
variant->key.clip_user;
-
+
arg_types[0] = get_context_ptr_type(llvm); /* context */
arg_types[1] = get_vertex_header_ptr_type(llvm); /* vertex_header */
arg_types[2] = get_buffer_ptr_type(llvm); /* vbuffers */
@@ -1388,7 +1388,7 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
"fetch_max");
/* function returns non-zero i32 value if any clipped vertices */
- ret_ptr = lp_build_alloca(gallivm, int32_type, "");
+ ret_ptr = lp_build_alloca(gallivm, int32_type, "");
LLVMBuildStore(builder, lp_build_const_int32(gallivm, 0), ret_ptr);
lp_build_loop_begin(&lp_loop, gallivm, lp_build_const_int32(gallivm, 0));
@@ -1449,7 +1449,7 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
/* allocate clipmask, assign it integer type */
clipmask = generate_clipmask(gallivm, outputs,
variant->key.clip_xy,
- variant->key.clip_z,
+ variant->key.clip_z,
variant->key.clip_user,
variant->key.clip_halfz,
variant->key.nr_planes,
@@ -1460,16 +1460,16 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
else{
clipmask = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0);
}
-
+
/* do viewport mapping */
if (!bypass_viewport){
generate_viewport(llvm, builder, outputs, context_ptr);
}
- /* store clipmask in vertex header,
- * original positions in clip
- * and transformed positions in data
- */
+ /* store clipmask in vertex header,
+ * original positions in clip
+ * and transformed positions in data
+ */
convert_to_aos(gallivm, io, outputs, clipmask,
draw->vs.vertex_shader->info.num_outputs,
max_vertices);
@@ -1479,9 +1479,9 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
sampler->destroy(sampler);
- ret = LLVMBuildLoad(builder, ret_ptr,"");
+ ret = LLVMBuildLoad(builder, ret_ptr,"");
LLVMBuildRet(builder, ret);
-
+
/*
* Translate the LLVM IR into machine code.
*/
@@ -1544,7 +1544,7 @@ draw_llvm_make_variant_key(struct draw_llvm *llvm, char *store)
memcpy(key->vertex_element,
llvm->draw->pt.vertex_element,
sizeof(struct pipe_vertex_element) * key->nr_vertex_elements);
-
+
memset(sampler, 0, key->nr_samplers * sizeof *sampler);
for (i = 0 ; i < key->nr_samplers; i++) {
diff --git a/src/gallium/auxiliary/draw/draw_pipe.c b/src/gallium/auxiliary/draw/draw_pipe.c
index 6206197..61b322d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe.c
+++ b/src/gallium/auxiliary/draw/draw_pipe.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -115,7 +115,7 @@ static void do_point( struct draw_context *draw,
const char *v0 )
{
struct prim_header prim;
-
+
prim.flags = 0;
prim.pad = 0;
prim.v[0] = (struct vertex_header *)v0;
@@ -134,7 +134,7 @@ static void do_line( struct draw_context *draw,
const char *v1 )
{
struct prim_header prim;
-
+
prim.flags = flags;
prim.pad = 0;
prim.v[0] = (struct vertex_header *)v0;
@@ -155,7 +155,7 @@ static void do_triangle( struct draw_context *draw,
char *v2 )
{
struct prim_header prim;
-
+
prim.v[0] = (struct vertex_header *)v0;
prim.v[1] = (struct vertex_header *)v1;
prim.v[2] = (struct vertex_header *)v2;
@@ -340,7 +340,7 @@ void draw_pipeline_run_linear( struct draw_context *draw,
}
-void draw_pipeline_flush( struct draw_context *draw,
+void draw_pipeline_flush( struct draw_context *draw,
unsigned flags )
{
draw->pipeline.first->flush( draw->pipeline.first, flags );
diff --git a/src/gallium/auxiliary/draw/draw_pipe.h b/src/gallium/auxiliary/draw/draw_pipe.h
index 4792507..f18f16d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe.h
+++ b/src/gallium/auxiliary/draw/draw_pipe.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -114,7 +114,7 @@ static INLINE struct vertex_header *
dup_vert( struct draw_stage *stage,
const struct vertex_header *vert,
unsigned idx )
-{
+{
struct vertex_header *tmp = stage->tmp[idx];
const uint vsize = sizeof(struct vertex_header)
+ stage->draw->vs.num_vs_outputs * 4 * sizeof(float);
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
index 0851b9a..c650c3d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -234,27 +234,27 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
decl.Declaration.Semantic = 1;
decl.Semantic.Name = TGSI_SEMANTIC_GENERIC;
decl.Semantic.Index = aactx->maxGeneric + 1;
- decl.Range.First =
+ decl.Range.First =
decl.Range.Last = aactx->maxInput + 1;
ctx->emit_declaration(ctx, &decl);
/* declare new sampler */
decl = tgsi_default_full_declaration();
decl.Declaration.File = TGSI_FILE_SAMPLER;
- decl.Range.First =
+ decl.Range.First =
decl.Range.Last = aactx->freeSampler;
ctx->emit_declaration(ctx, &decl);
/* declare new temp regs */
decl = tgsi_default_full_declaration();
decl.Declaration.File = TGSI_FILE_TEMPORARY;
- decl.Range.First =
+ decl.Range.First =
decl.Range.Last = aactx->texTemp;
ctx->emit_declaration(ctx, &decl);
decl = tgsi_default_full_declaration();
decl.Declaration.File = TGSI_FILE_TEMPORARY;
- decl.Range.First =
+ decl.Range.First =
decl.Range.Last = aactx->colorTemp;
ctx->emit_declaration(ctx, &decl);
@@ -439,7 +439,7 @@ aaline_create_texture(struct aaline_stage *aaline)
u_box_origin_2d( size, size, &box );
- /* This texture is new, no need to flush.
+ /* This texture is new, no need to flush.
*/
transfer = pipe->get_transfer(pipe,
aaline->texture,
@@ -519,7 +519,7 @@ bind_aaline_fragment_shader(struct aaline_stage *aaline)
struct draw_context *draw = aaline->stage.draw;
struct pipe_context *pipe = draw->pipe;
- if (!aaline->fs->aaline_fs &&
+ if (!aaline->fs->aaline_fs &&
!generate_aaline_fs(aaline))
return FALSE;
@@ -950,7 +950,7 @@ draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe)
pipe->bind_fragment_sampler_states = aaline_bind_sampler_states;
pipe->set_fragment_sampler_views = aaline_set_sampler_views;
-
+
/* Install once everything is known to be OK:
*/
draw->pipeline.aaline = &aaline->stage;
@@ -960,6 +960,6 @@ draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe)
fail:
if (aaline)
aaline->stage.destroy( &aaline->stage );
-
+
return FALSE;
}
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
index 5ea552f..dcb8c4a 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aapoint.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -205,20 +205,20 @@ aa_transform_inst(struct tgsi_transform_context *ctx,
decl.Declaration.Semantic = 1;
decl.Semantic.Name = TGSI_SEMANTIC_GENERIC;
decl.Semantic.Index = aactx->maxGeneric + 1;
- decl.Range.First =
+ decl.Range.First =
decl.Range.Last = texInput;
ctx->emit_declaration(ctx, &decl);
/* declare new temp regs */
decl = tgsi_default_full_declaration();
decl.Declaration.File = TGSI_FILE_TEMPORARY;
- decl.Range.First =
+ decl.Range.First =
decl.Range.Last = tmp0;
ctx->emit_declaration(ctx, &decl);
decl = tgsi_default_full_declaration();
decl.Declaration.File = TGSI_FILE_TEMPORARY;
- decl.Range.First =
+ decl.Range.First =
decl.Range.Last = aactx->colorTemp;
ctx->emit_declaration(ctx, &decl);
@@ -822,7 +822,7 @@ aapoint_create_fs_state(struct pipe_context *pipe,
{
struct aapoint_stage *aapoint = aapoint_stage_from_pipe(pipe);
struct aapoint_fragment_shader *aafs = CALLOC_STRUCT(aapoint_fragment_shader);
- if (aafs == NULL)
+ if (aafs == NULL)
return NULL;
aafs->state = *fs;
diff --git a/src/gallium/auxiliary/draw/draw_pipe_clip.c b/src/gallium/auxiliary/draw/draw_pipe_clip.c
index a10d8e9..c7f1aac 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_clip.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_clip.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -84,7 +84,7 @@ static void interp_attr( float dst[4],
float t,
const float in[4],
const float out[4] )
-{
+{
dst[0] = LINTERP( t, out[0], in[0] );
dst[1] = LINTERP( t, out[1], in[1] );
dst[2] = LINTERP( t, out[2], in[2] );
@@ -110,12 +110,12 @@ static void copy_colors( struct draw_stage *stage,
-/* Interpolate between two vertices to produce a third.
+/* Interpolate between two vertices to produce a third.
*/
static void interp( const struct clip_stage *clip,
struct vertex_header *dst,
float t,
- const struct vertex_header *out,
+ const struct vertex_header *out,
const struct vertex_header *in )
{
const unsigned nr_attrs = draw_current_shader_outputs(clip->stage.draw);
@@ -236,7 +236,7 @@ dot4(const float *a, const float *b)
/* Clip a triangle against the viewport and user clip planes.
*/
static void
-do_clip_tri( struct draw_stage *stage,
+do_clip_tri( struct draw_stage *stage,
struct prim_header *header,
unsigned clipmask )
{
@@ -298,7 +298,7 @@ do_clip_tri( struct draw_stage *stage,
*/
float t = dp / (dp - dp_prev);
interp( clipper, new_vert, t, vert, vert_prev );
-
+
/* Force edgeflag true in this case:
*/
new_vert->edgeflag = 1;
@@ -350,7 +350,7 @@ do_clip_tri( struct draw_stage *stage,
}
}
}
-
+
/* Emit the polygon as triangles to the setup stage:
*/
emit_poly( stage, inlist, n, header );
@@ -383,7 +383,7 @@ do_clip_line( struct draw_stage *stage,
if (dp1 < 0.0F) {
float t = dp1 / (dp1 - dp0);
t1 = MAX2(t1, t);
- }
+ }
if (dp0 < 0.0F) {
float t = dp0 / (dp0 - dp1);
@@ -421,10 +421,10 @@ do_clip_line( struct draw_stage *stage,
static void
-clip_point( struct draw_stage *stage,
+clip_point( struct draw_stage *stage,
struct prim_header *header )
{
- if (header->v[0]->clipmask == 0)
+ if (header->v[0]->clipmask == 0)
stage->next->point( stage->next, header );
}
@@ -433,9 +433,9 @@ static void
clip_line( struct draw_stage *stage,
struct prim_header *header )
{
- unsigned clipmask = (header->v[0]->clipmask |
+ unsigned clipmask = (header->v[0]->clipmask |
header->v[1]->clipmask);
-
+
if (clipmask == 0) {
/* no clipping needed */
stage->next->line( stage->next, header );
@@ -452,16 +452,16 @@ static void
clip_tri( struct draw_stage *stage,
struct prim_header *header )
{
- unsigned clipmask = (header->v[0]->clipmask |
- header->v[1]->clipmask |
+ unsigned clipmask = (header->v[0]->clipmask |
+ header->v[1]->clipmask |
header->v[2]->clipmask);
-
+
if (clipmask == 0) {
/* no clipping needed */
stage->next->tri( stage->next, header );
}
- else if ((header->v[0]->clipmask &
- header->v[1]->clipmask &
+ else if ((header->v[0]->clipmask &
+ header->v[1]->clipmask &
header->v[2]->clipmask) == 0) {
do_clip_tri(stage, header, clipmask);
}
@@ -471,7 +471,7 @@ clip_tri( struct draw_stage *stage,
/* Update state. Could further delay this until we hit the first
* primitive that really requires clipping.
*/
-static void
+static void
clip_init_state( struct draw_stage *stage )
{
struct clip_stage *clipper = clip_stage( stage );
@@ -490,7 +490,7 @@ clip_init_state( struct draw_stage *stage )
}
}
}
-
+
stage->tri = clip_tri;
stage->line = clip_line;
}
@@ -512,7 +512,7 @@ static void clip_first_line( struct draw_stage *stage,
}
-static void clip_flush( struct draw_stage *stage,
+static void clip_flush( struct draw_stage *stage,
unsigned flags )
{
stage->tri = clip_first_tri;
diff --git a/src/gallium/auxiliary/draw/draw_pipe_cull.c b/src/gallium/auxiliary/draw/draw_pipe_cull.c
index 2f4d01d..b55c805 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_cull.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_cull.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -66,12 +66,12 @@ static void cull_tri( struct draw_stage *stage,
const float ey = v0[1] - v2[1];
const float fx = v1[0] - v2[0];
const float fy = v1[1] - v2[1];
-
+
/* det = cross(e,f).z */
header->det = ex * fy - ey * fx;
if (header->det != 0) {
- /* if det < 0 then Z points toward the camera and the triangle is
+ /* if det < 0 then Z points toward the camera and the triangle is
* counter-clockwise winding.
*/
unsigned ccw = (header->det < 0);
@@ -87,7 +87,7 @@ static void cull_tri( struct draw_stage *stage,
}
-static void cull_first_tri( struct draw_stage *stage,
+static void cull_first_tri( struct draw_stage *stage,
struct prim_header *header )
{
struct cull_stage *cull = cull_stage(stage);
diff --git a/src/gallium/auxiliary/draw/draw_pipe_flatshade.c b/src/gallium/auxiliary/draw/draw_pipe_flatshade.c
index 693f289..cd68036 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_flatshade.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_flatshade.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -122,7 +122,7 @@ static void flatshade_tri_0( struct draw_stage *stage,
tmp.v[2] = dup_vert(stage, header->v[2], 1);
copy_colors2(stage, tmp.v[1], tmp.v[2], tmp.v[0]);
-
+
stage->next->tri( stage->next, &tmp );
}
@@ -140,7 +140,7 @@ static void flatshade_tri_2( struct draw_stage *stage,
tmp.v[2] = header->v[2];
copy_colors2(stage, tmp.v[0], tmp.v[1], tmp.v[2]);
-
+
stage->next->tri( stage->next, &tmp );
}
@@ -160,7 +160,7 @@ static void flatshade_line_0( struct draw_stage *stage,
tmp.v[1] = dup_vert(stage, header->v[1], 0);
copy_colors(stage, tmp.v[1], tmp.v[0]);
-
+
stage->next->line( stage->next, &tmp );
}
@@ -173,7 +173,7 @@ static void flatshade_line_1( struct draw_stage *stage,
tmp.v[1] = header->v[1];
copy_colors(stage, tmp.v[0], tmp.v[1]);
-
+
stage->next->line( stage->next, &tmp );
}
@@ -226,7 +226,7 @@ static void flatshade_first_line( struct draw_stage *stage,
}
-static void flatshade_flush( struct draw_stage *stage,
+static void flatshade_flush( struct draw_stage *stage,
unsigned flags )
{
stage->tri = flatshade_first_tri;
diff --git a/src/gallium/auxiliary/draw/draw_pipe_offset.c b/src/gallium/auxiliary/draw/draw_pipe_offset.c
index 8afbbfa..d79f99f 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_offset.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_offset.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -64,7 +64,7 @@ static void do_offset_tri( struct draw_stage *stage,
struct prim_header *header )
{
const unsigned pos = draw_current_shader_position_output(stage->draw);
- struct offset_stage *offset = offset_stage(stage);
+ struct offset_stage *offset = offset_stage(stage);
float inv_det = 1.0f / header->det;
/* Window coords:
@@ -118,7 +118,7 @@ static void offset_tri( struct draw_stage *stage,
}
-static void offset_first_tri( struct draw_stage *stage,
+static void offset_first_tri( struct draw_stage *stage,
struct prim_header *header )
{
struct offset_stage *offset = offset_stage(stage);
diff --git a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
index f5515c1..6ee05fb 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_pstipple.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -231,7 +231,7 @@ pstip_transform_inst(struct tgsi_transform_context *ctx,
decl.Declaration.Semantic = 1;
decl.Semantic.Name = TGSI_SEMANTIC_POSITION;
decl.Semantic.Index = 0;
- decl.Range.First =
+ decl.Range.First =
decl.Range.Last = wincoordInput;
ctx->emit_declaration(ctx, &decl);
}
@@ -239,14 +239,14 @@ pstip_transform_inst(struct tgsi_transform_context *ctx,
/* declare new sampler */
decl = tgsi_default_full_declaration();
decl.Declaration.File = TGSI_FILE_SAMPLER;
- decl.Range.First =
+ decl.Range.First =
decl.Range.Last = pctx->freeSampler;
ctx->emit_declaration(ctx, &decl);
/* declare new temp regs */
decl = tgsi_default_full_declaration();
decl.Declaration.File = TGSI_FILE_TEMPORARY;
- decl.Range.First =
+ decl.Range.First =
decl.Range.Last = pctx->texTemp;
ctx->emit_declaration(ctx, &decl);
@@ -269,7 +269,7 @@ pstip_transform_inst(struct tgsi_transform_context *ctx,
pctx->firstInstruction = FALSE;
- /*
+ /*
* Insert new MUL/TEX/KILP instructions at start of program
* Take gl_FragCoord, divide by 32 (stipple size), sample the
* texture and kill fragment if needed.
@@ -363,7 +363,7 @@ generate_pstip_fs(struct pstip_stage *pstip)
assert(pstip->fs->sampler_unit < PIPE_MAX_SAMPLERS);
pstip->fs->pstip_fs = pstip->driver_create_fs_state(pstip->pipe, &pstip_fs);
-
+
FREE((void *)pstip_fs.tokens);
if (!pstip->fs->pstip_fs)
@@ -386,7 +386,7 @@ pstip_update_texture(struct pstip_stage *pstip)
uint i, j;
ubyte *data;
- /* XXX: want to avoid flushing just because we use stipple:
+ /* XXX: want to avoid flushing just because we use stipple:
*
* Flush should no longer be necessary if driver is properly
* interleaving drawing and transfers on a given context:
@@ -484,7 +484,7 @@ pstip_create_sampler(struct pstip_stage *pstip)
pstip->sampler_cso = pipe->create_sampler_state(pipe, &sampler);
if (pstip->sampler_cso == NULL)
return FALSE;
-
+
return TRUE;
}
@@ -531,7 +531,7 @@ pstip_first_tri(struct draw_stage *stage, struct prim_header *header)
stage->tri(stage, header);
return;
}
-
+
/* how many samplers? */
/* we'll use sampler/texture[pstip->sampler_unit] for the stipple */
diff --git a/src/gallium/auxiliary/draw/draw_pipe_stipple.c b/src/gallium/auxiliary/draw/draw_pipe_stipple.c
index 4b3f4e7..831a0e7 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_stipple.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_stipple.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -61,7 +61,7 @@ stipple_stage(struct draw_stage *stage)
/**
- * Compute interpolated vertex attributes for 'dst' at position 't'
+ * Compute interpolated vertex attributes for 'dst' at position 't'
* between 'v0' and 'v1'.
* XXX using linear interpolation for all attribs at this time.
*/
@@ -69,7 +69,7 @@ static void
screen_interp( struct draw_context *draw,
struct vertex_header *dst,
float t,
- const struct vertex_header *v0,
+ const struct vertex_header *v0,
const struct vertex_header *v1 )
{
uint attr;
@@ -160,7 +160,7 @@ stipple_line(struct draw_stage *stage, struct prim_header *header)
/* starting an "on" segment */
start = (float) i;
}
- state = result;
+ state = result;
}
}
@@ -197,7 +197,7 @@ stipple_reset_tri(struct draw_stage *stage, struct prim_header *header)
static void
-stipple_first_line(struct draw_stage *stage,
+stipple_first_line(struct draw_stage *stage,
struct prim_header *header)
{
struct stipple_stage *stipple = stipple_stage(stage);
@@ -221,7 +221,7 @@ stipple_flush(struct draw_stage *stage, unsigned flags)
-static void
+static void
stipple_destroy( struct draw_stage *stage )
{
draw_free_temp_verts( stage );
diff --git a/src/gallium/auxiliary/draw/draw_pipe_twoside.c b/src/gallium/auxiliary/draw/draw_pipe_twoside.c
index 9a3f3fe..15f867d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_twoside.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_twoside.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -55,12 +55,12 @@ static INLINE struct twoside_stage *twoside_stage( struct draw_stage *stage )
* Copy back color(s) to front color(s).
*/
static INLINE struct vertex_header *
-copy_bfc( struct twoside_stage *twoside,
+copy_bfc( struct twoside_stage *twoside,
const struct vertex_header *v,
unsigned idx )
-{
+{
struct vertex_header *tmp = dup_vert( &twoside->stage, v, idx );
-
+
if (twoside->attrib_back0) {
COPY_4FV(tmp->data[twoside->attrib_front0],
tmp->data[twoside->attrib_back0]);
@@ -102,7 +102,7 @@ static void twoside_tri( struct draw_stage *stage,
-static void twoside_first_tri( struct draw_stage *stage,
+static void twoside_first_tri( struct draw_stage *stage,
struct prim_header *header )
{
struct twoside_stage *twoside = twoside_stage(stage);
diff --git a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
index d87741b..13a35d3 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_unfilled.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -122,11 +122,11 @@ print_header_flags(unsigned flags)
}
-/* Unfilled tri:
+/* Unfilled tri:
*
* Note edgeflags in the vertex struct is not sufficient as we will
- * need to manipulate them when decomposing primitives.
- *
+ * need to manipulate them when decomposing primitives.
+ *
* We currently keep the vertex edgeflag and primitive edgeflag mask
* separate until the last possible moment.
*/
@@ -136,7 +136,7 @@ static void unfilled_tri( struct draw_stage *stage,
struct unfilled_stage *unfilled = unfilled_stage(stage);
unsigned cw = header->det >= 0.0;
unsigned mode = unfilled->mode[cw];
-
+
if (0)
print_header_flags(header->flags);
@@ -152,11 +152,11 @@ static void unfilled_tri( struct draw_stage *stage,
break;
default:
assert(0);
- }
+ }
}
-static void unfilled_first_tri( struct draw_stage *stage,
+static void unfilled_first_tri( struct draw_stage *stage,
struct prim_header *header )
{
struct unfilled_stage *unfilled = unfilled_stage(stage);
diff --git a/src/gallium/auxiliary/draw/draw_pipe_util.c b/src/gallium/auxiliary/draw/draw_pipe_util.c
index e22e5fe..ede5f10 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_util.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_util.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -86,7 +86,7 @@ boolean draw_alloc_temp_verts( struct draw_stage *stage, unsigned nr )
FREE(store);
return FALSE;
}
-
+
for (i = 0; i < nr; i++)
stage->tmp[i] = (struct vertex_header *)(store + i * MAX_VERTEX_SIZE);
}
@@ -112,7 +112,7 @@ void draw_free_temp_verts( struct draw_stage *stage )
void draw_reset_vertex_ids(struct draw_context *draw)
{
struct draw_stage *stage = draw->pipeline.first;
-
+
while (stage) {
unsigned i;
diff --git a/src/gallium/auxiliary/draw/draw_pipe_validate.c b/src/gallium/auxiliary/draw/draw_pipe_validate.c
index c575a8a..dd14dbc 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_validate.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_validate.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -65,10 +65,10 @@ draw_need_pipeline(const struct draw_context *draw,
const struct pipe_rasterizer_state *rasterizer,
unsigned int prim )
{
- /* If the driver has overridden this, use that version:
+ /* If the driver has overridden this, use that version:
*/
if (draw->render &&
- draw->render->need_pipeline)
+ draw->render->need_pipeline)
{
return draw->render->need_pipeline( draw->render,
rasterizer,
@@ -79,7 +79,7 @@ draw_need_pipeline(const struct draw_context *draw,
* and triggering the pipeline, because we have to trigger the
* pipeline *anyway* if unfilled mode is active.
*/
- if (lines(prim))
+ if (lines(prim))
{
/* line stipple */
if (rasterizer->line_stipple_enable && draw->pipeline.line_stipple)
@@ -115,7 +115,7 @@ draw_need_pipeline(const struct draw_context *draw,
}
- if (triangles(prim))
+ if (triangles(prim))
{
/* polygon stipple */
if (rasterizer->poly_stipple_enable && draw->pipeline.pstipple)
@@ -125,7 +125,7 @@ draw_need_pipeline(const struct draw_context *draw,
if (rasterizer->fill_front != PIPE_POLYGON_MODE_FILL ||
rasterizer->fill_back != PIPE_POLYGON_MODE_FILL)
return TRUE;
-
+
/* polygon offset */
if (rasterizer->offset_point ||
rasterizer->offset_line ||
@@ -139,7 +139,7 @@ draw_need_pipeline(const struct draw_context *draw,
/* polygon cull - this is difficult - hardware can cull just fine
* most of the time (though sometimes CULL_NEITHER is unsupported.
- *
+ *
* Generally this isn't a reason to require the pipeline, though.
*
if (rasterizer->cull_mode)
@@ -236,7 +236,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
draw->pipeline.flatshade->next = next;
next = draw->pipeline.flatshade;
}
-
+
if (rast->offset_point ||
rast->offset_line ||
rast->offset_tri) {
@@ -252,7 +252,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
}
/* Always run the cull stage as we calculate determinant there
- * also.
+ * also.
*
* This can actually be a win as culling out the triangles can lead
* to less work emitting vertices, smaller vertex buffers, etc.
@@ -271,34 +271,34 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
next = draw->pipeline.clip;
}
-
+
draw->pipeline.first = next;
if (0) {
debug_printf("draw pipeline:\n");
- for (next = draw->pipeline.first; next ; next = next->next )
+ for (next = draw->pipeline.first; next ; next = next->next )
debug_printf(" %s\n", next->name);
debug_printf("\n");
}
-
+
return draw->pipeline.first;
}
-static void validate_tri( struct draw_stage *stage,
+static void validate_tri( struct draw_stage *stage,
struct prim_header *header )
{
struct draw_stage *pipeline = validate_pipeline( stage );
pipeline->tri( pipeline, header );
}
-static void validate_line( struct draw_stage *stage,
+static void validate_line( struct draw_stage *stage,
struct prim_header *header )
{
struct draw_stage *pipeline = validate_pipeline( stage );
pipeline->line( pipeline, header );
}
-static void validate_point( struct draw_stage *stage,
+static void validate_point( struct draw_stage *stage,
struct prim_header *header )
{
struct draw_stage *pipeline = validate_pipeline( stage );
@@ -311,7 +311,7 @@ static void validate_reset_stipple_counter( struct draw_stage *stage )
pipeline->reset_stipple_counter( pipeline );
}
-static void validate_flush( struct draw_stage *stage,
+static void validate_flush( struct draw_stage *stage,
unsigned flags )
{
/* May need to pass a backend flush on to the rasterize stage.
diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
index 58c5858..f389af1 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c
@@ -28,7 +28,7 @@
/**
* \file
* Vertex buffer drawing stage.
- *
+ *
* \author Jose Fonseca
* \author Keith Whitwell
*/
@@ -53,14 +53,14 @@ struct vbuf_stage {
struct draw_stage stage; /**< This must be first (base class) */
struct vbuf_render *render;
-
+
const struct vertex_info *vinfo;
-
+
/** Vertex size in bytes */
unsigned vertex_size;
struct translate *translate;
-
+
/* FIXME: we have no guarantee that 'unsigned' is 32bit */
/** Vertices in hardware format */
@@ -68,7 +68,7 @@ struct vbuf_stage {
unsigned *vertex_ptr;
unsigned max_vertices;
unsigned nr_vertices;
-
+
/** Indices */
ushort *indices;
unsigned max_indices;
@@ -97,7 +97,7 @@ static void vbuf_flush_vertices( struct vbuf_stage *vbuf );
static void vbuf_alloc_vertices( struct vbuf_stage *vbuf );
-static INLINE boolean
+static INLINE boolean
overflow( void *map, void *ptr, unsigned bytes, unsigned bufsz )
{
unsigned long used = (unsigned long) ((char *)ptr - (char *)map);
@@ -105,7 +105,7 @@ overflow( void *map, void *ptr, unsigned bytes, unsigned bufsz )
}
-static INLINE void
+static INLINE void
check_space( struct vbuf_stage *vbuf, unsigned nr )
{
if (vbuf->nr_vertices + nr > vbuf->max_vertices ||
@@ -126,22 +126,22 @@ check_space( struct vbuf_stage *vbuf, unsigned nr )
* have a couple of slots at the beginning (1-dword header, 4-dword
* clip pos) that we ignore here. We only use the vertex->data[] fields.
*/
-static INLINE ushort
+static INLINE ushort
emit_vertex( struct vbuf_stage *vbuf,
struct vertex_header *vertex )
{
- if(vertex->vertex_id == UNDEFINED_VERTEX_ID) {
+ if(vertex->vertex_id == UNDEFINED_VERTEX_ID) {
/* Hmm - vertices are emitted one at a time - better make sure
* set_buffer is efficient. Consider a special one-shot mode for
* translate.
*/
- /* Note: we really do want data[0] here, not data[pos]:
+ /* Note: we really do want data[0] here, not data[pos]:
*/
vbuf->translate->set_buffer(vbuf->translate, 0, vertex->data[0], 0, ~0);
vbuf->translate->run(vbuf->translate, 0, 1, 0, vbuf->vertex_ptr);
if (0) draw_dump_emitted_vertex(vbuf->vinfo, (uint8_t *)vbuf->vertex_ptr);
-
+
vbuf->vertex_ptr += vbuf->vertex_size/4;
vertex->vertex_id = vbuf->nr_vertices++;
}
@@ -150,7 +150,7 @@ emit_vertex( struct vbuf_stage *vbuf,
}
-static void
+static void
vbuf_tri( struct draw_stage *stage,
struct prim_header *prim )
{
@@ -165,8 +165,8 @@ vbuf_tri( struct draw_stage *stage,
}
-static void
-vbuf_line( struct draw_stage *stage,
+static void
+vbuf_line( struct draw_stage *stage,
struct prim_header *prim )
{
struct vbuf_stage *vbuf = vbuf_stage( stage );
@@ -176,12 +176,12 @@ vbuf_line( struct draw_stage *stage,
for (i = 0; i < 2; i++) {
vbuf->indices[vbuf->nr_indices++] = emit_vertex( vbuf, prim->v[i] );
- }
+ }
}
-static void
-vbuf_point( struct draw_stage *stage,
+static void
+vbuf_point( struct draw_stage *stage,
struct prim_header *prim )
{
struct vbuf_stage *vbuf = vbuf_stage( stage );
@@ -209,7 +209,7 @@ vbuf_start_prim( struct vbuf_stage *vbuf, uint prim )
vbuf->render->set_primitive(vbuf->render, prim);
/* Must do this after set_primitive() above:
- *
+ *
* XXX: need some state managment to track when this needs to be
* recalculated. The driver should tell us whether there was a
* state change.
@@ -255,7 +255,7 @@ vbuf_start_prim( struct vbuf_stage *vbuf, uint prim )
/* Don't bother with caching at this stage:
*/
if (!vbuf->translate ||
- translate_key_compare(&vbuf->translate->key, &hw_key) != 0)
+ translate_key_compare(&vbuf->translate->key, &hw_key) != 0)
{
translate_key_sanitize(&hw_key);
vbuf->translate = translate_cache_find(vbuf->cache, &hw_key);
@@ -272,7 +272,7 @@ vbuf_start_prim( struct vbuf_stage *vbuf, uint prim )
}
-static void
+static void
vbuf_first_tri( struct draw_stage *stage,
struct prim_header *prim )
{
@@ -285,7 +285,7 @@ vbuf_first_tri( struct draw_stage *stage,
}
-static void
+static void
vbuf_first_line( struct draw_stage *stage,
struct prim_header *prim )
{
@@ -298,7 +298,7 @@ vbuf_first_line( struct draw_stage *stage,
}
-static void
+static void
vbuf_first_point( struct draw_stage *stage,
struct prim_header *prim )
{
@@ -315,26 +315,26 @@ vbuf_first_point( struct draw_stage *stage,
/**
* Flush existing vertex buffer and allocate a new one.
*/
-static void
+static void
vbuf_flush_vertices( struct vbuf_stage *vbuf )
{
if(vbuf->vertices) {
vbuf->render->unmap_vertices( vbuf->render, 0, vbuf->nr_vertices - 1 );
- if (vbuf->nr_indices)
+ if (vbuf->nr_indices)
{
- vbuf->render->draw_elements(vbuf->render,
- vbuf->indices,
+ vbuf->render->draw_elements(vbuf->render,
+ vbuf->indices,
vbuf->nr_indices );
-
+
vbuf->nr_indices = 0;
}
-
+
/* Reset temporary vertices ids */
if(vbuf->nr_vertices)
draw_reset_vertex_ids( vbuf->stage.draw );
-
+
/* Free the vertex buffer */
vbuf->render->release_vertices( vbuf->render );
@@ -342,14 +342,14 @@ vbuf_flush_vertices( struct vbuf_stage *vbuf )
vbuf->vertex_ptr = vbuf->vertices = NULL;
}
}
-
-static void
+
+static void
vbuf_alloc_vertices( struct vbuf_stage *vbuf )
{
assert(!vbuf->nr_indices);
assert(!vbuf->vertices);
-
+
/* Allocate a new vertex buffer */
vbuf->max_vertices = vbuf->render->max_vertex_buffer_bytes / vbuf->vertex_size;
@@ -366,13 +366,13 @@ vbuf_alloc_vertices( struct vbuf_stage *vbuf )
(ushort) vbuf->max_vertices);
vbuf->vertices = (uint *) vbuf->render->map_vertices( vbuf->render );
-
+
vbuf->vertex_ptr = vbuf->vertices;
}
-static void
+static void
vbuf_flush( struct draw_stage *stage, unsigned flags )
{
struct vbuf_stage *vbuf = vbuf_stage( stage );
@@ -385,7 +385,7 @@ vbuf_flush( struct draw_stage *stage, unsigned flags )
}
-static void
+static void
vbuf_reset_stipple_counter( struct draw_stage *stage )
{
/* XXX: Need to do something here for hardware with linestipple.
@@ -400,7 +400,7 @@ static void vbuf_destroy( struct draw_stage *stage )
if(vbuf->indices)
align_free( vbuf->indices );
-
+
if (vbuf->render)
vbuf->render->destroy( vbuf->render );
@@ -420,7 +420,7 @@ struct draw_stage *draw_vbuf_stage( struct draw_context *draw,
struct vbuf_stage *vbuf = CALLOC_STRUCT(vbuf_stage);
if (vbuf == NULL)
goto fail;
-
+
vbuf->stage.draw = draw;
vbuf->stage.name = "vbuf";
vbuf->stage.point = vbuf_first_point;
@@ -429,29 +429,29 @@ struct draw_stage *draw_vbuf_stage( struct draw_context *draw,
vbuf->stage.flush = vbuf_flush;
vbuf->stage.reset_stipple_counter = vbuf_reset_stipple_counter;
vbuf->stage.destroy = vbuf_destroy;
-
+
vbuf->render = render;
vbuf->max_indices = MAX2(render->max_indices, UNDEFINED_VERTEX_ID-1);
- vbuf->indices = (ushort *) align_malloc( vbuf->max_indices *
- sizeof(vbuf->indices[0]),
+ vbuf->indices = (ushort *) align_malloc( vbuf->max_indices *
+ sizeof(vbuf->indices[0]),
16 );
if (!vbuf->indices)
goto fail;
vbuf->cache = translate_cache_create();
- if (!vbuf->cache)
+ if (!vbuf->cache)
goto fail;
-
-
+
+
vbuf->vertices = NULL;
vbuf->vertex_ptr = vbuf->vertices;
-
+
return &vbuf->stage;
fail:
if (vbuf)
vbuf_destroy(&vbuf->stage);
-
+
return NULL;
}
diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c
index 98da9cf..b753ab1 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -149,7 +149,7 @@ static void wideline_line( struct draw_stage *stage,
}
-static void wideline_first_line( struct draw_stage *stage,
+static void wideline_first_line( struct draw_stage *stage,
struct prim_header *header )
{
struct draw_context *draw = stage->draw;
diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
index 3646c6a..82acc9d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_wide_point.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -142,7 +142,7 @@ static void widepoint_point( struct draw_stage *stage,
/* point size is either per-vertex or fixed size */
if (wide->psize_slot >= 0) {
half_size = header->v[0]->data[wide->psize_slot][0];
- half_size *= 0.5f;
+ half_size *= 0.5f;
}
else {
half_size = wide->half_point_size;
@@ -190,7 +190,7 @@ static void widepoint_point( struct draw_stage *stage,
static void
-widepoint_first_point(struct draw_stage *stage,
+widepoint_first_point(struct draw_stage *stage,
struct prim_header *header)
{
struct widepoint_stage *wide = widepoint_stage(stage);
@@ -280,7 +280,7 @@ widepoint_first_point(struct draw_stage *stage,
}
}
}
-
+
stage->point( stage, header );
}
@@ -341,6 +341,6 @@ struct draw_stage *draw_wide_point_stage( struct draw_context *draw )
fail:
if (wide)
wide->stage.destroy( &wide->stage );
-
+
return NULL;
}
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 06ed4d6..56bb2aa 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -63,7 +63,7 @@ struct tgsi_sampler;
/**
* Basic vertex info.
- * Carry some useful information around with the vertices in the prim pipe.
+ * Carry some useful information around with the vertices in the prim pipe.
*/
struct vertex_header {
unsigned clipmask:12;
@@ -96,7 +96,7 @@ struct draw_context
struct {
struct draw_stage *first; /**< one of the following */
- struct draw_stage *validate;
+ struct draw_stage *validate;
/* stages (in logical order) */
struct draw_stage *flatshade;
@@ -160,18 +160,18 @@ struct draw_context
int eltBias;
unsigned min_index;
unsigned max_index;
-
+
/** vertex arrays */
const void *vbuffer[PIPE_MAX_ATTRIBS];
-
+
/** constant buffers (for vertex/geometry shader) */
const void *vs_constants[PIPE_MAX_CONSTANT_BUFFERS];
unsigned vs_constants_size[PIPE_MAX_CONSTANT_BUFFERS];
const void *gs_constants[PIPE_MAX_CONSTANT_BUFFERS];
unsigned gs_constants_size[PIPE_MAX_CONSTANT_BUFFERS];
-
+
/* pointer to planes */
- float (*planes)[12][4];
+ float (*planes)[12][4];
} user;
boolean test_fse; /* enable FSE even though its not correct (eg for softpipe) */
@@ -225,7 +225,7 @@ struct draw_context
/* Here's another one:
*/
- struct aos_machine *aos_machine;
+ struct aos_machine *aos_machine;
const void *aligned_constants[PIPE_MAX_CONSTANT_BUFFERS];
@@ -340,7 +340,7 @@ boolean draw_init(struct draw_context *draw);
boolean draw_vs_init( struct draw_context *draw );
void draw_vs_destroy( struct draw_context *draw );
-void draw_vs_set_viewport( struct draw_context *,
+void draw_vs_set_viewport( struct draw_context *,
const struct pipe_viewport_state * );
void
@@ -384,7 +384,7 @@ void draw_pt_reset_vertex_ids( struct draw_context *draw );
/*******************************************************************************
- * Primitive processing (pipeline) code:
+ * Primitive processing (pipeline) code:
*/
boolean draw_pipeline_init( struct draw_context *draw );
@@ -415,13 +415,13 @@ void draw_pipeline_run_linear( struct draw_context *draw,
-void draw_pipeline_flush( struct draw_context *draw,
+void draw_pipeline_flush( struct draw_context *draw,
unsigned flags );
/*******************************************************************************
- * Flushing
+ * Flushing
*/
#define DRAW_FLUSH_STATE_CHANGE 0x8
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index 4078b2a..2cf0bbc 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -48,13 +48,13 @@ DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", FALSE)
/* Overall we split things into:
* - frontend -- prepare fetch_elts, draw_elts - eg vsplit
* - middle -- fetch, shade, cliptest, viewport
- * - pipeline -- the prim pipeline: clipping, wide lines, etc
+ * - pipeline -- the prim pipeline: clipping, wide lines, etc
* - backend -- the vbuf_render provided by the driver.
*/
static boolean
-draw_pt_arrays(struct draw_context *draw,
+draw_pt_arrays(struct draw_context *draw,
unsigned prim,
- unsigned start,
+ unsigned start,
unsigned count)
{
struct draw_pt_front_end *frontend = NULL;
@@ -72,7 +72,7 @@ draw_pt_arrays(struct draw_context *draw,
}
if (!draw->force_passthrough) {
- unsigned gs_out_prim = (draw->gs.geometry_shader ?
+ unsigned gs_out_prim = (draw->gs.geometry_shader ?
draw->gs.geometry_shader->output_primitive :
prim);
diff --git a/src/gallium/auxiliary/draw/draw_pt.h b/src/gallium/auxiliary/draw/draw_pt.h
index 5fbb424..9ee7ce9 100644
--- a/src/gallium/auxiliary/draw/draw_pt.h
+++ b/src/gallium/auxiliary/draw/draw_pt.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -128,7 +128,7 @@ struct vbuf_render;
struct vertex_header;
-/* Frontends:
+/* Frontends:
*
* Currently only the general-purpose vsplit implementation.
*/
@@ -234,7 +234,7 @@ void draw_pt_post_vs_destroy( struct pt_post_vs *pvs );
/*******************************************************************************
- * Utils:
+ * Utils:
*/
void draw_pt_split_prim(unsigned prim, unsigned *first, unsigned *incr);
unsigned draw_pt_trim_count(unsigned count, unsigned first, unsigned incr);
diff --git a/src/gallium/auxiliary/draw/draw_pt_emit.c b/src/gallium/auxiliary/draw/draw_pt_emit.c
index c8dfc16..d91e0c3 100644
--- a/src/gallium/auxiliary/draw/draw_pt_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_emit.c
@@ -55,8 +55,8 @@ void draw_pt_emit_prepare( struct pt_emit *emit,
struct translate_key hw_key;
unsigned i;
boolean ok;
-
- /* XXX: need to flush to get prim_vbuf.c to release its allocation??
+
+ /* XXX: need to flush to get prim_vbuf.c to release its allocation??
*/
draw_do_flush( draw, DRAW_FLUSH_BACKEND );
@@ -118,7 +118,7 @@ void draw_pt_emit_prepare( struct pt_emit *emit,
emit->translate = translate_cache_find(emit->cache, &hw_key);
}
- *max_vertices = (draw->render->max_vertex_buffer_bytes /
+ *max_vertices = (draw->render->max_vertex_buffer_bytes /
(vinfo->size * 4));
}
@@ -137,7 +137,7 @@ void draw_pt_emit( struct pt_emit *emit,
unsigned start, i;
void *hw_verts;
- /* XXX: need to flush to get prim_vbuf.c to release its allocation??
+ /* XXX: need to flush to get prim_vbuf.c to release its allocation??
*/
draw_do_flush( draw, DRAW_FLUSH_BACKEND );
@@ -162,27 +162,27 @@ void draw_pt_emit( struct pt_emit *emit,
return;
}
- translate->set_buffer(translate,
- 0,
+ translate->set_buffer(translate,
+ 0,
vertex_data,
stride,
~0);
- translate->set_buffer(translate,
- 1,
+ translate->set_buffer(translate,
+ 1,
&draw->rasterizer->point_size,
0,
~0);
/* fetch/translate vertex attribs to fill hw_verts[] */
translate->run( translate,
- 0,
+ 0,
vertex_count,
draw->instance_id,
hw_verts );
- render->unmap_vertices( render,
- 0,
+ render->unmap_vertices( render,
+ 0,
vertex_count - 1 );
for (start = i = 0;
@@ -214,14 +214,14 @@ void draw_pt_emit_linear(struct pt_emit *emit,
#if 0
debug_printf("Linear emit\n");
#endif
- /* XXX: need to flush to get prim_vbuf.c to release its allocation??
+ /* XXX: need to flush to get prim_vbuf.c to release its allocation??
*/
draw_do_flush( draw, DRAW_FLUSH_BACKEND );
/* XXX: and work out some way to coordinate the render primitive
* between vbuf.c and here...
*/
- if (!draw->render->set_primitive(draw->render, emit->prim))
+ if (!draw->render->set_primitive(draw->render, emit->prim))
goto fail;
if (!render->allocate_vertices(render,
@@ -250,8 +250,8 @@ void draw_pt_emit_linear(struct pt_emit *emit,
unsigned i;
for (i = 0; i < count; i++) {
debug_printf("\n\n%s vertex %d:\n", __FUNCTION__, i);
- draw_dump_emitted_vertex( emit->vinfo,
- (const uint8_t *)hw_verts +
+ draw_dump_emitted_vertex( emit->vinfo,
+ (const uint8_t *)hw_verts +
translate->key.output_stride * i );
}
}
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c
index ae12ee2..86578bd 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c
@@ -134,16 +134,16 @@ void draw_pt_fetch_run( struct pt_fetch *fetch,
unsigned i;
for (i = 0; i < draw->pt.nr_vertex_buffers; i++) {
- translate->set_buffer(translate,
- i,
- ((char *)draw->pt.user.vbuffer[i] +
+ translate->set_buffer(translate,
+ i,
+ ((char *)draw->pt.user.vbuffer[i] +
draw->pt.vertex_buffer[i].buffer_offset),
draw->pt.vertex_buffer[i].stride,
draw->pt.vertex_buffer[i].max_index);
}
translate->run_elts( translate,
- elts,
+ elts,
count,
draw->instance_id,
verts );
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
index e706b77..d8b9498 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -40,15 +40,15 @@
#include "translate/translate.h"
#include "translate/translate_cache.h"
-/* The simplest 'middle end' in the new vertex code.
- *
+/* The simplest 'middle end' in the new vertex code.
+ *
* The responsibilities of a middle end are to:
* - perform vertex fetch using
* - draw vertex element/buffer state
* - a list of fetch indices we received as an input
* - run the vertex shader
- * - cliptest,
- * - clip coord calculation
+ * - cliptest,
+ * - clip coord calculation
* - viewport transformation
* - if necessary, run the primitive pipeline, passing it:
* - a linear array of vertex_header vertices constructed here
@@ -75,7 +75,7 @@
struct fetch_emit_middle_end {
struct draw_pt_middle_end base;
struct draw_context *draw;
-
+
struct translate *translate;
const struct vertex_info *vinfo;
@@ -101,24 +101,24 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle,
boolean ok;
struct translate_key key;
- unsigned gs_out_prim = (draw->gs.geometry_shader ?
+ unsigned gs_out_prim = (draw->gs.geometry_shader ?
draw->gs.geometry_shader->output_primitive :
prim);
- ok = draw->render->set_primitive( draw->render,
+ ok = draw->render->set_primitive( draw->render,
gs_out_prim );
if (!ok) {
assert(0);
return;
}
-
+
/* Must do this after set_primitive() above:
*/
vinfo = feme->vinfo = draw->render->get_vertex_info(draw->render);
-
-
+
+
/* Transform from API vertices to HW vertices, skipping the
* pipeline_vertex intermediate step.
@@ -154,7 +154,7 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle,
key.element[i].instance_divisor = src->instance_divisor;
key.element[i].output_format = output_format;
key.element[i].output_offset = dst_offset;
-
+
dst_offset += emit_sz;
}
@@ -164,32 +164,32 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle,
/* Don't bother with caching at this stage:
*/
if (!feme->translate ||
- translate_key_compare(&feme->translate->key, &key) != 0)
+ translate_key_compare(&feme->translate->key, &key) != 0)
{
translate_key_sanitize(&key);
feme->translate = translate_cache_find(feme->cache,
&key);
- feme->translate->set_buffer(feme->translate,
- draw->pt.nr_vertex_buffers,
+ feme->translate->set_buffer(feme->translate,
+ draw->pt.nr_vertex_buffers,
&feme->point_size,
0,
~0);
}
-
+
feme->point_size = draw->rasterizer->point_size;
for (i = 0; i < draw->pt.nr_vertex_buffers; i++) {
- feme->translate->set_buffer(feme->translate,
- i,
- ((char *)draw->pt.user.vbuffer[i] +
+ feme->translate->set_buffer(feme->translate,
+ i,
+ ((char *)draw->pt.user.vbuffer[i] +
draw->pt.vertex_buffer[i].buffer_offset),
draw->pt.vertex_buffer[i].stride,
draw->pt.vertex_buffer[i].max_index);
}
- *max_vertices = (draw->render->max_vertex_buffer_bytes /
+ *max_vertices = (draw->render->max_vertex_buffer_bytes /
(vinfo->size * 4));
}
@@ -207,8 +207,8 @@ static void fetch_emit_run( struct draw_pt_middle_end *middle,
struct fetch_emit_middle_end *feme = (struct fetch_emit_middle_end *)middle;
struct draw_context *draw = feme->draw;
void *hw_verts;
-
- /* XXX: need to flush to get prim_vbuf.c to release its allocation??
+
+ /* XXX: need to flush to get prim_vbuf.c to release its allocation??
*/
draw_do_flush( draw, DRAW_FLUSH_BACKEND );
@@ -221,11 +221,11 @@ static void fetch_emit_run( struct draw_pt_middle_end *middle,
assert(0);
return;
}
-
-
+
+
/* Single routine to fetch vertices and emit HW verts.
*/
- feme->translate->run_elts( feme->translate,
+ feme->translate->run_elts( feme->translate,
fetch_elts,
fetch_count,
draw->instance_id,
@@ -235,23 +235,23 @@ static void fetch_emit_run( struct draw_pt_middle_end *middle,
unsigned i;
for (i = 0; i < fetch_count; i++) {
debug_printf("\n\nvertex %d:\n", i);
- draw_dump_emitted_vertex( feme->vinfo,
+ draw_dump_emitted_vertex( feme->vinfo,
(const uint8_t *)hw_verts + feme->vinfo->size * 4 * i );
}
}
- draw->render->unmap_vertices( draw->render,
- 0,
+ draw->render->unmap_vertices( draw->render,
+ 0,
(ushort)(fetch_count - 1) );
/* XXX: Draw arrays path to avoid re-emitting index list again and
* again.
*/
- draw->render->draw_elements( draw->render,
- draw_elts,
+ draw->render->draw_elements( draw->render,
+ draw_elts,
draw_count );
- /* Done -- that was easy, wasn't it:
+ /* Done -- that was easy, wasn't it:
*/
draw->render->release_vertices( draw->render );
@@ -273,11 +273,11 @@ static void fetch_emit_run_linear( struct draw_pt_middle_end *middle,
if (!draw->render->allocate_vertices( draw->render,
(ushort)feme->translate->key.output_stride,
- (ushort)count ))
+ (ushort)count ))
goto fail;
hw_verts = draw->render->map_vertices( draw->render );
- if (!hw_verts)
+ if (!hw_verts)
goto fail;
/* Single routine to fetch vertices and emit HW verts.
@@ -336,7 +336,7 @@ static boolean fetch_emit_run_linear_elts( struct draw_pt_middle_end *middle,
return FALSE;
hw_verts = draw->render->map_vertices( draw->render );
- if (!hw_verts)
+ if (!hw_verts)
return FALSE;
/* Single routine to fetch vertices and emit HW verts.
@@ -352,8 +352,8 @@ static boolean fetch_emit_run_linear_elts( struct draw_pt_middle_end *middle,
/* XXX: Draw arrays path to avoid re-emitting index list again and
* again.
*/
- draw->render->draw_elements( draw->render,
- draw_elts,
+ draw->render->draw_elements( draw->render,
+ draw_elts,
draw_count );
/* Done -- that was easy, wasn't it:
@@ -402,7 +402,7 @@ struct draw_pt_middle_end *draw_pt_fetch_emit( struct draw_context *draw )
fetch_emit->base.destroy = fetch_emit_destroy;
fetch_emit->draw = draw;
-
+
return &fetch_emit->base;
}
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 7c198c6..73a8517 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -105,7 +105,7 @@ static void fse_prepare( struct draw_pt_middle_end *middle,
fse->key.clip = draw->clip_xy || draw->clip_z || draw->clip_user;
fse->key.const_vbuffers = 0;
- memset(fse->key.element, 0,
+ memset(fse->key.element, 0,
fse->key.nr_elements * sizeof(fse->key.element[0]));
for (i = 0; i < num_vs_inputs; i++) {
@@ -119,14 +119,14 @@ static void fse_prepare( struct draw_pt_middle_end *middle,
fse->key.element[i].in.offset = src->src_offset;
nr_vbs = MAX2(nr_vbs, src->vertex_buffer_index + 1);
}
-
+
for (i = 0; i < 5 && i < nr_vbs; i++) {
if (draw->pt.vertex_buffer[i].stride == 0)
fse->key.const_vbuffers |= (1<key.const_vbuffers);
-
+
{
unsigned dst_offset = 0;
@@ -143,14 +143,14 @@ static void fse_prepare( struct draw_pt_middle_end *middle,
fse->key.element[i].out.format = vinfo->attrib[i].emit;
fse->key.element[i].out.vs_output = vinfo->attrib[i].src_index;
fse->key.element[i].out.offset = dst_offset;
-
+
dst_offset += emit_sz;
assert(fse->key.output_stride >= dst_offset);
}
}
-
- fse->active = draw_vs_lookup_varient( draw->vs.vertex_shader,
+
+ fse->active = draw_vs_lookup_varient( draw->vs.vertex_shader,
&fse->key );
if (!fse->active) {
@@ -158,21 +158,21 @@ static void fse_prepare( struct draw_pt_middle_end *middle,
return ;
}
- if (0) debug_printf("%s: found const_vbuffers: %x\n", __FUNCTION__,
+ if (0) debug_printf("%s: found const_vbuffers: %x\n", __FUNCTION__,
fse->active->key.const_vbuffers);
/* Now set buffer pointers:
*/
for (i = 0; i < draw->pt.nr_vertex_buffers; i++) {
- fse->active->set_buffer( fse->active,
- i,
- ((const ubyte *) draw->pt.user.vbuffer[i] +
+ fse->active->set_buffer( fse->active,
+ i,
+ ((const ubyte *) draw->pt.user.vbuffer[i] +
draw->pt.vertex_buffer[i].buffer_offset),
draw->pt.vertex_buffer[i].stride,
draw->pt.vertex_buffer[i].max_index );
}
- *max_vertices = (draw->render->max_vertex_buffer_bytes /
+ *max_vertices = (draw->render->max_vertex_buffer_bytes /
(vinfo->size * 4));
/* Probably need to do this somewhere (or fix exec shader not to
@@ -186,8 +186,8 @@ static void fse_prepare( struct draw_pt_middle_end *middle,
-static void fse_run_linear( struct draw_pt_middle_end *middle,
- unsigned start,
+static void fse_run_linear( struct draw_pt_middle_end *middle,
+ unsigned start,
unsigned count,
unsigned prim_flags )
{
@@ -212,7 +212,7 @@ static void fse_run_linear( struct draw_pt_middle_end *middle,
* Clipping is done elsewhere -- either by the API or on hardware,
* or for some other reason not required...
*/
- fse->active->run_linear( fse->active,
+ fse->active->run_linear( fse->active,
start, count,
hw_verts );
@@ -224,11 +224,11 @@ static void fse_run_linear( struct draw_pt_middle_end *middle,
fse->key.output_stride,
fse->key.output_stride * i);
- draw_dump_emitted_vertex( fse->vinfo,
+ draw_dump_emitted_vertex( fse->vinfo,
(const uint8_t *)hw_verts + fse->key.output_stride * i );
}
}
-
+
draw->render->unmap_vertices( draw->render, 0, (ushort)(count - 1) );
/* Draw arrays path to avoid re-emitting index list again and
@@ -237,7 +237,7 @@ static void fse_run_linear( struct draw_pt_middle_end *middle,
draw->render->draw_arrays( draw->render,
0,
count );
-
+
draw->render->release_vertices( draw->render );
@@ -260,8 +260,8 @@ fse_run(struct draw_pt_middle_end *middle,
struct fetch_shade_emit *fse = (struct fetch_shade_emit *)middle;
struct draw_context *draw = fse->draw;
void *hw_verts;
-
- /* XXX: need to flush to get prim_vbuf.c to release its allocation??
+
+ /* XXX: need to flush to get prim_vbuf.c to release its allocation??
*/
draw_do_flush( draw, DRAW_FLUSH_BACKEND );
@@ -270,14 +270,14 @@ fse_run(struct draw_pt_middle_end *middle,
(ushort)fetch_count ))
goto fail;
- hw_verts = draw->render->map_vertices( draw->render );
- if (!hw_verts)
+ hw_verts = draw->render->map_vertices( draw->render );
+ if (!hw_verts)
goto fail;
-
-
+
+
/* Single routine to fetch vertices, run shader and emit HW verts.
*/
- fse->active->run_elts( fse->active,
+ fse->active->run_elts( fse->active,
fetch_elts,
fetch_count,
hw_verts );
@@ -287,16 +287,16 @@ fse_run(struct draw_pt_middle_end *middle,
unsigned i;
for (i = 0; i < fetch_count; i++) {
debug_printf("\n\n%s vertex %d:\n", __FUNCTION__, i);
- draw_dump_emitted_vertex( fse->vinfo,
- (const uint8_t *)hw_verts +
+ draw_dump_emitted_vertex( fse->vinfo,
+ (const uint8_t *)hw_verts +
fse->key.output_stride * i );
}
}
draw->render->unmap_vertices( draw->render, 0, (ushort)(fetch_count - 1) );
-
- draw->render->draw_elements( draw->render,
- draw_elts,
+
+ draw->render->draw_elements( draw->render,
+ draw_elts,
draw_count );
@@ -310,8 +310,8 @@ fse_run(struct draw_pt_middle_end *middle,
-static boolean fse_run_linear_elts( struct draw_pt_middle_end *middle,
- unsigned start,
+static boolean fse_run_linear_elts( struct draw_pt_middle_end *middle,
+ unsigned start,
unsigned count,
const ushort *draw_elts,
unsigned draw_count,
@@ -331,22 +331,22 @@ static boolean fse_run_linear_elts( struct draw_pt_middle_end *middle,
return FALSE;
hw_verts = draw->render->map_vertices( draw->render );
- if (!hw_verts)
+ if (!hw_verts)
return FALSE;
/* Single routine to fetch vertices, run shader and emit HW verts.
* Clipping is done elsewhere -- either by the API or on hardware,
* or for some other reason not required...
*/
- fse->active->run_linear( fse->active,
+ fse->active->run_linear( fse->active,
start, count,
hw_verts );
- draw->render->draw_elements( draw->render,
- draw_elts,
+ draw->render->draw_elements( draw->render,
+ draw_elts,
draw_count );
-
+
draw->render->unmap_vertices( draw->render, 0, (ushort)(count - 1) );
@@ -363,7 +363,7 @@ static void fse_finish( struct draw_pt_middle_end *middle )
static void
-fse_destroy( struct draw_pt_middle_end *middle )
+fse_destroy( struct draw_pt_middle_end *middle )
{
FREE(middle);
}
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 b72fd61..cab2f3c 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
@@ -62,7 +62,7 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle,
unsigned i;
unsigned instance_id_index = ~0;
- unsigned gs_out_prim = (draw->gs.geometry_shader ?
+ unsigned gs_out_prim = (draw->gs.geometry_shader ?
draw->gs.geometry_shader->output_primitive :
prim);
@@ -86,13 +86,13 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle,
/* Always leave room for the vertex header whether we need it or
* not. It's hard to get rid of it in particular because of the
- * viewport code in draw_pt_post_vs.c.
+ * viewport code in draw_pt_post_vs.c.
*/
fpme->vertex_size = sizeof(struct vertex_header) + nr * 4 * sizeof(float);
-
- draw_pt_fetch_prepare( fpme->fetch,
+
+ draw_pt_fetch_prepare( fpme->fetch,
vs->info.num_inputs,
fpme->vertex_size,
instance_id_index );
@@ -174,7 +174,7 @@ static void emit(struct pt_emit *emit,
static void draw_vertex_shader_run(struct draw_vertex_shader *vshader,
- const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
+ const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
unsigned const_size[PIPE_MAX_CONSTANT_BUFFERS],
const struct draw_vertex_info *input_verts,
struct draw_vertex_info *output_verts )
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 2e3afb2..5b96911 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
@@ -73,7 +73,7 @@ llvm_middle_end_prepare( struct draw_pt_middle_end *middle,
struct draw_llvm_variant_list_item *li;
unsigned i;
unsigned instance_id_index = ~0;
- const unsigned out_prim = (draw->gs.geometry_shader ?
+ const unsigned out_prim = (draw->gs.geometry_shader ?
draw->gs.geometry_shader->output_primitive :
in_prim);
@@ -130,7 +130,7 @@ llvm_middle_end_prepare( struct draw_pt_middle_end *middle,
/* return even number */
*max_vertices = *max_vertices & ~1;
-
+
key = draw_llvm_make_variant_key(fpme->llvm, store);
/* Search shader's list of variants for the key */
@@ -186,7 +186,7 @@ llvm_middle_end_prepare( struct draw_pt_middle_end *middle,
(float (*) [12][4]) draw->pt.user.planes[0];
fpme->llvm->jit_context.viewport =
(float *)draw->viewport.scale;
-
+
}
diff --git a/src/gallium/auxiliary/draw/draw_pt_post_vs.c b/src/gallium/auxiliary/draw/draw_pt_post_vs.c
index 769409c..0f85008 100644
--- a/src/gallium/auxiliary/draw/draw_pt_post_vs.c
+++ b/src/gallium/auxiliary/draw/draw_pt_post_vs.c
@@ -128,7 +128,7 @@ void draw_pt_post_vs_prepare( struct pt_post_vs *pvs,
if (clip_xy)
pvs->flags |= DO_CLIP_XY;
-
+
if (clip_z && opengl) {
pvs->flags |= DO_CLIP_FULL_Z;
ASSIGN_4V( pvs->draw->plane[4], 0, 0, 1, 1 );
@@ -179,7 +179,7 @@ void draw_pt_post_vs_prepare( struct pt_post_vs *pvs,
DO_VIEWPORT | DO_EDGEFLAG):
pvs->run = do_cliptest_xy_fullz_user_viewport_edgeflag;
break;
-
+
default:
pvs->run = do_cliptest_generic;
break;
diff --git a/src/gallium/auxiliary/draw/draw_pt_util.c b/src/gallium/auxiliary/draw/draw_pt_util.c
index 513bbbe..413ed87 100644
--- a/src/gallium/auxiliary/draw/draw_pt_util.c
+++ b/src/gallium/auxiliary/draw/draw_pt_util.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
diff --git a/src/gallium/auxiliary/draw/draw_vbuf.h b/src/gallium/auxiliary/draw/draw_vbuf.h
index e32803c..b84d3ca 100644
--- a/src/gallium/auxiliary/draw/draw_vbuf.h
+++ b/src/gallium/auxiliary/draw/draw_vbuf.h
@@ -28,7 +28,7 @@
/**
* \file
* Vertex buffer drawing stage.
- *
+ *
* \author Keith Whitwell
* \author Jose Fonseca
*/
@@ -70,11 +70,11 @@ struct vbuf_render {
/**
* Get the hardware vertex format.
- *
+ *
* XXX: have this in draw_context instead?
- */
+ */
const struct vertex_info *(*get_vertex_info)( struct vbuf_render * );
-
+
/**
* Request a destination for vertices.
* Hardware renderers will use ttm memory, others will just malloc
@@ -83,9 +83,9 @@ struct vbuf_render {
boolean (*allocate_vertices)( struct vbuf_render *,
ushort vertex_size,
ushort nr_vertices );
-
+
void *(*map_vertices)( struct vbuf_render * );
- void (*unmap_vertices)( struct vbuf_render *,
+ void (*unmap_vertices)( struct vbuf_render *,
ushort min_index,
ushort max_index );
diff --git a/src/gallium/auxiliary/draw/draw_vertex.c b/src/gallium/auxiliary/draw/draw_vertex.c
index a4f5e88..605acf0 100644
--- a/src/gallium/auxiliary/draw/draw_vertex.c
+++ b/src/gallium/auxiliary/draw/draw_vertex.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
diff --git a/src/gallium/auxiliary/draw/draw_vertex.h b/src/gallium/auxiliary/draw/draw_vertex.h
index e63cf5f..0d211ba 100644
--- a/src/gallium/auxiliary/draw/draw_vertex.h
+++ b/src/gallium/auxiliary/draw/draw_vertex.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -79,7 +79,7 @@ struct vertex_info
uint num_attribs;
uint hwfmt[4]; /**< hardware format info for this format */
uint size; /**< total vertex size in dwords */
-
+
/* Keep this small and at the end of the struct to allow quick
* memcmp() comparisons.
*/
@@ -122,7 +122,7 @@ draw_vinfo_copy( struct vertex_info *dst,
*/
static INLINE uint
draw_emit_vertex_attr(struct vertex_info *vinfo,
- enum attrib_emit emit,
+ enum attrib_emit emit,
enum interp_mode interp, /* only used by softpipe??? */
uint src_index)
{
@@ -138,7 +138,7 @@ draw_emit_vertex_attr(struct vertex_info *vinfo,
extern void draw_compute_vertex_size(struct vertex_info *vinfo);
-void draw_dump_emitted_vertex(const struct vertex_info *vinfo,
+void draw_dump_emitted_vertex(const struct vertex_info *vinfo,
const uint8_t *data);
diff --git a/src/gallium/auxiliary/draw/draw_vs.c b/src/gallium/auxiliary/draw/draw_vs.c
index 032c06b..e9060e7 100644
--- a/src/gallium/auxiliary/draw/draw_vs.c
+++ b/src/gallium/auxiliary/draw/draw_vs.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -143,8 +143,8 @@ draw_bind_vertex_shader(struct draw_context *draw,
struct draw_vertex_shader *dvs)
{
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
-
- if (dvs)
+
+ if (dvs)
{
draw->vs.vertex_shader = dvs;
draw->vs.num_vs_outputs = dvs->info.num_outputs;
@@ -165,7 +165,7 @@ draw_delete_vertex_shader(struct draw_context *draw,
{
unsigned i;
- for (i = 0; i < dvs->nr_varients; i++)
+ for (i = 0; i < dvs->nr_varients; i++)
dvs->varient[i]->destroy( dvs->varient[i] );
dvs->nr_varients = 0;
@@ -175,7 +175,7 @@ draw_delete_vertex_shader(struct draw_context *draw,
-boolean
+boolean
draw_vs_init( struct draw_context *draw )
{
draw->dump_vs = debug_get_option_gallium_dump_vs();
@@ -185,11 +185,11 @@ draw_vs_init( struct draw_context *draw )
return FALSE;
draw->vs.emit_cache = translate_cache_create();
- if (!draw->vs.emit_cache)
+ if (!draw->vs.emit_cache)
return FALSE;
-
+
draw->vs.fetch_cache = translate_cache_create();
- if (!draw->vs.fetch_cache)
+ if (!draw->vs.fetch_cache)
return FALSE;
draw->vs.aos_machine = draw_vs_aos_machine();
@@ -197,7 +197,7 @@ draw_vs_init( struct draw_context *draw )
if (!draw->vs.aos_machine)
return FALSE;
#endif
-
+
return TRUE;
}
@@ -232,19 +232,19 @@ draw_vs_lookup_varient( struct draw_vertex_shader *vs,
struct draw_vs_varient *varient;
unsigned i;
- /* Lookup existing varient:
+ /* Lookup existing varient:
*/
for (i = 0; i < vs->nr_varients; i++)
if (draw_vs_varient_key_compare(key, &vs->varient[i]->key) == 0)
return vs->varient[i];
-
- /* Else have to create a new one:
+
+ /* Else have to create a new one:
*/
varient = vs->create_varient( vs, key );
if (varient == NULL)
return NULL;
- /* Add it to our list, could be smarter:
+ /* Add it to our list, could be smarter:
*/
if (vs->nr_varients < Elements(vs->varient)) {
vs->varient[vs->nr_varients++] = varient;
@@ -256,7 +256,7 @@ draw_vs_lookup_varient( struct draw_vertex_shader *vs,
vs->varient[vs->last_varient] = varient;
}
- /* Done
+ /* Done
*/
return varient;
}
@@ -267,12 +267,12 @@ draw_vs_get_fetch( struct draw_context *draw,
struct translate_key *key )
{
if (!draw->vs.fetch ||
- translate_key_compare(&draw->vs.fetch->key, key) != 0)
+ translate_key_compare(&draw->vs.fetch->key, key) != 0)
{
translate_key_sanitize(key);
draw->vs.fetch = translate_cache_find(draw->vs.fetch_cache, key);
}
-
+
return draw->vs.fetch;
}
@@ -281,11 +281,11 @@ draw_vs_get_emit( struct draw_context *draw,
struct translate_key *key )
{
if (!draw->vs.emit ||
- translate_key_compare(&draw->vs.emit->key, key) != 0)
+ translate_key_compare(&draw->vs.emit->key, key) != 0)
{
translate_key_sanitize(key);
draw->vs.emit = translate_cache_find(draw->vs.emit_cache, key);
}
-
+
return draw->vs.emit;
}
diff --git a/src/gallium/auxiliary/draw/draw_vs.h b/src/gallium/auxiliary/draw/draw_vs.h
index f9a0387..452266a 100644
--- a/src/gallium/auxiliary/draw/draw_vs.h
+++ b/src/gallium/auxiliary/draw/draw_vs.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -38,11 +38,11 @@
struct draw_context;
struct pipe_shader_state;
-struct draw_varient_input
+struct draw_varient_input
{
enum pipe_format format;
unsigned buffer;
- unsigned offset;
+ unsigned offset;
unsigned instance_divisor;
};
@@ -115,7 +115,7 @@ struct draw_vertex_shader {
*/
const float (*immediates)[4];
- /*
+ /*
*/
struct draw_vs_varient *varient[16];
unsigned nr_varients;
@@ -226,7 +226,7 @@ void draw_vs_aos_machine_viewport( struct aos_machine *machine,
#define MAX_TGSI_VERTICES 4
-
+
#endif
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c
index 19f49e3..0a68263 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos.c
+++ b/src/gallium/auxiliary/draw/draw_vs_aos.c
@@ -68,7 +68,7 @@ static INLINE boolean eq( struct x86_reg a,
a.mod == b.mod &&
a.disp == b.disp);
}
-
+
struct x86_reg aos_get_x86( struct aos_compilation *cp,
unsigned which_reg, /* quick hack */
unsigned value )
@@ -102,7 +102,7 @@ struct x86_reg aos_get_x86( struct aos_compilation *cp,
}
- x86_mov(cp->func, reg,
+ x86_mov(cp->func, reg,
x86_make_disp(cp->machine_EDX, offset));
cp->x86_reg[which_reg] = value;
@@ -134,11 +134,11 @@ static struct x86_reg get_reg_ptr(struct aos_compilation *cp,
assert(idx < MAX_INTERNALS);
return x86_make_disp(ptr, Offset(struct aos_machine, internal[idx]));
- case TGSI_FILE_IMMEDIATE:
+ case TGSI_FILE_IMMEDIATE:
assert(idx < MAX_IMMEDIATES); /* just a sanity check */
return x86_make_disp(aos_get_x86(cp, 0, X86_IMMEDIATES), idx * 4 * sizeof(float));
- case TGSI_FILE_CONSTANT:
+ case TGSI_FILE_CONSTANT:
assert(idx < MAX_CONSTANTS); /* just a sanity check */
return x86_make_disp(aos_get_x86(cp, 1, X86_CONSTANTS), idx * 4 * sizeof(float));
@@ -147,7 +147,7 @@ static struct x86_reg get_reg_ptr(struct aos_compilation *cp,
return x86_make_reg(0,0);
}
}
-
+
#define X87_CW_EXCEPTION_INV_OP (1<<0)
@@ -184,11 +184,11 @@ static void spill( struct aos_compilation *cp, unsigned idx )
struct x86_reg oldval = get_reg_ptr(cp,
cp->xmm[idx].file,
cp->xmm[idx].idx);
-
- if (0) debug_printf("\nspill %s[%d]",
+
+ if (0) debug_printf("\nspill %s[%d]",
files[cp->xmm[idx].file],
cp->xmm[idx].idx);
-
+
assert(cp->xmm[idx].dirty);
sse_movaps(cp->func, oldval, x86_make_reg(file_XMM, idx));
cp->xmm[idx].dirty = 0;
@@ -201,7 +201,7 @@ void aos_spill_all( struct aos_compilation *cp )
unsigned i;
for (i = 0; i < 8; i++) {
- if (cp->xmm[i].dirty)
+ if (cp->xmm[i].dirty)
spill(cp, i);
aos_release_xmm_reg(cp, i);
}
@@ -226,7 +226,7 @@ static struct x86_reg get_xmm_writable( struct aos_compilation *cp,
static struct x86_reg get_xmm( struct aos_compilation *cp,
struct x86_reg reg )
{
- if (reg.file != file_XMM)
+ if (reg.file != file_XMM)
{
struct x86_reg tmp = aos_get_xmm_reg(cp);
sse_movaps(cp->func, tmp, reg);
@@ -247,7 +247,7 @@ struct x86_reg aos_get_xmm_reg( struct aos_compilation *cp )
unsigned oldest = 0;
boolean found = FALSE;
- for (i = 0; i < 8; i++)
+ for (i = 0; i < 8; i++)
if (cp->xmm[i].last_used != cp->insn_counter &&
cp->xmm[i].file == TGSI_FILE_NULL) {
oldest = i;
@@ -255,14 +255,14 @@ struct x86_reg aos_get_xmm_reg( struct aos_compilation *cp )
}
if (!found) {
- for (i = 0; i < 8; i++)
+ for (i = 0; i < 8; i++)
if (cp->xmm[i].last_used < cp->xmm[oldest].last_used)
oldest = i;
}
/* Need to write out the old value?
*/
- if (cp->xmm[oldest].dirty)
+ if (cp->xmm[oldest].dirty)
spill(cp, oldest);
assert(cp->xmm[oldest].last_used != cp->insn_counter);
@@ -294,7 +294,7 @@ static void aos_soft_release_xmm( struct aos_compilation *cp,
}
-
+
/* Mark an xmm reg as holding the current copy of a shader reg.
*/
void aos_adopt_xmm_reg( struct aos_compilation *cp,
@@ -315,8 +315,8 @@ void aos_adopt_xmm_reg( struct aos_compilation *cp,
* illusion.
*/
for (i = 0; i < 8; i++) {
- if (cp->xmm[i].file == file &&
- cp->xmm[i].idx == idx)
+ if (cp->xmm[i].file == file &&
+ cp->xmm[i].idx == idx)
{
/* If an xmm reg is already holding this shader reg, take into account its
* dirty flag...
@@ -335,7 +335,7 @@ void aos_adopt_xmm_reg( struct aos_compilation *cp,
/* Return a pointer to the in-memory copy of the reg, making sure it is uptodate.
*/
-static struct x86_reg aos_get_shader_reg_ptr( struct aos_compilation *cp,
+static struct x86_reg aos_get_shader_reg_ptr( struct aos_compilation *cp,
unsigned file,
unsigned idx )
{
@@ -344,7 +344,7 @@ static struct x86_reg aos_get_shader_reg_ptr( struct aos_compilation *cp,
/* Ensure the in-memory copy of this reg is up-to-date
*/
for (i = 0; i < 8; i++) {
- if (cp->xmm[i].file == file &&
+ if (cp->xmm[i].file == file &&
cp->xmm[i].idx == idx &&
cp->xmm[i].dirty) {
spill(cp, i);
@@ -358,13 +358,13 @@ static struct x86_reg aos_get_shader_reg_ptr( struct aos_compilation *cp,
/* As above, but return a pointer. Note - this pointer may alias
* those returned by get_arg_ptr().
*/
-static struct x86_reg get_dst_ptr( struct aos_compilation *cp,
+static struct x86_reg get_dst_ptr( struct aos_compilation *cp,
const struct tgsi_full_dst_register *dst )
{
unsigned file = dst->Register.File;
unsigned idx = dst->Register.Index;
unsigned i;
-
+
/* Ensure in-memory copy of this reg is up-to-date and invalidate
* any xmm copies.
@@ -373,9 +373,9 @@ static struct x86_reg get_dst_ptr( struct aos_compilation *cp,
if (cp->xmm[i].file == file &&
cp->xmm[i].idx == idx)
{
- if (cp->xmm[i].dirty)
+ if (cp->xmm[i].dirty)
spill(cp, i);
-
+
aos_release_xmm_reg(cp, i);
}
}
@@ -390,7 +390,7 @@ static struct x86_reg get_dst_ptr( struct aos_compilation *cp,
/* Return an XMM reg if the argument is resident, otherwise return a
* base+offset pointer to the saved value.
*/
-struct x86_reg aos_get_shader_reg( struct aos_compilation *cp,
+struct x86_reg aos_get_shader_reg( struct aos_compilation *cp,
unsigned file,
unsigned idx )
{
@@ -398,7 +398,7 @@ struct x86_reg aos_get_shader_reg( struct aos_compilation *cp,
for (i = 0; i < 8; i++) {
if (cp->xmm[i].file == file &&
- cp->xmm[i].idx == idx)
+ cp->xmm[i].idx == idx)
{
cp->xmm[i].last_used = cp->insn_counter;
return x86_make_reg(file_XMM, i);
@@ -413,7 +413,7 @@ struct x86_reg aos_get_shader_reg( struct aos_compilation *cp,
-static struct x86_reg aos_get_shader_reg_xmm( struct aos_compilation *cp,
+static struct x86_reg aos_get_shader_reg_xmm( struct aos_compilation *cp,
unsigned file,
unsigned idx )
{
@@ -425,7 +425,7 @@ static struct x86_reg aos_get_shader_reg_xmm( struct aos_compilation *cp,
file,
idx,
FALSE );
-
+
return reg;
}
@@ -459,7 +459,7 @@ static void emit_pshufd( struct aos_compilation *cp,
sse2_pshufd(cp->func, dst, arg0, shuf);
}
else {
- if (!eq(dst, arg0))
+ if (!eq(dst, arg0))
sse_movaps(cp->func, dst, arg0);
sse_shufps(cp->func, dst, dst, shuf);
@@ -479,8 +479,8 @@ static boolean mask_write( struct aos_compilation *cp,
{
struct x86_reg imm_swz = aos_get_internal_xmm(cp, IMM_SWZ);
struct x86_reg tmp = aos_get_xmm_reg(cp);
-
- emit_pshufd(cp, tmp, imm_swz,
+
+ emit_pshufd(cp, tmp, imm_swz,
SHUF((mask & 1) ? 2 : 3,
(mask & 2) ? 2 : 3,
(mask & 4) ? 2 : 3,
@@ -521,15 +521,15 @@ static boolean emit_shuf_copy2( struct aos_compilation *cp,
#define SSE_SWIZZLE_NOOP ((0<<0) | (1<<2) | (2<<4) | (3<<6))
-/* Locate a source register and perform any required (simple) swizzle.
- *
+/* Locate a source register and perform any required (simple) swizzle.
+ *
* Just fail on complex swizzles at this point.
*/
-static struct x86_reg fetch_src( struct aos_compilation *cp,
- const struct tgsi_full_src_register *src )
+static struct x86_reg fetch_src( struct aos_compilation *cp,
+ const struct tgsi_full_src_register *src )
{
- struct x86_reg arg0 = aos_get_shader_reg(cp,
- src->Register.File,
+ struct x86_reg arg0 = aos_get_shader_reg(cp,
+ src->Register.File,
src->Register.Index);
unsigned i;
ubyte swz = 0;
@@ -546,7 +546,7 @@ static struct x86_reg fetch_src( struct aos_compilation *cp,
case TGSI_UTIL_SIGN_TOGGLE:
negs |= (1<Register.File,
+ struct x86_reg arg0 = aos_get_shader_reg_ptr(cp,
+ src->Register.File,
src->Register.Index);
unsigned swizzle = tgsi_util_get_full_src_register_swizzle( src, channel );
@@ -634,7 +634,7 @@ static void x87_fld_src( struct aos_compilation *cp,
*/
x87_fchs( cp->func );
break;
-
+
case TGSI_UTIL_SIGN_KEEP:
break;
@@ -663,7 +663,7 @@ static void x87_fld_src( struct aos_compilation *cp,
* to a 2 argument format (dst/arg0, arg1) at the shader level before
* attempting to translate to x86/sse code.
*/
-static void store_dest( struct aos_compilation *cp,
+static void store_dest( struct aos_compilation *cp,
const struct tgsi_full_dst_register *reg,
struct x86_reg result )
{
@@ -672,19 +672,19 @@ static void store_dest( struct aos_compilation *cp,
switch (reg->Register.WriteMask) {
case 0:
return;
-
+
case TGSI_WRITEMASK_XYZW:
- aos_adopt_xmm_reg(cp,
- get_xmm_writable(cp, result),
+ aos_adopt_xmm_reg(cp,
+ get_xmm_writable(cp, result),
reg->Register.File,
reg->Register.Index,
TRUE);
return;
- default:
+ default:
break;
}
- dst = aos_get_shader_reg_xmm(cp,
+ dst = aos_get_shader_reg_xmm(cp,
reg->Register.File,
reg->Register.Index);
@@ -692,18 +692,18 @@ static void store_dest( struct aos_compilation *cp,
case TGSI_WRITEMASK_X:
sse_movss(cp->func, dst, get_xmm(cp, result));
break;
-
+
case TGSI_WRITEMASK_ZW:
sse_shufps(cp->func, dst, get_xmm(cp, result), SHUF(X, Y, Z, W));
break;
- case TGSI_WRITEMASK_XY:
+ case TGSI_WRITEMASK_XY:
result = get_xmm_writable(cp, result);
sse_shufps(cp->func, result, dst, SHUF(X, Y, Z, W));
dst = result;
break;
- case TGSI_WRITEMASK_YZW:
+ case TGSI_WRITEMASK_YZW:
result = get_xmm_writable(cp, result);
sse_movss(cp->func, result, dst);
dst = result;
@@ -714,8 +714,8 @@ static void store_dest( struct aos_compilation *cp,
break;
}
- aos_adopt_xmm_reg(cp,
- dst,
+ aos_adopt_xmm_reg(cp,
+ dst,
reg->Register.File,
reg->Register.Index,
TRUE);
@@ -733,7 +733,7 @@ static void inject_scalar( struct aos_compilation *cp,
}
-static void store_scalar_dest( struct aos_compilation *cp,
+static void store_scalar_dest( struct aos_compilation *cp,
const struct tgsi_full_dst_register *reg,
struct x86_reg result )
{
@@ -744,7 +744,7 @@ static void store_scalar_dest( struct aos_compilation *cp,
writemask != TGSI_WRITEMASK_Y &&
writemask != TGSI_WRITEMASK_Z &&
writemask != TGSI_WRITEMASK_W &&
- writemask != 0)
+ writemask != 0)
{
result = get_xmm_writable(cp, result); /* already true, right? */
sse_shufps(cp->func, result, result, SHUF(X,X,X,X));
@@ -753,7 +753,7 @@ static void store_scalar_dest( struct aos_compilation *cp,
}
result = get_xmm(cp, result);
- dst = aos_get_shader_reg_xmm(cp,
+ dst = aos_get_shader_reg_xmm(cp,
reg->Register.File,
reg->Register.Index);
@@ -780,13 +780,13 @@ static void store_scalar_dest( struct aos_compilation *cp,
break;
}
- aos_adopt_xmm_reg(cp,
- dst,
+ aos_adopt_xmm_reg(cp,
+ dst,
reg->Register.File,
reg->Register.Index,
TRUE);
}
-
+
static void x87_fst_or_nop( struct x86_function *func,
@@ -795,7 +795,7 @@ static void x87_fst_or_nop( struct x86_function *func,
struct x86_reg ptr )
{
assert(ptr.file == file_REG32);
- if (writemask & (1<Register.WriteMask;
x87_fst_or_nop(cp->func, writemask, 0, ptr);
@@ -831,14 +831,14 @@ static void x87_fstp_dest4( struct aos_compilation *cp,
*/
static void save_fpu_state( struct aos_compilation *cp )
{
- x87_fnstcw( cp->func, x86_make_disp(cp->machine_EDX,
+ x87_fnstcw( cp->func, x86_make_disp(cp->machine_EDX,
Offset(struct aos_machine, fpu_restore)));
}
static void restore_fpu_state( struct aos_compilation *cp )
{
x87_fnclex(cp->func);
- x87_fldcw( cp->func, x86_make_disp(cp->machine_EDX,
+ x87_fldcw( cp->func, x86_make_disp(cp->machine_EDX,
Offset(struct aos_machine, fpu_restore)));
}
@@ -847,7 +847,7 @@ static void set_fpu_round_neg_inf( struct aos_compilation *cp )
if (cp->fpucntl != FPU_RND_NEG) {
cp->fpucntl = FPU_RND_NEG;
x87_fnclex(cp->func);
- x87_fldcw( cp->func, x86_make_disp(cp->machine_EDX,
+ x87_fldcw( cp->func, x86_make_disp(cp->machine_EDX,
Offset(struct aos_machine, fpu_rnd_neg_inf)));
}
}
@@ -857,7 +857,7 @@ static void set_fpu_round_nearest( struct aos_compilation *cp )
if (cp->fpucntl != FPU_RND_NEAREST) {
cp->fpucntl = FPU_RND_NEAREST;
x87_fnclex(cp->func);
- x87_fldcw( cp->func, x86_make_disp(cp->machine_EDX,
+ x87_fldcw( cp->func, x86_make_disp(cp->machine_EDX,
Offset(struct aos_machine, fpu_rnd_nearest)));
}
}
@@ -883,7 +883,7 @@ static void x87_emit_ex2( struct aos_compilation *cp )
x87_fstp(cp->func, st1); /* 2^a */
assert( stack == cp->func->x87_stack);
-
+
}
#endif
@@ -915,13 +915,13 @@ static void emit_print( struct aos_compilation *cp,
* debug path, so here goes:
*/
for (i = 0; i < 8; i++) {
- if (cp->xmm[i].dirty)
+ if (cp->xmm[i].dirty)
spill(cp, i);
aos_release_xmm_reg(cp, i);
}
- /* Push caller-save (ie scratch) regs.
+ /* Push caller-save (ie scratch) regs.
*/
x86_cdecl_caller_push_regs( cp->func );
@@ -940,11 +940,11 @@ static void emit_print( struct aos_compilation *cp,
x86_pop( cp->func, ecx );
x86_pop( cp->func, ecx );
- /* Pop caller-save regs
+ /* Pop caller-save regs
*/
x86_cdecl_caller_pop_regs( cp->func );
- /* Done...
+ /* Done...
*/
}
#endif
@@ -954,7 +954,7 @@ static void emit_print( struct aos_compilation *cp,
* and ignore write masks and swizzling issues.
*/
-static boolean emit_ABS( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_ABS( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
struct x86_reg arg0 = fetch_src(cp, &op->Src[0]);
struct x86_reg neg = aos_get_internal(cp, IMM_NEGS);
@@ -963,7 +963,7 @@ static boolean emit_ABS( struct aos_compilation *cp, const struct tgsi_full_inst
sse_movaps(cp->func, tmp, arg0);
sse_mulps(cp->func, tmp, neg);
sse_maxps(cp->func, tmp, arg0);
-
+
store_dest(cp, &op->Dst[0], tmp);
return TRUE;
}
@@ -980,7 +980,7 @@ static boolean emit_ADD( struct aos_compilation *cp, const struct tgsi_full_inst
return TRUE;
}
-static boolean emit_COS( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_COS( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
x87_fld_src(cp, &op->Src[0], 0);
x87_fcos(cp->func);
@@ -995,17 +995,17 @@ static boolean emit_DP3( struct aos_compilation *cp, const struct tgsi_full_inst
{
struct x86_reg arg0 = fetch_src(cp, &op->Src[0]);
struct x86_reg arg1 = fetch_src(cp, &op->Src[1]);
- struct x86_reg tmp = aos_get_xmm_reg(cp);
+ struct x86_reg tmp = aos_get_xmm_reg(cp);
struct x86_reg dst = get_xmm_writable(cp, arg0);
sse_mulps(cp->func, dst, arg1);
/* Now the hard bit: sum the first 3 values:
- */
+ */
sse_movhlps(cp->func, tmp, dst);
sse_addss(cp->func, dst, tmp); /* a*x+c*z, b*y, ?, ? */
emit_pshufd(cp, tmp, dst, SHUF(Y,X,W,Z));
sse_addss(cp->func, dst, tmp);
-
+
aos_release_xmm_reg(cp, tmp.idx);
store_scalar_dest(cp, &op->Dst[0], dst);
return TRUE;
@@ -1015,13 +1015,13 @@ static boolean emit_DP4( struct aos_compilation *cp, const struct tgsi_full_inst
{
struct x86_reg arg0 = fetch_src(cp, &op->Src[0]);
struct x86_reg arg1 = fetch_src(cp, &op->Src[1]);
- struct x86_reg tmp = aos_get_xmm_reg(cp);
+ struct x86_reg tmp = aos_get_xmm_reg(cp);
struct x86_reg dst = get_xmm_writable(cp, arg0);
sse_mulps(cp->func, dst, arg1);
-
+
/* Now the hard bit: sum the values:
- */
+ */
sse_movhlps(cp->func, tmp, dst);
sse_addps(cp->func, dst, tmp); /* a*x+c*z, b*y+d*w, a*x+c*z, b*y+d*w */
emit_pshufd(cp, tmp, dst, SHUF(Y,X,W,Z));
@@ -1042,7 +1042,7 @@ static boolean emit_DPH( struct aos_compilation *cp, const struct tgsi_full_inst
sse_mulps(cp->func, dst, arg1);
/* Now the hard bit: sum the values (from DP3):
- */
+ */
sse_movhlps(cp->func, tmp, dst);
sse_addss(cp->func, dst, tmp); /* a*x+c*z, b*y, ?, ? */
emit_pshufd(cp, tmp, dst, SHUF(Y,X,W,Z));
@@ -1077,7 +1077,7 @@ static boolean emit_DST( struct aos_compilation *cp, const struct tgsi_full_inst
return TRUE;
}
-static boolean emit_LG2( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_LG2( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
x87_fld1(cp->func); /* 1 */
x87_fld_src(cp, &op->Src[0], 0); /* a0 1 */
@@ -1087,7 +1087,7 @@ static boolean emit_LG2( struct aos_compilation *cp, const struct tgsi_full_inst
}
#if 0
-static boolean emit_EX2( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_EX2( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
x87_fld_src(cp, &op->Src[0], 0);
x87_emit_ex2(cp);
@@ -1097,9 +1097,9 @@ static boolean emit_EX2( struct aos_compilation *cp, const struct tgsi_full_inst
#endif
-static boolean emit_FLR( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_FLR( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
- struct x86_reg dst = get_dst_ptr(cp, &op->Dst[0]);
+ struct x86_reg dst = get_dst_ptr(cp, &op->Dst[0]);
unsigned writemask = op->Dst[0].Register.WriteMask;
int i;
@@ -1109,13 +1109,13 @@ static boolean emit_FLR( struct aos_compilation *cp, const struct tgsi_full_inst
*/
for (i = 3; i >= 0; i--) {
if (writemask & (1<Src[0], i);
+ x87_fld_src(cp, &op->Src[0], i);
}
}
for (i = 0; i < 4; i++) {
if (writemask & (1<func );
+ x87_fprndint( cp->func );
x87_fstp(cp->func, x86_make_disp(dst, i*4));
}
}
@@ -1124,9 +1124,9 @@ static boolean emit_FLR( struct aos_compilation *cp, const struct tgsi_full_inst
}
-static boolean emit_RND( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_RND( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
- struct x86_reg dst = get_dst_ptr(cp, &op->Dst[0]);
+ struct x86_reg dst = get_dst_ptr(cp, &op->Dst[0]);
unsigned writemask = op->Dst[0].Register.WriteMask;
int i;
@@ -1136,13 +1136,13 @@ static boolean emit_RND( struct aos_compilation *cp, const struct tgsi_full_inst
*/
for (i = 3; i >= 0; i--) {
if (writemask & (1<Src[0], i);
+ x87_fld_src(cp, &op->Src[0], i);
}
}
for (i = 0; i < 4; i++) {
if (writemask & (1<func );
+ x87_fprndint( cp->func );
x87_fstp(cp->func, x86_make_disp(dst, i*4));
}
}
@@ -1151,9 +1151,9 @@ static boolean emit_RND( struct aos_compilation *cp, const struct tgsi_full_inst
}
-static boolean emit_FRC( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_FRC( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
- struct x86_reg dst = get_dst_ptr(cp, &op->Dst[0]);
+ struct x86_reg dst = get_dst_ptr(cp, &op->Dst[0]);
struct x86_reg st0 = x86_make_reg(file_x87, 0);
struct x86_reg st1 = x86_make_reg(file_x87, 1);
unsigned writemask = op->Dst[0].Register.WriteMask;
@@ -1166,7 +1166,7 @@ static boolean emit_FRC( struct aos_compilation *cp, const struct tgsi_full_inst
*/
for (i = 3; i >= 0; i--) {
if (writemask & (1<Src[0], i);
+ x87_fld_src(cp, &op->Src[0], i);
}
}
@@ -1197,32 +1197,32 @@ static boolean emit_LIT( struct aos_compilation *cp, const struct tgsi_full_inst
#if 1
/* For absolute correctness, need to spill/invalidate all XMM regs
- * too.
+ * too.
*/
for (i = 0; i < 8; i++) {
- if (cp->xmm[i].dirty)
+ if (cp->xmm[i].dirty)
spill(cp, i);
aos_release_xmm_reg(cp, i);
}
#endif
- if (writemask != TGSI_WRITEMASK_XYZW)
+ if (writemask != TGSI_WRITEMASK_XYZW)
result = x86_make_disp(cp->machine_EDX, Offset(struct aos_machine, tmp[0]));
- else
- result = get_dst_ptr(cp, &op->Dst[0]);
+ else
+ result = get_dst_ptr(cp, &op->Dst[0]);
+
-
arg0 = fetch_src( cp, &op->Src[0] );
if (arg0.file == file_XMM) {
- struct x86_reg tmp = x86_make_disp(cp->machine_EDX,
+ struct x86_reg tmp = x86_make_disp(cp->machine_EDX,
Offset(struct aos_machine, tmp[1]));
sse_movaps( cp->func, tmp, arg0 );
arg0 = tmp;
}
-
-
- /* Push caller-save (ie scratch) regs.
+
+
+ /* Push caller-save (ie scratch) regs.
*/
x86_cdecl_caller_push_regs( cp->func );
@@ -1239,9 +1239,9 @@ static boolean emit_LIT( struct aos_compilation *cp, const struct tgsi_full_inst
x86_push( cp->func, cp->machine_EDX );
if (lit_count < MAX_LIT_INFO) {
- x86_mov( cp->func, ecx, x86_make_disp( cp->machine_EDX,
- Offset(struct aos_machine, lit_info) +
- lit_count * sizeof(struct lit_info) +
+ x86_mov( cp->func, ecx, x86_make_disp( cp->machine_EDX,
+ Offset(struct aos_machine, lit_info) +
+ lit_count * sizeof(struct lit_info) +
Offset(struct lit_info, func)));
}
else {
@@ -1249,7 +1249,7 @@ static boolean emit_LIT( struct aos_compilation *cp, const struct tgsi_full_inst
}
x86_call( cp->func, ecx );
-
+
x86_pop( cp->func, ecx ); /* fixme... */
x86_pop( cp->func, ecx );
x86_pop( cp->func, ecx );
@@ -1258,7 +1258,7 @@ static boolean emit_LIT( struct aos_compilation *cp, const struct tgsi_full_inst
x86_cdecl_caller_pop_regs( cp->func );
if (writemask != TGSI_WRITEMASK_XYZW) {
- store_dest( cp,
+ store_dest( cp,
&op->Dst[0],
get_xmm_writable( cp, result ) );
}
@@ -1266,17 +1266,17 @@ static boolean emit_LIT( struct aos_compilation *cp, const struct tgsi_full_inst
return TRUE;
}
-#if 0
+#if 0
static boolean emit_inline_LIT( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
- struct x86_reg dst = get_dst_ptr(cp, &op->Dst[0]);
+ struct x86_reg dst = get_dst_ptr(cp, &op->Dst[0]);
unsigned writemask = op->Dst[0].Register.WriteMask;
if (writemask & TGSI_WRITEMASK_YZ) {
struct x86_reg st1 = x86_make_reg(file_x87, 1);
struct x86_reg st2 = x86_make_reg(file_x87, 2);
- /* a1' = a1 <= 0 ? 1 : a1;
+ /* a1' = a1 <= 0 ? 1 : a1;
*/
x87_fldz(cp->func); /* 1 0 */
#if 1
@@ -1294,7 +1294,7 @@ static boolean emit_inline_LIT( struct aos_compilation *cp, const struct tgsi_fu
x87_fld_src(cp, &op->Src[0], 3); /* a3 a1' */
x87_fxch(cp->func, st1); /* a1' a3 */
-
+
/* Compute pow(a1, a3)
*/
@@ -1306,7 +1306,7 @@ static boolean emit_inline_LIT( struct aos_compilation *cp, const struct tgsi_fu
*/
x87_fldz(cp->func); /* 0 r2 */
x87_fld_src(cp, &op->Src[0], 0); /* a0 0 r2 */
- x87_fcomi(cp->func, st1);
+ x87_fcomi(cp->func, st1);
x87_fcmovb(cp->func, st1); /* a0' 0 r2 */
x87_fst_or_nop(cp->func, writemask, 1, dst); /* result[1] = a0' */
@@ -1422,7 +1422,7 @@ static float PIPE_CDECL _exp2(float x)
/* Really not sufficient -- need to check for conditions that could
* generate inf/nan values, which will slow things down hugely.
*/
-static boolean emit_POW( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_POW( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
#if 0
x87_fld_src(cp, &op->Src[1], 0); /* a1.x */
@@ -1436,15 +1436,15 @@ static boolean emit_POW( struct aos_compilation *cp, const struct tgsi_full_inst
uint i;
/* For absolute correctness, need to spill/invalidate all XMM regs
- * too.
+ * too.
*/
for (i = 0; i < 8; i++) {
- if (cp->xmm[i].dirty)
+ if (cp->xmm[i].dirty)
spill(cp, i);
aos_release_xmm_reg(cp, i);
}
- /* Push caller-save (ie scratch) regs.
+ /* Push caller-save (ie scratch) regs.
*/
x86_cdecl_caller_push_regs( cp->func );
@@ -1474,20 +1474,20 @@ static boolean emit_POW( struct aos_compilation *cp, const struct tgsi_full_inst
#if FAST_MATH
-static boolean emit_EXPBASE2( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_EXPBASE2( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
uint i;
/* For absolute correctness, need to spill/invalidate all XMM regs
- * too.
+ * too.
*/
for (i = 0; i < 8; i++) {
- if (cp->xmm[i].dirty)
+ if (cp->xmm[i].dirty)
spill(cp, i);
aos_release_xmm_reg(cp, i);
}
- /* Push caller-save (ie scratch) regs.
+ /* Push caller-save (ie scratch) regs.
*/
x86_cdecl_caller_push_regs( cp->func );
@@ -1539,12 +1539,12 @@ static boolean emit_RCP( struct aos_compilation *cp, const struct tgsi_full_inst
/* Although rsqrtps() and rcpps() are low precision on some/all SSE
* implementations, it is possible to improve its precision at
* fairly low cost, using a newton/raphson step, as below:
- *
+ *
* x1 = 2 * rcpps(a) - a * rcpps(a) * rcpps(a)
* x1 = 0.5 * rsqrtps(a) * [3.0 - (a * rsqrtps(a))* rsqrtps(a)]
* or:
* x1 = rsqrtps(a) * [1.5 - .5 * a * rsqrtps(a) * rsqrtps(a)]
- *
+ *
*
* See: http://softwarecommunity.intel.com/articles/eng/1818.htm
*/
@@ -1570,7 +1570,7 @@ static boolean emit_RSQ( struct aos_compilation *cp, const struct tgsi_full_inst
sse_movaps(cp->func, tmp, src);
sse_mulps(cp->func, tmp, neg);
sse_maxps(cp->func, tmp, src);
-
+
sse_rsqrtss( cp->func, r, tmp ); /* rsqrtss(a) */
sse_mulss( cp->func, tmp, neg_half ); /* -.5 * a */
sse_mulss( cp->func, tmp, r ); /* -.5 * a * r */
@@ -1601,7 +1601,7 @@ static boolean emit_SGE( struct aos_compilation *cp, const struct tgsi_full_inst
return TRUE;
}
-static boolean emit_SIN( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_SIN( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
x87_fld_src(cp, &op->Src[0], 0);
x87_fsin(cp->func);
@@ -1617,7 +1617,7 @@ static boolean emit_SLT( struct aos_compilation *cp, const struct tgsi_full_inst
struct x86_reg arg1 = fetch_src(cp, &op->Src[1]);
struct x86_reg ones = aos_get_internal(cp, IMM_ONES);
struct x86_reg dst = get_xmm_writable(cp, arg0);
-
+
sse_cmpps(cp->func, dst, arg1, cc_LessThan);
sse_andps(cp->func, dst, ones);
@@ -1625,7 +1625,7 @@ static boolean emit_SLT( struct aos_compilation *cp, const struct tgsi_full_inst
return TRUE;
}
-static boolean emit_SUB( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_SUB( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
struct x86_reg arg0 = fetch_src(cp, &op->Src[0]);
struct x86_reg arg1 = fetch_src(cp, &op->Src[1]);
@@ -1649,7 +1649,7 @@ static boolean emit_TRUNC( struct aos_compilation *cp, const struct tgsi_full_in
return TRUE;
}
-static boolean emit_XPD( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
+static boolean emit_XPD( struct aos_compilation *cp, const struct tgsi_full_instruction *op )
{
struct x86_reg arg0 = fetch_src(cp, &op->Src[0]);
struct x86_reg arg1 = fetch_src(cp, &op->Src[1]);
@@ -1735,7 +1735,7 @@ emit_instruction( struct aos_compilation *cp,
case TGSI_OPCODE_SUB:
return emit_SUB(cp, inst);
-
+
case TGSI_OPCODE_LRP:
/*return emit_LERP(cp, inst);*/
return FALSE;
@@ -1800,14 +1800,14 @@ emit_instruction( struct aos_compilation *cp,
static boolean emit_viewport( struct aos_compilation *cp )
{
- struct x86_reg pos = aos_get_shader_reg_xmm(cp,
- TGSI_FILE_OUTPUT,
+ struct x86_reg pos = aos_get_shader_reg_xmm(cp,
+ TGSI_FILE_OUTPUT,
cp->vaos->draw->vs.position_output );
- struct x86_reg scale = x86_make_disp(cp->machine_EDX,
+ struct x86_reg scale = x86_make_disp(cp->machine_EDX,
Offset(struct aos_machine, scale));
- struct x86_reg translate = x86_make_disp(cp->machine_EDX,
+ struct x86_reg translate = x86_make_disp(cp->machine_EDX,
Offset(struct aos_machine, translate));
sse_mulps(cp->func, pos, scale);
@@ -1829,14 +1829,14 @@ static boolean emit_viewport( struct aos_compilation *cp )
static boolean emit_rhw_viewport( struct aos_compilation *cp )
{
struct x86_reg tmp = aos_get_xmm_reg(cp);
- struct x86_reg pos = aos_get_shader_reg_xmm(cp,
- TGSI_FILE_OUTPUT,
+ struct x86_reg pos = aos_get_shader_reg_xmm(cp,
+ TGSI_FILE_OUTPUT,
cp->vaos->draw->vs.position_output);
- struct x86_reg scale = x86_make_disp(cp->machine_EDX,
+ struct x86_reg scale = x86_make_disp(cp->machine_EDX,
Offset(struct aos_machine, scale));
- struct x86_reg translate = x86_make_disp(cp->machine_EDX,
+ struct x86_reg translate = x86_make_disp(cp->machine_EDX,
Offset(struct aos_machine, translate));
@@ -1844,12 +1844,12 @@ static boolean emit_rhw_viewport( struct aos_compilation *cp )
emit_pshufd(cp, tmp, pos, SHUF(W, W, W, W));
sse2_rcpss(cp->func, tmp, tmp);
sse_shufps(cp->func, tmp, tmp, SHUF(X, X, X, X));
-
+
sse_mulps(cp->func, pos, scale);
sse_mulps(cp->func, pos, tmp);
sse_addps(cp->func, pos, translate);
- /* Set pos[3] = w
+ /* Set pos[3] = w
*/
mask_write(cp, pos, tmp, TGSI_WRITEMASK_W);
@@ -1890,15 +1890,15 @@ static void find_last_write_outputs( struct aos_compilation *cp )
tgsi_parse_init( &parse, cp->vaos->base.vs->state.tokens );
while (!tgsi_parse_end_of_tokens( &parse )) {
-
+
tgsi_parse_token( &parse );
- if (parse.FullToken.Token.Type != TGSI_TOKEN_TYPE_INSTRUCTION)
+ if (parse.FullToken.Token.Type != TGSI_TOKEN_TYPE_INSTRUCTION)
continue;
for (i = 0; i < TGSI_FULL_MAX_DST_REGISTERS; i++) {
if (parse.FullToken.FullInstruction.Dst[i].Register.File ==
- TGSI_FILE_OUTPUT)
+ TGSI_FILE_OUTPUT)
{
unsigned idx = parse.FullToken.FullInstruction.Dst[i].Register.Index;
cp->output_last_write[idx] = this_instruction;
@@ -1920,7 +1920,7 @@ static void find_last_write_outputs( struct aos_compilation *cp )
static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
boolean linear )
-{
+{
struct tgsi_parse_context parse;
struct aos_compilation cp;
unsigned fixup, label;
@@ -1975,8 +1975,8 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
cp.x86_reg[0] = 0;
cp.x86_reg[1] = 0;
-
- /* Note address for loop jump
+
+ /* Note address for loop jump
*/
label = x86_get_label(cp.func);
{
@@ -1987,7 +1987,7 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
/* Emit the shader:
*/
- while( !tgsi_parse_end_of_tokens( &parse ) && !cp.error )
+ while( !tgsi_parse_end_of_tokens( &parse ) && !cp.error )
{
tgsi_parse_token( &parse );
@@ -2015,7 +2015,7 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
debug_printf("\n");
}
-
+
{
unsigned i;
for (i = 0; i < 8; i++) {
@@ -2033,7 +2033,7 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
/* not really handling clipping, just do the rhw so we can
* see the results...
*/
- emit_rhw_viewport(&cp);
+ emit_rhw_viewport(&cp);
}
else if (cp.vaos->base.key.viewport) {
emit_viewport(&cp);
@@ -2048,13 +2048,13 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient,
/* Next vertex:
*/
- x86_lea(cp.func,
- cp.outbuf_ECX,
- x86_make_disp(cp.outbuf_ECX,
+ x86_lea(cp.func,
+ cp.outbuf_ECX,
+ x86_make_disp(cp.outbuf_ECX,
cp.vaos->base.key.output_stride));
/* Incr index
- */
+ */
aos_incr_inputs( &cp, linear );
}
/* decr count, loop if not zero
@@ -2148,7 +2148,7 @@ static void PIPE_CDECL vaos_run_linear( struct draw_vs_varient *varient,
struct aos_machine *machine = vaos->draw->vs.aos_machine;
unsigned i;
- if (0) debug_printf("%s %d %d const: %x\n", __FUNCTION__, start, count,
+ if (0) debug_printf("%s %d %d const: %x\n", __FUNCTION__, start, count,
vaos->base.key.const_vbuffers);
machine->internal[IMM_PSIZE][0] = vaos->draw->rasterizer->point_size;
@@ -2193,7 +2193,7 @@ static struct draw_vs_varient *varient_aos_sse( struct draw_vertex_shader *vs,
if (!vaos)
goto fail;
-
+
vaos->base.key = *key;
vaos->base.vs = vs;
vaos->base.set_buffer = vaos_set_buffer;
@@ -2203,7 +2203,7 @@ static struct draw_vs_varient *varient_aos_sse( struct draw_vertex_shader *vs,
vaos->draw = vs->draw;
- for (i = 0; i < key->nr_inputs; i++)
+ for (i = 0; i < key->nr_inputs; i++)
vaos->nr_vb = MAX2( vaos->nr_vb, key->element[i].in.buffer + 1 );
vaos->buffer = MALLOC( vaos->nr_vb * sizeof(vaos->buffer[0]) );
@@ -2244,7 +2244,7 @@ static struct draw_vs_varient *varient_aos_sse( struct draw_vertex_shader *vs,
x86_release_func( &vaos->func[1] );
FREE(vaos);
-
+
return NULL;
}
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.h b/src/gallium/auxiliary/draw/draw_vs_aos.h
index 68e8295..90214a2 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos.h
+++ b/src/gallium/auxiliary/draw/draw_vs_aos.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -116,7 +116,7 @@ struct aos_machine {
struct shine_tab shine_tab[MAX_SHINE_TAB];
struct lit_info lit_info[MAX_LIT_INFO];
unsigned now;
-
+
ushort fpu_rnd_nearest;
ushort fpu_rnd_neg_inf;
@@ -180,7 +180,7 @@ void aos_adopt_xmm_reg( struct aos_compilation *cp,
void aos_spill_all( struct aos_compilation *cp );
-struct x86_reg aos_get_shader_reg( struct aos_compilation *cp,
+struct x86_reg aos_get_shader_reg( struct aos_compilation *cp,
unsigned file,
unsigned idx );
@@ -251,5 +251,5 @@ struct draw_vs_varient_aos_sse {
#endif
-#endif
+#endif
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos_io.c b/src/gallium/auxiliary/draw/draw_vs_aos_io.c
index 8f8bbe7..b78ac04 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos_io.c
+++ b/src/gallium/auxiliary/draw/draw_vs_aos_io.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -43,14 +43,14 @@
* draw_vs_aos.c as there is no intermingling of generated code...
* That may have to change, we'll see.
*/
-static void emit_load_R32G32B32A32( struct aos_compilation *cp,
+static void emit_load_R32G32B32A32( struct aos_compilation *cp,
struct x86_reg data,
struct x86_reg src_ptr )
{
sse_movups(cp->func, data, src_ptr);
}
-static void emit_load_R32G32B32( struct aos_compilation *cp,
+static void emit_load_R32G32B32( struct aos_compilation *cp,
struct x86_reg data,
struct x86_reg src_ptr )
{
@@ -75,7 +75,7 @@ static void emit_load_R32G32B32( struct aos_compilation *cp,
#endif
}
-static void emit_load_R32G32( struct aos_compilation *cp,
+static void emit_load_R32G32( struct aos_compilation *cp,
struct x86_reg data,
struct x86_reg src_ptr )
{
@@ -84,7 +84,7 @@ static void emit_load_R32G32( struct aos_compilation *cp,
}
-static void emit_load_R32( struct aos_compilation *cp,
+static void emit_load_R32( struct aos_compilation *cp,
struct x86_reg data,
struct x86_reg src_ptr )
{
@@ -107,7 +107,7 @@ static void emit_load_R8G8B8A8_UNORM( struct aos_compilation *cp,
/* Extended swizzles? Maybe later.
- */
+ */
static void emit_swizzle( struct aos_compilation *cp,
struct x86_reg dest,
struct x86_reg src,
@@ -124,13 +124,13 @@ static boolean get_buffer_ptr( struct aos_compilation *cp,
struct x86_reg elt,
struct x86_reg ptr)
{
- struct x86_reg buf = x86_make_disp(aos_get_x86( cp, 0, X86_BUFFERS ),
+ struct x86_reg buf = x86_make_disp(aos_get_x86( cp, 0, X86_BUFFERS ),
buf_idx * sizeof(struct aos_buffer));
- struct x86_reg buf_stride = x86_make_disp(buf,
+ struct x86_reg buf_stride = x86_make_disp(buf,
Offset(struct aos_buffer, stride));
if (linear) {
- struct x86_reg buf_ptr = x86_make_disp(buf,
+ struct x86_reg buf_ptr = x86_make_disp(buf,
Offset(struct aos_buffer, ptr));
@@ -143,7 +143,7 @@ static boolean get_buffer_ptr( struct aos_compilation *cp,
x86_mov(cp->func, buf_ptr, elt);
}
else {
- struct x86_reg buf_base_ptr = x86_make_disp(buf,
+ struct x86_reg buf_base_ptr = x86_make_disp(buf,
Offset(struct aos_buffer, base_ptr));
@@ -221,7 +221,7 @@ static boolean load_inputs( struct aos_compilation *cp,
cp->insn_counter++;
}
}
-
+
return TRUE;
}
@@ -229,10 +229,10 @@ boolean aos_init_inputs( struct aos_compilation *cp, boolean linear )
{
unsigned i;
for (i = 0; i < cp->vaos->nr_vb; i++) {
- struct x86_reg buf = x86_make_disp(aos_get_x86( cp, 0, X86_BUFFERS ),
+ struct x86_reg buf = x86_make_disp(aos_get_x86( cp, 0, X86_BUFFERS ),
i * sizeof(struct aos_buffer));
- struct x86_reg buf_base_ptr = x86_make_disp(buf,
+ struct x86_reg buf_base_ptr = x86_make_disp(buf,
Offset(struct aos_buffer, base_ptr));
if (cp->vaos->base.key.const_vbuffers & (1<idx_EBX;
struct x86_reg ptr = cp->tmp_EAX;
- struct x86_reg buf_stride = x86_make_disp(buf,
+ struct x86_reg buf_stride = x86_make_disp(buf,
Offset(struct aos_buffer, stride));
- struct x86_reg buf_ptr = x86_make_disp(buf,
+ struct x86_reg buf_ptr = x86_make_disp(buf,
Offset(struct aos_buffer, ptr));
@@ -271,7 +271,7 @@ boolean aos_init_inputs( struct aos_compilation *cp, boolean linear )
/* In the linear case, keep the buffer pointer instead of the
* index number.
*/
- if (cp->vaos->nr_vb == 1)
+ if (cp->vaos->nr_vb == 1)
x86_mov( cp->func, elt, ptr );
else
x86_mov( cp->func, buf_ptr, ptr );
@@ -312,8 +312,8 @@ boolean aos_fetch_inputs( struct aos_compilation *cp, boolean linear )
boolean aos_incr_inputs( struct aos_compilation *cp, boolean linear )
{
if (linear && cp->vaos->nr_vb == 1) {
- struct x86_reg stride = x86_make_disp(aos_get_x86( cp, 0, X86_BUFFERS ),
- (0 * sizeof(struct aos_buffer) +
+ struct x86_reg stride = x86_make_disp(aos_get_x86( cp, 0, X86_BUFFERS ),
+ (0 * sizeof(struct aos_buffer) +
Offset(struct aos_buffer, stride)));
x86_add(cp->func, cp->idx_EBX, stride);
@@ -321,7 +321,7 @@ boolean aos_incr_inputs( struct aos_compilation *cp, boolean linear )
}
else if (linear) {
/* Nothing to do */
- }
+ }
else {
x86_lea(cp->func, cp->idx_EBX, x86_make_disp(cp->idx_EBX, 4));
}
@@ -334,14 +334,14 @@ boolean aos_incr_inputs( struct aos_compilation *cp, boolean linear )
-static void emit_store_R32G32B32A32( struct aos_compilation *cp,
+static void emit_store_R32G32B32A32( struct aos_compilation *cp,
struct x86_reg dst_ptr,
struct x86_reg dataXMM )
{
sse_movups(cp->func, dst_ptr, dataXMM);
}
-static void emit_store_R32G32B32( struct aos_compilation *cp,
+static void emit_store_R32G32B32( struct aos_compilation *cp,
struct x86_reg dst_ptr,
struct x86_reg dataXMM )
{
@@ -350,14 +350,14 @@ static void emit_store_R32G32B32( struct aos_compilation *cp,
sse_movss(cp->func, x86_make_disp(dst_ptr,8), dataXMM);
}
-static void emit_store_R32G32( struct aos_compilation *cp,
+static void emit_store_R32G32( struct aos_compilation *cp,
struct x86_reg dst_ptr,
struct x86_reg dataXMM )
{
sse_movlps(cp->func, dst_ptr, dataXMM);
}
-static void emit_store_R32( struct aos_compilation *cp,
+static void emit_store_R32( struct aos_compilation *cp,
struct x86_reg dst_ptr,
struct x86_reg dataXMM )
{
@@ -383,7 +383,7 @@ static void emit_store_R8G8B8A8_UNORM( struct aos_compilation *cp,
static boolean emit_output( struct aos_compilation *cp,
struct x86_reg ptr,
- struct x86_reg dataXMM,
+ struct x86_reg dataXMM,
unsigned format )
{
switch (format) {
@@ -420,7 +420,7 @@ static boolean emit_output( struct aos_compilation *cp,
boolean aos_emit_outputs( struct aos_compilation *cp )
{
unsigned i;
-
+
for (i = 0; i < cp->vaos->base.key.nr_outputs; i++) {
unsigned format = cp->vaos->base.key.element[i].out.format;
unsigned offset = cp->vaos->base.key.element[i].out.offset;
@@ -432,7 +432,7 @@ boolean aos_emit_outputs( struct aos_compilation *cp )
data = aos_get_internal_xmm( cp, IMM_PSIZE );
}
else {
- data = aos_get_shader_reg( cp,
+ data = aos_get_shader_reg( cp,
TGSI_FILE_OUTPUT,
vs_output );
}
@@ -442,10 +442,10 @@ boolean aos_emit_outputs( struct aos_compilation *cp )
sse_movaps(cp->func, tmp, data);
data = tmp;
}
-
- if (!emit_output( cp,
+
+ if (!emit_output( cp,
x86_make_disp( cp->outbuf_ECX, offset ),
- data,
+ data,
format ))
return FALSE;
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos_machine.c b/src/gallium/auxiliary/draw/draw_vs_aos_machine.c
index 0eda414..0429838 100644
--- a/src/gallium/auxiliary/draw/draw_vs_aos_machine.c
+++ b/src/gallium/auxiliary/draw/draw_vs_aos_machine.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -68,9 +68,9 @@ void PIPE_CDECL aos_do_lit( struct aos_machine *machine,
const float *in,
unsigned count )
{
- if (in[0] > 0)
+ if (in[0] > 0)
{
- if (in[1] <= 0.0)
+ if (in[1] <= 0.0)
{
result[0] = 1.0F;
result[1] = in[0];
@@ -79,7 +79,7 @@ void PIPE_CDECL aos_do_lit( struct aos_machine *machine,
}
else
{
- const float epsilon = 1.0F / 256.0F;
+ const float epsilon = 1.0F / 256.0F;
float exponent = CLAMP(in[3], -(128.0F - epsilon), (128.0F - epsilon));
result[0] = 1.0F;
result[1] = in[0];
@@ -87,7 +87,7 @@ void PIPE_CDECL aos_do_lit( struct aos_machine *machine,
result[3] = 1.0;
}
}
- else
+ else
{
result[0] = 1.0F;
result[1] = 0.0;
@@ -102,9 +102,9 @@ static void PIPE_CDECL do_lit_lut( struct aos_machine *machine,
const float *in,
unsigned count )
{
- if (in[0] > 0)
+ if (in[0] > 0)
{
- if (in[1] <= 0.0)
+ if (in[1] <= 0.0)
{
result[0] = 1.0F;
result[1] = in[0];
@@ -112,7 +112,7 @@ static void PIPE_CDECL do_lit_lut( struct aos_machine *machine,
result[3] = 1.0F;
return;
}
-
+
if (machine->lit_info[count].shine_tab->exponent != in[3]) {
machine->lit_info[count].func = aos_do_lit;
goto no_luck;
@@ -124,17 +124,17 @@ static void PIPE_CDECL do_lit_lut( struct aos_machine *machine,
float f = in[1] * 256;
int k = (int)f;
float frac = f - (float)k;
-
+
result[0] = 1.0F;
result[1] = in[0];
result[2] = tab[k] + frac*(tab[k+1]-tab[k]);
result[3] = 1.0;
return;
}
-
+
no_luck:
{
- const float epsilon = 1.0F / 256.0F;
+ const float epsilon = 1.0F / 256.0F;
float exponent = CLAMP(in[3], -(128.0F - epsilon), (128.0F - epsilon));
result[0] = 1.0F;
result[1] = in[0];
@@ -142,7 +142,7 @@ static void PIPE_CDECL do_lit_lut( struct aos_machine *machine,
result[3] = 1.0;
}
}
- else
+ else
{
result[0] = 1.0F;
result[1] = 0.0;
@@ -155,17 +155,17 @@ static void PIPE_CDECL do_lit_lut( struct aos_machine *machine,
static void do_populate_lut( struct shine_tab *tab,
float unclamped_exponent )
{
- const float epsilon = 1.0F / 256.0F;
+ const float epsilon = 1.0F / 256.0F;
float exponent = CLAMP(unclamped_exponent, -(128.0F - epsilon), (128.0F - epsilon));
unsigned i;
tab->exponent = unclamped_exponent; /* for later comparison */
-
+
tab->values[0] = 0;
if (exponent == 0) {
for (i = 1; i < 258; i++) {
tab->values[i] = 1.0;
- }
+ }
}
else {
for (i = 1; i < 258; i++) {
@@ -285,7 +285,7 @@ struct aos_machine *draw_vs_aos_machine( void )
X87_CW_PRECISION_DOUBLE_EXT);
assert(machine->fpu_rnd_nearest == 0x37f);
-
+
machine->fpu_rnd_neg_inf = (X87_CW_EXCEPTION_INV_OP |
X87_CW_EXCEPTION_DENORM_OP |
X87_CW_EXCEPTION_ZERO_DIVIDE |
diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c
index dab3eb1..d8e7dc4 100644
--- a/src/gallium/auxiliary/draw/draw_vs_exec.c
+++ b/src/gallium/auxiliary/draw/draw_vs_exec.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -102,7 +102,7 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
for (i = 0; i < count; i += MAX_TGSI_VERTICES) {
unsigned int max_vertices = MIN2(MAX_TGSI_VERTICES, count - i);
- /* Swizzle inputs.
+ /* Swizzle inputs.
*/
for (j = 0; j < max_vertices; j++) {
#if 0
@@ -130,7 +130,7 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
}
input = (const float (*)[4])((const char *)input + input_stride);
- }
+ }
tgsi_set_exec_mask(machine,
1,
@@ -141,7 +141,7 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
/* run interpreter */
tgsi_exec_machine_run( machine );
- /* Unswizzle all output results.
+ /* Unswizzle all output results.
*/
for (j = 0; j < max_vertices; j++) {
for (slot = 0; slot < shader->info.num_outputs; slot++) {
@@ -165,7 +165,7 @@ vs_exec_run_linear( struct draw_vertex_shader *shader,
#endif
output = (float (*)[4])((char *)output + output_stride);
- }
+ }
}
}
@@ -187,7 +187,7 @@ draw_create_vs_exec(struct draw_context *draw,
{
struct exec_vertex_shader *vs = CALLOC_STRUCT( exec_vertex_shader );
- if (vs == NULL)
+ if (vs == NULL)
return NULL;
/* we make a private copy of the tokens */
diff --git a/src/gallium/auxiliary/draw/draw_vs_llvm.c b/src/gallium/auxiliary/draw/draw_vs_llvm.c
index de074be..a08c304 100644
--- a/src/gallium/auxiliary/draw/draw_vs_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_vs_llvm.c
@@ -98,7 +98,7 @@ draw_create_vs_llvm(struct draw_context *draw,
tgsi_scan_shader(state->tokens, &vs->base.info);
- vs->variant_key_size =
+ vs->variant_key_size =
draw_llvm_variant_key_size(
vs->base.info.file_max[TGSI_FILE_INPUT]+1,
vs->base.info.file_max[TGSI_FILE_SAMPLER]+1);
diff --git a/src/gallium/auxiliary/draw/draw_vs_ppc.c b/src/gallium/auxiliary/draw/draw_vs_ppc.c
index 5df8491..85fabcb 100644
--- a/src/gallium/auxiliary/draw/draw_vs_ppc.c
+++ b/src/gallium/auxiliary/draw/draw_vs_ppc.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -157,7 +157,7 @@ static void
vs_ppc_delete( struct draw_vertex_shader *base )
{
struct draw_ppc_vertex_shader *shader = (struct draw_ppc_vertex_shader *)base;
-
+
ppc_release_func( &shader->ppc_program );
align_free( (void *) shader->base.immediates );
@@ -174,7 +174,7 @@ draw_create_vs_ppc(struct draw_context *draw,
struct draw_ppc_vertex_shader *vs;
vs = CALLOC_STRUCT( draw_ppc_vertex_shader );
- if (vs == NULL)
+ if (vs == NULL)
return NULL;
/* we make a private copy of the tokens */
@@ -194,7 +194,7 @@ draw_create_vs_ppc(struct draw_context *draw,
vs->base.prepare = vs_ppc_prepare;
vs->base.run_linear = vs_ppc_run_linear;
vs->base.delete = vs_ppc_delete;
-
+
vs->base.immediates = align_malloc(TGSI_EXEC_NUM_IMMEDIATES * 4 *
sizeof(float), 16);
@@ -206,16 +206,16 @@ draw_create_vs_ppc(struct draw_context *draw,
#endif
if (!tgsi_emit_ppc( (struct tgsi_token *) vs->base.state.tokens,
- &vs->ppc_program,
- (float (*)[4]) vs->base.immediates,
- TRUE ))
+ &vs->ppc_program,
+ (float (*)[4]) vs->base.immediates,
+ TRUE ))
goto fail;
-
+
vs->func = (codegen_function) ppc_get_func( &vs->ppc_program );
if (!vs->func) {
goto fail;
}
-
+
return &vs->base;
fail:
@@ -224,7 +224,7 @@ draw_create_vs_ppc(struct draw_context *draw,
*/
ppc_release_func( &vs->ppc_program );
-
+
FREE(vs);
return NULL;
}
diff --git a/src/gallium/auxiliary/draw/draw_vs_sse.c b/src/gallium/auxiliary/draw/draw_vs_sse.c
index 0b0c607..fd93d47 100644
--- a/src/gallium/auxiliary/draw/draw_vs_sse.c
+++ b/src/gallium/auxiliary/draw/draw_vs_sse.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -58,7 +58,7 @@ struct draw_sse_vertex_shader {
struct x86_function sse2_program;
tgsi_sse2_vs_func func;
-
+
struct tgsi_exec_machine *machine;
};
@@ -134,7 +134,7 @@ static void
vs_sse_delete( struct draw_vertex_shader *base )
{
struct draw_sse_vertex_shader *shader = (struct draw_sse_vertex_shader *)base;
-
+
x86_release_func( &shader->sse2_program );
align_free( (void *) shader->base.immediates );
@@ -154,7 +154,7 @@ draw_create_vs_sse(struct draw_context *draw,
return NULL;
vs = CALLOC_STRUCT( draw_sse_vertex_shader );
- if (vs == NULL)
+ if (vs == NULL)
return NULL;
/* we make a private copy of the tokens */
@@ -172,32 +172,32 @@ draw_create_vs_sse(struct draw_context *draw,
vs->base.prepare = vs_sse_prepare;
vs->base.run_linear = vs_sse_run_linear;
vs->base.delete = vs_sse_delete;
-
+
vs->base.immediates = align_malloc(TGSI_EXEC_NUM_IMMEDIATES * 4 *
sizeof(float), 16);
vs->machine = draw->vs.machine;
-
+
x86_init_func( &vs->sse2_program );
if (!tgsi_emit_sse2( (struct tgsi_token *) vs->base.state.tokens,
- &vs->sse2_program,
- (float (*)[4])vs->base.immediates,
- TRUE ))
+ &vs->sse2_program,
+ (float (*)[4])vs->base.immediates,
+ TRUE ))
goto fail;
-
+
vs->func = (tgsi_sse2_vs_func) x86_get_func( &vs->sse2_program );
if (!vs->func) {
goto fail;
}
-
+
return &vs->base;
fail:
debug_error("tgsi_emit_sse2() failed, falling back to interpreter\n");
x86_release_func( &vs->sse2_program );
-
+
FREE(vs);
return NULL;
}
diff --git a/src/gallium/auxiliary/draw/draw_vs_varient.c b/src/gallium/auxiliary/draw/draw_vs_varient.c
index eacd160..00deec5 100644
--- a/src/gallium/auxiliary/draw/draw_vs_varient.c
+++ b/src/gallium/auxiliary/draw/draw_vs_varient.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -39,18 +39,18 @@
#include "draw/draw_vs.h"
#include "translate/translate.h"
-/* A first pass at incorporating vertex fetch/emit functionality into
+/* A first pass at incorporating vertex fetch/emit functionality into
*/
struct draw_vs_varient_generic {
struct draw_vs_varient base;
struct draw_vertex_shader *shader;
struct draw_context *draw;
-
+
/* Basic plan is to run these two translate functions before/after
* the vertex shader's existing run_linear() routine to simulate
- * the inclusion of this functionality into the shader...
- *
+ * the inclusion of this functionality into the shader...
+ *
* Next will look at actually including it.
*/
struct translate *fetch;
@@ -71,9 +71,9 @@ static void vsvg_set_buffer( struct draw_vs_varient *varient,
{
struct draw_vs_varient_generic *vsvg = (struct draw_vs_varient_generic *)varient;
- vsvg->fetch->set_buffer(vsvg->fetch,
- buffer,
- ptr,
+ vsvg->fetch->set_buffer(vsvg->fetch,
+ buffer,
+ ptr,
stride,
max_index );
}
@@ -124,7 +124,7 @@ static void do_viewport( struct draw_vs_varient_generic *vsvg,
data[2] = data[2] * scale[2] + trans[2];
}
}
-
+
static void PIPE_CDECL vsvg_run_elts( struct draw_vs_varient *varient,
const unsigned *elts,
@@ -134,25 +134,25 @@ static void PIPE_CDECL vsvg_run_elts( struct draw_vs_varient *varient,
struct draw_vs_varient_generic *vsvg = (struct draw_vs_varient_generic *)varient;
unsigned temp_vertex_stride = vsvg->temp_vertex_stride;
void *temp_buffer = MALLOC( align(count,4) * temp_vertex_stride );
-
+
if (0) debug_printf("%s %d \n", __FUNCTION__, count);
-
+
/* Want to do this in small batches for cache locality?
*/
-
- vsvg->fetch->run_elts( vsvg->fetch,
+
+ vsvg->fetch->run_elts( vsvg->fetch,
elts,
count,
vsvg->draw->instance_id,
temp_buffer );
- vsvg->base.vs->run_linear( vsvg->base.vs,
+ vsvg->base.vs->run_linear( vsvg->base.vs,
temp_buffer,
temp_buffer,
vsvg->base.vs->draw->pt.user.vs_constants,
vsvg->base.vs->draw->pt.user.vs_constants_size,
count,
- temp_vertex_stride,
+ temp_vertex_stride,
temp_vertex_stride);
/* FIXME: geometry shading? */
@@ -173,12 +173,12 @@ static void PIPE_CDECL vsvg_run_elts( struct draw_vs_varient *varient,
vsvg->emit->set_buffer( vsvg->emit,
- 0,
+ 0,
temp_buffer,
temp_vertex_stride,
~0 );
- vsvg->emit->set_buffer( vsvg->emit,
+ vsvg->emit->set_buffer( vsvg->emit,
1,
&vsvg->draw->rasterizer->point_size,
0,
@@ -201,24 +201,24 @@ static void PIPE_CDECL vsvg_run_linear( struct draw_vs_varient *varient,
struct draw_vs_varient_generic *vsvg = (struct draw_vs_varient_generic *)varient;
unsigned temp_vertex_stride = vsvg->temp_vertex_stride;
void *temp_buffer = MALLOC( align(count,4) * temp_vertex_stride );
-
+
if (0) debug_printf("%s %d %d (sz %d, %d)\n", __FUNCTION__, start, count,
vsvg->base.key.output_stride,
temp_vertex_stride);
- vsvg->fetch->run( vsvg->fetch,
+ vsvg->fetch->run( vsvg->fetch,
start,
count,
vsvg->draw->instance_id,
temp_buffer );
- vsvg->base.vs->run_linear( vsvg->base.vs,
+ vsvg->base.vs->run_linear( vsvg->base.vs,
temp_buffer,
temp_buffer,
vsvg->base.vs->draw->pt.user.vs_constants,
vsvg->base.vs->draw->pt.user.vs_constants_size,
count,
- temp_vertex_stride,
+ temp_vertex_stride,
temp_vertex_stride);
if (vsvg->base.key.clip) {
@@ -236,17 +236,17 @@ static void PIPE_CDECL vsvg_run_linear( struct draw_vs_varient *varient,
}
vsvg->emit->set_buffer( vsvg->emit,
- 0,
+ 0,
temp_buffer,
temp_vertex_stride,
~0 );
-
- vsvg->emit->set_buffer( vsvg->emit,
+
+ vsvg->emit->set_buffer( vsvg->emit,
1,
&vsvg->draw->rasterizer->point_size,
0,
~0 );
-
+
vsvg->emit->run( vsvg->emit,
0, count,
vsvg->draw->instance_id,
@@ -308,7 +308,7 @@ draw_vs_create_varient_generic( struct draw_vertex_shader *vs,
emit.output_stride = key->output_stride;
for (i = 0; i < key->nr_outputs; i++) {
if (key->element[i].out.format != EMIT_1F_PSIZE)
- {
+ {
emit.element[i].type = TRANSLATE_ELEMENT_NORMAL;
emit.element[i].input_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
emit.element[i].input_buffer = 0;
diff --git a/src/gallium/auxiliary/gallivm/f.cpp b/src/gallium/auxiliary/gallivm/f.cpp
index 5eb09c0..84d9ff5 100644
--- a/src/gallium/auxiliary/gallivm/f.cpp
+++ b/src/gallium/auxiliary/gallivm/f.cpp
@@ -18,7 +18,7 @@
* - Download and abuild the NTL library from
* http://shoup.net/ntl/download.html
*
- * - Download boost source code matching to your distro.
+ * - Download boost source code matching to your distro.
*
* - Goto libs/math/minimax and replace f.cpp with this file.
*
@@ -26,7 +26,7 @@
*
* g++ -o minimax -I /path/to/ntl/include main.cpp f.cpp /path/to/ntl/src/ntl.a -lboost_math_tr1
*
- * - Run as
+ * - Run as
*
* ./minimax
*
@@ -52,7 +52,7 @@
boost::math::ntl::RR f(const boost::math::ntl::RR& x, int variant)
{
static const boost::math::ntl::RR tiny = boost::math::tools::min_value() * 64;
-
+
switch(variant)
{
case 0:
@@ -69,10 +69,10 @@ boost::math::ntl::RR f(const boost::math::ntl::RR& x, int variant)
void show_extra(
- const boost::math::tools::polynomial& n,
- const boost::math::tools::polynomial& d,
- const boost::math::ntl::RR& x_offset,
- const boost::math::ntl::RR& y_offset,
+ const boost::math::tools::polynomial& n,
+ const boost::math::tools::polynomial& d,
+ const boost::math::ntl::RR& x_offset,
+ const boost::math::ntl::RR& y_offset,
int variant)
{
switch(variant)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld.h b/src/gallium/auxiliary/gallivm/lp_bld.h
index ee05c6b..355da7e 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld.h
@@ -46,7 +46,7 @@
* for a standalone example.
*/
-#include
+#include
/** Ensure HAVE_LLVM is set to avoid #ifdef HAVE_LLVM everywhere */
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
index 02b3bde..0be5b25 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c
@@ -239,7 +239,7 @@ lp_build_add(struct lp_build_context *bld,
if(type.width == 16)
intrinsic = type.sign ? "llvm.x86.sse2.padds.w" : "llvm.x86.sse2.paddus.w";
}
-
+
if(intrinsic)
return lp_build_intrinsic_binary(builder, intrinsic, lp_build_vec_type(bld->gallivm, bld->type), a, b);
}
@@ -340,7 +340,7 @@ lp_build_sub(struct lp_build_context *bld,
if(type.width == 16)
intrinsic = type.sign ? "llvm.x86.sse2.psubs.w" : "llvm.x86.sse2.psubus.w";
}
-
+
if(intrinsic)
return lp_build_intrinsic_binary(builder, intrinsic, lp_build_vec_type(bld->gallivm, bld->type), a, b);
}
@@ -369,11 +369,11 @@ lp_build_sub(struct lp_build_context *bld,
* - alpha plus one
*
* makes the following approximation to the division (Sree)
- *
+ *
* a*b/255 ~= (a*(b + 1)) >> 256
- *
+ *
* which is the fastest method that satisfies the following OpenGL criteria
- *
+ *
* 0*0 = 0 and 255*255 = 255
*
* - geometric series
@@ -399,9 +399,9 @@ lp_build_sub(struct lp_build_context *bld,
*
* achieving the exact results
*
- * @sa Alvy Ray Smith, Image Compositing Fundamentals, Tech Memo 4, Aug 15, 1995,
+ * @sa Alvy Ray Smith, Image Compositing Fundamentals, Tech Memo 4, Aug 15, 1995,
* ftp://ftp.alvyray.com/Acrobat/4_Comp.pdf
- * @sa Michael Herf, The "double blend trick", May 2000,
+ * @sa Michael Herf, The "double blend trick", May 2000,
* http://www.stereopsis.com/doubleblend.html
*/
static LLVMValueRef
@@ -418,22 +418,22 @@ lp_build_mul_u8n(struct gallivm_state *gallivm,
assert(lp_check_value(i16_type, b));
c8 = lp_build_const_int_vec(gallivm, i16_type, 8);
-
+
#if 0
-
+
/* a*b/255 ~= (a*(b + 1)) >> 256 */
b = LLVMBuildAdd(builder, b, lp_build_const_int_vec(gallium, i16_type, 1), "");
ab = LLVMBuildMul(builder, a, b, "");
#else
-
+
/* ab/255 ~= (ab + (ab >> 8) + 0x80) >> 8 */
ab = LLVMBuildMul(builder, a, b, "");
ab = LLVMBuildAdd(builder, ab, LLVMBuildLShr(builder, ab, c8, ""), "");
ab = LLVMBuildAdd(builder, ab, lp_build_const_int_vec(gallivm, i16_type, 0x80), "");
#endif
-
+
ab = LLVMBuildLShr(builder, ab, c8, "");
return ab;
@@ -480,7 +480,7 @@ lp_build_mul(struct lp_build_context *bld,
abh = lp_build_mul_u8n(bld->gallivm, i16_type, ah, bh);
ab = lp_build_pack2(bld->gallivm, i16_type, type, abl, abh);
-
+
return ab;
}
@@ -1715,7 +1715,7 @@ lp_build_sin(struct lp_build_context *bld,
* scale by 4/Pi
* y = _mm_mul_ps(x, *(v4sf*)_ps_cephes_FOPI);
*/
-
+
LLVMValueRef FOPi = lp_build_const_v4sf(gallivm, 1.27323954473516);
LLVMValueRef scale_y = LLVMBuildFMul(b, x_abs, FOPi, "scale_y");
@@ -1723,7 +1723,7 @@ lp_build_sin(struct lp_build_context *bld,
* store the integer part of y in mm0
* emm2 = _mm_cvttps_epi32(y);
*/
-
+
LLVMValueRef emm2_i = LLVMBuildFPToSI(b, scale_y, v4si, "emm2_i");
/*
@@ -1749,19 +1749,19 @@ lp_build_sin(struct lp_build_context *bld,
*/
LLVMValueRef pi32_4 = lp_build_const_v4si(bld->gallivm, 4);
LLVMValueRef emm0_and = LLVMBuildAnd(b, emm2_add, pi32_4, "emm0_and");
-
+
/*
* emm2 = _mm_slli_epi32(emm0, 29);
- */
+ */
LLVMValueRef const_29 = lp_build_const_v4si(bld->gallivm, 29);
LLVMValueRef swap_sign_bit = LLVMBuildShl(b, emm0_and, const_29, "swap_sign_bit");
/*
- * get the polynom selection mask
+ * get the polynom selection mask
* there is one polynom for 0 <= x <= Pi/4
* and another one for Pi/4gallivm, 4);
LLVMValueRef emm0_and = LLVMBuildAnd(b, emm0_not, pi32_4, "emm0_and");
-
+
/*
* emm2 = _mm_slli_epi32(emm0, 29);
- */
+ */
LLVMValueRef const_29 = lp_build_const_v4si(bld->gallivm, 29);
LLVMValueRef sign_bit = LLVMBuildShl(b, emm0_and, const_29, "sign_bit");
/*
- * get the polynom selection mask
+ * get the polynom selection mask
* there is one polynom for 0 <= x <= Pi/4
* and another one for Pi/4 1x16ub
+ /* Special case 4x4f --> 1x16ub
*/
if (src_type.floating == 1 &&
src_type.fixed == 0 &&
@@ -386,7 +386,7 @@ lp_build_conv(struct gallivm_state *gallivm,
hi = lp_build_pack2(gallivm, int32_type, int16_type, src_int2, src_int3);
dst[i] = lp_build_pack2(gallivm, int16_type, dst_type, lo, hi);
}
- return;
+ return;
}
/*
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_flow.c b/src/gallium/auxiliary/gallivm/lp_bld_flow.c
index a9c9c7a..c41a1c7 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_flow.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_flow.c
@@ -208,7 +208,7 @@ void
lp_build_loop_begin(struct lp_build_loop_state *state,
struct gallivm_state *gallivm,
LLVMValueRef start)
-
+
{
LLVMBuilderRef builder = gallivm->builder;
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
index 8a4261f..178413c 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c
@@ -333,7 +333,7 @@ lp_build_pack_rgba_aos(struct gallivm_state *gallivm,
casted = LLVMBuildFPToSI(builder, scaled, LLVMVectorType(LLVMInt32TypeInContext(gallivm->context), 4), "");
shifted = LLVMBuildShl(builder, casted, LLVMConstVector(shifts, 4), "");
-
+
/* Bitwise or all components */
for (i = 0; i < 4; ++i) {
if (desc->channel[i].type == UTIL_FORMAT_TYPE_UNSIGNED) {
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index efe8d38..56c3531 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -396,7 +396,7 @@ lp_build_init(void)
LLVMLinkInJIT();
util_cpu_detect();
-
+
gallivm_initialized = TRUE;
#if 0
@@ -441,7 +441,7 @@ gallivm_destroy(struct gallivm_state *gallivm)
-/*
+/*
* Hack to allow the linking of release LLVM static libraries on a debug build.
*
* See also:
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_logic.c b/src/gallium/auxiliary/gallivm/lp_bld_logic.c
index f7e6fba..8af30b5 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_logic.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_logic.c
@@ -60,7 +60,7 @@
* sext <4 x i1> %C to <4 x i32>
*
* is valid and supported (e.g., llvm/test/CodeGen/X86/vec_compare.ll), but
- * it causes assertion failures in LLVM 2.6. It appears to work correctly on
+ * it causes assertion failures in LLVM 2.6. It appears to work correctly on
* LLVM 2.7.
*/
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_printf.c b/src/gallium/auxiliary/gallivm/lp_bld_printf.c
index 60cc609..57c62fe 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_printf.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_printf.c
@@ -66,7 +66,7 @@ lp_get_printf_arg_count(const char *fmt)
return count;
}
-LLVMValueRef
+LLVMValueRef
lp_build_const_string_variable(LLVMModuleRef module,
LLVMContextRef context,
const char *str, int len)
@@ -77,7 +77,7 @@ lp_build_const_string_variable(LLVMModuleRef module,
LLVMSetInitializer(string, LLVMConstStringInContext(context, str, len + 1, TRUE));
return string;
}
-
+
/**
* lp_build_printf.
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index 8ad3459..681cf36 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@ -533,7 +533,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
* mipmap level index.
* Note: this is all scalar code.
* \param lod scalar float texture level of detail
- * \param level_out returns integer
+ * \param level_out returns integer
*/
void
lp_build_nearest_mip_level(struct lp_build_sample_context *bld,
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
index 991f6fa..e120652 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
@@ -1062,7 +1062,7 @@ lp_build_sample_aos(struct lp_build_sample_context *bld,
lp_build_else(&if_ctx);
{
/* Use the magnification filter */
- lp_build_sample_mipmap(bld,
+ lp_build_sample_mipmap(bld,
mag_filter, PIPE_TEX_MIPFILTER_NONE,
s, t, r,
i32t_zero, NULL, NULL,
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index cf46e2b..359ef6a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -173,7 +173,7 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
if (use_border) {
/* select texel color or border color depending on use_border */
- LLVMValueRef border_color_ptr =
+ LLVMValueRef border_color_ptr =
bld->dynamic_state->border_color(bld->dynamic_state,
bld->gallivm, unit);
int chan;
@@ -442,7 +442,7 @@ lp_build_sample_wrap_nearest(struct lp_build_sample_context *bld,
LLVMBuilderRef builder = bld->gallivm->builder;
LLVMValueRef length_minus_one = lp_build_sub(int_coord_bld, length, int_coord_bld->one);
LLVMValueRef icoord;
-
+
switch(wrap_mode) {
case PIPE_TEX_WRAP_REPEAT:
coord = lp_build_mul(coord_bld, coord, length_f);
@@ -1136,7 +1136,7 @@ lp_build_sample_nop(struct gallivm_state *gallivm, struct lp_type type,
for (chan = 0; chan < 4; chan++) {
texel_out[chan] = one;
- }
+ }
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
index a021efd..9914e6f 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
@@ -105,7 +105,7 @@ struct lp_build_tgsi_aos_context
/**
- * Wrapper around lp_build_swizzle_aos which translates swizzles to another
+ * Wrapper around lp_build_swizzle_aos which translates swizzles to another
* ordering.
*/
static LLVMValueRef
@@ -1026,7 +1026,7 @@ emit_instruction(
default:
return FALSE;
}
-
+
if (info->num_dst) {
emit_store(bld, inst, 0, dst0);
}
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 1b5a8a5..d46e4ee 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -984,7 +984,7 @@ emit_store(
int i;
/* build pixel offset vector: {0, 1, 2, 3, ...} */
- pixel_offsets = uint_bld->undef;
+ pixel_offsets = uint_bld->undef;
for (i = 0; i < bld->base.type.length; i++) {
LLVMValueRef ii = lp_build_const_int32(gallivm, i);
pixel_offsets = LLVMBuildInsertElement(builder, pixel_offsets,
@@ -2301,7 +2301,7 @@ emit_instruction(
default:
return FALSE;
}
-
+
if(info->num_dst) {
LLVMValueRef pred[NUM_CHANNELS];
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.c b/src/gallium/auxiliary/gallivm/lp_bld_type.c
index c5cf6d4..237fb5f 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_type.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_type.c
@@ -73,7 +73,7 @@ lp_build_vec_type(struct gallivm_state *gallivm,struct lp_type type)
* type and check for identity.
*/
boolean
-lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type)
+lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type)
{
LLVMTypeKind elem_kind;
@@ -106,12 +106,12 @@ lp_check_elem_type(struct lp_type type, LLVMTypeRef elem_type)
return FALSE;
}
- return TRUE;
+ return TRUE;
}
boolean
-lp_check_vec_type(struct lp_type type, LLVMTypeRef vec_type)
+lp_check_vec_type(struct lp_type type, LLVMTypeRef vec_type)
{
LLVMTypeRef elem_type;
@@ -135,7 +135,7 @@ lp_check_vec_type(struct lp_type type, LLVMTypeRef vec_type)
boolean
-lp_check_value(struct lp_type type, LLVMValueRef val)
+lp_check_value(struct lp_type type, LLVMValueRef val)
{
LLVMTypeRef vec_type;
diff --git a/src/gallium/auxiliary/indices/u_indices.c b/src/gallium/auxiliary/indices/u_indices.c
index 03d7453..f1bb594 100644
--- a/src/gallium/auxiliary/indices/u_indices.c
+++ b/src/gallium/auxiliary/indices/u_indices.c
@@ -31,14 +31,14 @@ static void translate_memcpy_ushort( const void *in,
{
memcpy(out, in, nr*sizeof(short));
}
-
+
static void translate_memcpy_uint( const void *in,
unsigned nr,
void *out )
{
memcpy(out, in, nr*sizeof(int));
}
-
+
int u_index_translator( unsigned hw_mask,
unsigned prim,
@@ -61,9 +61,9 @@ int u_index_translator( unsigned hw_mask,
*out_index_size = (in_index_size == 4) ? 4 : 2;
out_idx = out_size_idx(*out_index_size);
- if ((hw_mask & (1< 0xfffe) ? 4 : 2;
out_idx = out_size_idx(*out_index_size);
- if ((hw_mask & (1<
-#include
-#include
-#include
+#include
+#include
+#include
+#include
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
@@ -60,7 +60,7 @@
#ifdef PIPE_SUBSYSTEM_WINDOWS_DISPLAY
-static INLINE void
+static INLINE void
_EngDebugPrint(const char *format, ...)
{
va_list ap;
@@ -85,16 +85,16 @@ os_log_message(const char *message)
}
#elif defined(PIPE_SUBSYSTEM_WINDOWS_CE)
wchar_t *wide_format;
- long wide_str_len;
- /* Format is ascii - needs to be converted to wchar_t for printing */
+ long wide_str_len;
+ /* Format is ascii - needs to be converted to wchar_t for printing */
wide_str_len = MultiByteToWideChar(CP_ACP, 0, message, -1, NULL, 0);
- wide_format = (wchar_t *) malloc((wide_str_len+1) * sizeof(wchar_t));
- if (wide_format) {
+ wide_format = (wchar_t *) malloc((wide_str_len+1) * sizeof(wchar_t));
+ if (wide_format) {
MultiByteToWideChar(CP_ACP, 0, message, -1,
- wide_format, wide_str_len);
- NKDbgPrintfW(wide_format, wide_format);
- free(wide_format);
- }
+ wide_format, wide_str_len);
+ NKDbgPrintfW(wide_format, wide_format);
+ free(wide_format);
+ }
#elif defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
/* TODO */
#else /* !PIPE_SUBSYSTEM_WINDOWS */
@@ -153,7 +153,7 @@ os_get_option(const char *name)
const void *pMap = NULL;
const char *sol, *eol, *sep;
static char output[1024];
-
+
pMap = EngMapFile(L"\\??\\c:\\gallium.cfg", 0, &iFile);
if(pMap) {
sol = (const char *)pMap;
@@ -178,7 +178,7 @@ os_get_option(const char *name)
#else
return NULL;
#endif
-#elif defined(PIPE_SUBSYSTEM_WINDOWS_CE) || defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_CE) || defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
/* TODO: implement */
return NULL;
#else
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h
index a084310..0c1b6df 100644
--- a/src/gallium/auxiliary/os/os_thread.h
+++ b/src/gallium/auxiliary/os/os_thread.h
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 1999-2006 Brian Paul
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
@@ -20,13 +20,13 @@
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
- *
+ *
* Thread, mutex, condition variable, barrier, semaphore and
* thread-specific data functions.
*/
diff --git a/src/gallium/auxiliary/os/os_time.c b/src/gallium/auxiliary/os/os_time.c
index 2e1527b..dc607b8 100644
--- a/src/gallium/auxiliary/os/os_time.c
+++ b/src/gallium/auxiliary/os/os_time.c
@@ -28,7 +28,7 @@
/**
* @file
* OS independent time-manipulation functions.
- *
+ *
* @author Jose Fonseca
*/
@@ -100,17 +100,17 @@ os_time_sleep(int64_t usecs)
{
static LONGLONG frequency;
LONGLONG start, curr, end;
-
+
EngQueryPerformanceCounter(&start);
-
+
if(!frequency)
EngQueryPerformanceFrequency(&frequency);
-
+
end = start + (usecs * frequency + 999999LL)/1000000LL;
-
+
do {
EngQueryPerformanceCounter(&curr);
- } while(start <= curr && curr < end ||
+ } while(start <= curr && curr < end ||
end < start && (curr < end || start <= curr));
}
diff --git a/src/gallium/auxiliary/os/os_time.h b/src/gallium/auxiliary/os/os_time.h
index 4836ccb..54f5078 100644
--- a/src/gallium/auxiliary/os/os_time.h
+++ b/src/gallium/auxiliary/os/os_time.h
@@ -28,7 +28,7 @@
/**
* @file
* OS independent time-manipulation functions.
- *
+ *
* @author Jose Fonseca
*/
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer.h b/src/gallium/auxiliary/pipebuffer/pb_buffer.h
index 5a13f39..8946fe8 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer.h
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer.h
@@ -28,15 +28,15 @@
/**
* \file
* Generic code for buffers.
- *
- * Behind a pipe buffle handle there can be DMA buffers, client (or user)
- * buffers, regular malloced buffers, etc. This file provides an abstract base
- * buffer handle that allows the driver to cope with all those kinds of buffers
+ *
+ * Behind a pipe buffle handle there can be DMA buffers, client (or user)
+ * buffers, regular malloced buffers, etc. This file provides an abstract base
+ * buffer handle that allows the driver to cope with all those kinds of buffers
* in a more flexible way.
- *
+ *
* There is no obligation of a winsys driver to use this library. And a pipe
* driver should be completly agnostic about it.
- *
+ *
* \author Jose Fonseca
*/
@@ -76,7 +76,7 @@ struct pipe_fence_handle;
/**
* Buffer description.
- *
+ *
* Used when allocating the buffer.
*/
struct pb_desc
@@ -95,7 +95,7 @@ typedef unsigned pb_size;
/**
* Base class for all pb_* buffers.
*/
-struct pb_buffer
+struct pb_buffer
{
/* This used to be a pipe_buffer struct:
*/
@@ -109,8 +109,8 @@ struct pb_buffer
/**
* Pointer to the virtual function table.
*
- * Avoid accessing this table directly. Use the inline functions below
- * instead to avoid mistakes.
+ * Avoid accessing this table directly. Use the inline functions below
+ * instead to avoid mistakes.
*/
const struct pb_vtbl *vtbl;
};
@@ -118,44 +118,44 @@ struct pb_buffer
/**
* Virtual function table for the buffer storage operations.
- *
+ *
* Note that creation is not done through this table.
*/
struct pb_vtbl
{
void (*destroy)( struct pb_buffer *buf );
- /**
+ /**
* Map the entire data store of a buffer object into the client's address.
- * flags is bitmask of PB_USAGE_CPU_READ/WRITE.
+ * flags is bitmask of PB_USAGE_CPU_READ/WRITE.
*/
- void *(*map)( struct pb_buffer *buf,
+ void *(*map)( struct pb_buffer *buf,
unsigned flags, void *flush_ctx );
-
+
void (*unmap)( struct pb_buffer *buf );
- enum pipe_error (*validate)( struct pb_buffer *buf,
+ enum pipe_error (*validate)( struct pb_buffer *buf,
struct pb_validate *vl,
unsigned flags );
- void (*fence)( struct pb_buffer *buf,
+ void (*fence)( struct pb_buffer *buf,
struct pipe_fence_handle *fence );
/**
* Get the base buffer and the offset.
- *
+ *
* A buffer can be subdivided in smaller buffers. This method should return
* the underlaying buffer, and the relative offset.
- *
- * Buffers without an underlaying base buffer should return themselves, with
+ *
+ * Buffers without an underlaying base buffer should return themselves, with
* a zero offset.
- *
+ *
* Note that this will increase the reference count of the base buffer.
*/
void (*get_base_buffer)( struct pb_buffer *buf,
struct pb_buffer **base_buf,
pb_size *offset );
-
+
};
@@ -163,7 +163,7 @@ struct pb_vtbl
/* Accessor functions for pb->vtbl:
*/
static INLINE void *
-pb_map(struct pb_buffer *buf,
+pb_map(struct pb_buffer *buf,
unsigned flags, void *flush_ctx)
{
assert(buf);
@@ -174,7 +174,7 @@ pb_map(struct pb_buffer *buf,
}
-static INLINE void
+static INLINE void
pb_unmap(struct pb_buffer *buf)
{
assert(buf);
@@ -204,7 +204,7 @@ pb_get_base_buffer( struct pb_buffer *buf,
}
-static INLINE enum pipe_error
+static INLINE enum pipe_error
pb_validate(struct pb_buffer *buf, struct pb_validate *vl, unsigned flags)
{
assert(buf);
@@ -215,7 +215,7 @@ pb_validate(struct pb_buffer *buf, struct pb_validate *vl, unsigned flags)
}
-static INLINE void
+static INLINE void
pb_fence(struct pb_buffer *buf, struct pipe_fence_handle *fence)
{
assert(buf);
@@ -226,7 +226,7 @@ pb_fence(struct pb_buffer *buf, struct pipe_fence_handle *fence)
}
-static INLINE void
+static INLINE void
pb_destroy(struct pb_buffer *buf)
{
assert(buf);
@@ -277,11 +277,11 @@ pb_check_usage(unsigned requested, unsigned provided)
/**
- * Malloc-based buffer to store data that can't be used by the graphics
+ * Malloc-based buffer to store data that can't be used by the graphics
* hardware.
*/
struct pb_buffer *
-pb_malloc_buffer_create(pb_size size,
+pb_malloc_buffer_create(pb_size size,
const struct pb_desc *desc);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
index c310f28..e58fcd1 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
@@ -692,7 +692,7 @@ fenced_buffer_map(struct pb_buffer *buf,
((fenced_buf->flags & PB_USAGE_GPU_READ) &&
(flags & PB_USAGE_CPU_WRITE))) {
- /*
+ /*
* Don't wait for the GPU to finish accessing it, if blocking is forbidden.
*/
if((flags & PB_USAGE_DONTBLOCK) &&
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
index 004c2b9..de335e1 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h
@@ -28,22 +28,22 @@
/**
* \file
* Buffer fencing.
- *
- * "Fenced buffers" is actually a misnomer. They should be referred as
+ *
+ * "Fenced buffers" is actually a misnomer. They should be referred as
* "fenceable buffers", i.e, buffers that can be fenced, but I couldn't find
* the word "fenceable" in the dictionary.
- *
- * A "fenced buffer" is a decorator around a normal buffer, which adds two
+ *
+ * A "fenced buffer" is a decorator around a normal buffer, which adds two
* special properties:
* - the ability for the destruction to be delayed by a fence;
* - reference counting.
- *
- * Usually DMA buffers have a life-time that will extend the life-time of its
- * handle. The end-of-life is dictated by the fence signalling.
- *
- * Between the handle's destruction, and the fence signalling, the buffer is
+ *
+ * Usually DMA buffers have a life-time that will extend the life-time of its
+ * handle. The end-of-life is dictated by the fence signalling.
+ *
+ * Between the handle's destruction, and the fence signalling, the buffer is
* stored in a fenced buffer list.
- *
+ *
* \author Jose Fonseca
*/
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
index c2322ee..5dcd1d2 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c
@@ -28,8 +28,8 @@
/**
* \file
* Implementation of malloc-based buffers to store data that can't be processed
- * by the hardware.
- *
+ * by the hardware.
+ *
* \author Jose Fonseca
*/
@@ -40,7 +40,7 @@
#include "pb_bufmgr.h"
-struct malloc_buffer
+struct malloc_buffer
{
struct pb_buffer base;
void *data;
@@ -69,7 +69,7 @@ malloc_buffer_destroy(struct pb_buffer *buf)
static void *
-malloc_buffer_map(struct pb_buffer *buf,
+malloc_buffer_map(struct pb_buffer *buf,
unsigned flags,
void *flush_ctx)
{
@@ -84,8 +84,8 @@ malloc_buffer_unmap(struct pb_buffer *buf)
}
-static enum pipe_error
-malloc_buffer_validate(struct pb_buffer *buf,
+static enum pipe_error
+malloc_buffer_validate(struct pb_buffer *buf,
struct pb_validate *vl,
unsigned flags)
{
@@ -95,7 +95,7 @@ malloc_buffer_validate(struct pb_buffer *buf,
static void
-malloc_buffer_fence(struct pb_buffer *buf,
+malloc_buffer_fence(struct pb_buffer *buf,
struct pipe_fence_handle *fence)
{
assert(0);
@@ -112,7 +112,7 @@ malloc_buffer_get_base_buffer(struct pb_buffer *buf,
}
-const struct pb_vtbl
+const struct pb_vtbl
malloc_buffer_vtbl = {
malloc_buffer_destroy,
malloc_buffer_map,
@@ -125,12 +125,12 @@ malloc_buffer_vtbl = {
struct pb_buffer *
pb_malloc_buffer_create(pb_size size,
- const struct pb_desc *desc)
+ const struct pb_desc *desc)
{
struct malloc_buffer *buf;
-
+
/* TODO: do a single allocation */
-
+
buf = CALLOC_STRUCT(malloc_buffer);
if(!buf)
return NULL;
@@ -152,29 +152,29 @@ pb_malloc_buffer_create(pb_size size,
static struct pb_buffer *
-pb_malloc_bufmgr_create_buffer(struct pb_manager *mgr,
+pb_malloc_bufmgr_create_buffer(struct pb_manager *mgr,
pb_size size,
- const struct pb_desc *desc)
+ const struct pb_desc *desc)
{
return pb_malloc_buffer_create(size, desc);
}
static void
-pb_malloc_bufmgr_flush(struct pb_manager *mgr)
+pb_malloc_bufmgr_flush(struct pb_manager *mgr)
{
/* No-op */
}
static void
-pb_malloc_bufmgr_destroy(struct pb_manager *mgr)
+pb_malloc_bufmgr_destroy(struct pb_manager *mgr)
{
/* No-op */
}
-static struct pb_manager
+static struct pb_manager
pb_malloc_bufmgr = {
pb_malloc_bufmgr_destroy,
pb_malloc_bufmgr_create_buffer,
@@ -183,7 +183,7 @@ pb_malloc_bufmgr = {
struct pb_manager *
-pb_malloc_bufmgr_create(void)
+pb_malloc_bufmgr_create(void)
{
return &pb_malloc_bufmgr;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h
index 2ef0216..86c97fa 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h
@@ -28,21 +28,21 @@
/**
* \file
* Buffer management.
- *
+ *
* A buffer manager does only one basic thing: it creates buffers. Actually,
* "buffer factory" would probably a more accurate description.
- *
+ *
* You can chain buffer managers so that you can have a finer grained memory
* management and pooling.
- *
+ *
* For example, for a simple batch buffer manager you would chain:
* - the native buffer manager, which provides DMA memory from the graphics
* memory space;
* - the pool buffer manager, which keep around a pool of equally sized buffers
- * to avoid latency associated with the native buffer manager;
- * - the fenced buffer manager, which will delay buffer destruction until the
- * the moment the card finishing processing it.
- *
+ * to avoid latency associated with the native buffer manager;
+ * - the fenced buffer manager, which will delay buffer destruction until the
+ * the moment the card finishing processing it.
+ *
* \author Jose Fonseca
*/
@@ -61,7 +61,7 @@ extern "C" {
struct pb_desc;
-/**
+/**
* Abstract base class for all buffer managers.
*/
struct pb_manager
@@ -70,14 +70,14 @@ struct pb_manager
(*destroy)( struct pb_manager *mgr );
struct pb_buffer *
- (*create_buffer)( struct pb_manager *mgr,
+ (*create_buffer)( struct pb_manager *mgr,
pb_size size,
const struct pb_desc *desc);
/**
* Flush all temporary-held buffers.
- *
- * Used mostly to aid debugging memory issues or to clean up resources when
+ *
+ * Used mostly to aid debugging memory issues or to clean up resources when
* the drivers are long lived.
*/
void
@@ -87,45 +87,45 @@ struct pb_manager
/**
* Malloc buffer provider.
- *
+ *
* Simple wrapper around pb_malloc_buffer_create for convenience.
*/
struct pb_manager *
pb_malloc_bufmgr_create(void);
-/**
+/**
* Static buffer pool sub-allocator.
- *
+ *
* Manages the allocation of equally sized buffers. It does so by allocating
- * a single big buffer and divide it equally sized buffers.
- *
+ * a single big buffer and divide it equally sized buffers.
+ *
* It is meant to manage the allocation of batch buffer pools.
*/
struct pb_manager *
-pool_bufmgr_create(struct pb_manager *provider,
+pool_bufmgr_create(struct pb_manager *provider,
pb_size n, pb_size size,
const struct pb_desc *desc);
-/**
+/**
* Static sub-allocator based the old memory manager.
- *
+ *
* It managers buffers of different sizes. It does so by allocating a buffer
* with the size of the heap, and then using the old mm memory manager to manage
- * that heap.
+ * that heap.
*/
struct pb_manager *
-mm_bufmgr_create(struct pb_manager *provider,
+mm_bufmgr_create(struct pb_manager *provider,
pb_size size, pb_size align2);
/**
* Same as mm_bufmgr_create.
- *
+ *
* Buffer will be release when the manager is destroyed.
*/
struct pb_manager *
-mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
+mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
pb_size size, pb_size align2);
@@ -139,7 +139,7 @@ pb_slab_manager_create(struct pb_manager *provider,
const struct pb_desc *desc);
/**
- * Allow a range of buffer size, by aggregating multiple slabs sub-allocators
+ * Allow a range of buffer size, by aggregating multiple slabs sub-allocators
* with different bucket sizes.
*/
struct pb_manager *
@@ -150,24 +150,24 @@ pb_slab_range_manager_create(struct pb_manager *provider,
const struct pb_desc *desc);
-/**
+/**
* Time-based buffer cache.
*
- * This manager keeps a cache of destroyed buffers during a time interval.
+ * This manager keeps a cache of destroyed buffers during a time interval.
*/
struct pb_manager *
-pb_cache_manager_create(struct pb_manager *provider,
- unsigned usecs);
+pb_cache_manager_create(struct pb_manager *provider,
+ unsigned usecs);
struct pb_fence_ops;
-/**
+/**
* Fenced buffer manager.
*
* This manager is just meant for convenience. It wraps the buffers returned
- * by another manager in fenced buffers, so that
- *
+ * by another manager in fenced buffers, so that
+ *
* NOTE: the buffer manager that provides the buffers will be destroyed
* at the same time.
*/
@@ -179,32 +179,32 @@ fenced_bufmgr_create(struct pb_manager *provider,
struct pb_manager *
-pb_alt_manager_create(struct pb_manager *provider1,
+pb_alt_manager_create(struct pb_manager *provider1,
struct pb_manager *provider2);
-/**
+/**
* Ondemand buffer manager.
- *
+ *
* Buffers are created in malloc'ed memory (fast and cached), and the constents
- * is transfered to a buffer from the provider (typically in slow uncached
+ * is transfered to a buffer from the provider (typically in slow uncached
* memory) when there is an attempt to validate the buffer.
- *
+ *
* Ideal for situations where one does not know before hand whether a given
- * buffer will effectively be used by the hardware or not.
+ * buffer will effectively be used by the hardware or not.
*/
struct pb_manager *
-pb_ondemand_manager_create(struct pb_manager *provider);
+pb_ondemand_manager_create(struct pb_manager *provider);
-/**
+/**
* Debug buffer manager to detect buffer under- and overflows.
*
* Under/overflow sizes should be a multiple of the largest alignment
*/
struct pb_manager *
pb_debug_manager_create(struct pb_manager *provider,
- pb_size underflow_size, pb_size overflow_size);
+ pb_size underflow_size, pb_size overflow_size);
#ifdef __cplusplus
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c
index f60c836..94bed12 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c
@@ -28,7 +28,7 @@
/**
* \file
* Allocate buffers from two alternative buffer providers.
- *
+ *
* \author Jose Fonseca
*/
@@ -59,17 +59,17 @@ pb_alt_manager(struct pb_manager *mgr)
static struct pb_buffer *
-pb_alt_manager_create_buffer(struct pb_manager *_mgr,
+pb_alt_manager_create_buffer(struct pb_manager *_mgr,
pb_size size,
const struct pb_desc *desc)
{
struct pb_alt_manager *mgr = pb_alt_manager(_mgr);
struct pb_buffer *buf;
-
+
buf = mgr->provider1->create_buffer(mgr->provider1, size, desc);
if(buf)
return buf;
-
+
buf = mgr->provider2->create_buffer(mgr->provider2, size, desc);
return buf;
}
@@ -79,11 +79,11 @@ static void
pb_alt_manager_flush(struct pb_manager *_mgr)
{
struct pb_alt_manager *mgr = pb_alt_manager(_mgr);
-
+
assert(mgr->provider1->flush);
if(mgr->provider1->flush)
mgr->provider1->flush(mgr->provider1);
-
+
assert(mgr->provider2->flush);
if(mgr->provider2->flush)
mgr->provider2->flush(mgr->provider2);
@@ -98,14 +98,14 @@ pb_alt_manager_destroy(struct pb_manager *mgr)
struct pb_manager *
-pb_alt_manager_create(struct pb_manager *provider1,
+pb_alt_manager_create(struct pb_manager *provider1,
struct pb_manager *provider2)
{
struct pb_alt_manager *mgr;
if(!provider1 || !provider2)
return NULL;
-
+
mgr = CALLOC_STRUCT(pb_alt_manager);
if (!mgr)
return NULL;
@@ -115,6 +115,6 @@ pb_alt_manager_create(struct pb_manager *provider1,
mgr->base.flush = pb_alt_manager_flush;
mgr->provider1 = provider1;
mgr->provider2 = provider2;
-
+
return &mgr->base;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
index a6eb403..9cb0182 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c
@@ -28,7 +28,7 @@
/**
* \file
* Buffer cache.
- *
+ *
* \author Jose Fonseca
* \author Thomas Hellström
*/
@@ -60,7 +60,7 @@ struct pb_cache_manager;
struct pb_cache_buffer
{
struct pb_buffer base;
-
+
struct pb_buffer *buffer;
struct pb_cache_manager *mgr;
@@ -77,9 +77,9 @@ struct pb_cache_manager
struct pb_manager *provider;
unsigned usecs;
-
+
pipe_mutex mutex;
-
+
struct list_head delayed;
pb_size numDelayed;
};
@@ -119,7 +119,7 @@ _pb_cache_buffer_destroy(struct pb_cache_buffer *buf)
/**
- * Free as many cache buffers from the list head as possible.
+ * Free as many cache buffers from the list head as possible.
*/
static void
_pb_cache_buffer_list_check_free(struct pb_cache_manager *mgr)
@@ -127,9 +127,9 @@ _pb_cache_buffer_list_check_free(struct pb_cache_manager *mgr)
struct list_head *curr, *next;
struct pb_cache_buffer *buf;
int64_t now;
-
+
now = os_time_get();
-
+
curr = mgr->delayed.next;
next = curr->next;
while(curr != &mgr->delayed) {
@@ -137,10 +137,10 @@ _pb_cache_buffer_list_check_free(struct pb_cache_manager *mgr)
if(!os_time_timeout(buf->start, buf->end, now))
break;
-
+
_pb_cache_buffer_destroy(buf);
- curr = next;
+ curr = next;
next = curr->next;
}
}
@@ -149,14 +149,14 @@ _pb_cache_buffer_list_check_free(struct pb_cache_manager *mgr)
static void
pb_cache_buffer_destroy(struct pb_buffer *_buf)
{
- struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
+ struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
struct pb_cache_manager *mgr = buf->mgr;
pipe_mutex_lock(mgr->mutex);
assert(!pipe_is_referenced(&buf->base.base.reference));
-
+
_pb_cache_buffer_list_check_free(mgr);
-
+
buf->start = os_time_get();
buf->end = buf->start + mgr->usecs;
LIST_ADDTAIL(&buf->head, &mgr->delayed);
@@ -166,10 +166,10 @@ pb_cache_buffer_destroy(struct pb_buffer *_buf)
static void *
-pb_cache_buffer_map(struct pb_buffer *_buf,
+pb_cache_buffer_map(struct pb_buffer *_buf,
unsigned flags, void *flush_ctx)
{
- struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
+ struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
return pb_map(buf->buffer, flags, flush_ctx);
}
@@ -177,13 +177,13 @@ pb_cache_buffer_map(struct pb_buffer *_buf,
static void
pb_cache_buffer_unmap(struct pb_buffer *_buf)
{
- struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
+ struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
pb_unmap(buf->buffer);
}
-static enum pipe_error
-pb_cache_buffer_validate(struct pb_buffer *_buf,
+static enum pipe_error
+pb_cache_buffer_validate(struct pb_buffer *_buf,
struct pb_validate *vl,
unsigned flags)
{
@@ -193,7 +193,7 @@ pb_cache_buffer_validate(struct pb_buffer *_buf,
static void
-pb_cache_buffer_fence(struct pb_buffer *_buf,
+pb_cache_buffer_fence(struct pb_buffer *_buf,
struct pipe_fence_handle *fence)
{
struct pb_cache_buffer *buf = pb_cache_buffer(_buf);
@@ -211,7 +211,7 @@ pb_cache_buffer_get_base_buffer(struct pb_buffer *_buf,
}
-const struct pb_vtbl
+const struct pb_vtbl
pb_cache_buffer_vtbl = {
pb_cache_buffer_destroy,
pb_cache_buffer_map,
@@ -223,7 +223,7 @@ pb_cache_buffer_vtbl = {
static INLINE int
-pb_cache_is_buffer_compat(struct pb_cache_buffer *buf,
+pb_cache_is_buffer_compat(struct pb_cache_buffer *buf,
pb_size size,
const struct pb_desc *desc)
{
@@ -235,10 +235,10 @@ pb_cache_is_buffer_compat(struct pb_cache_buffer *buf,
/* be lenient with size */
if(buf->base.base.size >= 2*size)
return 0;
-
+
if(!pb_check_alignment(desc->alignment, buf->base.base.alignment))
return 0;
-
+
if(!pb_check_usage(desc->usage, buf->base.base.usage))
return 0;
@@ -248,13 +248,13 @@ pb_cache_is_buffer_compat(struct pb_cache_buffer *buf,
}
pb_unmap(buf->buffer);
-
+
return 1;
}
static struct pb_buffer *
-pb_cache_manager_create_buffer(struct pb_manager *_mgr,
+pb_cache_manager_create_buffer(struct pb_manager *_mgr,
pb_size size,
const struct pb_desc *desc)
{
@@ -270,7 +270,7 @@ pb_cache_manager_create_buffer(struct pb_manager *_mgr,
buf = NULL;
curr = mgr->delayed.next;
next = curr->next;
-
+
/* search in the expired buffers, freeing them in the process */
now = os_time_get();
while(curr != &mgr->delayed) {
@@ -284,7 +284,7 @@ pb_cache_manager_create_buffer(struct pb_manager *_mgr,
break;
if (ret == -1)
break;
- curr = next;
+ curr = next;
next = curr->next;
}
@@ -304,7 +304,7 @@ pb_cache_manager_create_buffer(struct pb_manager *_mgr,
next = curr->next;
}
}
-
+
if(buf) {
LIST_DEL(&buf->head);
--mgr->numDelayed;
@@ -313,32 +313,32 @@ pb_cache_manager_create_buffer(struct pb_manager *_mgr,
pipe_reference_init(&buf->base.base.reference, 1);
return &buf->base;
}
-
+
pipe_mutex_unlock(mgr->mutex);
buf = CALLOC_STRUCT(pb_cache_buffer);
if(!buf)
return NULL;
-
+
buf->buffer = mgr->provider->create_buffer(mgr->provider, size, desc);
if(!buf->buffer) {
FREE(buf);
return NULL;
}
-
+
assert(pipe_is_referenced(&buf->buffer->base.reference));
assert(pb_check_alignment(desc->alignment, buf->buffer->base.alignment));
assert(pb_check_usage(desc->usage, buf->buffer->base.usage));
assert(buf->buffer->base.size >= size);
-
+
pipe_reference_init(&buf->base.base.reference, 1);
buf->base.base.alignment = buf->buffer->base.alignment;
buf->base.base.usage = buf->buffer->base.usage;
buf->base.base.size = buf->buffer->base.size;
-
+
buf->base.vtbl = &pb_cache_buffer_vtbl;
buf->mgr = mgr;
-
+
return &buf->base;
}
@@ -356,11 +356,11 @@ pb_cache_manager_flush(struct pb_manager *_mgr)
while(curr != &mgr->delayed) {
buf = LIST_ENTRY(struct pb_cache_buffer, curr, head);
_pb_cache_buffer_destroy(buf);
- curr = next;
+ curr = next;
next = curr->next;
}
pipe_mutex_unlock(mgr->mutex);
-
+
assert(mgr->provider->flush);
if(mgr->provider->flush)
mgr->provider->flush(mgr->provider);
@@ -376,14 +376,14 @@ pb_cache_manager_destroy(struct pb_manager *mgr)
struct pb_manager *
-pb_cache_manager_create(struct pb_manager *provider,
- unsigned usecs)
+pb_cache_manager_create(struct pb_manager *provider,
+ unsigned usecs)
{
struct pb_cache_manager *mgr;
if(!provider)
return NULL;
-
+
mgr = CALLOC_STRUCT(pb_cache_manager);
if (!mgr)
return NULL;
@@ -396,6 +396,6 @@ pb_cache_manager_create(struct pb_manager *provider,
LIST_INITHEAD(&mgr->delayed);
mgr->numDelayed = 0;
pipe_mutex_init(mgr->mutex);
-
+
return &mgr->base;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
index 7604e75..78d1cdc 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
@@ -28,7 +28,7 @@
/**
* \file
* Debug buffer manager to detect buffer under- and overflows.
- *
+ *
* \author Jose Fonseca
*/
@@ -68,10 +68,10 @@ struct pb_debug_manager;
struct pb_debug_buffer
{
struct pb_buffer base;
-
+
struct pb_buffer *buffer;
struct pb_debug_manager *mgr;
-
+
pb_size underflow_size;
pb_size overflow_size;
@@ -80,7 +80,7 @@ struct pb_debug_buffer
pipe_mutex mutex;
unsigned map_count;
struct debug_stack_frame map_backtrace[PB_DEBUG_MAP_BACKTRACE];
-
+
struct list_head head;
};
@@ -93,7 +93,7 @@ struct pb_debug_manager
pb_size underflow_size;
pb_size overflow_size;
-
+
pipe_mutex mutex;
struct list_head list;
};
@@ -116,14 +116,14 @@ pb_debug_manager(struct pb_manager *mgr)
static const uint8_t random_pattern[32] = {
- 0xaf, 0xcf, 0xa5, 0xa2, 0xc2, 0x63, 0x15, 0x1a,
+ 0xaf, 0xcf, 0xa5, 0xa2, 0xc2, 0x63, 0x15, 0x1a,
0x7e, 0xe2, 0x7e, 0x84, 0x15, 0x49, 0xa2, 0x1e,
- 0x49, 0x63, 0xf5, 0x52, 0x74, 0x66, 0x9e, 0xc4,
+ 0x49, 0x63, 0xf5, 0x52, 0x74, 0x66, 0x9e, 0xc4,
0x6d, 0xcf, 0x2c, 0x4a, 0x74, 0xe6, 0xfd, 0x94
};
-static INLINE void
+static INLINE void
fill_random_pattern(uint8_t *dst, pb_size size)
{
pb_size i = 0;
@@ -134,9 +134,9 @@ fill_random_pattern(uint8_t *dst, pb_size size)
}
-static INLINE boolean
-check_random_pattern(const uint8_t *dst, pb_size size,
- pb_size *min_ofs, pb_size *max_ofs)
+static INLINE boolean
+check_random_pattern(const uint8_t *dst, pb_size size,
+ pb_size *min_ofs, pb_size *max_ofs)
{
boolean result = TRUE;
pb_size i;
@@ -157,12 +157,12 @@ static void
pb_debug_buffer_fill(struct pb_debug_buffer *buf)
{
uint8_t *map;
-
+
map = pb_map(buf->buffer, PB_USAGE_CPU_WRITE, NULL);
assert(map);
if(map) {
fill_random_pattern(map, buf->underflow_size);
- fill_random_pattern(map + buf->underflow_size + buf->base.base.size,
+ fill_random_pattern(map + buf->underflow_size + buf->base.base.size,
buf->overflow_size);
pb_unmap(buf->buffer);
}
@@ -171,14 +171,14 @@ pb_debug_buffer_fill(struct pb_debug_buffer *buf)
/**
* Check for under/over flows.
- *
+ *
* Should be called with the buffer unmaped.
*/
static void
pb_debug_buffer_check(struct pb_debug_buffer *buf)
{
uint8_t *map;
-
+
map = pb_map(buf->buffer,
PB_USAGE_CPU_READ |
PB_USAGE_UNSYNCHRONIZED, NULL);
@@ -186,8 +186,8 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
if(map) {
boolean underflow, overflow;
pb_size min_ofs, max_ofs;
-
- underflow = !check_random_pattern(map, buf->underflow_size,
+
+ underflow = !check_random_pattern(map, buf->underflow_size,
&min_ofs, &max_ofs);
if(underflow) {
debug_printf("buffer underflow (offset -%u%s to -%u bytes) detected\n",
@@ -195,9 +195,9 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
min_ofs == 0 ? "+" : "",
buf->underflow_size - max_ofs);
}
-
- overflow = !check_random_pattern(map + buf->underflow_size + buf->base.base.size,
- buf->overflow_size,
+
+ overflow = !check_random_pattern(map + buf->underflow_size + buf->base.base.size,
+ buf->overflow_size,
&min_ofs, &max_ofs);
if(overflow) {
debug_printf("buffer overflow (size %u plus offset %u to %u%s bytes) detected\n",
@@ -206,7 +206,7 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
max_ofs,
max_ofs == buf->overflow_size - 1 ? "+" : "");
}
-
+
if(underflow || overflow)
debug_backtrace_dump(buf->create_backtrace, PB_DEBUG_CREATE_BACKTRACE);
@@ -216,7 +216,7 @@ pb_debug_buffer_check(struct pb_debug_buffer *buf)
if(underflow)
fill_random_pattern(map, buf->underflow_size);
if(overflow)
- fill_random_pattern(map + buf->underflow_size + buf->base.base.size,
+ fill_random_pattern(map + buf->underflow_size + buf->base.base.size,
buf->overflow_size);
pb_unmap(buf->buffer);
@@ -229,9 +229,9 @@ pb_debug_buffer_destroy(struct pb_buffer *_buf)
{
struct pb_debug_buffer *buf = pb_debug_buffer(_buf);
struct pb_debug_manager *mgr = buf->mgr;
-
+
assert(!pipe_is_referenced(&buf->base.base.reference));
-
+
pb_debug_buffer_check(buf);
pipe_mutex_lock(mgr->mutex);
@@ -239,32 +239,32 @@ pb_debug_buffer_destroy(struct pb_buffer *_buf)
pipe_mutex_unlock(mgr->mutex);
pipe_mutex_destroy(buf->mutex);
-
+
pb_reference(&buf->buffer, NULL);
FREE(buf);
}
static void *
-pb_debug_buffer_map(struct pb_buffer *_buf,
+pb_debug_buffer_map(struct pb_buffer *_buf,
unsigned flags, void *flush_ctx)
{
struct pb_debug_buffer *buf = pb_debug_buffer(_buf);
void *map;
-
+
pb_debug_buffer_check(buf);
map = pb_map(buf->buffer, flags, flush_ctx);
if(!map)
return NULL;
-
+
if(map) {
pipe_mutex_lock(buf->mutex);
++buf->map_count;
debug_backtrace_capture(buf->map_backtrace, 1, PB_DEBUG_MAP_BACKTRACE);
pipe_mutex_unlock(buf->mutex);
}
-
+
return (uint8_t *)map + buf->underflow_size;
}
@@ -272,16 +272,16 @@ pb_debug_buffer_map(struct pb_buffer *_buf,
static void
pb_debug_buffer_unmap(struct pb_buffer *_buf)
{
- struct pb_debug_buffer *buf = pb_debug_buffer(_buf);
-
+ struct pb_debug_buffer *buf = pb_debug_buffer(_buf);
+
pipe_mutex_lock(buf->mutex);
assert(buf->map_count);
if(buf->map_count)
--buf->map_count;
pipe_mutex_unlock(buf->mutex);
-
+
pb_unmap(buf->buffer);
-
+
pb_debug_buffer_check(buf);
}
@@ -297,13 +297,13 @@ pb_debug_buffer_get_base_buffer(struct pb_buffer *_buf,
}
-static enum pipe_error
-pb_debug_buffer_validate(struct pb_buffer *_buf,
+static enum pipe_error
+pb_debug_buffer_validate(struct pb_buffer *_buf,
struct pb_validate *vl,
unsigned flags)
{
struct pb_debug_buffer *buf = pb_debug_buffer(_buf);
-
+
pipe_mutex_lock(buf->mutex);
if(buf->map_count) {
debug_printf("%s: attempting to validate a mapped buffer\n", __FUNCTION__);
@@ -319,7 +319,7 @@ pb_debug_buffer_validate(struct pb_buffer *_buf,
static void
-pb_debug_buffer_fence(struct pb_buffer *_buf,
+pb_debug_buffer_fence(struct pb_buffer *_buf,
struct pipe_fence_handle *fence)
{
struct pb_debug_buffer *buf = pb_debug_buffer(_buf);
@@ -327,7 +327,7 @@ pb_debug_buffer_fence(struct pb_buffer *_buf,
}
-const struct pb_vtbl
+const struct pb_vtbl
pb_debug_buffer_vtbl = {
pb_debug_buffer_destroy,
pb_debug_buffer_map,
@@ -345,7 +345,7 @@ pb_debug_manager_dump(struct pb_debug_manager *mgr)
struct pb_debug_buffer *buf;
pipe_mutex_lock(mgr->mutex);
-
+
curr = mgr->list.next;
next = curr->next;
while(curr != &mgr->list) {
@@ -354,8 +354,8 @@ pb_debug_manager_dump(struct pb_debug_manager *mgr)
debug_printf("buffer = %p\n", (void *) buf);
debug_printf(" .size = 0x%x\n", buf->base.base.size);
debug_backtrace_dump(buf->create_backtrace, PB_DEBUG_CREATE_BACKTRACE);
-
- curr = next;
+
+ curr = next;
next = curr->next;
}
@@ -364,7 +364,7 @@ pb_debug_manager_dump(struct pb_debug_manager *mgr)
static struct pb_buffer *
-pb_debug_manager_create_buffer(struct pb_manager *_mgr,
+pb_debug_manager_create_buffer(struct pb_manager *_mgr,
pb_size size,
const struct pb_desc *desc)
{
@@ -372,21 +372,21 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr,
struct pb_debug_buffer *buf;
struct pb_desc real_desc;
pb_size real_size;
-
+
assert(size);
assert(desc->alignment);
buf = CALLOC_STRUCT(pb_debug_buffer);
if(!buf)
return NULL;
-
+
real_size = mgr->underflow_size + size + mgr->overflow_size;
real_desc = *desc;
real_desc.usage |= PB_USAGE_CPU_WRITE;
real_desc.usage |= PB_USAGE_CPU_READ;
- buf->buffer = mgr->provider->create_buffer(mgr->provider,
- real_size,
+ buf->buffer = mgr->provider->create_buffer(mgr->provider,
+ real_size,
&real_desc);
if(!buf->buffer) {
FREE(buf);
@@ -399,29 +399,29 @@ pb_debug_manager_create_buffer(struct pb_manager *_mgr,
#endif
return NULL;
}
-
+
assert(pipe_is_referenced(&buf->buffer->base.reference));
assert(pb_check_alignment(real_desc.alignment, buf->buffer->base.alignment));
assert(pb_check_usage(real_desc.usage, buf->buffer->base.usage));
assert(buf->buffer->base.size >= real_size);
-
+
pipe_reference_init(&buf->base.base.reference, 1);
buf->base.base.alignment = desc->alignment;
buf->base.base.usage = desc->usage;
buf->base.base.size = size;
-
+
buf->base.vtbl = &pb_debug_buffer_vtbl;
buf->mgr = mgr;
buf->underflow_size = mgr->underflow_size;
buf->overflow_size = buf->buffer->base.size - buf->underflow_size - size;
-
+
debug_backtrace_capture(buf->create_backtrace, 1, PB_DEBUG_CREATE_BACKTRACE);
pb_debug_buffer_fill(buf);
-
+
pipe_mutex_init(buf->mutex);
-
+
pipe_mutex_lock(mgr->mutex);
LIST_ADDTAIL(&buf->head, &mgr->list);
pipe_mutex_unlock(mgr->mutex);
@@ -444,14 +444,14 @@ static void
pb_debug_manager_destroy(struct pb_manager *_mgr)
{
struct pb_debug_manager *mgr = pb_debug_manager(_mgr);
-
+
pipe_mutex_lock(mgr->mutex);
if(!LIST_IS_EMPTY(&mgr->list)) {
debug_printf("%s: unfreed buffers\n", __FUNCTION__);
pb_debug_manager_dump(mgr);
}
pipe_mutex_unlock(mgr->mutex);
-
+
pipe_mutex_destroy(mgr->mutex);
mgr->provider->destroy(mgr->provider);
FREE(mgr);
@@ -459,14 +459,14 @@ pb_debug_manager_destroy(struct pb_manager *_mgr)
struct pb_manager *
-pb_debug_manager_create(struct pb_manager *provider,
- pb_size underflow_size, pb_size overflow_size)
+pb_debug_manager_create(struct pb_manager *provider,
+ pb_size underflow_size, pb_size overflow_size)
{
struct pb_debug_manager *mgr;
if(!provider)
return NULL;
-
+
mgr = CALLOC_STRUCT(pb_debug_manager);
if (!mgr)
return NULL;
@@ -477,7 +477,7 @@ pb_debug_manager_create(struct pb_manager *provider,
mgr->provider = provider;
mgr->underflow_size = underflow_size;
mgr->overflow_size = overflow_size;
-
+
pipe_mutex_init(mgr->mutex);
LIST_INITHEAD(&mgr->list);
@@ -489,8 +489,8 @@ pb_debug_manager_create(struct pb_manager *provider,
struct pb_manager *
-pb_debug_manager_create(struct pb_manager *provider,
- pb_size underflow_size, pb_size overflow_size)
+pb_debug_manager_create(struct pb_manager *provider,
+ pb_size underflow_size, pb_size overflow_size)
{
return provider;
}
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
index 88da786..e2249f2 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c
@@ -28,7 +28,7 @@
/**
* \file
* Buffer manager using the old texture memory manager.
- *
+ *
* \author Jose Fonseca
*/
@@ -52,14 +52,14 @@
struct mm_pb_manager
{
struct pb_manager base;
-
+
pipe_mutex mutex;
-
+
pb_size size;
struct mem_block *heap;
-
+
pb_size align2;
-
+
struct pb_buffer *buffer;
void *map;
};
@@ -76,9 +76,9 @@ mm_pb_manager(struct pb_manager *mgr)
struct mm_buffer
{
struct pb_buffer base;
-
+
struct mm_pb_manager *mgr;
-
+
struct mem_block *block;
};
@@ -96,9 +96,9 @@ mm_buffer_destroy(struct pb_buffer *buf)
{
struct mm_buffer *mm_buf = mm_buffer(buf);
struct mm_pb_manager *mm = mm_buf->mgr;
-
+
assert(!pipe_is_referenced(&mm_buf->base.base.reference));
-
+
pipe_mutex_lock(mm->mutex);
u_mmFreeMem(mm_buf->block);
FREE(mm_buf);
@@ -127,8 +127,8 @@ mm_buffer_unmap(struct pb_buffer *buf)
}
-static enum pipe_error
-mm_buffer_validate(struct pb_buffer *buf,
+static enum pipe_error
+mm_buffer_validate(struct pb_buffer *buf,
struct pb_validate *vl,
unsigned flags)
{
@@ -139,7 +139,7 @@ mm_buffer_validate(struct pb_buffer *buf,
static void
-mm_buffer_fence(struct pb_buffer *buf,
+mm_buffer_fence(struct pb_buffer *buf,
struct pipe_fence_handle *fence)
{
struct mm_buffer *mm_buf = mm_buffer(buf);
@@ -160,7 +160,7 @@ mm_buffer_get_base_buffer(struct pb_buffer *buf,
}
-static const struct pb_vtbl
+static const struct pb_vtbl
mm_buffer_vtbl = {
mm_buffer_destroy,
mm_buffer_map,
@@ -172,7 +172,7 @@ mm_buffer_vtbl = {
static struct pb_buffer *
-mm_bufmgr_create_buffer(struct pb_manager *mgr,
+mm_bufmgr_create_buffer(struct pb_manager *mgr,
pb_size size,
const struct pb_desc *desc)
{
@@ -183,7 +183,7 @@ mm_bufmgr_create_buffer(struct pb_manager *mgr,
assert(pb_check_alignment(desc->alignment, (pb_size)1 << mm->align2));
if(!pb_check_alignment(desc->alignment, (pb_size)1 << mm->align2))
return NULL;
-
+
pipe_mutex_lock(mm->mutex);
mm_buf = CALLOC_STRUCT(mm_buffer);
@@ -196,11 +196,11 @@ mm_bufmgr_create_buffer(struct pb_manager *mgr,
mm_buf->base.base.alignment = desc->alignment;
mm_buf->base.base.usage = desc->usage;
mm_buf->base.base.size = size;
-
+
mm_buf->base.vtbl = &mm_buffer_vtbl;
-
+
mm_buf->mgr = mm;
-
+
mm_buf->block = u_mmAllocMem(mm->heap, (int)size, (int)mm->align2, 0);
if(!mm_buf->block) {
#if 0
@@ -211,11 +211,11 @@ mm_bufmgr_create_buffer(struct pb_manager *mgr,
pipe_mutex_unlock(mm->mutex);
return NULL;
}
-
+
/* Some sanity checks */
assert(0 <= (pb_size)mm_buf->block->ofs && (pb_size)mm_buf->block->ofs < mm->size);
assert(size <= (pb_size)mm_buf->block->size && (pb_size)mm_buf->block->ofs + (pb_size)mm_buf->block->size <= mm->size);
-
+
pipe_mutex_unlock(mm->mutex);
return SUPER(mm_buf);
}
@@ -232,29 +232,29 @@ static void
mm_bufmgr_destroy(struct pb_manager *mgr)
{
struct mm_pb_manager *mm = mm_pb_manager(mgr);
-
+
pipe_mutex_lock(mm->mutex);
u_mmDestroy(mm->heap);
-
+
pb_unmap(mm->buffer);
pb_reference(&mm->buffer, NULL);
-
+
pipe_mutex_unlock(mm->mutex);
-
+
FREE(mgr);
}
struct pb_manager *
-mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
- pb_size size, pb_size align2)
+mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
+ pb_size size, pb_size align2)
{
struct mm_pb_manager *mm;
if(!buffer)
return NULL;
-
+
mm = CALLOC_STRUCT(mm_pb_manager);
if (!mm)
return NULL;
@@ -268,20 +268,20 @@ mm_bufmgr_create_from_buffer(struct pb_buffer *buffer,
pipe_mutex_init(mm->mutex);
- mm->buffer = buffer;
+ mm->buffer = buffer;
- mm->map = pb_map(mm->buffer,
+ mm->map = pb_map(mm->buffer,
PB_USAGE_CPU_READ |
PB_USAGE_CPU_WRITE, NULL);
if(!mm->map)
goto failure;
- mm->heap = u_mmInit(0, (int)size);
+ mm->heap = u_mmInit(0, (int)size);
if (!mm->heap)
goto failure;
return SUPER(mm);
-
+
failure:
if(mm->heap)
u_mmDestroy(mm->heap);
@@ -294,8 +294,8 @@ if(mm->heap)
struct pb_manager *
-mm_bufmgr_create(struct pb_manager *provider,
- pb_size size, pb_size align2)
+mm_bufmgr_create(struct pb_manager *provider,
+ pb_size size, pb_size align2)
{
struct pb_buffer *buffer;
struct pb_manager *mgr;
@@ -303,14 +303,14 @@ mm_bufmgr_create(struct pb_manager *provider,
if(!provider)
return NULL;
-
+
memset(&desc, 0, sizeof(desc));
desc.alignment = 1 << align2;
-
- buffer = provider->create_buffer(provider, size, &desc);
+
+ buffer = provider->create_buffer(provider, size, &desc);
if (!buffer)
return NULL;
-
+
mgr = mm_bufmgr_create_from_buffer(buffer, size, align2);
if (!mgr) {
pb_reference(&buffer, NULL);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c
index 694a092..292d92d 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c
@@ -28,8 +28,8 @@
/**
* @file
* A variation of malloc buffers which get transferred to real graphics memory
- * when there is an attempt to validate them.
- *
+ * when there is an attempt to validate them.
+ *
* @author Jose Fonseca
*/
@@ -43,16 +43,16 @@
struct pb_ondemand_manager;
-struct pb_ondemand_buffer
+struct pb_ondemand_buffer
{
struct pb_buffer base;
-
+
struct pb_ondemand_manager *mgr;
-
+
/** Regular malloc'ed memory */
void *data;
unsigned mapcount;
-
+
/** Real buffer */
struct pb_buffer *buffer;
pb_size size;
@@ -63,7 +63,7 @@ struct pb_ondemand_buffer
struct pb_ondemand_manager
{
struct pb_manager base;
-
+
struct pb_manager *provider;
};
@@ -92,17 +92,17 @@ static void
pb_ondemand_buffer_destroy(struct pb_buffer *_buf)
{
struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf);
-
+
pb_reference(&buf->buffer, NULL);
-
+
align_free(buf->data);
-
+
FREE(buf);
}
static void *
-pb_ondemand_buffer_map(struct pb_buffer *_buf,
+pb_ondemand_buffer_map(struct pb_buffer *_buf,
unsigned flags, void *flush_ctx)
{
struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf);
@@ -137,45 +137,45 @@ pb_ondemand_buffer_unmap(struct pb_buffer *_buf)
}
-static enum pipe_error
+static enum pipe_error
pb_ondemand_buffer_instantiate(struct pb_ondemand_buffer *buf)
{
if(!buf->buffer) {
struct pb_manager *provider = buf->mgr->provider;
uint8_t *map;
-
+
assert(!buf->mapcount);
-
+
buf->buffer = provider->create_buffer(provider, buf->size, &buf->desc);
if(!buf->buffer)
return PIPE_ERROR_OUT_OF_MEMORY;
-
+
map = pb_map(buf->buffer, PB_USAGE_CPU_READ, NULL);
if(!map) {
pb_reference(&buf->buffer, NULL);
return PIPE_ERROR;
}
-
+
memcpy(map, buf->data, buf->size);
-
+
pb_unmap(buf->buffer);
-
+
if(!buf->mapcount) {
FREE(buf->data);
buf->data = NULL;
}
}
-
+
return PIPE_OK;
}
-static enum pipe_error
-pb_ondemand_buffer_validate(struct pb_buffer *_buf,
+static enum pipe_error
+pb_ondemand_buffer_validate(struct pb_buffer *_buf,
struct pb_validate *vl,
unsigned flags)
{
struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf);
- enum pipe_error ret;
+ enum pipe_error ret;
assert(!buf->mapcount);
if(buf->mapcount)
@@ -184,21 +184,21 @@ pb_ondemand_buffer_validate(struct pb_buffer *_buf,
ret = pb_ondemand_buffer_instantiate(buf);
if(ret != PIPE_OK)
return ret;
-
+
return pb_validate(buf->buffer, vl, flags);
}
static void
-pb_ondemand_buffer_fence(struct pb_buffer *_buf,
+pb_ondemand_buffer_fence(struct pb_buffer *_buf,
struct pipe_fence_handle *fence)
{
struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf);
-
+
assert(buf->buffer);
if(!buf->buffer)
return;
-
+
pb_fence(buf->buffer, fence);
}
@@ -221,7 +221,7 @@ pb_ondemand_buffer_get_base_buffer(struct pb_buffer *_buf,
}
-const struct pb_vtbl
+const struct pb_vtbl
pb_ondemand_buffer_vtbl = {
pb_ondemand_buffer_destroy,
pb_ondemand_buffer_map,
@@ -233,13 +233,13 @@ pb_ondemand_buffer_vtbl = {
static struct pb_buffer *
-pb_ondemand_manager_create_buffer(struct pb_manager *_mgr,
+pb_ondemand_manager_create_buffer(struct pb_manager *_mgr,
pb_size size,
- const struct pb_desc *desc)
+ const struct pb_desc *desc)
{
struct pb_ondemand_manager *mgr = pb_ondemand_manager(_mgr);
struct pb_ondemand_buffer *buf;
-
+
buf = CALLOC_STRUCT(pb_ondemand_buffer);
if(!buf)
return NULL;
@@ -249,15 +249,15 @@ pb_ondemand_manager_create_buffer(struct pb_manager *_mgr,
buf->base.base.usage = desc->usage;
buf->base.base.size = size;
buf->base.vtbl = &pb_ondemand_buffer_vtbl;
-
+
buf->mgr = mgr;
-
+
buf->data = align_malloc(size, desc->alignment < sizeof(void*) ? sizeof(void*) : desc->alignment);
if(!buf->data) {
FREE(buf);
return NULL;
}
-
+
buf->size = size;
buf->desc = *desc;
@@ -266,16 +266,16 @@ pb_ondemand_manager_create_buffer(struct pb_manager *_mgr,
static void
-pb_ondemand_manager_flush(struct pb_manager *_mgr)
+pb_ondemand_manager_flush(struct pb_manager *_mgr)
{
struct pb_ondemand_manager *mgr = pb_ondemand_manager(_mgr);
-
+
mgr->provider->flush(mgr->provider);
}
static void
-pb_ondemand_manager_destroy(struct pb_manager *_mgr)
+pb_ondemand_manager_destroy(struct pb_manager *_mgr)
{
struct pb_ondemand_manager *mgr = pb_ondemand_manager(_mgr);
@@ -284,21 +284,21 @@ pb_ondemand_manager_destroy(struct pb_manager *_mgr)
struct pb_manager *
-pb_ondemand_manager_create(struct pb_manager *provider)
+pb_ondemand_manager_create(struct pb_manager *provider)
{
struct pb_ondemand_manager *mgr;
if(!provider)
return NULL;
-
+
mgr = CALLOC_STRUCT(pb_ondemand_manager);
if(!mgr)
return NULL;
-
+
mgr->base.destroy = pb_ondemand_manager_destroy;
mgr->base.create_buffer = pb_ondemand_manager_create_buffer;
mgr->base.flush = pb_ondemand_manager_flush;
-
+
mgr->provider = provider;
return &mgr->base;
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
index 2f7c738..bfd332c 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND., USA
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,26 +10,26 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
- *
+ *
+ *
**************************************************************************/
/**
* \file
* Batch buffer pool management.
- *
+ *
* \author Jose Fonseca
* \author Thomas Hellström
*/
@@ -55,20 +55,20 @@
struct pool_pb_manager
{
struct pb_manager base;
-
+
pipe_mutex mutex;
-
+
pb_size bufSize;
pb_size bufAlign;
-
+
pb_size numFree;
pb_size numTot;
-
+
struct list_head free;
-
+
struct pb_buffer *buffer;
void *map;
-
+
struct pool_buffer *bufs;
};
@@ -84,11 +84,11 @@ pool_pb_manager(struct pb_manager *mgr)
struct pool_buffer
{
struct pb_buffer base;
-
+
struct pool_pb_manager *mgr;
-
+
struct list_head head;
-
+
pb_size start;
};
@@ -107,7 +107,7 @@ pool_buffer_destroy(struct pb_buffer *buf)
{
struct pool_buffer *pool_buf = pool_buffer(buf);
struct pool_pb_manager *pool = pool_buf->mgr;
-
+
assert(!pipe_is_referenced(&pool_buf->base.base.reference));
pipe_mutex_lock(pool->mutex);
@@ -140,8 +140,8 @@ pool_buffer_unmap(struct pb_buffer *buf)
}
-static enum pipe_error
-pool_buffer_validate(struct pb_buffer *buf,
+static enum pipe_error
+pool_buffer_validate(struct pb_buffer *buf,
struct pb_validate *vl,
unsigned flags)
{
@@ -152,7 +152,7 @@ pool_buffer_validate(struct pb_buffer *buf,
static void
-pool_buffer_fence(struct pb_buffer *buf,
+pool_buffer_fence(struct pb_buffer *buf,
struct pipe_fence_handle *fence)
{
struct pool_buffer *pool_buf = pool_buffer(buf);
@@ -173,7 +173,7 @@ pool_buffer_get_base_buffer(struct pb_buffer *buf,
}
-static const struct pb_vtbl
+static const struct pb_vtbl
pool_buffer_vtbl = {
pool_buffer_destroy,
pool_buffer_map,
@@ -195,7 +195,7 @@ pool_bufmgr_create_buffer(struct pb_manager *mgr,
assert(size == pool->bufSize);
assert(pool->bufAlign % desc->alignment == 0);
-
+
pipe_mutex_lock(pool->mutex);
if (pool->numFree == 0) {
@@ -216,13 +216,13 @@ pool_bufmgr_create_buffer(struct pb_manager *mgr,
--pool->numFree;
pipe_mutex_unlock(pool->mutex);
-
+
pool_buf = LIST_ENTRY(struct pool_buffer, item, head);
assert(!pipe_is_referenced(&pool_buf->base.base.reference));
pipe_reference_init(&pool_buf->base.base.reference, 1);
pool_buf->base.base.alignment = desc->alignment;
pool_buf->base.base.usage = desc->usage;
-
+
return SUPER(pool_buf);
}
@@ -241,21 +241,21 @@ pool_bufmgr_destroy(struct pb_manager *mgr)
pipe_mutex_lock(pool->mutex);
FREE(pool->bufs);
-
+
pb_unmap(pool->buffer);
pb_reference(&pool->buffer, NULL);
-
+
pipe_mutex_unlock(pool->mutex);
-
+
FREE(mgr);
}
struct pb_manager *
-pool_bufmgr_create(struct pb_manager *provider,
- pb_size numBufs,
+pool_bufmgr_create(struct pb_manager *provider,
+ pb_size numBufs,
pb_size bufSize,
- const struct pb_desc *desc)
+ const struct pb_desc *desc)
{
struct pool_pb_manager *pool;
struct pool_buffer *pool_buf;
@@ -263,7 +263,7 @@ pool_bufmgr_create(struct pb_manager *provider,
if(!provider)
return NULL;
-
+
pool = CALLOC_STRUCT(pool_pb_manager);
if (!pool)
return NULL;
@@ -277,11 +277,11 @@ pool_bufmgr_create(struct pb_manager *provider,
pool->numTot = numBufs;
pool->numFree = numBufs;
pool->bufSize = bufSize;
- pool->bufAlign = desc->alignment;
-
+ pool->bufAlign = desc->alignment;
+
pipe_mutex_init(pool->mutex);
- pool->buffer = provider->create_buffer(provider, numBufs*bufSize, desc);
+ pool->buffer = provider->create_buffer(provider, numBufs*bufSize, desc);
if (!pool->buffer)
goto failure;
@@ -309,7 +309,7 @@ pool_bufmgr_create(struct pb_manager *provider,
}
return SUPER(pool);
-
+
failure:
if(pool->bufs)
FREE(pool->bufs);
diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
index 176f9aa..e312e1b 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
@@ -29,9 +29,9 @@
/**
* @file
* S-lab pool implementation.
- *
+ *
* @sa http://en.wikipedia.org/wiki/Slab_allocation
- *
+ *
* @author Thomas Hellstrom
* @author Jose Fonseca
*/
@@ -53,22 +53,22 @@ struct pb_slab;
/**
* Buffer in a slab.
- *
+ *
* Sub-allocation of a contiguous buffer.
*/
struct pb_slab_buffer
{
struct pb_buffer base;
-
+
struct pb_slab *slab;
-
+
struct list_head head;
-
+
unsigned mapCount;
-
+
/** Offset relative to the start of the slab buffer. */
pb_size start;
-
+
/** Use when validating, to signal that all mappings are finished */
/* TODO: Actually validation does not reach this stage yet */
pipe_condvar event;
@@ -76,7 +76,7 @@ struct pb_slab_buffer
/**
- * Slab -- a contiguous piece of memory.
+ * Slab -- a contiguous piece of memory.
*/
struct pb_slab
{
@@ -84,80 +84,80 @@ struct pb_slab
struct list_head freeBuffers;
pb_size numBuffers;
pb_size numFree;
-
+
struct pb_slab_buffer *buffers;
struct pb_slab_manager *mgr;
-
+
/** Buffer from the provider */
struct pb_buffer *bo;
-
- void *virtual;
+
+ void *virtual;
};
/**
- * It adds/removes slabs as needed in order to meet the allocation/destruction
+ * It adds/removes slabs as needed in order to meet the allocation/destruction
* of individual buffers.
*/
-struct pb_slab_manager
+struct pb_slab_manager
{
struct pb_manager base;
-
+
/** From where we get our buffers */
struct pb_manager *provider;
-
+
/** Size of the buffers we hand on downstream */
pb_size bufSize;
-
+
/** Size of the buffers we request upstream */
pb_size slabSize;
-
- /**
+
+ /**
* Alignment, usage to be used to allocate the slab buffers.
- *
- * We can only provide buffers which are consistent (in alignment, usage)
- * with this description.
+ *
+ * We can only provide buffers which are consistent (in alignment, usage)
+ * with this description.
*/
struct pb_desc desc;
- /**
+ /**
* Partial slabs
- *
- * Full slabs are not stored in any list. Empty slabs are destroyed
+ *
+ * Full slabs are not stored in any list. Empty slabs are destroyed
* immediatly.
*/
struct list_head slabs;
-
+
pipe_mutex mutex;
};
/**
- * Wrapper around several slabs, therefore capable of handling buffers of
- * multiple sizes.
- *
+ * Wrapper around several slabs, therefore capable of handling buffers of
+ * multiple sizes.
+ *
* This buffer manager just dispatches buffer allocations to the appropriate slab
- * manager, according to the requested buffer size, or by passes the slab
+ * manager, according to the requested buffer size, or by passes the slab
* managers altogether for even greater sizes.
- *
+ *
* The data of this structure remains constant after
* initialization and thus needs no mutex protection.
*/
-struct pb_slab_range_manager
+struct pb_slab_range_manager
{
struct pb_manager base;
struct pb_manager *provider;
-
+
pb_size minBufSize;
pb_size maxBufSize;
-
- /** @sa pb_slab_manager::desc */
+
+ /** @sa pb_slab_manager::desc */
struct pb_desc desc;
-
+
unsigned numBuckets;
pb_size *bucketSizes;
-
+
/** Array of pb_slab_manager, one for each bucket size */
struct pb_manager **buckets;
};
@@ -200,9 +200,9 @@ pb_slab_buffer_destroy(struct pb_buffer *_buf)
struct list_head *list = &buf->head;
pipe_mutex_lock(mgr->mutex);
-
+
assert(!pipe_is_referenced(&buf->base.base.reference));
-
+
buf->mapCount = 0;
LIST_DEL(list);
@@ -226,7 +226,7 @@ pb_slab_buffer_destroy(struct pb_buffer *_buf)
static void *
-pb_slab_buffer_map(struct pb_buffer *_buf,
+pb_slab_buffer_map(struct pb_buffer *_buf,
unsigned flags,
void *flush_ctx)
{
@@ -245,13 +245,13 @@ pb_slab_buffer_unmap(struct pb_buffer *_buf)
struct pb_slab_buffer *buf = pb_slab_buffer(_buf);
--buf->mapCount;
- if (buf->mapCount == 0)
+ if (buf->mapCount == 0)
pipe_condvar_broadcast(buf->event);
}
-static enum pipe_error
-pb_slab_buffer_validate(struct pb_buffer *_buf,
+static enum pipe_error
+pb_slab_buffer_validate(struct pb_buffer *_buf,
struct pb_validate *vl,
unsigned flags)
{
@@ -261,7 +261,7 @@ pb_slab_buffer_validate(struct pb_buffer *_buf,
static void
-pb_slab_buffer_fence(struct pb_buffer *_buf,
+pb_slab_buffer_fence(struct pb_buffer *_buf,
struct pipe_fence_handle *fence)
{
struct pb_slab_buffer *buf = pb_slab_buffer(_buf);
@@ -280,7 +280,7 @@ pb_slab_buffer_get_base_buffer(struct pb_buffer *_buf,
}
-static const struct pb_vtbl
+static const struct pb_vtbl
pb_slab_buffer_vtbl = {
pb_slab_buffer_destroy,
pb_slab_buffer_map,
@@ -293,7 +293,7 @@ pb_slab_buffer_vtbl = {
/**
* Create a new slab.
- *
+ *
* Called when we ran out of free slabs.
*/
static enum pipe_error
@@ -315,9 +315,9 @@ pb_slab_create(struct pb_slab_manager *mgr)
goto out_err0;
}
- /* Note down the slab virtual address. All mappings are accessed directly
+ /* Note down the slab virtual address. All mappings are accessed directly
* through this address so it is required that the buffer is pinned. */
- slab->virtual = pb_map(slab->bo,
+ slab->virtual = pb_map(slab->bo,
PB_USAGE_CPU_READ |
PB_USAGE_CPU_WRITE, NULL);
if(!slab->virtual) {
@@ -361,9 +361,9 @@ pb_slab_create(struct pb_slab_manager *mgr)
return PIPE_OK;
-out_err1:
+out_err1:
pb_reference(&slab->bo, NULL);
-out_err0:
+out_err0:
FREE(slab);
return ret;
}
@@ -383,7 +383,7 @@ pb_slab_manager_create_buffer(struct pb_manager *_mgr,
assert(size <= mgr->bufSize);
if(size > mgr->bufSize)
return NULL;
-
+
/* check if we can provide the requested alignment */
assert(pb_check_alignment(desc->alignment, mgr->desc.alignment));
if(!pb_check_alignment(desc->alignment, mgr->desc.alignment))
@@ -397,7 +397,7 @@ pb_slab_manager_create_buffer(struct pb_manager *_mgr,
return NULL;
pipe_mutex_lock(mgr->mutex);
-
+
/* Create a new slab, if we run out of partial slabs */
if (mgr->slabs.next == &mgr->slabs) {
(void) pb_slab_create(mgr);
@@ -406,11 +406,11 @@ pb_slab_manager_create_buffer(struct pb_manager *_mgr,
return NULL;
}
}
-
+
/* Allocate the buffer from a partial (or just created) slab */
list = mgr->slabs.next;
slab = LIST_ENTRY(struct pb_slab, list, head);
-
+
/* If totally full remove from the partial slab list */
if (--slab->numFree == 0)
LIST_DELINIT(list);
@@ -420,11 +420,11 @@ pb_slab_manager_create_buffer(struct pb_manager *_mgr,
pipe_mutex_unlock(mgr->mutex);
buf = LIST_ENTRY(struct pb_slab_buffer, list, head);
-
+
pipe_reference_init(&buf->base.base.reference, 1);
buf->base.base.alignment = desc->alignment;
buf->base.base.usage = desc->usage;
-
+
return &buf->base;
}
@@ -472,7 +472,7 @@ pb_slab_manager_create(struct pb_manager *provider,
mgr->desc = *desc;
LIST_INITHEAD(&mgr->slabs);
-
+
pipe_mutex_init(mgr->mutex);
return &mgr->base;
@@ -510,7 +510,7 @@ pb_slab_range_manager_flush(struct pb_manager *_mgr)
struct pb_slab_range_manager *mgr = pb_slab_range_manager(_mgr);
/* Individual slabs don't hold any temporary buffers so no need to call them */
-
+
assert(mgr->provider->flush);
if(mgr->provider->flush)
mgr->provider->flush(mgr->provider);
@@ -522,7 +522,7 @@ pb_slab_range_manager_destroy(struct pb_manager *_mgr)
{
struct pb_slab_range_manager *mgr = pb_slab_range_manager(_mgr);
unsigned i;
-
+
for (i = 0; i < mgr->numBuckets; ++i)
mgr->buckets[i]->destroy(mgr->buckets[i]);
FREE(mgr->buckets);
@@ -544,7 +544,7 @@ pb_slab_range_manager_create(struct pb_manager *provider,
if(!provider)
return NULL;
-
+
mgr = CALLOC_STRUCT(pb_slab_range_manager);
if (!mgr)
goto out_err0;
@@ -563,7 +563,7 @@ pb_slab_range_manager_create(struct pb_manager *provider,
bufSize *= 2;
++mgr->numBuckets;
}
-
+
mgr->buckets = CALLOC(mgr->numBuckets, sizeof(*mgr->buckets));
if (!mgr->buckets)
goto out_err1;
@@ -578,12 +578,12 @@ pb_slab_range_manager_create(struct pb_manager *provider,
return &mgr->base;
-out_err2:
+out_err2:
for (i = 0; i < mgr->numBuckets; ++i)
if(mgr->buckets[i])
mgr->buckets[i]->destroy(mgr->buckets[i]);
FREE(mgr->buckets);
-out_err1:
+out_err1:
FREE(mgr);
out_err0:
return NULL;
diff --git a/src/gallium/auxiliary/pipebuffer/pb_validate.c b/src/gallium/auxiliary/pipebuffer/pb_validate.c
index b585422..adb5bfb 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_validate.c
+++ b/src/gallium/auxiliary/pipebuffer/pb_validate.c
@@ -28,7 +28,7 @@
/**
* @file
* Buffer validation.
- *
+ *
* @author Jose Fonseca
*/
@@ -42,7 +42,7 @@
#include "pb_validate.h"
-#define PB_VALIDATE_INITIAL_SIZE 1 /* 512 */
+#define PB_VALIDATE_INITIAL_SIZE 1 /* 512 */
struct pb_validate_entry
@@ -74,19 +74,19 @@ pb_validate_add_buffer(struct pb_validate *vl,
flags &= PB_USAGE_GPU_READ_WRITE;
/* We only need to store one reference for each buffer, so avoid storing
- * consecutive references for the same buffer. It might not be the most
+ * consecutive references for the same buffer. It might not be the most
* common pattern, but it is easy to implement.
*/
if(vl->used && vl->entries[vl->used - 1].buf == buf) {
vl->entries[vl->used - 1].flags |= flags;
return PIPE_OK;
}
-
+
/* Grow the table */
if(vl->used == vl->size) {
unsigned new_size;
struct pb_validate_entry *new_entries;
-
+
new_size = vl->size * 2;
if(!new_size)
return PIPE_ERROR_OUT_OF_MEMORY;
@@ -96,18 +96,18 @@ pb_validate_add_buffer(struct pb_validate *vl,
new_size*sizeof(struct pb_validate_entry));
if(!new_entries)
return PIPE_ERROR_OUT_OF_MEMORY;
-
+
memset(new_entries + vl->size, 0, (new_size - vl->size)*sizeof(struct pb_validate_entry));
-
+
vl->size = new_size;
vl->entries = new_entries;
}
-
+
assert(!vl->entries[vl->used].buf);
pb_reference(&vl->entries[vl->used].buf, buf);
vl->entries[vl->used].flags = flags;
++vl->used;
-
+
return PIPE_OK;
}
@@ -129,10 +129,10 @@ pb_validate_foreach(struct pb_validate *vl,
enum pipe_error
-pb_validate_validate(struct pb_validate *vl)
+pb_validate_validate(struct pb_validate *vl)
{
unsigned i;
-
+
for(i = 0; i < vl->used; ++i) {
enum pipe_error ret;
ret = pb_validate(vl->entries[i].buf, vl, vl->entries[i].flags);
@@ -175,11 +175,11 @@ struct pb_validate *
pb_validate_create()
{
struct pb_validate *vl;
-
+
vl = CALLOC_STRUCT(pb_validate);
if(!vl)
return NULL;
-
+
vl->size = PB_VALIDATE_INITIAL_SIZE;
vl->entries = (struct pb_validate_entry *)CALLOC(vl->size, sizeof(struct pb_validate_entry));
if(!vl->entries) {
diff --git a/src/gallium/auxiliary/pipebuffer/pb_validate.h b/src/gallium/auxiliary/pipebuffer/pb_validate.h
index 3c93f30..728d977 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_validate.h
+++ b/src/gallium/auxiliary/pipebuffer/pb_validate.h
@@ -28,7 +28,7 @@
/**
* @file
* Buffer validation.
- *
+ *
* @author Jose Fonseca
*/
@@ -50,7 +50,7 @@ struct pipe_fence_handle;
/**
* Buffer validation list.
- *
+ *
* It holds a list of buffers to be validated and fenced when flushing.
*/
struct pb_validate;
@@ -68,7 +68,7 @@ pb_validate_foreach(struct pb_validate *vl,
/**
* Validate all buffers for hardware access.
- *
+ *
* Should be called right before issuing commands to the hardware.
*/
enum pipe_error
@@ -76,7 +76,7 @@ pb_validate_validate(struct pb_validate *vl);
/**
* Fence all buffers and clear the list.
- *
+ *
* Should be called right after issuing commands to the hardware.
*/
void
diff --git a/src/gallium/auxiliary/rtasm/rtasm_cpu.c b/src/gallium/auxiliary/rtasm/rtasm_cpu.c
index 0461c81..575778f 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_cpu.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_cpu.c
@@ -35,7 +35,7 @@ static boolean rtasm_sse_enabled(void)
{
static boolean firsttime = 1;
static boolean enabled;
-
+
/* This gets called quite often at the moment:
*/
if (firsttime) {
@@ -56,7 +56,7 @@ int rtasm_cpu_has_sse(void)
#endif
}
-int rtasm_cpu_has_sse2(void)
+int rtasm_cpu_has_sse2(void)
{
/* FIXME: actually detect this at run-time */
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
diff --git a/src/gallium/auxiliary/rtasm/rtasm_execmem.c b/src/gallium/auxiliary/rtasm/rtasm_execmem.c
index fbde1d1..7de4c45 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_execmem.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_execmem.c
@@ -73,10 +73,10 @@ init_heap(void)
{
if (!exec_heap)
exec_heap = u_mmInit( 0, EXEC_HEAP_SIZE );
-
+
if (!exec_mem)
- exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE,
- PROT_EXEC | PROT_READ | PROT_WRITE,
+ exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE,
+ PROT_EXEC | PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
}
@@ -98,23 +98,23 @@ rtasm_exec_malloc(size_t size)
if (block)
addr = exec_mem + block->ofs;
- else
+ else
debug_printf("rtasm_exec_malloc failed\n");
-
+
pipe_mutex_unlock(exec_mutex);
-
+
return addr;
}
-
-void
+
+void
rtasm_exec_free(void *addr)
{
pipe_mutex_lock(exec_mutex);
if (exec_heap) {
struct mem_block *block = u_mmFindBlock(exec_heap, (unsigned char *)addr - exec_mem);
-
+
if (block)
u_mmFreeMem(block);
}
@@ -157,8 +157,8 @@ rtasm_exec_malloc(size_t size)
return MALLOC( size );
}
-
-void
+
+void
rtasm_exec_free(void *addr)
{
FREE(addr);
diff --git a/src/gallium/auxiliary/rtasm/rtasm_execmem.h b/src/gallium/auxiliary/rtasm/rtasm_execmem.h
index 155c6d3..c51ddfe 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_execmem.h
+++ b/src/gallium/auxiliary/rtasm/rtasm_execmem.h
@@ -38,7 +38,7 @@ extern void *
rtasm_exec_malloc( size_t size );
-extern void
+extern void
rtasm_exec_free( void *addr );
diff --git a/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.c b/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.c
index 53a0e72..81357c9 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.c
@@ -520,7 +520,7 @@ void spe_allocate_register_set(struct spe_function *p)
{
uint i;
- /* Keep track of the set count. If it ever wraps around to 0,
+ /* Keep track of the set count. If it ever wraps around to 0,
* we're in trouble.
*/
p->set_count++;
@@ -843,7 +843,7 @@ spe_and_uint(struct spe_function *p, int rT, int rA, uint ui)
spe_andi(p, rT, rA, ui & 0x000003ff);
return;
}
-
+
/* If the ui field is symmetric along halfword boundaries and
* the upper 7 bits of each halfword are all 0s or 1s, we
* can use And Halfword Immediate
@@ -878,10 +878,10 @@ spe_and_uint(struct spe_function *p, int rT, int rA, uint ui)
void
spe_xor_uint(struct spe_function *p, int rT, int rA, uint ui)
{
- /* If we can, emit a single instruction, either Exclusive Or Byte
- * Immediate (which uses the same constant across each byte), Exclusive
- * Or Halfword Immediate (which sign-extends a 10-bit immediate to
- * 16 bits and uses that across each halfword), or Exclusive Or Word
+ /* If we can, emit a single instruction, either Exclusive Or Byte
+ * Immediate (which uses the same constant across each byte), Exclusive
+ * Or Halfword Immediate (which sign-extends a 10-bit immediate to
+ * 16 bits and uses that across each halfword), or Exclusive Or Word
* Immediate (which sign-extends a 10-bit immediate to 32 bits).
*
* Otherwise, we'll need to use a temporary register.
@@ -896,7 +896,7 @@ spe_xor_uint(struct spe_function *p, int rT, int rA, uint ui)
spe_xori(p, rT, rA, ui & 0x000003ff);
return;
}
-
+
/* If the ui field is symmetric along halfword boundaries and
* the upper 7 bits of each halfword are all 0s or 1s, we
* can use Exclusive Or Halfword Immediate
@@ -1025,7 +1025,7 @@ spe_splat_word(struct spe_function *p, int rT, int rA, int word)
/**
* For each 32-bit float element of rA and rB, choose the smaller of the
* two, compositing them into the rT register.
- *
+ *
* The Float Compare Greater Than (fcgt) instruction will put 1s into
* compare_reg where rA > rB, and 0s where rA <= rB.
*
@@ -1038,7 +1038,7 @@ spe_splat_word(struct spe_function *p, int rT, int rA, int word)
* rT == rA || rt == rB. But since this is common in constructions
* like "x = min(x, a)", we always allocate a new register to be safe.
*/
-void
+void
spe_float_min(struct spe_function *p, int rT, int rA, int rB)
{
int compare_reg = spe_allocate_available_register(p);
@@ -1050,12 +1050,12 @@ spe_float_min(struct spe_function *p, int rT, int rA, int rB)
/**
* For each 32-bit float element of rA and rB, choose the greater of the
* two, compositing them into the rT register.
- *
+ *
* The logic is similar to that of spe_float_min() above; the only
* difference is that the registers on spe_selb() have been reversed,
* so that the larger of the two is selected instead of the smaller.
*/
-void
+void
spe_float_max(struct spe_function *p, int rT, int rA, int rB)
{
int compare_reg = spe_allocate_available_register(p);
diff --git a/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h b/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h
index 65d9c77..fe07bff 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h
+++ b/src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h
@@ -61,7 +61,7 @@ struct spe_function
*/
unsigned char set_count;
- /**
+ /**
* Flags for used and unused registers. Each byte corresponds to a
* register; a 0 in that byte means that the register is available.
* A value of 1 means that the register was allocated in the current
@@ -70,7 +70,7 @@ struct spe_function
*
* \sa
* spe_allocate_register, spe_allocate_available_register,
- * spe_allocate_register_set, spe_release_register_set, spe_release_register,
+ * spe_allocate_register_set, spe_release_register_set, spe_release_register,
*/
unsigned char regs[SPE_NUM_REGS];
diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
index 75b0f6a..6a128c4 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
@@ -42,9 +42,9 @@
void x86_print_reg( struct x86_reg reg )
{
- if (reg.mod != mod_REG)
+ if (reg.mod != mod_REG)
debug_printf( "[" );
-
+
switch( reg.file ) {
case file_REG32:
switch( reg.idx ) {
@@ -73,7 +73,7 @@ void x86_print_reg( struct x86_reg reg )
reg.mod == mod_DISP32)
debug_printf("+%d", reg.disp);
- if (reg.mod != mod_REG)
+ if (reg.mod != mod_REG)
debug_printf( "]" );
}
@@ -224,14 +224,14 @@ static void emit_3ub( struct x86_function *p, unsigned char b0, unsigned char b1
*
* This is the "/r" field in the x86 manuals...
*/
-static void emit_modrm( struct x86_function *p,
- struct x86_reg reg,
+static void emit_modrm( struct x86_function *p,
+ struct x86_reg reg,
struct x86_reg regmem )
{
unsigned char val = 0;
-
+
assert(reg.mod == mod_REG);
-
+
/* TODO: support extended x86-64 registers */
assert(reg.idx < 8);
assert(regmem.idx < 8);
@@ -239,7 +239,7 @@ static void emit_modrm( struct x86_function *p,
val |= regmem.mod << 6; /* mod field */
val |= reg.idx << 3; /* reg field */
val |= regmem.idx; /* r/m field */
-
+
emit_1ub(p, val);
/* Oh-oh we've stumbled into the SIB thing.
@@ -282,11 +282,11 @@ static void emit_modrm_noreg( struct x86_function *p,
* the arguments presented.
*/
static void emit_op_modrm( struct x86_function *p,
- unsigned char op_dst_is_reg,
+ unsigned char op_dst_is_reg,
unsigned char op_dst_is_mem,
struct x86_reg dst,
struct x86_reg src )
-{
+{
switch (dst.mod) {
case mod_REG:
emit_1ub(p, op_dst_is_reg);
@@ -380,7 +380,7 @@ void x86_jcc( struct x86_function *p,
{
int offset = label - (x86_get_label(p) + 2);
DUMP_I(cc);
-
+
if (offset < 0) {
/*assert(p->csr - p->store > -offset);*/
if (p->csr - p->store <= -offset) {
@@ -509,8 +509,8 @@ void x86_mov8_imm( struct x86_function *p, struct x86_reg dst, uint8_t imm )
/**
* Immediate group 1 instructions.
*/
-static INLINE void
-x86_group1_imm( struct x86_function *p,
+static INLINE void
+x86_group1_imm( struct x86_function *p,
unsigned op, struct x86_reg dst, int imm )
{
assert(dst.file == file_REG32);
@@ -570,7 +570,7 @@ void x86_push( struct x86_function *p,
DUMP_R( reg );
if (reg.mod == mod_REG)
emit_1ub(p, 0x50 + reg.idx);
- else
+ else
{
emit_1ub(p, 0xff);
emit_modrm_noreg(p, 6, reg);
@@ -905,7 +905,7 @@ void sse_prefetch1( struct x86_function *p, struct x86_reg ptr)
emit_modrm_noreg(p, 2, ptr);
}
-void sse_movntps( struct x86_function *p,
+void sse_movntps( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src)
{
@@ -1128,7 +1128,7 @@ void sse_cvtps2pi( struct x86_function *p,
struct x86_reg src )
{
DUMP_RR( dst, src );
- assert(dst.file == file_MMX &&
+ assert(dst.file == file_MMX &&
(src.file == file_XMM || src.mod != mod_REG));
p->need_emms = 1;
@@ -1153,12 +1153,12 @@ void sse2_cvtdq2ps( struct x86_function *p,
void sse_shufps( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src,
- unsigned char shuf)
+ unsigned char shuf)
{
DUMP_RRI( dst, src, shuf );
emit_2ub(p, X86_TWOB, 0xC6);
emit_modrm(p, dst, src);
- emit_1ub(p, shuf);
+ emit_1ub(p, shuf);
}
void sse_unpckhps( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
@@ -1178,12 +1178,12 @@ void sse_unpcklps( struct x86_function *p, struct x86_reg dst, struct x86_reg sr
void sse_cmpps( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src,
- enum sse_cc cc)
+ enum sse_cc cc)
{
DUMP_RRI( dst, src, cc );
emit_2ub(p, X86_TWOB, 0xC2);
emit_modrm(p, dst, src);
- emit_1ub(p, cc);
+ emit_1ub(p, cc);
}
void sse_pmovmskb( struct x86_function *p,
@@ -1285,12 +1285,12 @@ void sse2_movapd( struct x86_function *p, struct x86_reg dst, struct x86_reg src
void sse2_pshufd( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src,
- unsigned char shuf)
+ unsigned char shuf)
{
DUMP_RRI( dst, src, shuf );
emit_3ub(p, 0x66, X86_TWOB, 0x70);
emit_modrm(p, dst, src);
- emit_1ub(p, shuf);
+ emit_1ub(p, shuf);
}
void sse2_pshuflw( struct x86_function *p,
@@ -1651,9 +1651,9 @@ static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86
assert(dst.file == file_x87);
if (arg.file == file_x87) {
- if (dst.idx == 0)
+ if (dst.idx == 0)
emit_2ub(p, dst0ub0, dst0ub1+arg.idx);
- else if (arg.idx == 0)
+ else if (arg.idx == 0)
emit_2ub(p, arg0ub0, arg0ub1+arg.idx);
else
assert(0);
@@ -1670,7 +1670,7 @@ static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86
void x87_fmul( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
{
DUMP_RR( dst, src );
- x87_arith_op(p, dst, src,
+ x87_arith_op(p, dst, src,
0xd8, 0xc8,
0xdc, 0xc8,
4);
@@ -1679,7 +1679,7 @@ void x87_fmul( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
void x87_fsub( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
{
DUMP_RR( dst, src );
- x87_arith_op(p, dst, src,
+ x87_arith_op(p, dst, src,
0xd8, 0xe0,
0xdc, 0xe8,
4);
@@ -1688,7 +1688,7 @@ void x87_fsub( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
void x87_fsubr( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
{
DUMP_RR( dst, src );
- x87_arith_op(p, dst, src,
+ x87_arith_op(p, dst, src,
0xd8, 0xe8,
0xdc, 0xe0,
5);
@@ -1697,7 +1697,7 @@ void x87_fsubr( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
void x87_fadd( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
{
DUMP_RR( dst, src );
- x87_arith_op(p, dst, src,
+ x87_arith_op(p, dst, src,
0xd8, 0xc0,
0xdc, 0xc0,
0);
@@ -1706,7 +1706,7 @@ void x87_fadd( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
void x87_fdiv( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
{
DUMP_RR( dst, src );
- x87_arith_op(p, dst, src,
+ x87_arith_op(p, dst, src,
0xd8, 0xf0,
0xdc, 0xf8,
6);
@@ -1715,7 +1715,7 @@ void x87_fdiv( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
void x87_fdivr( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
{
DUMP_RR( dst, src );
- x87_arith_op(p, dst, src,
+ x87_arith_op(p, dst, src,
0xd8, 0xf8,
0xdc, 0xf0,
7);
@@ -1889,7 +1889,7 @@ void x87_fyl2x( struct x86_function *p )
/* st1 = st1 * log2(st0 + 1.0);
* pop_stack;
*
- * A fast operation, with restrictions: -.29 < st0 < .29
+ * A fast operation, with restrictions: -.29 < st0 < .29
*/
void x87_fyl2xp1( struct x86_function *p )
{
@@ -1902,7 +1902,7 @@ void x87_fyl2xp1( struct x86_function *p )
void x87_fld( struct x86_function *p, struct x86_reg arg )
{
DUMP_R( arg );
- if (arg.file == file_x87)
+ if (arg.file == file_x87)
emit_2ub(p, 0xd9, 0xc0 + arg.idx);
else {
emit_1ub(p, 0xd9);
@@ -1914,7 +1914,7 @@ void x87_fld( struct x86_function *p, struct x86_reg arg )
void x87_fst( struct x86_function *p, struct x86_reg dst )
{
DUMP_R( dst );
- if (dst.file == file_x87)
+ if (dst.file == file_x87)
emit_2ub(p, 0xdd, 0xd0 + dst.idx);
else {
emit_1ub(p, 0xd9);
@@ -1925,7 +1925,7 @@ void x87_fst( struct x86_function *p, struct x86_reg dst )
void x87_fstp( struct x86_function *p, struct x86_reg dst )
{
DUMP_R( dst );
- if (dst.file == file_x87)
+ if (dst.file == file_x87)
emit_2ub(p, 0xdd, 0xd8 + dst.idx);
else {
emit_1ub(p, 0xd9);
@@ -1943,7 +1943,7 @@ void x87_fpop( struct x86_function *p )
void x87_fcom( struct x86_function *p, struct x86_reg dst )
{
DUMP_R( dst );
- if (dst.file == file_x87)
+ if (dst.file == file_x87)
emit_2ub(p, 0xd8, 0xd0 + dst.idx);
else {
emit_1ub(p, 0xd8);
@@ -1955,7 +1955,7 @@ void x87_fcom( struct x86_function *p, struct x86_reg dst )
void x87_fcomp( struct x86_function *p, struct x86_reg dst )
{
DUMP_R( dst );
- if (dst.file == file_x87)
+ if (dst.file == file_x87)
emit_2ub(p, 0xd8, 0xd8 + dst.idx);
else {
emit_1ub(p, 0xd8);
@@ -1984,7 +1984,7 @@ void x87_fnstsw( struct x86_function *p, struct x86_reg dst )
assert(dst.file == file_REG32);
if (dst.idx == reg_AX &&
- dst.mod == mod_REG)
+ dst.mod == mod_REG)
emit_2ub(p, 0xdf, 0xe0);
else {
emit_1ub(p, 0xdd);
@@ -2023,7 +2023,7 @@ void mmx_packssdw( struct x86_function *p,
struct x86_reg src )
{
DUMP_RR( dst, src );
- assert(dst.file == file_MMX &&
+ assert(dst.file == file_MMX &&
(src.file == file_MMX || src.mod != mod_REG));
p->need_emms = 1;
@@ -2037,7 +2037,7 @@ void mmx_packuswb( struct x86_function *p,
struct x86_reg src )
{
DUMP_RR( dst, src );
- assert(dst.file == file_MMX &&
+ assert(dst.file == file_MMX &&
(src.file == file_MMX || src.mod != mod_REG));
p->need_emms = 1;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index 16a205f..3d748e1 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_debug.h"
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.h b/src/gallium/auxiliary/tgsi/tgsi_build.h
index 3f236a9..f03d921 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_BUILD_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c
index 77bde86..4d3e7bd 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_debug.h"
@@ -44,13 +44,13 @@ struct dump_ctx
uint instno;
int indent;
-
+
uint indentation;
void (*printf)(struct dump_ctx *ctx, const char *format, ...);
};
-static void
+static void
dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...)
{
va_list ap;
@@ -744,7 +744,7 @@ static void
str_dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...)
{
struct str_dump_ctx *sctx = (struct str_dump_ctx *)ctx;
-
+
if(sctx->left > 1) {
int written;
va_list ap;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.h b/src/gallium/auxiliary/tgsi/tgsi_dump.h
index fc0429a..dd1b6fb 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_dump.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_dump.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_DUMP_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 7892a67..dfd0406 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2009-2010 VMware, Inc. All rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -619,7 +619,7 @@ tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst)
* allocating temporary storage, setting up constants, etc.
* After this, we can call tgsi_exec_machine_run() many times.
*/
-void
+void
tgsi_exec_machine_bind_shader(
struct tgsi_exec_machine *mach,
const struct tgsi_token *tokens,
@@ -736,7 +736,7 @@ tgsi_exec_machine_bind_shader(
assert( mach->ImmLimit + 1 <= TGSI_EXEC_NUM_IMMEDIATES );
for( i = 0; i < size; i++ ) {
- mach->Imms[mach->ImmLimit][i] =
+ mach->Imms[mach->ImmLimit][i] =
parse.FullToken.FullImmediate.u[i].Float;
}
mach->ImmLimit += 1;
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.h b/src/gallium/auxiliary/tgsi/tgsi_exec.h
index b5ebbfb..3749d3b 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.h
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2009-2010 VMware, Inc. All rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_EXEC_H
@@ -310,7 +310,7 @@ void
tgsi_exec_machine_destroy(struct tgsi_exec_machine *mach);
-void
+void
tgsi_exec_machine_bind_shader(
struct tgsi_exec_machine *mach,
const struct tgsi_token *tokens,
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
index e59e964..4de934d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_debug.h"
@@ -189,7 +189,7 @@ tgsi_get_opcode_info( uint opcode )
for (i = 0; i < Elements(opcode_info); i++)
assert(opcode_info[i].opcode == i);
}
-
+
if (opcode < TGSI_OPCODE_LAST)
return &opcode_info[opcode];
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.h b/src/gallium/auxiliary/tgsi/tgsi_info.h
index 1992d11..35add66 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_INFO_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_iterate.c b/src/gallium/auxiliary/tgsi/tgsi_iterate.c
index 0ba5fe4..82a11ba 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_iterate.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_iterate.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_debug.h"
diff --git a/src/gallium/auxiliary/tgsi/tgsi_iterate.h b/src/gallium/auxiliary/tgsi/tgsi_iterate.h
index 8d67f22..aaf5ead 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_iterate.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_iterate.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_ITERATE_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
index b3123ed..067d746 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef OP12_TEX
#define OP12_TEX(a) OP12(a)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.c b/src/gallium/auxiliary/tgsi/tgsi_parse.c
index 1891203..705e499 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_parse.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_parse.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_debug.h"
@@ -316,7 +316,7 @@ tgsi_dump_tokens(const struct tgsi_token *tokens)
const unsigned *dwords = (const unsigned *)tokens;
int nr = tgsi_num_tokens(tokens);
int i;
-
+
assert(sizeof(*tokens) == sizeof(unsigned));
debug_printf("const unsigned tokens[%d] = {\n", nr);
diff --git a/src/gallium/auxiliary/tgsi/tgsi_parse.h b/src/gallium/auxiliary/tgsi/tgsi_parse.h
index d4df585..c9e1895 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_parse.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_parse.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_PARSE_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ppc.c b/src/gallium/auxiliary/tgsi/tgsi_ppc.c
index 3521847..34c908f 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ppc.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ppc.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -51,7 +51,7 @@
* Since it's pretty much impossible to form PPC vector immediates, load
* them from memory here:
*/
-PIPE_ALIGN_VAR(16) const float
+PIPE_ALIGN_VAR(16) const float
ppc_builtin_constants[] = {
1.0f, -128.0f, 128.0, 0.0
};
@@ -432,7 +432,7 @@ static int
get_src_vec(struct gen_context *gen,
struct tgsi_full_instruction *inst, int src_reg, uint chan)
{
- const const struct tgsi_full_src_register *src =
+ const const struct tgsi_full_src_register *src =
&inst->Src[src_reg];
int vec;
uint i;
@@ -480,7 +480,7 @@ release_src_vecs(struct gen_context *gen)
static int
-get_dst_vec(struct gen_context *gen,
+get_dst_vec(struct gen_context *gen,
const struct tgsi_full_instruction *inst,
unsigned chan_index)
{
@@ -984,7 +984,7 @@ emit_log(struct gen_context *gen, struct tgsi_full_instruction *inst)
if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_X)) {
emit_store(gen, tmp_vec, inst, CHAN_X, FALSE);
}
-
+
/* Compute Y = abs / 2^tmp */
if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Y)) {
const int zero_vec = ppc_allocate_vec_register(gen->f);
@@ -1319,7 +1319,7 @@ tgsi_emit_ppc(const struct tgsi_token *tokens,
if (!ok) {
uint opcode = parse.FullToken.FullInstruction.Instruction.Opcode;
- debug_printf("failed to translate tgsi opcode %d (%s) to PPC (%s)\n",
+ debug_printf("failed to translate tgsi opcode %d (%s) to PPC (%s)\n",
opcode,
tgsi_get_opcode_name(opcode),
parse.FullHeader.Processor.Processor == TGSI_PROCESSOR_VERTEX ?
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ppc.h b/src/gallium/auxiliary/tgsi/tgsi_ppc.h
index 829ec07..e00b3ed 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ppc.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ppc.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_PPC_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
index acbff10..8574f6c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_debug.h"
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.h b/src/gallium/auxiliary/tgsi/tgsi_sanity.h
index 73f0f41..f389a59 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sanity.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_SANITY_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c
index 6585da3..820e219 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2008 VMware, Inc. All rights Reserved.
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -213,7 +213,7 @@ tgsi_scan_shader(const struct tgsi_token *tokens,
/**
* Check if the given shader is a "passthrough" shader consisting of only
* MOV instructions of the form: MOV OUT[n], IN[n]
- *
+ *
*/
boolean
tgsi_is_passthrough_shader(const struct tgsi_token *tokens)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h
index 104097f..b177d3d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_scan.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_SCAN_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sse2.c b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
index 086d983..71b33da 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sse2.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_sse2.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2009-2010 VMware, Inc. All rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "pipe/p_config.h"
@@ -548,7 +548,7 @@ emit_coef_dady(
*/
/**
- * NOTE: In gcc, if the destination uses the SSE intrinsics, then it must be
+ * NOTE: In gcc, if the destination uses the SSE intrinsics, then it must be
* defined with __attribute__((force_align_arg_pointer)), as we do not guarantee
* that the stack pointer is 16 byte aligned, as expected.
*/
@@ -572,15 +572,15 @@ emit_func_call(
x86_push(
func,
x86_make_reg( file_REG32, reg_DX) );
-
+
/* Store XMM regs to the stack
*/
for(i = 0, n = 0; i < 8; ++i)
if(xmm_save_mask & (1 << i))
++n;
-
+
x86_sub_imm(
- func,
+ func,
x86_make_reg( file_REG32, reg_SP ),
n*16);
@@ -601,7 +601,7 @@ emit_func_call(
func,
ecx,
arg[i] );
-
+
/* Push actual function arguments (currently just the pointer to
* the buffer above), and call the function:
*/
@@ -627,9 +627,9 @@ emit_func_call(
x86_make_disp( x86_make_reg( file_REG32, reg_SP ), n*16 ) );
++n;
}
-
+
x86_add_imm(
- func,
+ func,
x86_make_reg( file_REG32, reg_SP ),
n*16);
@@ -649,14 +649,14 @@ emit_func_call(
static void
emit_func_call_dst_src1(
struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst,
unsigned xmm_src0,
void (PIPE_CDECL *code)() )
{
struct x86_reg store = get_temp( TEMP_R0, 0 );
unsigned xmm_mask = ((1 << xmm_save) - 1) & ~(1 << xmm_dst);
-
+
/* Store our input parameters (in xmm regs) to the buffer we use
* for passing arguments. We will pass a pointer to this buffer as
* the actual function argument.
@@ -682,7 +682,7 @@ emit_func_call_dst_src1(
static void
emit_func_call_dst_src2(
struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst,
unsigned xmm_src0,
unsigned xmm_src1,
@@ -743,7 +743,7 @@ emit_func_call_dst_src2(
/**
* See http://www.devmaster.net/forums/showthread.php?p=43580
*/
-static INLINE __m128
+static INLINE __m128
exp2f4(__m128 x)
{
__m128i ipart;
@@ -781,7 +781,7 @@ exp2f4(__m128 x)
/**
* See http://www.devmaster.net/forums/showthread.php?p=43580
*/
-static INLINE __m128
+static INLINE __m128
log2f4(__m128 x)
{
__m128i expmask = _mm_set1_epi32(0x7f800000);
@@ -798,8 +798,8 @@ log2f4(__m128 x)
__m128 logmant;
- /* Minimax polynomial fit of log2(x)/(x - 1), for x in range [1, 2[
- * These coefficients can be generate with
+ /* Minimax polynomial fit of log2(x)/(x - 1), for x in range [1, 2[
+ * These coefficients can be generate with
* http://www.boost.org/doc/libs/1_36_0/libs/math/doc/sf_and_dist/html/math_toolkit/toolkit/internals2/minimax.html
*/
#if LOG_POLY_DEGREE == 6
@@ -873,12 +873,12 @@ cos4f(
static void
emit_cos(
struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst )
{
emit_func_call_dst_src1(
func,
- xmm_save,
+ xmm_save,
xmm_dst,
xmm_dst,
cos4f );
@@ -904,7 +904,7 @@ ex24f(
static void
emit_ex2(
struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst )
{
emit_func_call_dst_src1(
@@ -950,7 +950,7 @@ flr4f(
static void
emit_flr(
struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst )
{
emit_func_call_dst_src1(
@@ -974,7 +974,7 @@ frc4f(
static void
emit_frc(
struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst )
{
emit_func_call_dst_src1(
@@ -1005,7 +1005,7 @@ lg24f(
static void
emit_lg2(
struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst )
{
emit_func_call_dst_src1(
@@ -1072,7 +1072,7 @@ pow4f(
static void
emit_pow(
struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst,
unsigned xmm_src0,
unsigned xmm_src1 )
@@ -1115,7 +1115,7 @@ rnd4f(
static void
emit_rnd(
struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst )
{
emit_func_call_dst_src1(
@@ -1136,7 +1136,7 @@ emit_rsqrt(
/* Although rsqrtps() and rcpps() are low precision on some/all SSE
* implementations, it is possible to improve its precision at
* fairly low cost, using a newton/raphson step, as below:
- *
+ *
* x1 = 2 * rcpps(a) - a * rcpps(a) * rcpps(a)
* x1 = 0.5 * rsqrtps(a) * [3.0 - (a * rsqrtps(a))* rsqrtps(a)]
*
@@ -1198,7 +1198,7 @@ sgn4f(
static void
emit_sgn(
struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst )
{
emit_func_call_dst_src1(
@@ -1221,7 +1221,7 @@ sin4f(
static void
emit_sin (struct x86_function *func,
- unsigned xmm_save,
+ unsigned xmm_save,
unsigned xmm_dst)
{
emit_func_call_dst_src1(
@@ -1406,14 +1406,14 @@ fetch_texel( struct tgsi_sampler **sampler,
#if 0
uint j;
- debug_printf("%s sampler: %p (%p) store: %p\n",
+ debug_printf("%s sampler: %p (%p) store: %p\n",
__FUNCTION__,
sampler, *sampler,
store );
for (j = 0; j < 4; j++)
debug_printf("sample %d texcoord %f %f %f lodbias %f\n",
- j,
+ j,
store[0+j],
store[4+j],
store[8 + j],
@@ -1422,7 +1422,7 @@ fetch_texel( struct tgsi_sampler **sampler,
{
float rgba[NUM_CHANNELS][QUAD_SIZE];
- (*sampler)->get_samples(*sampler,
+ (*sampler)->get_samples(*sampler,
&store[0], /* s */
&store[4], /* t */
&store[8], /* r */
@@ -1435,8 +1435,8 @@ fetch_texel( struct tgsi_sampler **sampler,
#if 0
for (j = 0; j < 4; j++)
- debug_printf("sample %d result %f %f %f %f\n",
- j,
+ debug_printf("sample %d result %f %f %f %f\n",
+ j,
store[0+j],
store[4+j],
store[8+j],
@@ -1513,7 +1513,7 @@ emit_tex( struct x86_function *func,
make_xmm( i ),
make_xmm( 3 ) );
}
-
+
/* Store in the argument buffer:
*/
sse_movaps(
@@ -1600,7 +1600,7 @@ emit_kil(
TGSI_EXEC_TEMP_00000000_I,
TGSI_EXEC_TEMP_00000000_C ),
cc_LessThan );
-
+
if( i == 0 ) {
sse_movmskps(
func,
@@ -2530,7 +2530,7 @@ emit_instruction(
case TGSI_OPCODE_TXP:
emit_tex( func, inst, FALSE, TRUE );
break;
-
+
case TGSI_OPCODE_BRK:
return 0;
break;
@@ -2627,7 +2627,7 @@ emit_instruction(
default:
return 0;
}
-
+
return 1;
}
@@ -2693,10 +2693,10 @@ emit_declaration(
}
}
-static void aos_to_soa( struct x86_function *func,
+static void aos_to_soa( struct x86_function *func,
uint arg_aos,
- uint arg_machine,
- uint arg_num,
+ uint arg_machine,
+ uint arg_num,
uint arg_stride )
{
struct x86_reg soa_input = x86_make_reg( file_REG32, reg_AX );
@@ -2710,8 +2710,8 @@ static void aos_to_soa( struct x86_function *func,
x86_mov( func, aos_input, x86_fn_arg( func, arg_aos ) );
x86_mov( func, soa_input, x86_fn_arg( func, arg_machine ) );
- x86_lea( func, soa_input,
- x86_make_disp( soa_input,
+ x86_lea( func, soa_input,
+ x86_make_disp( soa_input,
Offset(struct tgsi_exec_machine, Inputs) ) );
x86_mov( func, num_inputs, x86_fn_arg( func, arg_num ) );
x86_mov( func, stride, x86_fn_arg( func, arg_stride ) );
@@ -2761,10 +2761,10 @@ static void aos_to_soa( struct x86_function *func,
x86_pop( func, x86_make_reg( file_REG32, reg_BX ) );
}
-static void soa_to_aos( struct x86_function *func,
- uint arg_aos,
- uint arg_machine,
- uint arg_num,
+static void soa_to_aos( struct x86_function *func,
+ uint arg_aos,
+ uint arg_machine,
+ uint arg_num,
uint arg_stride )
{
struct x86_reg soa_output = x86_make_reg( file_REG32, reg_AX );
@@ -2778,8 +2778,8 @@ static void soa_to_aos( struct x86_function *func,
x86_mov( func, aos_output, x86_fn_arg( func, arg_aos ) );
x86_mov( func, soa_output, x86_fn_arg( func, arg_machine ) );
- x86_lea( func, soa_output,
- x86_make_disp( soa_output,
+ x86_lea( func, soa_output,
+ x86_make_disp( soa_output,
Offset(struct tgsi_exec_machine, Outputs) ) );
x86_mov( func, num_outputs, x86_fn_arg( func, arg_num ) );
@@ -2916,7 +2916,7 @@ tgsi_emit_sse2(
*/
if (parse.FullHeader.Processor.Processor == TGSI_PROCESSOR_VERTEX) {
if (do_swizzles)
- aos_to_soa( func,
+ aos_to_soa( func,
4, /* aos_input */
1, /* machine */
5, /* num_inputs */
@@ -2969,7 +2969,7 @@ tgsi_emit_sse2(
if (!ok) {
uint opcode = parse.FullToken.FullInstruction.Instruction.Opcode;
uint proc = parse.FullHeader.Processor.Processor;
- debug_printf("failed to translate tgsi opcode %d (%s) to SSE (%s)\n",
+ debug_printf("failed to translate tgsi opcode %d (%s) to SSE (%s)\n",
opcode,
tgsi_get_opcode_name(opcode),
tgsi_get_processor_name(proc));
@@ -3013,7 +3013,7 @@ tgsi_emit_sse2(
if (parse.FullHeader.Processor.Processor == TGSI_PROCESSOR_VERTEX) {
if (do_swizzles)
- soa_to_aos( func,
+ soa_to_aos( func,
7, /* aos_output */
1, /* machine */
8, /* num_outputs */
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sse2.h b/src/gallium/auxiliary/tgsi/tgsi_sse2.h
index 00aa8b8..219324d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_sse2.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_sse2.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_SSE2_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 9a38c37..0fd5c5d 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_debug.h"
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.h b/src/gallium/auxiliary/tgsi/tgsi_text.h
index 8eeeeef..eefdac5 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_TEXT_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.c b/src/gallium/auxiliary/tgsi/tgsi_transform.c
index ae875f2..c5d891e 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_transform.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_transform.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -237,13 +237,13 @@ int
tgsi_transform_foo( struct tgsi_token *tokens_out,
uint max_tokens_out )
{
- const char *text =
+ const char *text =
"FRAG\n"
"DCL IN[0], COLOR, CONSTANT\n"
"DCL OUT[0], COLOR\n"
" 0: MOV OUT[0], IN[0]\n"
" 1: END";
-
+
return tgsi_text_translate( text,
tokens_out,
max_tokens_out );
diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h b/src/gallium/auxiliary/tgsi/tgsi_transform.h
index 818478e..ff57ded 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_transform.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_transform.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_TRANSFORM_H
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
index 7d13a17..e1a3d94 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -182,7 +182,7 @@ static void tokens_expand( struct ureg_tokens *tokens,
tokens->size = (1 << ++tokens->order);
}
- tokens->tokens = REALLOC(tokens->tokens,
+ tokens->tokens = REALLOC(tokens->tokens,
old_size,
tokens->size * sizeof(unsigned));
if (tokens->tokens == NULL) {
@@ -204,7 +204,7 @@ static union tgsi_any_token *get_tokens( struct ureg_program *ureg,
struct ureg_tokens *tokens = &ureg->domain[domain];
union tgsi_any_token *result;
- if (tokens->count + count > tokens->size)
+ if (tokens->count + count > tokens->size)
tokens_expand(tokens, count);
result = &tokens->tokens[tokens->count];
@@ -319,12 +319,12 @@ ureg_DECL_fs_input_cyl_centroid(struct ureg_program *ureg,
}
-struct ureg_src
+struct ureg_src
ureg_DECL_vs_input( struct ureg_program *ureg,
unsigned index )
{
assert(ureg->processor == TGSI_PROCESSOR_VERTEX);
-
+
ureg->vs_inputs[index/32] |= 1 << (index % 32);
return ureg_src_register( TGSI_FILE_INPUT, index );
}
@@ -369,7 +369,7 @@ ureg_DECL_system_value(struct ureg_program *ureg,
}
-struct ureg_dst
+struct ureg_dst
ureg_DECL_output( struct ureg_program *ureg,
unsigned name,
unsigned index )
@@ -378,7 +378,7 @@ ureg_DECL_output( struct ureg_program *ureg,
for (i = 0; i < ureg->nr_outputs; i++) {
if (ureg->output[i].semantic_name == name &&
- ureg->output[i].semantic_index == index)
+ ureg->output[i].semantic_index == index)
goto out;
}
@@ -561,7 +561,7 @@ struct ureg_src ureg_DECL_sampler( struct ureg_program *ureg,
for (i = 0; i < ureg->nr_samplers; i++)
if (ureg->sampler[i].Index == nr)
return ureg->sampler[i];
-
+
if (i < PIPE_MAX_SAMPLERS) {
ureg->sampler[i] = ureg_src_register( TGSI_FILE_SAMPLER, nr );
ureg->nr_samplers++;
@@ -748,7 +748,7 @@ ureg_emit_src( struct ureg_program *ureg,
assert(src.File != TGSI_FILE_NULL);
assert(src.File != TGSI_FILE_OUTPUT);
assert(src.File < TGSI_FILE_COUNT);
-
+
out[n].value = 0;
out[n].src.File = src.File;
out[n].src.SwizzleX = src.SwizzleX;
@@ -801,11 +801,11 @@ ureg_emit_src( struct ureg_program *ureg,
}
-void
+void
ureg_emit_dst( struct ureg_program *ureg,
struct ureg_dst dst )
{
- unsigned size = (1 +
+ unsigned size = (1 +
(dst.Indirect ? 1 : 0));
union tgsi_any_token *out = get_tokens( ureg, DOMAIN_INSN, size );
@@ -817,14 +817,14 @@ ureg_emit_dst( struct ureg_program *ureg,
assert(dst.File != TGSI_FILE_SAMPLER);
assert(dst.File != TGSI_FILE_IMMEDIATE);
assert(dst.File < TGSI_FILE_COUNT);
-
+
out[n].value = 0;
out[n].dst.File = dst.File;
out[n].dst.WriteMask = dst.WriteMask;
out[n].dst.Indirect = dst.Indirect;
out[n].dst.Index = dst.Index;
n++;
-
+
if (dst.Indirect) {
out[n].value = 0;
out[n].src.File = TGSI_FILE_ADDRESS;
@@ -872,7 +872,7 @@ ureg_emit_insn(struct ureg_program *ureg,
struct ureg_emit_insn_result result;
validate( opcode, num_dst, num_src );
-
+
out = get_tokens( ureg, DOMAIN_INSN, count );
out[0].insn = tgsi_default_instruction();
out[0].insn.Opcode = opcode;
@@ -1322,7 +1322,7 @@ static void emit_decls( struct ureg_program *ureg )
}
for (i = 0; i < ureg->nr_samplers; i++) {
- emit_decl_range( ureg,
+ emit_decl_range( ureg,
TGSI_FILE_SAMPLER,
ureg->sampler[i].Index, 1 );
}
@@ -1384,12 +1384,12 @@ static void emit_decls( struct ureg_program *ureg )
static void copy_instructions( struct ureg_program *ureg )
{
unsigned nr_tokens = ureg->domain[DOMAIN_INSN].count;
- union tgsi_any_token *out = get_tokens( ureg,
- DOMAIN_DECL,
+ union tgsi_any_token *out = get_tokens( ureg,
+ DOMAIN_DECL,
nr_tokens );
- memcpy(out,
- ureg->domain[DOMAIN_INSN].tokens,
+ memcpy(out,
+ ureg->domain[DOMAIN_INSN].tokens,
nr_tokens * sizeof out[0] );
}
@@ -1424,7 +1424,7 @@ const struct tgsi_token *ureg_finalize( struct ureg_program *ureg )
emit_decls( ureg );
copy_instructions( ureg );
fixup_header_size( ureg );
-
+
if (ureg->domain[0].tokens == error_tokens ||
ureg->domain[1].tokens == error_tokens) {
debug_printf("%s: error in generated shader\n", __FUNCTION__);
@@ -1435,7 +1435,7 @@ const struct tgsi_token *ureg_finalize( struct ureg_program *ureg )
tokens = &ureg->domain[DOMAIN_DECL].tokens[0].token;
if (0) {
- debug_printf("%s: emitted shader %d tokens:\n", __FUNCTION__,
+ debug_printf("%s: emitted shader %d tokens:\n", __FUNCTION__,
ureg->domain[DOMAIN_DECL].count);
tgsi_dump( tokens, 0 );
}
@@ -1448,7 +1448,7 @@ const struct tgsi_token *ureg_finalize( struct ureg_program *ureg )
}
#endif
-
+
return tokens;
}
@@ -1478,7 +1478,7 @@ const struct tgsi_token *ureg_get_tokens( struct ureg_program *ureg,
tokens = &ureg->domain[DOMAIN_DECL].tokens[0].token;
- if (nr_tokens)
+ if (nr_tokens)
*nr_tokens = ureg->domain[DOMAIN_DECL].size;
ureg->domain[DOMAIN_DECL].tokens = 0;
@@ -1515,10 +1515,10 @@ void ureg_destroy( struct ureg_program *ureg )
unsigned i;
for (i = 0; i < Elements(ureg->domain); i++) {
- if (ureg->domain[i].tokens &&
+ if (ureg->domain[i].tokens &&
ureg->domain[i].tokens != error_tokens)
FREE(ureg->domain[i].tokens);
}
-
+
FREE(ureg);
}
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
index acc4632..126262c 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_UREG_H
@@ -35,7 +35,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
struct ureg_program;
/* Almost a tgsi_src_register, but we need to pull in the Absolute
@@ -112,7 +112,7 @@ ureg_get_tokens( struct ureg_program *ureg,
void ureg_free_tokens( const struct tgsi_token *tokens );
-void
+void
ureg_destroy( struct ureg_program * );
@@ -247,7 +247,7 @@ ureg_DECL_constant( struct ureg_program *,
struct ureg_dst
ureg_DECL_temporary( struct ureg_program * );
-void
+void
ureg_release_temporary( struct ureg_program *ureg,
struct ureg_dst tmp );
@@ -482,11 +482,11 @@ ureg_emit_texture(struct ureg_program *ureg,
unsigned insn_token,
unsigned target );
-void
+void
ureg_emit_dst( struct ureg_program *ureg,
struct ureg_dst dst );
-void
+void
ureg_emit_src( struct ureg_program *ureg,
struct ureg_src src );
@@ -738,7 +738,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \
/***********************************************************************
* Inline helpers for manipulating register structs:
*/
-static INLINE struct ureg_src
+static INLINE struct ureg_src
ureg_negate( struct ureg_src reg )
{
assert(reg.File != TGSI_FILE_NULL);
@@ -755,8 +755,8 @@ ureg_abs( struct ureg_src reg )
return reg;
}
-static INLINE struct ureg_src
-ureg_swizzle( struct ureg_src reg,
+static INLINE struct ureg_src
+ureg_swizzle( struct ureg_src reg,
int x, int y, int z, int w )
{
unsigned swz = ( (reg.SwizzleX << 0) |
@@ -783,7 +783,7 @@ ureg_scalar( struct ureg_src reg, int x )
return ureg_swizzle(reg, x, x, x, x);
}
-static INLINE struct ureg_dst
+static INLINE struct ureg_dst
ureg_writemask( struct ureg_dst reg,
unsigned writemask )
{
@@ -792,7 +792,7 @@ ureg_writemask( struct ureg_dst reg,
return reg;
}
-static INLINE struct ureg_dst
+static INLINE struct ureg_dst
ureg_saturate( struct ureg_dst reg )
{
assert(reg.File != TGSI_FILE_NULL);
@@ -818,7 +818,7 @@ ureg_predicate(struct ureg_dst reg,
return reg;
}
-static INLINE struct ureg_dst
+static INLINE struct ureg_dst
ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr )
{
assert(reg.File != TGSI_FILE_NULL);
@@ -829,7 +829,7 @@ ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr )
return reg;
}
-static INLINE struct ureg_src
+static INLINE struct ureg_src
ureg_src_indirect( struct ureg_src reg, struct ureg_src addr )
{
assert(reg.File != TGSI_FILE_NULL);
diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.c b/src/gallium/auxiliary/tgsi/tgsi_util.c
index 08e7e89..d156e3e 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_util.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_util.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_debug.h"
diff --git a/src/gallium/auxiliary/tgsi/tgsi_util.h b/src/gallium/auxiliary/tgsi/tgsi_util.h
index 04702ba..aad4758 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_util.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_util.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef TGSI_UTIL_H
diff --git a/src/gallium/auxiliary/translate/translate.c b/src/gallium/auxiliary/translate/translate.c
index 73287b6..463b2de 100644
--- a/src/gallium/auxiliary/translate/translate.c
+++ b/src/gallium/auxiliary/translate/translate.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
diff --git a/src/gallium/auxiliary/translate/translate.h b/src/gallium/auxiliary/translate/translate.h
index 850ef39..fd68b12 100644
--- a/src/gallium/auxiliary/translate/translate.h
+++ b/src/gallium/auxiliary/translate/translate.h
@@ -49,7 +49,7 @@ enum translate_element_type {
TRANSLATE_ELEMENT_INSTANCE_ID
};
-struct translate_element
+struct translate_element
{
enum translate_element_type type;
enum pipe_format input_format;
diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c
index ad809db..4c84fab 100644
--- a/src/gallium/auxiliary/translate/translate_generic.c
+++ b/src/gallium/auxiliary/translate/translate_generic.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -59,7 +59,7 @@ struct translate_generic {
emit_func emit;
unsigned output_offset;
-
+
const uint8_t *input_ptr;
unsigned input_stride;
unsigned max_index;
@@ -215,7 +215,7 @@ emit_B8G8R8A8_UNORM( const float *attrib, void *ptr)
out[3] = TO_8_UNORM(attrib[3]);
}
-static void
+static void
emit_NULL( const float *attrib, void *ptr )
{
/* do nothing is the only sensible option */
@@ -357,7 +357,7 @@ static emit_func get_emit_func( enum pipe_format format )
return &emit_A8R8G8B8_UNORM;
default:
- assert(0);
+ assert(0);
return &emit_NULL;
}
}
@@ -490,7 +490,7 @@ static void PIPE_CDECL generic_run( struct translate *translate,
}
-
+
static void generic_set_buffer( struct translate *translate,
unsigned buf,
const void *ptr,
diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c
index ef7f4be..7f77a32 100644
--- a/src/gallium/auxiliary/translate/translate_sse.c
+++ b/src/gallium/auxiliary/translate/translate_sse.c
@@ -1143,10 +1143,10 @@ static struct x86_reg get_buffer_ptr( struct translate_sse *p,
}
else if (!index_size || p->buffer_varient[var_idx].instance_divisor) {
struct x86_reg ptr = p->src_ECX;
- struct x86_reg buf_ptr =
+ struct x86_reg buf_ptr =
x86_make_disp(p->machine_EDI,
get_offset(p, &p->buffer_varient[var_idx].ptr));
-
+
x64_rexw(p->func);
x86_mov(p->func, ptr, buf_ptr);
return ptr;
@@ -1155,11 +1155,11 @@ static struct x86_reg get_buffer_ptr( struct translate_sse *p,
struct x86_reg ptr = p->src_ECX;
const struct translate_buffer_varient *varient = &p->buffer_varient[var_idx];
- struct x86_reg buf_stride =
+ struct x86_reg buf_stride =
x86_make_disp(p->machine_EDI,
get_offset(p, &p->buffer[varient->buffer_index].stride));
- struct x86_reg buf_base_ptr =
+ struct x86_reg buf_base_ptr =
x86_make_disp(p->machine_EDI,
get_offset(p, &p->buffer[varient->buffer_index].base_ptr));
@@ -1188,7 +1188,7 @@ static struct x86_reg get_buffer_ptr( struct translate_sse *p,
-static boolean incr_inputs( struct translate_sse *p,
+static boolean incr_inputs( struct translate_sse *p,
unsigned index_size )
{
if (!index_size && p->nr_buffer_varients == 1) {
@@ -1222,12 +1222,12 @@ static boolean incr_inputs( struct translate_sse *p,
x86_mov(p->func, buf_ptr, p->tmp_EAX);
}
}
- }
+ }
else {
x64_rexw(p->func);
x86_lea(p->func, p->idx_ESI, x86_make_disp(p->idx_ESI, index_size));
}
-
+
return TRUE;
}
@@ -1245,8 +1245,8 @@ static boolean incr_inputs( struct translate_sse *p,
* Lots of hardcoding
*
* EAX -- pointer to current output vertex
- * ECX -- pointer to current attribute
- *
+ * ECX -- pointer to current attribute
+ *
*/
static boolean build_vertex_emit( struct translate_sse *p,
struct x86_function *func,
@@ -1336,9 +1336,9 @@ static boolean build_vertex_emit( struct translate_sse *p,
last_varient = varient;
vb = get_buffer_ptr(p, index_size, varient, elt);
}
-
- if (!translate_attr( p, a,
- x86_make_disp(vb, a->input_offset),
+
+ if (!translate_attr( p, a,
+ x86_make_disp(vb, a->input_offset),
x86_make_disp(p->outbuf_EBX, a->output_offset)))
return FALSE;
}
@@ -1346,13 +1346,13 @@ static boolean build_vertex_emit( struct translate_sse *p,
/* Next output vertex:
*/
x64_rexw(p->func);
- x86_lea(p->func,
+ x86_lea(p->func,
p->outbuf_EBX,
x86_make_disp(p->outbuf_EBX,
p->translate.key.output_stride));
/* Incr index
- */
+ */
incr_inputs( p, index_size );
}
@@ -1372,7 +1372,7 @@ static boolean build_vertex_emit( struct translate_sse *p,
/* Pop regs and return
*/
-
+
if(x86_target(p->func) != X86_64_STD_ABI)
{
x86_pop(p->func, p->idx_ESI);
@@ -1397,7 +1397,7 @@ static boolean build_vertex_emit( struct translate_sse *p,
-
+
static void translate_sse_set_buffer( struct translate *translate,
unsigned buf,
const void *ptr,
@@ -1412,9 +1412,9 @@ static void translate_sse_set_buffer( struct translate *translate,
p->buffer[buf].max_index = max_index;
}
- if (0) debug_printf("%s %d/%d: %p %d\n",
- __FUNCTION__, buf,
- p->nr_buffers,
+ if (0) debug_printf("%s %d/%d: %p %d\n",
+ __FUNCTION__, buf,
+ p->nr_buffers,
ptr, stride);
}
@@ -1440,7 +1440,7 @@ struct translate *translate_sse2_create( const struct translate_key *key )
goto fail;
p = os_malloc_aligned(sizeof(struct translate_sse), 16);
- if (p == NULL)
+ if (p == NULL)
goto fail;
memset(p, 0, sizeof(*p));
memcpy(p->consts, consts, sizeof(consts));
diff --git a/src/gallium/auxiliary/util/u_atomic.h b/src/gallium/auxiliary/util/u_atomic.h
index 8434491..d791ff9 100644
--- a/src/gallium/auxiliary/util/u_atomic.h
+++ b/src/gallium/auxiliary/util/u_atomic.h
@@ -26,7 +26,7 @@
#elif defined(PIPE_CC_MSVC)
#define PIPE_ATOMIC_MSVC_INTRINSIC
#elif (defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86))
-#define PIPE_ATOMIC_ASM_MSVC_X86
+#define PIPE_ATOMIC_ASM_MSVC_X86
#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86))
#define PIPE_ATOMIC_ASM_GCC_X86
#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64))
@@ -180,7 +180,7 @@ p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
/* Unlocked version for single threaded environments, such as some
* windows kernel modules.
*/
-#if defined(PIPE_ATOMIC_OS_UNLOCKED)
+#if defined(PIPE_ATOMIC_OS_UNLOCKED)
#define PIPE_ATOMIC "Unlocked"
diff --git a/src/gallium/auxiliary/util/u_bitmask.c b/src/gallium/auxiliary/util/u_bitmask.c
index 23c93a3..b5c88f7 100644
--- a/src/gallium/auxiliary/util/u_bitmask.c
+++ b/src/gallium/auxiliary/util/u_bitmask.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,13 +22,13 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
* Generic bitmask implementation.
- *
+ *
* @author Jose Fonseca
*/
@@ -40,7 +40,7 @@
#include "util/u_bitmask.h"
-typedef uint32_t util_bitmask_word;
+typedef uint32_t util_bitmask_word;
#define UTIL_BITMASK_INITIAL_WORDS 16
@@ -51,10 +51,10 @@ typedef uint32_t util_bitmask_word;
struct util_bitmask
{
util_bitmask_word *words;
-
+
/** Number of bits we can currently hold */
unsigned size;
-
+
/** Number of consecutive bits set at the start of the bitmask */
unsigned filled;
};
@@ -64,26 +64,26 @@ struct util_bitmask *
util_bitmask_create(void)
{
struct util_bitmask *bm;
-
+
bm = MALLOC_STRUCT(util_bitmask);
if(!bm)
return NULL;
-
+
bm->words = (util_bitmask_word *)CALLOC(UTIL_BITMASK_INITIAL_WORDS, sizeof(util_bitmask_word));
if(!bm->words) {
FREE(bm);
return NULL;
}
-
+
bm->size = UTIL_BITMASK_INITIAL_WORDS * UTIL_BITMASK_BITS_PER_WORD;
bm->filled = 0;
-
+
return bm;
}
/**
- * Resize the bitmask if necessary
+ * Resize the bitmask if necessary
*/
static INLINE boolean
util_bitmask_resize(struct util_bitmask *bm,
@@ -96,7 +96,7 @@ util_bitmask_resize(struct util_bitmask *bm,
/* Check integer overflow */
if(!minimum_size)
return FALSE;
-
+
if(bm->size >= minimum_size)
return TRUE;
@@ -110,20 +110,20 @@ util_bitmask_resize(struct util_bitmask *bm,
}
assert(new_size);
assert(new_size % UTIL_BITMASK_BITS_PER_WORD == 0);
-
+
new_words = (util_bitmask_word *)REALLOC((void *)bm->words,
bm->size / UTIL_BITMASK_BITS_PER_BYTE,
new_size / UTIL_BITMASK_BITS_PER_BYTE);
if(!new_words)
return FALSE;
-
- memset(new_words + bm->size/UTIL_BITMASK_BITS_PER_WORD,
- 0,
+
+ memset(new_words + bm->size/UTIL_BITMASK_BITS_PER_WORD,
+ 0,
(new_size - bm->size)/UTIL_BITMASK_BITS_PER_BYTE);
-
+
bm->size = new_size;
bm->words = new_words;
-
+
return TRUE;
}
@@ -137,7 +137,7 @@ util_bitmask_filled_set(struct util_bitmask *bm,
{
assert(bm->filled <= bm->size);
assert(index < bm->size);
-
+
if(index == bm->filled) {
++bm->filled;
assert(bm->filled <= bm->size);
@@ -150,7 +150,7 @@ util_bitmask_filled_unset(struct util_bitmask *bm,
{
assert(bm->filled <= bm->size);
assert(index < bm->size);
-
+
if(index < bm->filled)
bm->filled = index;
}
@@ -162,7 +162,7 @@ util_bitmask_add(struct util_bitmask *bm)
unsigned word;
unsigned bit;
util_bitmask_word mask;
-
+
assert(bm);
/* linear search for an empty index */
@@ -195,15 +195,15 @@ util_bitmask_add(struct util_bitmask *bm)
unsigned
-util_bitmask_set(struct util_bitmask *bm,
+util_bitmask_set(struct util_bitmask *bm,
unsigned index)
{
unsigned word;
unsigned bit;
util_bitmask_word mask;
-
+
assert(bm);
-
+
/* grow the bitmask if necessary */
if(!util_bitmask_resize(bm, index))
return UTIL_BITMASK_INVALID_INDEX;
@@ -215,21 +215,21 @@ util_bitmask_set(struct util_bitmask *bm,
bm->words[word] |= mask;
util_bitmask_filled_set(bm, index);
-
+
return index;
}
void
-util_bitmask_clear(struct util_bitmask *bm,
+util_bitmask_clear(struct util_bitmask *bm,
unsigned index)
{
unsigned word;
unsigned bit;
util_bitmask_word mask;
-
+
assert(bm);
-
+
if(index >= bm->size)
return;
@@ -238,21 +238,21 @@ util_bitmask_clear(struct util_bitmask *bm,
mask = 1 << bit;
bm->words[word] &= ~mask;
-
+
util_bitmask_filled_unset(bm, index);
}
boolean
-util_bitmask_get(struct util_bitmask *bm,
+util_bitmask_get(struct util_bitmask *bm,
unsigned index)
{
unsigned word = index / UTIL_BITMASK_BITS_PER_WORD;
unsigned bit = index % UTIL_BITMASK_BITS_PER_WORD;
util_bitmask_word mask = 1 << bit;
-
+
assert(bm);
-
+
if(index < bm->filled) {
assert(bm->words[word] & mask);
return TRUE;
@@ -271,7 +271,7 @@ util_bitmask_get(struct util_bitmask *bm,
unsigned
-util_bitmask_get_next_index(struct util_bitmask *bm,
+util_bitmask_get_next_index(struct util_bitmask *bm,
unsigned index)
{
unsigned word = index / UTIL_BITMASK_BITS_PER_WORD;
@@ -305,7 +305,7 @@ util_bitmask_get_next_index(struct util_bitmask *bm,
bit = 0;
mask = 1;
}
-
+
return UTIL_BITMASK_INVALID_INDEX;
}
diff --git a/src/gallium/auxiliary/util/u_bitmask.h b/src/gallium/auxiliary/util/u_bitmask.h
index 98b85dd..f076968 100644
--- a/src/gallium/auxiliary/util/u_bitmask.h
+++ b/src/gallium/auxiliary/util/u_bitmask.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,13 +22,13 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
* Generic bitmask.
- *
+ *
* @author Jose Fonseca
*/
@@ -45,8 +45,8 @@ extern "C" {
#define UTIL_BITMASK_INVALID_INDEX (~0U)
-
-
+
+
/**
* Abstract data type to represent arbitrary set of bits.
*/
@@ -59,10 +59,10 @@ util_bitmask_create(void);
/**
* Search a cleared bit and set it.
- *
+ *
* It searches for the first cleared bit.
- *
- * Returns the bit index on success, or UTIL_BITMASK_INVALID_INDEX on out of
+ *
+ * Returns the bit index on success, or UTIL_BITMASK_INVALID_INDEX on out of
* memory growing the bitmask.
*/
unsigned
@@ -70,20 +70,20 @@ util_bitmask_add(struct util_bitmask *bm);
/**
* Set a bit.
- *
- * Returns the input index on success, or UTIL_BITMASK_INVALID_INDEX on out of
+ *
+ * Returns the input index on success, or UTIL_BITMASK_INVALID_INDEX on out of
* memory growing the bitmask.
*/
unsigned
-util_bitmask_set(struct util_bitmask *bm,
+util_bitmask_set(struct util_bitmask *bm,
unsigned index);
void
-util_bitmask_clear(struct util_bitmask *bm,
+util_bitmask_clear(struct util_bitmask *bm,
unsigned index);
boolean
-util_bitmask_get(struct util_bitmask *bm,
+util_bitmask_get(struct util_bitmask *bm,
unsigned index);
@@ -93,8 +93,8 @@ util_bitmask_destroy(struct util_bitmask *bm);
/**
* Search for the first set bit.
- *
- * Returns UTIL_BITMASK_INVALID_INDEX if a set bit cannot be found.
+ *
+ * Returns UTIL_BITMASK_INVALID_INDEX if a set bit cannot be found.
*/
unsigned
util_bitmask_get_first_index(struct util_bitmask *bm);
@@ -102,8 +102,8 @@ util_bitmask_get_first_index(struct util_bitmask *bm);
/**
* Search for the first set bit, starting from the giving index.
- *
- * Returns UTIL_BITMASK_INVALID_INDEX if a set bit cannot be found.
+ *
+ * Returns UTIL_BITMASK_INVALID_INDEX if a set bit cannot be found.
*/
unsigned
util_bitmask_get_next_index(struct util_bitmask *bm,
diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index c11f7d3..f3a1fc3 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -28,7 +28,7 @@
/**
* @file
* Copy/blit pixel rect between surfaces
- *
+ *
* @author Brian Paul
*/
@@ -193,7 +193,7 @@ get_next_slot( struct blit_state *ctx )
{
const unsigned max_slots = 4096 / sizeof ctx->vertices;
- if (ctx->vbuf_slot >= max_slots)
+ if (ctx->vbuf_slot >= max_slots)
util_blit_flush( ctx );
if (!ctx->vbuf) {
@@ -201,7 +201,7 @@ get_next_slot( struct blit_state *ctx )
PIPE_BIND_VERTEX_BUFFER,
max_slots * sizeof ctx->vertices);
}
-
+
return ctx->vbuf_slot++ * sizeof ctx->vertices;
}
@@ -357,7 +357,7 @@ util_blit_pixels_writemask(struct blit_state *ctx,
* is anything other than a 2d texture.
* XXX should just use appropriate shader to access 1d / 3d slice / cube face,
* much like the u_blitter code does (should be pretty trivial).
- *
+ *
* This can still be improved upon.
*/
if ((src_tex == dst->texture &&
@@ -608,7 +608,7 @@ void util_blit_flush( struct blit_state *ctx )
{
pipe_resource_reference(&ctx->vbuf, NULL);
ctx->vbuf_slot = 0;
-}
+}
@@ -722,7 +722,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
s0, t0, s1, t1,
z);
- util_draw_vertex_buffer(ctx->pipe,
+ util_draw_vertex_buffer(ctx->pipe,
ctx->vbuf, offset,
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
diff --git a/src/gallium/auxiliary/util/u_blit.h b/src/gallium/auxiliary/util/u_blit.h
index 3009e25..c01831e 100644
--- a/src/gallium/auxiliary/util/u_blit.h
+++ b/src/gallium/auxiliary/util/u_blit.h
@@ -37,7 +37,7 @@
extern "C" {
#endif
-
+
struct cso_context;
struct pipe_context;
struct pipe_resource;
diff --git a/src/gallium/auxiliary/util/u_cache.c b/src/gallium/auxiliary/util/u_cache.c
index 15f4a88..b1a2632 100644
--- a/src/gallium/auxiliary/util/u_cache.c
+++ b/src/gallium/auxiliary/util/u_cache.c
@@ -29,8 +29,8 @@
* @file
* Simple cache implementation.
*
- * We simply have fixed size array, and destroy previous values on collision.
- *
+ * We simply have fixed size array, and destroy previous values on collision.
+ *
* @author Jose Fonseca
*/
@@ -47,7 +47,7 @@ struct util_cache_entry
{
void *key;
void *value;
-
+
#ifdef DEBUG
unsigned count;
#endif
@@ -58,7 +58,7 @@ struct util_cache
{
/** Hash function */
uint32_t (*hash)(const void *key);
-
+
/** Compare two keys */
int (*compare)(const void *key1, const void *key2);
@@ -66,9 +66,9 @@ struct util_cache
void (*destroy)(void *key, void *value);
uint32_t size;
-
+
struct util_cache_entry *entries;
-
+
#ifdef DEBUG
unsigned count;
#endif
@@ -82,22 +82,22 @@ util_cache_create(uint32_t (*hash)(const void *key),
uint32_t size)
{
struct util_cache *cache;
-
+
cache = CALLOC_STRUCT(util_cache);
if(!cache)
return NULL;
-
+
cache->hash = hash;
cache->compare = compare;
cache->destroy = destroy;
cache->size = size;
-
+
cache->entries = CALLOC(size, sizeof(struct util_cache_entry));
if(!cache->entries) {
FREE(cache);
return NULL;
}
-
+
return cache;
}
@@ -107,7 +107,7 @@ util_cache_entry_get(struct util_cache *cache,
const void *key)
{
uint32_t hash;
-
+
hash = cache->hash(key);
return &cache->entries[hash % cache->size];
@@ -119,10 +119,10 @@ util_cache_entry_destroy(struct util_cache *cache,
{
void *key = entry->key;
void *value = entry->value;
-
+
entry->key = NULL;
entry->value = NULL;
-
+
if(key || value)
if(cache->destroy)
cache->destroy(key, value);
@@ -142,19 +142,19 @@ util_cache_set(struct util_cache *cache,
entry = util_cache_entry_get(cache, key);
util_cache_entry_destroy(cache, entry);
-
+
#ifdef DEBUG
++entry->count;
++cache->count;
#endif
-
+
entry->key = key;
entry->value = value;
}
void *
-util_cache_get(struct util_cache *cache,
+util_cache_get(struct util_cache *cache,
const void *key)
{
struct util_cache_entry *entry;
@@ -166,15 +166,15 @@ util_cache_get(struct util_cache *cache,
entry = util_cache_entry_get(cache, key);
if(!entry->key && !entry->value)
return NULL;
-
+
if(cache->compare(key, entry->key) != 0)
return NULL;
-
+
return entry->value;
}
-void
+void
util_cache_clear(struct util_cache *cache)
{
uint32_t i;
@@ -203,15 +203,15 @@ util_cache_destroy(struct util_cache *cache)
unsigned i;
for(i = 0; i < cache->size; ++i) {
double z = fabs(cache->entries[i].count - mean)/stddev;
- /* This assert should not fail 99.9999998027% of the times, unless
+ /* This assert should not fail 99.9999998027% of the times, unless
* the hash function is a poor one */
assert(z <= 6.0);
}
}
#endif
-
+
util_cache_clear(cache);
-
+
FREE(cache->entries);
FREE(cache);
}
diff --git a/src/gallium/auxiliary/util/u_cache.h b/src/gallium/auxiliary/util/u_cache.h
index 8a612c6..be5522c 100644
--- a/src/gallium/auxiliary/util/u_cache.h
+++ b/src/gallium/auxiliary/util/u_cache.h
@@ -43,7 +43,7 @@
extern "C" {
#endif
-
+
/**
* Least Recently Used (LRU) cache.
*/
@@ -52,7 +52,7 @@ struct util_cache;
/**
* Create a cache.
- *
+ *
* @param hash hash function
* @param compare should return 0 for two equal keys
* @param destroy destruction callback (optional)
@@ -70,7 +70,7 @@ util_cache_set(struct util_cache *cache,
void *value);
void *
-util_cache_get(struct util_cache *cache,
+util_cache_get(struct util_cache *cache,
const void *key);
void
diff --git a/src/gallium/auxiliary/util/u_clear.h b/src/gallium/auxiliary/util/u_clear.h
index ad69df3..03c5f68 100644
--- a/src/gallium/auxiliary/util/u_clear.h
+++ b/src/gallium/auxiliary/util/u_clear.h
@@ -1,7 +1,7 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc. All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -9,11 +9,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -21,7 +21,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors:
diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c
index 32519b1..858fba9 100644
--- a/src/gallium/auxiliary/util/u_cpu_detect.c
+++ b/src/gallium/auxiliary/util/u_cpu_detect.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Dennis Smit
* All Rights Reserved.
*
@@ -21,7 +21,7 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
diff --git a/src/gallium/auxiliary/util/u_cpu_detect.h b/src/gallium/auxiliary/util/u_cpu_detect.h
index f3bef09..0613542 100644
--- a/src/gallium/auxiliary/util/u_cpu_detect.h
+++ b/src/gallium/auxiliary/util/u_cpu_detect.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Dennis Smit
* All Rights Reserved.
*
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index 2ad2f95..fc86269 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* Copyright (c) 2008 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,23 +23,23 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
-#include "pipe/p_config.h"
+#include "pipe/p_config.h"
#include "pipe/p_compiler.h"
#include "os/os_stream.h"
-#include "util/u_debug.h"
-#include "pipe/p_format.h"
-#include "pipe/p_state.h"
-#include "util/u_inlines.h"
+#include "util/u_debug.h"
+#include "pipe/p_format.h"
+#include "pipe/p_state.h"
+#include "util/u_inlines.h"
#include "util/u_format.h"
-#include "util/u_memory.h"
-#include "util/u_string.h"
-#include "util/u_math.h"
-#include "util/u_tile.h"
+#include "util/u_memory.h"
+#include "util/u_string.h"
+#include "util/u_math.h"
+#include "util/u_tile.h"
#include "util/u_prim.h"
#include "util/u_surface.h"
@@ -105,7 +105,7 @@ debug_get_option(const char *name, const char *dfault)
if (debug_get_option_should_print())
debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? result : "(null)");
-
+
return result;
}
@@ -114,7 +114,7 @@ debug_get_bool_option(const char *name, boolean dfault)
{
const char *str = os_get_option(name);
boolean result;
-
+
if(str == NULL)
result = dfault;
else if(!util_strcmp(str, "n"))
@@ -136,7 +136,7 @@ debug_get_bool_option(const char *name, boolean dfault)
if (debug_get_option_should_print())
debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? "TRUE" : "FALSE");
-
+
return result;
}
@@ -146,7 +146,7 @@ debug_get_num_option(const char *name, long dfault)
{
long result;
const char *str;
-
+
str = os_get_option(name);
if(!str)
result = dfault;
@@ -157,7 +157,7 @@ debug_get_num_option(const char *name, long dfault)
if(c == '-') {
sign = -1;
c = *str++;
- }
+ }
else {
sign = 1;
}
@@ -177,7 +177,7 @@ debug_get_num_option(const char *name, long dfault)
unsigned long
-debug_get_flags_option(const char *name,
+debug_get_flags_option(const char *name,
const struct debug_named_value *flags,
unsigned long dfault)
{
@@ -185,7 +185,7 @@ debug_get_flags_option(const char *name,
const char *str;
const struct debug_named_value *orig = flags;
int namealign = 0;
-
+
str = os_get_option(name);
if(!str)
result = dfault;
@@ -220,10 +220,10 @@ debug_get_flags_option(const char *name,
}
-void _debug_assert_fail(const char *expr,
- const char *file,
- unsigned line,
- const char *function)
+void _debug_assert_fail(const char *expr,
+ const char *file,
+ unsigned line,
+ const char *function)
{
_debug_printf("%s:%u:%s: Assertion `%s' failed.\n", file, line, function, expr);
#if defined(PIPE_OS_WINDOWS) && !defined(PIPE_SUBSYSTEM_WINDOWS_USER)
@@ -238,11 +238,11 @@ void _debug_assert_fail(const char *expr,
const char *
-debug_dump_enum(const struct debug_named_value *names,
+debug_dump_enum(const struct debug_named_value *names,
unsigned long value)
{
static char rest[64];
-
+
while(names->name) {
if(names->value == value)
return names->name;
@@ -255,12 +255,12 @@ debug_dump_enum(const struct debug_named_value *names,
const char *
-debug_dump_enum_noprefix(const struct debug_named_value *names,
+debug_dump_enum_noprefix(const struct debug_named_value *names,
const char *prefix,
unsigned long value)
{
static char rest[64];
-
+
while(names->name) {
if(names->value == value) {
const char *name = names->name;
@@ -273,7 +273,7 @@ debug_dump_enum_noprefix(const struct debug_named_value *names,
++names;
}
-
+
util_snprintf(rest, sizeof(rest), "0x%08lx", value);
return rest;
@@ -281,7 +281,7 @@ debug_dump_enum_noprefix(const struct debug_named_value *names,
const char *
-debug_dump_flags(const struct debug_named_value *names,
+debug_dump_flags(const struct debug_named_value *names,
unsigned long value)
{
static char output[4096];
@@ -302,21 +302,21 @@ debug_dump_flags(const struct debug_named_value *names,
}
++names;
}
-
+
if (value) {
if (!first)
util_strncat(output, "|", sizeof(output));
else
first = 0;
-
+
util_snprintf(rest, sizeof(rest), "0x%08lx", value);
util_strncat(output, rest, sizeof(output) - 1);
output[sizeof(output) - 1] = '\0';
}
-
+
if(first)
return "0";
-
+
return output;
}
@@ -368,10 +368,10 @@ void debug_dump_image(const char *prefix,
unsigned format, unsigned cpp,
unsigned width, unsigned height,
unsigned stride,
- const void *data)
+ const void *data)
{
#ifdef PIPE_SUBSYSTEM_WINDOWS_DISPLAY
- static unsigned no = 0;
+ static unsigned no = 0;
char filename[256];
WCHAR wfilename[sizeof(filename)];
ULONG_PTR iFile = 0;
@@ -387,23 +387,23 @@ void debug_dump_image(const char *prefix,
util_snprintf(filename, sizeof(filename), "\\??\\c:\\%03u%s.raw", ++no, prefix);
for(i = 0; i < sizeof(filename); ++i)
wfilename[i] = (WCHAR)filename[i];
-
+
pMap = (unsigned char *)EngMapFile(wfilename, sizeof(header) + height*width*cpp, &iFile);
if(!pMap)
return;
-
+
header.format = format;
header.cpp = cpp;
header.width = width;
header.height = height;
memcpy(pMap, &header, sizeof(header));
pMap += sizeof(header);
-
+
for(i = 0; i < height; ++i) {
memcpy(pMap, (unsigned char *)data + stride*i, cpp*width);
pMap += cpp*width;
}
-
+
EngUnmapFile(iFile);
#elif defined(PIPE_OS_UNIX)
/* write a ppm file */
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index 1c9624e..a939944 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,16 +22,16 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
* Cross-platform debugging helpers.
- *
- * For now it just has assert and printf replacements, but it might be extended
- * with stack trace reports and more advanced logging in the near future.
- *
+ *
+ * For now it just has assert and printf replacements, but it might be extended
+ * with stack trace reports and more advanced logging in the near future.
+ *
* @author Jose Fonseca
*/
@@ -54,7 +54,7 @@ extern "C" {
#endif
void _debug_vprintf(const char *format, va_list ap);
-
+
static INLINE void
_debug_printf(const char *format, ...)
@@ -146,16 +146,16 @@ void debug_print_format(const char *msg, unsigned fmt );
long
debug_get_num_option(const char *name, long dfault);
-void _debug_assert_fail(const char *expr,
- const char *file,
- unsigned line,
+void _debug_assert_fail(const char *expr,
+ const char *file,
+ unsigned line,
const char *function);
-/**
+/**
* Assert macro
- *
- * Do not expect that the assert call terminates -- errors must be handled
+ *
+ * Do not expect that the assert call terminates -- errors must be handled
* regardless of assert behavior.
*
* For non debug builds the assert macro will expand to a no-op, so do not
@@ -183,7 +183,7 @@ void _debug_assert_fail(const char *expr,
_debug_printf("%s\n", __FUNCTION__)
#else
#define debug_checkpoint() \
- ((void)0)
+ ((void)0)
#endif
@@ -192,10 +192,10 @@ void _debug_assert_fail(const char *expr,
*/
#ifdef DEBUG
#define debug_checkpoint_full() \
- _debug_printf("%s:%u:%s", __FILE__, __LINE__, __FUNCTION__)
+ _debug_printf("%s:%u:%s", __FILE__, __LINE__, __FUNCTION__)
#else
#define debug_checkpoint_full() \
- ((void)0)
+ ((void)0)
#endif
@@ -207,7 +207,7 @@ void _debug_assert_fail(const char *expr,
_debug_printf("%s:%u:%s: warning: %s\n", __FILE__, __LINE__, __FUNCTION__, __msg)
#else
#define debug_warning(__msg) \
- ((void)0)
+ ((void)0)
#endif
@@ -216,7 +216,7 @@ void _debug_assert_fail(const char *expr,
*/
#ifdef DEBUG
#define debug_error(__msg) \
- _debug_printf("%s:%u:%s: error: %s\n", __FILE__, __LINE__, __FUNCTION__, __msg)
+ _debug_printf("%s:%u:%s: error: %s\n", __FILE__, __LINE__, __FUNCTION__, __msg)
#else
#define debug_error(__msg) \
_debug_printf("error: %s\n", __msg)
@@ -236,7 +236,7 @@ struct debug_named_value
/**
* Some C pre-processor magic to simplify creating named values.
- *
+ *
* Example:
* @code
* static const debug_named_value my_names[] = {
@@ -245,9 +245,9 @@ struct debug_named_value
* DEBUG_NAMED_VALUE(MY_ENUM_VALUE_Z),
* DEBUG_NAMED_VALUE_END
* };
- *
+ *
* ...
- * debug_printf("%s = %s\n",
+ * debug_printf("%s = %s\n",
* name,
* debug_dump_enum(my_names, my_value));
* ...
@@ -262,11 +262,11 @@ struct debug_named_value
* Convert a enum value to a string.
*/
const char *
-debug_dump_enum(const struct debug_named_value *names,
+debug_dump_enum(const struct debug_named_value *names,
unsigned long value);
const char *
-debug_dump_enum_noprefix(const struct debug_named_value *names,
+debug_dump_enum_noprefix(const struct debug_named_value *names,
const char *prefix,
unsigned long value);
@@ -275,20 +275,20 @@ debug_dump_enum_noprefix(const struct debug_named_value *names,
* Convert binary flags value to a string.
*/
const char *
-debug_dump_flags(const struct debug_named_value *names,
+debug_dump_flags(const struct debug_named_value *names,
unsigned long value);
/**
* Get option.
- *
- * It is an alias for getenv on Linux.
- *
- * On Windows it reads C:\gallium.cfg, which is a text file with CR+LF line
+ *
+ * It is an alias for getenv on Linux.
+ *
+ * On Windows it reads C:\gallium.cfg, which is a text file with CR+LF line
* endings with one option per line as
- *
+ *
* NAME=value
- *
+ *
* This file must be terminated with an extra empty line.
*/
const char *
@@ -301,7 +301,7 @@ long
debug_get_num_option(const char *name, long dfault);
unsigned long
-debug_get_flags_option(const char *name,
+debug_get_flags_option(const char *name,
const struct debug_named_value *flags,
unsigned long dfault);
@@ -348,7 +348,7 @@ debug_get_option_ ## sufix (void) \
unsigned long
debug_memory_begin(void);
-void
+void
debug_memory_end(unsigned long beginning);
@@ -365,7 +365,7 @@ void debug_dump_image(const char *prefix,
const void *data);
void debug_dump_surface(struct pipe_context *pipe,
const char *prefix,
- struct pipe_surface *surface);
+ struct pipe_surface *surface);
void debug_dump_texture(struct pipe_context *pipe,
const char *prefix,
struct pipe_resource *texture);
diff --git a/src/gallium/auxiliary/util/u_debug_memory.c b/src/gallium/auxiliary/util/u_debug_memory.c
index f1baa62..62e1376 100644
--- a/src/gallium/auxiliary/util/u_debug_memory.c
+++ b/src/gallium/auxiliary/util/u_debug_memory.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,36 +22,36 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
* Memory debugging.
- *
+ *
* @author José Fonseca
*/
-#include "pipe/p_config.h"
+#include "pipe/p_config.h"
#define DEBUG_MEMORY_IMPLEMENTATION
#include "os/os_memory.h"
#include "os/os_memory_debug.h"
-#include "util/u_debug.h"
-#include "util/u_debug_stack.h"
-#include "util/u_double_list.h"
+#include "util/u_debug.h"
+#include "util/u_debug_stack.h"
+#include "util/u_double_list.h"
-#define DEBUG_MEMORY_MAGIC 0x6e34090aU
+#define DEBUG_MEMORY_MAGIC 0x6e34090aU
#define DEBUG_MEMORY_STACK 0 /* XXX: disabled until we have symbol lookup */
-struct debug_memory_header
+struct debug_memory_header
{
struct list_head head;
-
+
unsigned long no;
const char *file;
unsigned line;
@@ -60,7 +60,7 @@ struct debug_memory_header
struct debug_stack_frame backtrace[DEBUG_MEMORY_STACK];
#endif
size_t size;
-
+
unsigned magic;
};
@@ -105,11 +105,11 @@ footer_from_header(struct debug_memory_header *hdr)
void *
debug_malloc(const char *file, unsigned line, const char *function,
- size_t size)
+ size_t size)
{
struct debug_memory_header *hdr;
struct debug_memory_footer *ftr;
-
+
hdr = os_malloc(sizeof(*hdr) + size + sizeof(*ftr));
if(!hdr) {
debug_printf("%s:%u:%s: out of memory when trying to allocate %lu bytes\n",
@@ -117,7 +117,7 @@ debug_malloc(const char *file, unsigned line, const char *function,
(long unsigned)size);
return NULL;
}
-
+
hdr->no = last_no++;
hdr->file = file;
hdr->line = line;
@@ -131,22 +131,22 @@ debug_malloc(const char *file, unsigned line, const char *function,
ftr = footer_from_header(hdr);
ftr->magic = DEBUG_MEMORY_MAGIC;
-
+
LIST_ADDTAIL(&hdr->head, &list);
-
+
return data_from_header(hdr);
}
void
debug_free(const char *file, unsigned line, const char *function,
- void *ptr)
+ void *ptr)
{
struct debug_memory_header *hdr;
struct debug_memory_footer *ftr;
-
+
if(!ptr)
return;
-
+
hdr = header_from_data(ptr);
if(hdr->magic != DEBUG_MEMORY_MAGIC) {
debug_printf("%s:%u:%s: freeing bad or corrupted memory %p\n",
@@ -167,7 +167,7 @@ debug_free(const char *file, unsigned line, const char *function,
LIST_DEL(&hdr->head);
hdr->magic = 0;
ftr->magic = 0;
-
+
os_free(hdr);
}
@@ -188,15 +188,15 @@ debug_realloc(const char *file, unsigned line, const char *function,
struct debug_memory_header *old_hdr, *new_hdr;
struct debug_memory_footer *old_ftr, *new_ftr;
void *new_ptr;
-
+
if(!old_ptr)
return debug_malloc( file, line, function, new_size );
-
+
if(!new_size) {
debug_free( file, line, function, old_ptr );
return NULL;
}
-
+
old_hdr = header_from_data(old_ptr);
if(old_hdr->magic != DEBUG_MEMORY_MAGIC) {
debug_printf("%s:%u:%s: reallocating bad or corrupted memory %p\n",
@@ -205,7 +205,7 @@ debug_realloc(const char *file, unsigned line, const char *function,
debug_assert(0);
return NULL;
}
-
+
old_ftr = footer_from_header(old_hdr);
if(old_ftr->magic != DEBUG_MEMORY_MAGIC) {
debug_printf("%s:%u:%s: buffer overflow %p\n",
@@ -228,10 +228,10 @@ debug_realloc(const char *file, unsigned line, const char *function,
new_hdr->function = old_hdr->function;
new_hdr->size = new_size;
new_hdr->magic = DEBUG_MEMORY_MAGIC;
-
+
new_ftr = footer_from_header(new_hdr);
new_ftr->magic = DEBUG_MEMORY_MAGIC;
-
+
LIST_REPLACE(&old_hdr->head, &new_hdr->head);
/* copy data */
@@ -252,7 +252,7 @@ debug_memory_begin(void)
return last_no;
}
-void
+void
debug_memory_end(unsigned long start_no)
{
size_t total_size = 0;
diff --git a/src/gallium/auxiliary/util/u_debug_stack.c b/src/gallium/auxiliary/util/u_debug_stack.c
index 24e039f..d2709b7 100644
--- a/src/gallium/auxiliary/util/u_debug_stack.c
+++ b/src/gallium/auxiliary/util/u_debug_stack.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,13 +22,13 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
* Stack backtracing.
- *
+ *
* @author Jose Fonseca
*/
@@ -39,7 +39,7 @@
void
debug_backtrace_capture(struct debug_stack_frame *backtrace,
- unsigned start_frame,
+ unsigned start_frame,
unsigned nr_frames)
{
const void **frame_pointer = NULL;
@@ -61,46 +61,46 @@ debug_backtrace_capture(struct debug_stack_frame *backtrace,
#else
frame_pointer = NULL;
#endif
-
-
+
+
#ifdef PIPE_ARCH_X86
while(nr_frames) {
const void **next_frame_pointer;
if(!frame_pointer)
break;
-
+
if(start_frame)
--start_frame;
else {
backtrace[i++].function = frame_pointer[1];
--nr_frames;
}
-
+
next_frame_pointer = (const void **)frame_pointer[0];
-
+
/* Limit the stack walk to avoid referencing undefined memory */
if((uintptr_t)next_frame_pointer <= (uintptr_t)frame_pointer ||
(uintptr_t)next_frame_pointer > (uintptr_t)frame_pointer + 64*1024)
break;
-
+
frame_pointer = next_frame_pointer;
}
#endif
-
+
while(nr_frames) {
backtrace[i++].function = NULL;
--nr_frames;
}
}
-
+
void
-debug_backtrace_dump(const struct debug_stack_frame *backtrace,
+debug_backtrace_dump(const struct debug_stack_frame *backtrace,
unsigned nr_frames)
{
unsigned i;
-
+
for(i = 0; i < nr_frames; ++i) {
if(!backtrace[i].function)
break;
diff --git a/src/gallium/auxiliary/util/u_debug_stack.h b/src/gallium/auxiliary/util/u_debug_stack.h
index f50f04e..35e66e5 100644
--- a/src/gallium/auxiliary/util/u_debug_stack.h
+++ b/src/gallium/auxiliary/util/u_debug_stack.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef U_DEBUG_STACK_H_
@@ -32,7 +32,7 @@
/**
* @file
* Stack backtracing.
- *
+ *
* @author Jose Fonseca
*/
@@ -42,19 +42,19 @@ extern "C" {
#endif
-struct debug_stack_frame
+struct debug_stack_frame
{
const void *function;
};
-
+
void
debug_backtrace_capture(struct debug_stack_frame *backtrace,
- unsigned start_frame,
+ unsigned start_frame,
unsigned nr_frames);
void
-debug_backtrace_dump(const struct debug_stack_frame *backtrace,
+debug_backtrace_dump(const struct debug_stack_frame *backtrace,
unsigned nr_frames);
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c
index 44d4377..ff141f0 100644
--- a/src/gallium/auxiliary/util/u_debug_symbol.c
+++ b/src/gallium/auxiliary/util/u_debug_symbol.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,13 +22,13 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
* Symbol lookup.
- *
+ *
* @author Jose Fonseca
*/
@@ -41,14 +41,14 @@
#include "u_hash_table.h"
#if defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
-
+
#include
#include
#include
/*
* TODO: Cleanup code.
- * TODO: Support x86_64
+ * TODO: Support x86_64
*/
static BOOL bSymInitialized = FALSE;
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.h b/src/gallium/auxiliary/util/u_debug_symbol.h
index b247706..11621c3 100644
--- a/src/gallium/auxiliary/util/u_debug_symbol.h
+++ b/src/gallium/auxiliary/util/u_debug_symbol.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef U_DEBUG_SYMBOL_H_
@@ -32,7 +32,7 @@
/**
* @file
* Symbol lookup.
- *
+ *
* @author Jose Fonseca
*/
diff --git a/src/gallium/auxiliary/util/u_double_list.h b/src/gallium/auxiliary/util/u_double_list.h
index 42adb1f..f43cf94 100644
--- a/src/gallium/auxiliary/util/u_double_list.h
+++ b/src/gallium/auxiliary/util/u_double_list.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND. USA.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,26 +10,26 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
**************************************************************************/
/**
* \file
* List macros heavily inspired by the Linux kernel
* list handling. No list looping yet.
- *
+ *
* Is not threadsafe, so common operations need to
* be protected using an external mutex.
*/
diff --git a/src/gallium/auxiliary/util/u_draw_quad.c b/src/gallium/auxiliary/util/u_draw_quad.c
index 0b6dc58..38b050e 100644
--- a/src/gallium/auxiliary/util/u_draw_quad.c
+++ b/src/gallium/auxiliary/util/u_draw_quad.c
@@ -37,7 +37,7 @@
* Draw a simple vertex buffer / primitive.
* Limited to float[4] vertex attribs, tightly packed.
*/
-void
+void
util_draw_vertex_buffer(struct pipe_context *pipe,
struct pipe_resource *vbuf,
uint offset,
@@ -69,13 +69,13 @@ util_draw_vertex_buffer(struct pipe_context *pipe,
* Draw screen-aligned textured quad.
* Note: this isn't especially efficient.
*/
-void
+void
util_draw_texquad(struct pipe_context *pipe,
float x0, float y0, float x1, float y1, float z)
{
uint numAttribs = 2, i, j;
uint vertexBytes = 4 * (4 * numAttribs * sizeof(float));
- struct pipe_resource *vbuf = NULL;
+ struct pipe_resource *vbuf = NULL;
uint *v = NULL;
v = MALLOC(vertexBytes);
@@ -112,10 +112,10 @@ util_draw_texquad(struct pipe_context *pipe,
v[25] = y1;
v[28] = 0.0;
v[29] = 1.0;
-
+
vbuf = pipe_user_buffer_create(pipe->screen, v, vertexBytes,
PIPE_BIND_VERTEX_BUFFER);
- if (!vbuf)
+ if (!vbuf)
goto out;
util_draw_vertex_buffer(pipe, vbuf, 0, PIPE_PRIM_TRIANGLE_FAN, 4, 2);
@@ -123,7 +123,7 @@ util_draw_texquad(struct pipe_context *pipe,
out:
if (vbuf)
pipe_resource_reference(&vbuf, NULL);
-
+
if (v)
FREE(v);
}
diff --git a/src/gallium/auxiliary/util/u_draw_quad.h b/src/gallium/auxiliary/util/u_draw_quad.h
index 52994fe..4eaec2d 100644
--- a/src/gallium/auxiliary/util/u_draw_quad.h
+++ b/src/gallium/auxiliary/util/u_draw_quad.h
@@ -41,13 +41,13 @@ struct pipe_resource;
#include "util/u_draw.h"
-extern void
+extern void
util_draw_vertex_buffer(struct pipe_context *pipe,
struct pipe_resource *vbuf, uint offset,
uint num_attribs, uint num_verts, uint prim_type);
-extern void
+extern void
util_draw_texquad(struct pipe_context *pipe,
float x0, float y0, float x1, float y1, float z);
diff --git a/src/gallium/auxiliary/util/u_dump.h b/src/gallium/auxiliary/util/u_dump.h
index 49536c0..6a7bb8e 100644
--- a/src/gallium/auxiliary/util/u_dump.h
+++ b/src/gallium/auxiliary/util/u_dump.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,13 +22,13 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
* Dump data in human/machine readable format.
- *
+ *
* @author Jose Fonseca
*/
diff --git a/src/gallium/auxiliary/util/u_dump_defines.c b/src/gallium/auxiliary/util/u_dump_defines.c
index 692d444..ad60500 100644
--- a/src/gallium/auxiliary/util/u_dump_defines.c
+++ b/src/gallium/auxiliary/util/u_dump_defines.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,19 +22,19 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_memory.h"
-#include "util/u_debug.h"
+#include "util/u_debug.h"
#include "util/u_dump.h"
#if 0
static const char *
util_dump_strip_prefix(const char *name,
- const char *prefix)
+ const char *prefix)
{
const char *stripped;
assert(name);
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index 1fbd838..3d71d81 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -1,8 +1,8 @@
###########################################################################
-#
+#
# Copyright 2009-2010 VMware, Inc.
# All Rights Reserved.
-#
+#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
# distribute, sub license, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
-#
+#
# The above copyright notice and this permission notice (including the
# next paragraph) shall be included in all copies or substantial portions
# of the Software.
-#
+#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
+#
###########################################################################
# This CSV file has the input data for u_format.h's struct
@@ -43,7 +43,7 @@
# - 'f': FLOAT
# - optionally followed by 'n' if it is normalized
# - number of bits
-# - channel swizzle
+# - channel swizzle
# - color space: rgb, yub, sz
#
# See also:
@@ -86,10 +86,10 @@ PIPE_FORMAT_L8A8_UNORM , plain, 1, 1, un8 , un8 , , , xxxy, r
PIPE_FORMAT_L16_UNORM , plain, 1, 1, un16, , , , xxx1, rgb
# SRGB formats
-PIPE_FORMAT_L8_SRGB , plain, 1, 1, un8 , , , , xxx1, srgb
-PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb
-PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb
-PIPE_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb
+PIPE_FORMAT_L8_SRGB , plain, 1, 1, un8 , , , , xxx1, srgb
+PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb
+PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb
+PIPE_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb
PIPE_FORMAT_A8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb
PIPE_FORMAT_X8B8G8R8_SRGB , plain, 1, 1, x8 , un8 , un8 , un8 , wzy1, srgb
PIPE_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb
@@ -152,9 +152,9 @@ PIPE_FORMAT_RGTC1_SNORM , rgtc, 4, 4, x64, , , , x001, rg
PIPE_FORMAT_RGTC2_UNORM , rgtc, 4, 4, x128, , , , xy01, rgb
PIPE_FORMAT_RGTC2_SNORM , rgtc, 4, 4, x128, , , , xy01, rgb
-# Straightforward D3D10-like formats (also used for
+# Straightforward D3D10-like formats (also used for
# vertex buffer element description)
-#
+#
# See also:
# - src/gallium/auxiliary/translate/translate_generic.c
# - src/mesa/state_tracker/st_draw.c
diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h
index 03b73c0..9beb034 100644
--- a/src/gallium/auxiliary/util/u_format.h
+++ b/src/gallium/auxiliary/util/u_format.h
@@ -80,7 +80,7 @@ struct util_format_block
{
/** Block width in pixels */
unsigned width;
-
+
/** Block height in pixels */
unsigned height;
@@ -323,7 +323,7 @@ struct util_format_description
};
-extern const struct util_format_description
+extern const struct util_format_description
util_format_description_table[];
@@ -376,7 +376,7 @@ util_format_is_plain(enum pipe_format format)
return desc->layout == UTIL_FORMAT_LAYOUT_PLAIN ? TRUE : FALSE;
}
-static INLINE boolean
+static INLINE boolean
util_format_is_compressed(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -396,7 +396,7 @@ util_format_is_compressed(enum pipe_format format)
}
}
-static INLINE boolean
+static INLINE boolean
util_format_is_s3tc(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -409,7 +409,7 @@ util_format_is_s3tc(enum pipe_format format)
return desc->layout == UTIL_FORMAT_LAYOUT_S3TC ? TRUE : FALSE;
}
-static INLINE boolean
+static INLINE boolean
util_format_is_depth_or_stencil(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -422,7 +422,7 @@ util_format_is_depth_or_stencil(enum pipe_format format)
return desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS ? TRUE : FALSE;
}
-static INLINE boolean
+static INLINE boolean
util_format_is_depth_and_stencil(enum pipe_format format)
{
const struct util_format_description *desc = util_format_description(format);
@@ -727,26 +727,26 @@ util_format_get_nr_components(enum pipe_format format)
void
util_format_read_4f(enum pipe_format format,
- float *dst, unsigned dst_stride,
- const void *src, unsigned src_stride,
+ float *dst, unsigned dst_stride,
+ const void *src, unsigned src_stride,
unsigned x, unsigned y, unsigned w, unsigned h);
void
util_format_write_4f(enum pipe_format format,
- const float *src, unsigned src_stride,
- void *dst, unsigned dst_stride,
+ const float *src, unsigned src_stride,
+ void *dst, unsigned dst_stride,
unsigned x, unsigned y, unsigned w, unsigned h);
void
util_format_read_4ub(enum pipe_format format,
- uint8_t *dst, unsigned dst_stride,
- const void *src, unsigned src_stride,
+ uint8_t *dst, unsigned dst_stride,
+ const void *src, unsigned src_stride,
unsigned x, unsigned y, unsigned w, unsigned h);
void
util_format_write_4ub(enum pipe_format format,
- const uint8_t *src, unsigned src_stride,
- void *dst, unsigned dst_stride,
+ const uint8_t *src, unsigned src_stride,
+ void *dst, unsigned dst_stride,
unsigned x, unsigned y, unsigned w, unsigned h);
/*
diff --git a/src/gallium/auxiliary/util/u_format_yuv.h b/src/gallium/auxiliary/util/u_format_yuv.h
index dc96323..d5d7226 100644
--- a/src/gallium/auxiliary/util/u_format_yuv.h
+++ b/src/gallium/auxiliary/util/u_format_yuv.h
@@ -68,9 +68,9 @@ util_format_rgb_float_to_yuv(float r, float g, float b,
const int _u = scale * (-(0.148f * _r) - (0.291f * _g) + (0.439f * _b));
const int _v = scale * ( (0.439f * _r) - (0.368f * _g) - (0.071f * _b));
- *y = _y + 16;
- *u = _u + 128;
- *v = _v + 128;
+ *y = _y + 16;
+ *u = _u + 128;
+ *v = _v + 128;
}
diff --git a/src/gallium/auxiliary/util/u_framebuffer.c b/src/gallium/auxiliary/util/u_framebuffer.c
index 7803ec6..6905e22 100644
--- a/src/gallium/auxiliary/util/u_framebuffer.c
+++ b/src/gallium/auxiliary/util/u_framebuffer.c
@@ -27,7 +27,7 @@
/**
* @file
* Framebuffer utility functions.
- *
+ *
* @author Brian Paul
*/
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index d22ae8b..8c71f03 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -29,7 +29,7 @@
/**
* @file
* Mipmap generation utility
- *
+ *
* @author Brian Paul
*/
@@ -999,7 +999,7 @@ reduce_2d(enum pipe_format pformat,
/* Compute src and dst pointers */
srcA = srcPtr;
- if (srcHeight > 1)
+ if (srcHeight > 1)
srcB = srcA + srcRowStride;
else
srcB = srcA;
@@ -1078,7 +1078,7 @@ reduce_3d(enum pipe_format pformat,
ubyte *dstImgRow = imgDst;
for (row = 0; row < dstHeight; row++) {
- do_row_3D(datatype, comps, srcWidth,
+ do_row_3D(datatype, comps, srcWidth,
srcImgARowA, srcImgARowB,
srcImgBRowA, srcImgBRowB,
dstWidth, dstImgRow);
@@ -1302,7 +1302,7 @@ util_create_gen_mipmap(struct pipe_context *pipe,
}
/* vertex shader - still needed to specify mapping from fragment
- * shader input semantics to vertex elements
+ * shader input semantics to vertex elements
*/
{
const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
@@ -1344,7 +1344,7 @@ get_next_slot(struct gen_mipmap_state *ctx)
{
const unsigned max_slots = 4096 / sizeof ctx->vertices;
- if (ctx->vbuf_slot >= max_slots)
+ if (ctx->vbuf_slot >= max_slots)
util_gen_mipmap_flush( ctx );
if (!ctx->vbuf) {
@@ -1352,7 +1352,7 @@ get_next_slot(struct gen_mipmap_state *ctx)
PIPE_BIND_VERTEX_BUFFER,
max_slots * sizeof ctx->vertices);
}
-
+
return ctx->vbuf_slot++ * sizeof ctx->vertices;
}
@@ -1446,7 +1446,7 @@ void util_gen_mipmap_flush( struct gen_mipmap_state *ctx )
{
pipe_resource_reference(&ctx->vbuf, NULL);
ctx->vbuf_slot = 0;
-}
+}
/**
@@ -1616,7 +1616,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
face,
rcoord);
- util_draw_vertex_buffer(ctx->pipe,
+ util_draw_vertex_buffer(ctx->pipe,
ctx->vbuf,
offset,
PIPE_PRIM_TRIANGLE_FAN,
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.h b/src/gallium/auxiliary/util/u_gen_mipmap.h
index a10b6a4..3ea0774 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.h
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.h
@@ -35,7 +35,7 @@
extern "C" {
#endif
-
+
struct pipe_context;
struct pipe_resource;
struct cso_context;
@@ -53,7 +53,7 @@ util_destroy_gen_mipmap(struct gen_mipmap_state *ctx);
/* Release vertex buffer at end of frame to avoid synchronous
* rendering.
*/
-extern void
+extern void
util_gen_mipmap_flush( struct gen_mipmap_state *ctx );
diff --git a/src/gallium/auxiliary/util/u_handle_table.c b/src/gallium/auxiliary/util/u_handle_table.c
index 3703718..df25a25 100644
--- a/src/gallium/auxiliary/util/u_handle_table.c
+++ b/src/gallium/auxiliary/util/u_handle_table.c
@@ -28,7 +28,7 @@
/**
* @file
* Generic handle table implementation.
- *
+ *
* @author José Fonseca
*/
@@ -40,19 +40,19 @@
#include "util/u_handle_table.h"
-#define HANDLE_TABLE_INITIAL_SIZE 16
+#define HANDLE_TABLE_INITIAL_SIZE 16
struct handle_table
{
/** Object array. Empty handles have a null object */
void **objects;
-
+
/** Number of objects the handle can currently hold */
unsigned size;
/** Number of consecutive objects allocated at the start of the table */
unsigned filled;
-
+
/** Optional object destructor */
void (*destroy)(void *object);
};
@@ -62,22 +62,22 @@ struct handle_table *
handle_table_create(void)
{
struct handle_table *ht;
-
+
ht = MALLOC_STRUCT(handle_table);
if(!ht)
return NULL;
-
+
ht->objects = (void **)CALLOC(HANDLE_TABLE_INITIAL_SIZE, sizeof(void *));
if(!ht->objects) {
FREE(ht);
return NULL;
}
-
+
ht->size = HANDLE_TABLE_INITIAL_SIZE;
ht->filled = 0;
-
+
ht->destroy = NULL;
-
+
return ht;
}
@@ -94,7 +94,7 @@ handle_table_set_destroy(struct handle_table *ht,
/**
- * Resize the table if necessary
+ * Resize the table if necessary
*/
static INLINE int
handle_table_resize(struct handle_table *ht,
@@ -110,51 +110,51 @@ handle_table_resize(struct handle_table *ht,
while(!(new_size > minimum_size))
new_size *= 2;
assert(new_size);
-
+
new_objects = (void **)REALLOC((void *)ht->objects,
ht->size*sizeof(void *),
new_size*sizeof(void *));
if(!new_objects)
return 0;
-
+
memset(new_objects + ht->size, 0, (new_size - ht->size)*sizeof(void *));
-
+
ht->size = new_size;
ht->objects = new_objects;
-
+
return ht->size;
}
static INLINE void
-handle_table_clear(struct handle_table *ht,
+handle_table_clear(struct handle_table *ht,
unsigned index)
{
void *object;
-
+
/* The order here is important so that the object being destroyed is not
- * present in the table when seen by the destroy callback, because the
- * destroy callback may directly or indirectly call the other functions in
+ * present in the table when seen by the destroy callback, because the
+ * destroy callback may directly or indirectly call the other functions in
* this module.
*/
object = ht->objects[index];
if(object) {
ht->objects[index] = NULL;
-
+
if(ht->destroy)
ht->destroy(object);
- }
+ }
}
unsigned
-handle_table_add(struct handle_table *ht,
+handle_table_add(struct handle_table *ht,
void *object)
{
unsigned index;
unsigned handle;
-
+
assert(ht);
assert(object);
if(!object || !ht)
@@ -166,14 +166,14 @@ handle_table_add(struct handle_table *ht,
break;
++ht->filled;
}
-
+
index = ht->filled;
handle = index + 1;
-
+
/* check integer overflow */
if(!handle)
return 0;
-
+
/* grow the table if necessary */
if(!handle_table_resize(ht, index))
return 0;
@@ -181,18 +181,18 @@ handle_table_add(struct handle_table *ht,
assert(!ht->objects[index]);
ht->objects[index] = object;
++ht->filled;
-
+
return handle;
}
unsigned
-handle_table_set(struct handle_table *ht,
+handle_table_set(struct handle_table *ht,
unsigned handle,
void *object)
{
unsigned index;
-
+
assert(ht);
assert(handle);
if(!handle || !ht)
@@ -201,7 +201,7 @@ handle_table_set(struct handle_table *ht,
assert(object);
if(!object)
return 0;
-
+
index = handle - 1;
/* grow the table if necessary */
@@ -211,35 +211,35 @@ handle_table_set(struct handle_table *ht,
handle_table_clear(ht, index);
ht->objects[index] = object;
-
+
return handle;
}
void *
-handle_table_get(struct handle_table *ht,
+handle_table_get(struct handle_table *ht,
unsigned handle)
{
void *object;
-
+
assert(ht);
assert(handle);
if(!handle || !ht || handle > ht->size)
return NULL;
object = ht->objects[handle - 1];
-
+
return object;
}
void
-handle_table_remove(struct handle_table *ht,
+handle_table_remove(struct handle_table *ht,
unsigned handle)
{
void *object;
unsigned index;
-
+
assert(ht);
assert(handle);
if(!handle || !ht || handle > ht->size)
@@ -249,7 +249,7 @@ handle_table_remove(struct handle_table *ht,
object = ht->objects[index];
if(!object)
return;
-
+
handle_table_clear(ht, index);
if(index < ht->filled)
@@ -258,11 +258,11 @@ handle_table_remove(struct handle_table *ht,
unsigned
-handle_table_get_next_handle(struct handle_table *ht,
+handle_table_get_next_handle(struct handle_table *ht,
unsigned handle)
{
unsigned index;
-
+
for(index = handle; index < ht->size; ++index) {
if(ht->objects[index])
return index + 1;
@@ -291,7 +291,7 @@ handle_table_destroy(struct handle_table *ht)
if(ht->destroy)
for(index = 0; index < ht->size; ++index)
handle_table_clear(ht, index);
-
+
FREE(ht->objects);
FREE(ht);
}
diff --git a/src/gallium/auxiliary/util/u_handle_table.h b/src/gallium/auxiliary/util/u_handle_table.h
index d080135..d47b249 100644
--- a/src/gallium/auxiliary/util/u_handle_table.h
+++ b/src/gallium/auxiliary/util/u_handle_table.h
@@ -28,7 +28,7 @@
/**
* @file
* Generic handle table.
- *
+ *
* @author José Fonseca
*/
@@ -40,10 +40,10 @@
extern "C" {
#endif
-
+
/**
* Abstract data type to map integer handles to objects.
- *
+ *
* Also referred as "pointer array".
*/
struct handle_table;
@@ -55,8 +55,8 @@ handle_table_create(void);
/**
* Set an optional destructor callback.
- *
- * If set, it will be called during handle_table_remove and
+ *
+ * If set, it will be called during handle_table_remove and
* handle_table_destroy calls.
*/
void
@@ -66,33 +66,33 @@ handle_table_set_destroy(struct handle_table *ht,
/**
* Add a new object.
- *
+ *
* Returns a zero handle on failure (out of memory).
*/
unsigned
-handle_table_add(struct handle_table *ht,
+handle_table_add(struct handle_table *ht,
void *object);
/**
* Returns zero on failure (out of memory).
*/
unsigned
-handle_table_set(struct handle_table *ht,
+handle_table_set(struct handle_table *ht,
unsigned handle,
void *object);
/**
* Fetch an existing object.
- *
+ *
* Returns NULL for an invalid handle.
*/
void *
-handle_table_get(struct handle_table *ht,
+handle_table_get(struct handle_table *ht,
unsigned handle);
void
-handle_table_remove(struct handle_table *ht,
+handle_table_remove(struct handle_table *ht,
unsigned handle);
diff --git a/src/gallium/auxiliary/util/u_hash.c b/src/gallium/auxiliary/util/u_hash.c
index b67653e..adab2b6 100644
--- a/src/gallium/auxiliary/util/u_hash.c
+++ b/src/gallium/auxiliary/util/u_hash.c
@@ -28,7 +28,7 @@
/**
* @file
* Hash functions implementation.
- *
+ *
* @author Jose Fonseca
*/
@@ -36,71 +36,71 @@
#include "u_hash.h"
-static const uint32_t
+static const uint32_t
util_crc32_table[256] = {
- 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
- 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
- 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
- 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
- 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
- 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
- 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
- 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
- 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
- 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
- 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
- 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
- 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
- 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
- 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
- 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
- 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
- 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
- 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
- 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
- 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
- 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
- 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
- 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
- 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
- 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
- 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
- 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
- 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
- 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
- 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
- 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
- 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
- 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
- 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
- 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
- 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
- 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
- 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
- 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
- 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
- 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
- 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
- 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
- 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
- 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
- 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
- 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
- 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
- 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
- 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
- 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
- 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
- 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
- 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
- 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
- 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
- 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
- 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
- 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
- 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
- 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
- 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
+ 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
+ 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
+ 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
+ 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+ 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
+ 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
+ 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
+ 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
+ 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+ 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
+ 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
+ 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
+ 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
+ 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+ 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
+ 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
+ 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
+ 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
+ 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+ 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
+ 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
+ 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
+ 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
+ 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
+ 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
+ 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
+ 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
+ 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
+ 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
+ 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
+ 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
+ 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
+ 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
+ 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
+ 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
+ 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
+ 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
+ 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
+ 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
+ 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
+ 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
+ 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
+ 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
+ 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
+ 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
+ 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
+ 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
+ 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
+ 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
+ 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
};
@@ -113,9 +113,9 @@ util_hash_crc32(const void *data, size_t size)
{
uint8_t *p = (uint8_t *)data;
uint32_t crc = 0xffffffff;
-
+
while (size--)
crc = util_crc32_table[(crc ^ *p++) & 0xff] ^ (crc >> 8);
-
+
return crc;
}
diff --git a/src/gallium/auxiliary/util/u_hash.h b/src/gallium/auxiliary/util/u_hash.h
index 8d92b07..aee65c0 100644
--- a/src/gallium/auxiliary/util/u_hash.h
+++ b/src/gallium/auxiliary/util/u_hash.h
@@ -28,7 +28,7 @@
/**
* @file
* Hash functions.
- *
+ *
* @author Jose Fonseca
*/
@@ -43,7 +43,7 @@
extern "C" {
#endif
-
+
uint32_t
util_hash_crc32(const void *data, size_t size);
diff --git a/src/gallium/auxiliary/util/u_hash_table.c b/src/gallium/auxiliary/util/u_hash_table.c
index 5604e3a..dcf2606 100644
--- a/src/gallium/auxiliary/util/u_hash_table.c
+++ b/src/gallium/auxiliary/util/u_hash_table.c
@@ -28,12 +28,12 @@
/**
* @file
* General purpose hash table implementation.
- *
- * Just uses the cso_hash for now, but it might be better switch to a linear
- * probing hash table implementation at some point -- as it is said they have
- * better lookup and cache performance and it appears to be possible to write
- * a lock-free implementation of such hash tables .
- *
+ *
+ * Just uses the cso_hash for now, but it might be better switch to a linear
+ * probing hash table implementation at some point -- as it is said they have
+ * better lookup and cache performance and it appears to be possible to write
+ * a lock-free implementation of such hash tables .
+ *
* @author José Fonseca
*/
@@ -49,14 +49,14 @@
struct util_hash_table
{
- struct cso_hash *cso;
-
+ struct cso_hash *cso;
+
/** Hash function */
unsigned (*hash)(void *key);
-
+
/** Compare two keys */
int (*compare)(void *key1, void *key2);
-
+
/* TODO: key, value destructors? */
};
@@ -80,20 +80,20 @@ util_hash_table_create(unsigned (*hash)(void *key),
int (*compare)(void *key1, void *key2))
{
struct util_hash_table *ht;
-
+
ht = MALLOC_STRUCT(util_hash_table);
if(!ht)
return NULL;
-
+
ht->cso = cso_hash_create();
if(!ht->cso) {
FREE(ht);
return NULL;
}
-
+
ht->hash = hash;
ht->compare = compare;
-
+
return ht;
}
@@ -105,7 +105,7 @@ util_hash_table_find_iter(struct util_hash_table *ht,
{
struct cso_hash_iter iter;
struct util_hash_table_item *item;
-
+
iter = cso_hash_find(ht->cso, key_hash);
while (!cso_hash_iter_is_null(iter)) {
item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
@@ -113,7 +113,7 @@ util_hash_table_find_iter(struct util_hash_table *ht,
break;
iter = cso_hash_iter_next(iter);
}
-
+
return iter;
}
@@ -125,7 +125,7 @@ util_hash_table_find_item(struct util_hash_table *ht,
{
struct cso_hash_iter iter;
struct util_hash_table_item *item;
-
+
iter = cso_hash_find(ht->cso, key_hash);
while (!cso_hash_iter_is_null(iter)) {
item = (struct util_hash_table_item *)cso_hash_iter_data(iter);
@@ -133,7 +133,7 @@ util_hash_table_find_item(struct util_hash_table *ht,
return item;
iter = cso_hash_iter_next(iter);
}
-
+
return NULL;
}
@@ -159,14 +159,14 @@ util_hash_table_set(struct util_hash_table *ht,
item->value = value;
return PIPE_OK;
}
-
+
item = MALLOC_STRUCT(util_hash_table_item);
if(!item)
return PIPE_ERROR_OUT_OF_MEMORY;
-
+
item->key = key;
item->value = value;
-
+
iter = cso_hash_insert(ht->cso, key_hash, item);
if(cso_hash_iter_is_null(iter)) {
FREE(item);
@@ -193,7 +193,7 @@ util_hash_table_get(struct util_hash_table *ht,
item = util_hash_table_find_item(ht, key, key_hash);
if(!item)
return NULL;
-
+
return item->value;
}
@@ -215,16 +215,16 @@ util_hash_table_remove(struct util_hash_table *ht,
iter = util_hash_table_find_iter(ht, key, key_hash);
if(cso_hash_iter_is_null(iter))
return;
-
+
item = util_hash_table_item(iter);
assert(item);
FREE(item);
-
+
cso_hash_erase(ht->cso, iter);
}
-void
+void
util_hash_table_clear(struct util_hash_table *ht)
{
struct cso_hash_iter iter;
@@ -288,6 +288,6 @@ util_hash_table_destroy(struct util_hash_table *ht)
}
cso_hash_delete(ht->cso);
-
+
FREE(ht);
}
diff --git a/src/gallium/auxiliary/util/u_hash_table.h b/src/gallium/auxiliary/util/u_hash_table.h
index 51ec10a..361ec8f 100644
--- a/src/gallium/auxiliary/util/u_hash_table.h
+++ b/src/gallium/auxiliary/util/u_hash_table.h
@@ -27,7 +27,7 @@
/**
* General purpose hash table.
- *
+ *
* @author José Fonseca
*/
@@ -42,7 +42,7 @@
extern "C" {
#endif
-
+
/**
* Generic purpose hash table.
*/
@@ -51,7 +51,7 @@ struct util_hash_table;
/**
* Create an hash table.
- *
+ *
* @param hash hash function
* @param compare should return 0 for two equal keys.
*/
diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index e55aafe..f72ef02 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef U_INLINES_H
@@ -69,8 +69,8 @@ pipe_is_referenced(struct pipe_reference *reference)
* \return TRUE if the object's refcount hits zero and should be destroyed.
*/
static INLINE boolean
-pipe_reference_described(struct pipe_reference *ptr,
- struct pipe_reference *reference,
+pipe_reference_described(struct pipe_reference *ptr,
+ struct pipe_reference *reference,
debug_reference_descriptor get_desc)
{
boolean destroy = FALSE;
@@ -98,7 +98,7 @@ pipe_reference_described(struct pipe_reference *ptr,
static INLINE boolean
pipe_reference(struct pipe_reference *ptr, struct pipe_reference *reference)
{
- return pipe_reference_described(ptr, reference,
+ return pipe_reference_described(ptr, reference,
(debug_reference_descriptor)debug_describe_reference);
}
@@ -107,7 +107,7 @@ pipe_surface_reference(struct pipe_surface **ptr, struct pipe_surface *surf)
{
struct pipe_surface *old_surf = *ptr;
- if (pipe_reference_described(&(*ptr)->reference, &surf->reference,
+ if (pipe_reference_described(&(*ptr)->reference, &surf->reference,
(debug_reference_descriptor)debug_describe_surface))
old_surf->context->surface_destroy(old_surf->context, old_surf);
*ptr = surf;
@@ -118,7 +118,7 @@ pipe_resource_reference(struct pipe_resource **ptr, struct pipe_resource *tex)
{
struct pipe_resource *old_tex = *ptr;
- if (pipe_reference_described(&(*ptr)->reference, &tex->reference,
+ if (pipe_reference_described(&(*ptr)->reference, &tex->reference,
(debug_reference_descriptor)debug_describe_resource))
old_tex->screen->resource_destroy(old_tex->screen, old_tex);
*ptr = tex;
@@ -377,14 +377,14 @@ pipe_transfer_unmap( struct pipe_context *context,
static INLINE void
-pipe_transfer_destroy( struct pipe_context *context,
+pipe_transfer_destroy( struct pipe_context *context,
struct pipe_transfer *transfer )
{
context->transfer_destroy(context, transfer);
}
-static INLINE boolean util_get_offset(
+static INLINE boolean util_get_offset(
const struct pipe_rasterizer_state *templ,
unsigned fill_mode)
{
diff --git a/src/gallium/auxiliary/util/u_keymap.c b/src/gallium/auxiliary/util/u_keymap.c
index e161ccd..1fbdf4d 100644
--- a/src/gallium/auxiliary/util/u_keymap.c
+++ b/src/gallium/auxiliary/util/u_keymap.c
@@ -45,7 +45,7 @@
struct keymap
{
- struct cso_hash *cso;
+ struct cso_hash *cso;
unsigned key_size;
unsigned max_entries; /* XXX not obeyed net */
unsigned num_entries;
@@ -113,13 +113,13 @@ util_new_keymap(unsigned keySize, unsigned maxEntries,
struct keymap *map = MALLOC_STRUCT(keymap);
if (!map)
return NULL;
-
+
map->cso = cso_hash_create();
if (!map->cso) {
FREE(map);
return NULL;
}
-
+
map->max_entries = maxEntries;
map->num_entries = 0;
map->key_size = keySize;
@@ -149,7 +149,7 @@ hash_table_find_iter(const struct keymap *map, const void *key,
{
struct cso_hash_iter iter;
struct keymap_item *item;
-
+
iter = cso_hash_find(map->cso, key_hash);
while (!cso_hash_iter_is_null(iter)) {
item = (struct keymap_item *) cso_hash_iter_data(iter);
@@ -157,7 +157,7 @@ hash_table_find_iter(const struct keymap *map, const void *key,
break;
iter = cso_hash_iter_next(iter);
}
-
+
return iter;
}
@@ -205,14 +205,14 @@ util_keymap_insert(struct keymap *map, const void *key,
item->value = (void *) data;
return TRUE;
}
-
+
item = MALLOC_STRUCT(keymap_item);
if (!item)
return FALSE;
item->key = mem_dup(key, map->key_size);
item->value = (void *) data;
-
+
iter = cso_hash_insert(map->cso, key_hash, item);
if (cso_hash_iter_is_null(iter)) {
FREE(item);
@@ -243,7 +243,7 @@ util_keymap_lookup(const struct keymap *map, const void *key)
item = hash_table_find_item(map, key, key_hash);
if (!item)
return NULL;
-
+
return item->value;
}
@@ -269,7 +269,7 @@ util_keymap_remove(struct keymap *map, const void *key, void *user)
iter = hash_table_find_iter(map, key, key_hash);
if (cso_hash_iter_is_null(iter))
return;
-
+
item = hash_table_item(iter);
assert(item);
if (!item)
@@ -277,7 +277,7 @@ util_keymap_remove(struct keymap *map, const void *key, void *user)
map->delete_func(map, item->key, item->value, user);
FREE(item->key);
FREE(item);
-
+
map->num_entries--;
cso_hash_erase(map->cso, iter);
diff --git a/src/gallium/auxiliary/util/u_keymap.h b/src/gallium/auxiliary/util/u_keymap.h
index 8d60a76..67587ec 100644
--- a/src/gallium/auxiliary/util/u_keymap.h
+++ b/src/gallium/auxiliary/util/u_keymap.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef U_KEYMAP_H
diff --git a/src/gallium/auxiliary/util/u_linear.c b/src/gallium/auxiliary/util/u_linear.c
index f1aef21..c178ac9 100644
--- a/src/gallium/auxiliary/util/u_linear.c
+++ b/src/gallium/auxiliary/util/u_linear.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
diff --git a/src/gallium/auxiliary/util/u_linear.h b/src/gallium/auxiliary/util/u_linear.h
index 81ffc9f..d0e1c5f 100644
--- a/src/gallium/auxiliary/util/u_linear.h
+++ b/src/gallium/auxiliary/util/u_linear.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -40,10 +40,10 @@ struct u_linear_format_block
{
/** Block size in bytes */
unsigned size;
-
+
/** Block width in pixels */
unsigned width;
-
+
/** Block height in pixels */
unsigned height;
};
diff --git a/src/gallium/auxiliary/util/u_math.c b/src/gallium/auxiliary/util/u_math.c
index 2811475..75a6905 100644
--- a/src/gallium/auxiliary/util/u_math.c
+++ b/src/gallium/auxiliary/util/u_math.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -47,7 +47,7 @@ init_pow2_table(void)
float log2_table[LOG2_TABLE_SIZE];
-static void
+static void
init_log2_table(void)
{
unsigned i;
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index 37294b7..9f82379 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -123,46 +123,46 @@ __inline double __cdecl atan2(double val)
#endif
-#if defined(_MSC_VER)
+#if defined(_MSC_VER)
#if _MSC_VER < 1400 && !defined(__cplusplus) || defined(PIPE_SUBSYSTEM_WINDOWS_CE)
-
-static INLINE float cosf( float f )
+
+static INLINE float cosf( float f )
{
return (float) cos( (double) f );
}
-static INLINE float sinf( float f )
+static INLINE float sinf( float f )
{
return (float) sin( (double) f );
}
-static INLINE float ceilf( float f )
+static INLINE float ceilf( float f )
{
return (float) ceil( (double) f );
}
-static INLINE float floorf( float f )
+static INLINE float floorf( float f )
{
return (float) floor( (double) f );
}
-static INLINE float powf( float f, float g )
+static INLINE float powf( float f, float g )
{
return (float) pow( (double) f, (double) g );
}
-static INLINE float sqrtf( float f )
+static INLINE float sqrtf( float f )
{
return (float) sqrt( (double) f );
}
-static INLINE float fabsf( float f )
+static INLINE float fabsf( float f )
{
return (float) fabs( (double) f );
}
-static INLINE float logf( float f )
+static INLINE float logf( float f )
{
return (float) log( (double) f );
}
@@ -323,7 +323,7 @@ util_ifloor(float f)
static INLINE int
util_iround(float f)
{
-#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
+#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
int r;
__asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st");
return r;
diff --git a/src/gallium/auxiliary/util/u_memory.h b/src/gallium/auxiliary/util/u_memory.h
index 53d5659..3c6c6fc 100644
--- a/src/gallium/auxiliary/util/u_memory.h
+++ b/src/gallium/auxiliary/util/u_memory.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/auxiliary/util/u_mm.c b/src/gallium/auxiliary/util/u_mm.c
index 82f8370..d66a29e 100644
--- a/src/gallium/auxiliary/util/u_mm.c
+++ b/src/gallium/auxiliary/util/u_mm.c
@@ -15,9 +15,9 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
@@ -70,14 +70,14 @@ struct mem_block *
u_mmInit(int ofs, int size)
{
struct mem_block *heap, *block;
-
- if (size <= 0)
+
+ if (size <= 0)
return NULL;
heap = CALLOC_STRUCT(mem_block);
- if (!heap)
+ if (!heap)
return NULL;
-
+
block = CALLOC_STRUCT(mem_block);
if (!block) {
FREE(heap);
@@ -104,8 +104,8 @@ u_mmInit(int ofs, int size)
static struct mem_block *
-SliceBlock(struct mem_block *p,
- int startofs, int size,
+SliceBlock(struct mem_block *p,
+ int startofs, int size,
int reserved, int alignment)
{
struct mem_block *newblock;
@@ -153,14 +153,14 @@ SliceBlock(struct mem_block *p,
newblock->prev_free = p;
p->next_free->prev_free = newblock;
p->next_free = newblock;
-
+
p->size = size;
}
/* p = middle block */
p->free = 0;
- /* Remove p from the free list:
+ /* Remove p from the free list:
*/
p->next_free->prev_free = p->prev_free;
p->prev_free->next_free = p->next_free;
@@ -200,7 +200,7 @@ u_mmAllocMem(struct mem_block *heap, int size, int align2, int startSearch)
break;
}
- if (p == heap)
+ if (p == heap)
return NULL;
assert(p->free);
@@ -216,7 +216,7 @@ u_mmFindBlock(struct mem_block *heap, int start)
struct mem_block *p;
for (p = heap->next; p != heap; p = p->next) {
- if (p->ofs == start)
+ if (p->ofs == start)
return p;
}
@@ -240,9 +240,9 @@ Join2Blocks(struct mem_block *p)
p->next = q->next;
q->next->prev = p;
- q->next_free->prev_free = q->prev_free;
+ q->next_free->prev_free = q->prev_free;
q->prev_free->next_free = q->next_free;
-
+
FREE(q);
return 1;
}
diff --git a/src/gallium/auxiliary/util/u_mm.h b/src/gallium/auxiliary/util/u_mm.h
index 6b158aa..66886fe 100644
--- a/src/gallium/auxiliary/util/u_mm.h
+++ b/src/gallium/auxiliary/util/u_mm.h
@@ -15,9 +15,9 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
@@ -45,7 +45,7 @@ struct mem_block {
-/**
+/**
* input: total size in bytes
* return: a heap pointer if OK, NULL if error
*/
@@ -61,7 +61,7 @@ extern struct mem_block *u_mmInit(int ofs, int size);
* startSearch = linear offset from start of heap to begin search
* return: pointer to the allocated block, 0 if error
*/
-extern struct mem_block *u_mmAllocMem(struct mem_block *heap, int size, int align2,
+extern struct mem_block *u_mmAllocMem(struct mem_block *heap, int size, int align2,
int startSearch);
/**
diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h
index 5378f2d..80e1f28 100644
--- a/src/gallium/auxiliary/util/u_pack_color.h
+++ b/src/gallium/auxiliary/util/u_pack_color.h
@@ -155,7 +155,7 @@ util_pack_color_ub(ubyte r, ubyte g, ubyte b, ubyte a,
}
}
}
-
+
/**
* Unpack RGBA from a packed pixel, returning values as ubytes in [0,255].
@@ -430,7 +430,7 @@ util_pack_color(const float rgba[4], enum pipe_format format, union util_color *
util_format_write_4f(format, rgba, 0, uc, 0, 0, 0, 1, 1);
}
}
-
+
/* Integer versions of util_pack_z and util_pack_z_stencil - useful for
* constructing clear masks.
*/
@@ -525,7 +525,7 @@ util_pack_z(enum pipe_format format, double z)
return 0;
}
}
-
+
/**
* Pack Z and/or stencil values into a 32-bit value described by format.
diff --git a/src/gallium/auxiliary/util/u_pointer.h b/src/gallium/auxiliary/util/u_pointer.h
index cce0c74..6c0f849 100644
--- a/src/gallium/auxiliary/util/u_pointer.h
+++ b/src/gallium/auxiliary/util/u_pointer.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef U_POINTER_H
diff --git a/src/gallium/auxiliary/util/u_rect.c b/src/gallium/auxiliary/util/u_rect.c
index 56fcfac..9c8d565 100644
--- a/src/gallium/auxiliary/util/u_rect.c
+++ b/src/gallium/auxiliary/util/u_rect.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -50,7 +50,7 @@ util_copy_rect(ubyte * dst,
unsigned height,
const ubyte * src,
int src_stride,
- unsigned src_x,
+ unsigned src_x,
unsigned src_y)
{
unsigned i;
@@ -69,7 +69,7 @@ util_copy_rect(ubyte * dst,
height = (height + blockheight - 1)/blockheight;
src_x /= blockwidth;
src_y /= blockheight;
-
+
dst += dst_x * blocksize;
src += src_x * blocksize;
dst += dst_y * dst_stride;
diff --git a/src/gallium/auxiliary/util/u_rect.h b/src/gallium/auxiliary/util/u_rect.h
index 4cb90d3..5c9edec 100644
--- a/src/gallium/auxiliary/util/u_rect.h
+++ b/src/gallium/auxiliary/util/u_rect.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/auxiliary/util/u_ringbuffer.c b/src/gallium/auxiliary/util/u_ringbuffer.c
index 648b105..e6300fa 100644
--- a/src/gallium/auxiliary/util/u_ringbuffer.c
+++ b/src/gallium/auxiliary/util/u_ringbuffer.c
@@ -5,9 +5,9 @@
#include "util/u_math.h"
#include "util/u_memory.h"
-/* Generic ringbuffer:
+/* Generic ringbuffer:
*/
-struct util_ringbuffer
+struct util_ringbuffer
{
struct util_packet *buf;
unsigned mask;
@@ -28,7 +28,7 @@ struct util_ringbuffer *util_ringbuffer_create( unsigned dwords )
return NULL;
assert(util_is_power_of_two(dwords));
-
+
ring->buf = MALLOC( dwords * sizeof(unsigned) );
if (ring->buf == NULL)
goto fail;
diff --git a/src/gallium/auxiliary/util/u_simple_list.h b/src/gallium/auxiliary/util/u_simple_list.h
index fe59771..e25d29b 100644
--- a/src/gallium/auxiliary/util/u_simple_list.h
+++ b/src/gallium/auxiliary/util/u_simple_list.h
@@ -4,7 +4,7 @@
*
* Intended to work with a list sentinal which is created as an empty
* list. Insert & delete are O(1).
- *
+ *
* \author
* (C) 1997, Keith Whitwell
*/
@@ -151,19 +151,19 @@ do { \
/**
* Test whether element is at end of the list.
- *
+ *
* \param list list.
* \param elem element.
- *
+ *
* \return non-zero if element is at end of list, or zero otherwise.
*/
#define at_end(list, elem) ((elem) == (list))
/**
* Test if a list is empty.
- *
+ *
* \param list list.
- *
+ *
* \return non-zero if list empty, or zero otherwise.
*/
#define is_empty_list(list) ((list)->next == (list))
@@ -185,7 +185,7 @@ do { \
*
* Same as #foreach but lets you unlink the current value during a list
* traversal. Useful for freeing a list, element by element.
- *
+ *
* \param ptr pointer to the current element.
* \param t temporary pointer.
* \param list list.
diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c
index b0f2dd8..11fd3c0 100644
--- a/src/gallium/auxiliary/util/u_simple_shaders.c
+++ b/src/gallium/auxiliary/util/u_simple_shaders.c
@@ -29,7 +29,7 @@
/**
* @file
* Simple vertex/fragment shader generators.
- *
+ *
* @author Brian Paul
Marek Olšák
*/
@@ -68,11 +68,11 @@ util_make_vertex_passthrough_shader(struct pipe_context *pipe,
struct ureg_dst dst;
src = ureg_DECL_vs_input( ureg, i );
-
+
dst = ureg_DECL_output( ureg,
semantic_names[i],
semantic_indexes[i]);
-
+
ureg_MOV( ureg, dst, src );
}
@@ -110,14 +110,14 @@ util_make_fragment_tex_shader_writemask(struct pipe_context *pipe,
ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
if (ureg == NULL)
return NULL;
-
+
sampler = ureg_DECL_sampler( ureg, 0 );
- tex = ureg_DECL_fs_input( ureg,
- TGSI_SEMANTIC_GENERIC, 0,
+ tex = ureg_DECL_fs_input( ureg,
+ TGSI_SEMANTIC_GENERIC, 0,
interp_mode );
- out = ureg_DECL_output( ureg,
+ out = ureg_DECL_output( ureg,
TGSI_SEMANTIC_COLOR,
0 );
@@ -127,7 +127,7 @@ util_make_fragment_tex_shader_writemask(struct pipe_context *pipe,
ureg_MOV( ureg, out, imm );
}
- ureg_TEX( ureg,
+ ureg_TEX( ureg,
ureg_writemask(out, writemask),
tex_target, tex, sampler );
ureg_END( ureg );
diff --git a/src/gallium/auxiliary/util/u_simple_shaders.h b/src/gallium/auxiliary/util/u_simple_shaders.h
index 1bfec18..09e7ab8 100644
--- a/src/gallium/auxiliary/util/u_simple_shaders.h
+++ b/src/gallium/auxiliary/util/u_simple_shaders.h
@@ -50,7 +50,7 @@ util_make_vertex_passthrough_shader(struct pipe_context *pipe,
extern void *
-util_make_fragment_tex_shader_writemask(struct pipe_context *pipe,
+util_make_fragment_tex_shader_writemask(struct pipe_context *pipe,
unsigned tex_target,
unsigned interp_mode,
unsigned writemask);
diff --git a/src/gallium/auxiliary/util/u_snprintf.c b/src/gallium/auxiliary/util/u_snprintf.c
index 65bdd0d..3c3db2c 100644
--- a/src/gallium/auxiliary/util/u_snprintf.c
+++ b/src/gallium/auxiliary/util/u_snprintf.c
@@ -334,13 +334,13 @@ static void *mymemcpy(void *, void *, size_t);
#endif /* HAVE_UINTPTR_T || defined(uintptr_t) */
#endif /* !defined(UINTPTR_T) */
-/* WinCE5.0 does not have uintptr_t defined */
-#if (_WIN32_WCE < 600)
-#ifdef UINTPTR_T
-#undef UINTPTR_T
-#endif
-#define UINTPTR_T unsigned long int
-#endif
+/* WinCE5.0 does not have uintptr_t defined */
+#if (_WIN32_WCE < 600)
+#ifdef UINTPTR_T
+#undef UINTPTR_T
+#endif
+#define UINTPTR_T unsigned long int
+#endif
/* Support for ptrdiff_t. */
diff --git a/src/gallium/auxiliary/util/u_sse.h b/src/gallium/auxiliary/util/u_sse.h
index 1df6c87..980edbb 100644
--- a/src/gallium/auxiliary/util/u_sse.h
+++ b/src/gallium/auxiliary/util/u_sse.h
@@ -28,9 +28,9 @@
/**
* @file
* SSE intrinsics portability header.
- *
- * Although the SSE intrinsics are support by all modern x86 and x86-64
- * compilers, there are some intrisincs missing in some implementations
+ *
+ * Although the SSE intrinsics are support by all modern x86 and x86-64
+ * compilers, there are some intrisincs missing in some implementations
* (especially older MSVC versions). This header abstracts that away.
*/
diff --git a/src/gallium/auxiliary/util/u_string.h b/src/gallium/auxiliary/util/u_string.h
index cc7992d..d7914da 100644
--- a/src/gallium/auxiliary/util/u_string.h
+++ b/src/gallium/auxiliary/util/u_string.h
@@ -188,7 +188,7 @@ struct util_strbuf
static INLINE void
-util_strbuf_init(struct util_strbuf *sbuf, char *str, size_t size)
+util_strbuf_init(struct util_strbuf *sbuf, char *str, size_t size)
{
sbuf->str = str;
sbuf->str[0] = 0;
diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index 4eddd3f..f56776e 100644
--- a/src/gallium/auxiliary/util/u_surface.c
+++ b/src/gallium/auxiliary/util/u_surface.c
@@ -27,7 +27,7 @@
/**
* @file
* Surface utility functions.
- *
+ *
* @author Brian Paul
*/
diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c
index 44cadbf..fbab23c 100644
--- a/src/gallium/auxiliary/util/u_tile.c
+++ b/src/gallium/auxiliary/util/u_tile.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
diff --git a/src/gallium/auxiliary/util/u_tile.h b/src/gallium/auxiliary/util/u_tile.h
index 558351d..275792e 100644
--- a/src/gallium/auxiliary/util/u_tile.h
+++ b/src/gallium/auxiliary/util/u_tile.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef P_TILE_H
diff --git a/src/gallium/auxiliary/util/u_time.h b/src/gallium/auxiliary/util/u_time.h
index 15899c2..66160ba 100644
--- a/src/gallium/auxiliary/util/u_time.h
+++ b/src/gallium/auxiliary/util/u_time.h
@@ -28,7 +28,7 @@
/**
* @file
* OS independent time-manipulation functions.
- *
+ *
* @author Jose Fonseca
*/
@@ -50,14 +50,14 @@ extern "C" {
/**
* Time abstraction.
- *
+ *
* Do not access this structure directly. Use the provided function instead.
*/
-struct util_time
+struct util_time
{
int64_t counter;
};
-
+
PIPE_DEPRECATED
static INLINE void
@@ -85,7 +85,7 @@ util_time_add(const struct util_time *t1,
*/
PIPE_DEPRECATED
static INLINE int64_t
-util_time_diff(const struct util_time *t1,
+util_time_diff(const struct util_time *t1,
const struct util_time *t2)
{
return t2->counter - t1->counter;
@@ -116,7 +116,7 @@ _util_time_compare(const struct util_time *t1,
*/
PIPE_DEPRECATED
static INLINE boolean
-util_time_timeout(const struct util_time *start,
+util_time_timeout(const struct util_time *start,
const struct util_time *end,
const struct util_time *curr)
{
diff --git a/src/gallium/auxiliary/util/u_transfer.c b/src/gallium/auxiliary/util/u_transfer.c
index e2828cf..465096e 100644
--- a/src/gallium/auxiliary/util/u_transfer.c
+++ b/src/gallium/auxiliary/util/u_transfer.c
@@ -96,7 +96,7 @@ struct pipe_transfer * u_default_get_transfer(struct pipe_context *context,
transfer->box = *box;
/* Note strides are zero, this is ok for buffers, but not for
- * textures 2d & higher at least.
+ * textures 2d & higher at least.
*/
return transfer;
}
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c
index af229e6..b1c4a84 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.c
+++ b/src/gallium/auxiliary/util/u_upload_mgr.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Helper utility for uploading user buffers & other data, and
@@ -78,7 +78,7 @@ struct u_upload_mgr *u_upload_create( struct pipe_context *pipe,
* dirty_size may be slightly greater than size to cope with
* alignment. We don't want to leave holes between succesively mapped
* regions as that may prevent the driver from consolidating uploads.
- *
+ *
* Note that the 'data' pointer has probably come from the application
* and we cannot read even a byte past its end without risking
* segfaults, or at least complaints from valgrind..
@@ -91,7 +91,7 @@ my_buffer_write(struct pipe_context *pipe,
{
struct pipe_transfer *transfer = NULL;
uint8_t *map;
-
+
assert(offset < buf->width0);
assert(offset + size <= buf->width0);
assert(dirty_size >= size);
@@ -103,7 +103,7 @@ my_buffer_write(struct pipe_context *pipe,
PIPE_TRANSFER_DISCARD |
PIPE_TRANSFER_UNSYNCHRONIZED,
&transfer);
- if (map == NULL)
+ if (map == NULL)
return PIPE_ERROR_OUT_OF_MEMORY;
memcpy(map + offset, data, size);
@@ -114,7 +114,7 @@ my_buffer_write(struct pipe_context *pipe,
}
/* Release old buffer.
- *
+ *
* This must usually be called prior to firing the command stream
* which references the upload buffer, as many memory managers will
* cause subsequent maps of a fired buffer to wait.
@@ -136,7 +136,7 @@ void u_upload_destroy( struct u_upload_mgr *upload )
}
-static enum pipe_error
+static enum pipe_error
u_upload_alloc_buffer( struct u_upload_mgr *upload,
unsigned min_size )
{
@@ -146,16 +146,16 @@ u_upload_alloc_buffer( struct u_upload_mgr *upload,
*/
u_upload_flush( upload );
- /* Allocate a new one:
+ /* Allocate a new one:
*/
size = align(MAX2(upload->default_size, min_size), 4096);
upload->buffer = pipe_buffer_create( upload->pipe->screen,
upload->usage,
size );
- if (upload->buffer == NULL)
+ if (upload->buffer == NULL)
goto fail;
-
+
upload->size = size;
upload->offset = 0;
@@ -186,10 +186,10 @@ enum pipe_error u_upload_data( struct u_upload_mgr *upload,
/* Copy the data, using map_range if available:
*/
- ret = my_buffer_write( upload->pipe,
+ ret = my_buffer_write( upload->pipe,
upload->buffer,
upload->offset,
- size,
+ size,
alloc_size,
data );
if (ret)
@@ -233,7 +233,7 @@ enum pipe_error u_upload_buffer( struct u_upload_mgr *upload,
if (0)
debug_printf("upload ptr %p ofs %d sz %d\n", map, offset, size);
- ret = u_upload_data( upload,
+ ret = u_upload_data( upload,
size,
map + offset,
out_offset,
diff --git a/src/gallium/auxiliary/util/u_upload_mgr.h b/src/gallium/auxiliary/util/u_upload_mgr.h
index de016df..a9de564 100644
--- a/src/gallium/auxiliary/util/u_upload_mgr.h
+++ b/src/gallium/auxiliary/util/u_upload_mgr.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Helper utility for uploading user buffers & other data, and
@@ -44,7 +44,7 @@ struct u_upload_mgr *u_upload_create( struct pipe_context *pipe,
void u_upload_destroy( struct u_upload_mgr *upload );
/* Unmap and release old buffer.
- *
+ *
* This must usually be called prior to firing the command stream
* which references the upload buffer, as many memory managers either
* don't like firing a mapped buffer or cause subsequent maps of a
diff --git a/src/gallium/drivers/cell/common.h b/src/gallium/drivers/cell/common.h
index a8cdde3..bb8f702 100644
--- a/src/gallium/drivers/cell/common.h
+++ b/src/gallium/drivers/cell/common.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -162,7 +162,7 @@ struct cell_command_fence
/**
* Command to specify per-fragment operations state and generated code.
- * Note that this is a variant-length structure, allocated with as
+ * Note that this is a variant-length structure, allocated with as
* much memory as needed to hold the generated code; the "code"
* field *must* be the last field in the structure. Also, the entire
* length of the structure (including the variant code field) must be
@@ -188,7 +188,7 @@ struct cell_command_fragment_ops
unsigned total_code_size;
unsigned front_code_index;
unsigned back_code_index;
- /* this field has variant length, and must be the last field in
+ /* this field has variant length, and must be the last field in
* the structure
*/
unsigned code[0];
diff --git a/src/gallium/drivers/cell/ppu/cell_batch.c b/src/gallium/drivers/cell/ppu/cell_batch.c
index fe144f8..2c1e931 100644
--- a/src/gallium/drivers/cell/ppu/cell_batch.c
+++ b/src/gallium/drivers/cell/ppu/cell_batch.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -155,7 +155,7 @@ cell_batch_flush(struct cell_context *cell)
printf("cell_batch_dispatch: buf %u at %p, size %u\n",
batch, &cell->buffer[batch][0], size);
*/
-
+
/*
* Build "BATCH" command and send to all SPUs.
*/
diff --git a/src/gallium/drivers/cell/ppu/cell_batch.h b/src/gallium/drivers/cell/ppu/cell_batch.h
index 2901360..08f2a15 100644
--- a/src/gallium/drivers/cell/ppu/cell_batch.h
+++ b/src/gallium/drivers/cell/ppu/cell_batch.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/ppu/cell_clear.c b/src/gallium/drivers/cell/ppu/cell_clear.c
index 246fe21..2150e76 100644
--- a/src/gallium/drivers/cell/ppu/cell_clear.c
+++ b/src/gallium/drivers/cell/ppu/cell_clear.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
diff --git a/src/gallium/drivers/cell/ppu/cell_clear.h b/src/gallium/drivers/cell/ppu/cell_clear.h
index 08e091a..0a0135d 100644
--- a/src/gallium/drivers/cell/ppu/cell_clear.h
+++ b/src/gallium/drivers/cell/ppu/cell_clear.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index b6b3a70..3bb7f73 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -164,8 +164,8 @@ cell_create_context(struct pipe_screen *screen,
draw_wide_line_threshold(cell->draw, 0.0);
/* get env vars or read config file to get debug flags */
- cell->debug_flags = debug_get_flags_option("CELL_DEBUG",
- cell_debug_flags,
+ cell->debug_flags = debug_get_flags_option("CELL_DEBUG",
+ cell_debug_flags,
0 );
for (i = 0; i < CELL_NUM_BUFFERS; i++)
diff --git a/src/gallium/drivers/cell/ppu/cell_context.h b/src/gallium/drivers/cell/ppu/cell_context.h
index d1aee62..b2101a0 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.h
+++ b/src/gallium/drivers/cell/ppu/cell_context.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/ppu/cell_draw_arrays.c b/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
index a367fa3..454de6e 100644
--- a/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
+++ b/src/gallium/drivers/cell/ppu/cell_draw_arrays.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
diff --git a/src/gallium/drivers/cell/ppu/cell_draw_arrays.h b/src/gallium/drivers/cell/ppu/cell_draw_arrays.h
index 148873a..54ec0e0 100644
--- a/src/gallium/drivers/cell/ppu/cell_draw_arrays.h
+++ b/src/gallium/drivers/cell/ppu/cell_draw_arrays.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef CELL_DRAW_ARRAYS_H
diff --git a/src/gallium/drivers/cell/ppu/cell_fence.c b/src/gallium/drivers/cell/ppu/cell_fence.c
index e7c9fc4..3f13564 100644
--- a/src/gallium/drivers/cell/ppu/cell_fence.c
+++ b/src/gallium/drivers/cell/ppu/cell_fence.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include
diff --git a/src/gallium/drivers/cell/ppu/cell_fence.h b/src/gallium/drivers/cell/ppu/cell_fence.h
index 536b4ba..ac4740a 100644
--- a/src/gallium/drivers/cell/ppu/cell_fence.h
+++ b/src/gallium/drivers/cell/ppu/cell_fence.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/ppu/cell_flush.c b/src/gallium/drivers/cell/ppu/cell_flush.c
index 8275c9d..6a45c6f 100644
--- a/src/gallium/drivers/cell/ppu/cell_flush.c
+++ b/src/gallium/drivers/cell/ppu/cell_flush.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -103,7 +103,7 @@ cell_flush_buffer_range(struct cell_context *cell, void *ptr,
unsigned size)
{
STATIC_ASSERT((sizeof(opcode_t) + sizeof(struct cell_buffer_range)) % 16 == 0);
- uint32_t *batch = (uint32_t*)cell_batch_alloc16(cell,
+ uint32_t *batch = (uint32_t*)cell_batch_alloc16(cell,
sizeof(opcode_t) + sizeof(struct cell_buffer_range));
struct cell_buffer_range *br = (struct cell_buffer_range *) &batch[4];
batch[0] = CELL_CMD_FLUSH_BUFFER_RANGE;
diff --git a/src/gallium/drivers/cell/ppu/cell_flush.h b/src/gallium/drivers/cell/ppu/cell_flush.h
index 509ae62..9cc1fe1 100644
--- a/src/gallium/drivers/cell/ppu/cell_flush.h
+++ b/src/gallium/drivers/cell/ppu/cell_flush.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/ppu/cell_gen_fp.c b/src/gallium/drivers/cell/ppu/cell_gen_fp.c
index 1d8a11a..c7b65b6 100644
--- a/src/gallium/drivers/cell/ppu/cell_gen_fp.c
+++ b/src/gallium/drivers/cell/ppu/cell_gen_fp.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2009 VMware, Inc. All rights reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -244,7 +244,7 @@ is_register_src(struct codegen *gen, int channel,
return FALSE;
}
-
+
static boolean
is_memory_dst(struct codegen *gen, int channel,
const struct tgsi_full_dst_register *dst)
@@ -257,7 +257,7 @@ is_memory_dst(struct codegen *gen, int channel,
}
}
-
+
/**
* Return the index of the SPU temporary containing the named TGSI
* source register. If the TGSI register is a TGSI_FILE_TEMPORARY we
@@ -743,7 +743,7 @@ emit_ABS(struct codegen *gen, const struct tgsi_full_instruction *inst)
int ch, s1_reg[4], d_reg[4];
const int bit31mask_reg = get_itemp(gen);
- /* mask with bit 31 set, the rest cleared */
+ /* mask with bit 31 set, the rest cleared */
spe_load_uint(gen->f, bit31mask_reg, (1 << 31));
FOR_EACH_ENABLED_CHANNEL(inst, ch) {
@@ -1065,7 +1065,7 @@ emit_CMP(struct codegen *gen, const struct tgsi_full_instruction *inst)
int s3_reg = get_src_reg(gen, ch, &inst->Src[2]);
int d_reg = get_dst_reg(gen, ch, &inst->Dst[0]);
int zero_reg = get_itemp(gen);
-
+
spe_zero(gen->f, zero_reg);
/* d = (s1 < 0) ? s2 : s3 */
@@ -1080,7 +1080,7 @@ emit_CMP(struct codegen *gen, const struct tgsi_full_instruction *inst)
}
/**
- * Emit trunc.
+ * Emit trunc.
* Convert float to signed int
* Convert signed int to float
*/
@@ -1114,7 +1114,7 @@ emit_TRUNC(struct codegen *gen, const struct tgsi_full_instruction *inst)
/**
- * Emit floor.
+ * Emit floor.
* If negative int subtract one
* Convert float to signed int
* Convert signed int to float
@@ -1127,7 +1127,7 @@ emit_FLR(struct codegen *gen, const struct tgsi_full_instruction *inst)
zero_reg = get_itemp(gen);
spe_zero(gen->f, zero_reg);
one_reg = get_const_one_reg(gen);
-
+
FOR_EACH_ENABLED_CHANNEL(inst, ch) {
s1_reg[ch] = get_src_reg(gen, ch, &inst->Src[0]);
d_reg[ch] = get_dst_reg(gen, ch, &inst->Dst[0]);
@@ -1503,7 +1503,7 @@ emit_MIN_MAX(struct codegen *gen, const struct tgsi_full_instruction *inst)
s0_reg[ch] = get_src_reg(gen, ch, &inst->Src[0]);
s1_reg[ch] = get_src_reg(gen, ch, &inst->Src[1]);
d_reg[ch] = get_dst_reg(gen, ch, &inst->Dst[0]);
- tmp_reg[ch] = get_itemp(gen);
+ tmp_reg[ch] = get_itemp(gen);
}
/* d = (s0 > s1) ? s0 : s1 */
diff --git a/src/gallium/drivers/cell/ppu/cell_gen_fp.h b/src/gallium/drivers/cell/ppu/cell_gen_fp.h
index 99faea7..c8447d2 100644
--- a/src/gallium/drivers/cell/ppu/cell_gen_fp.h
+++ b/src/gallium/drivers/cell/ppu/cell_gen_fp.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/ppu/cell_gen_fragment.c b/src/gallium/drivers/cell/ppu/cell_gen_fragment.c
index 628bc1c..426576d 100644
--- a/src/gallium/drivers/cell/ppu/cell_gen_fragment.c
+++ b/src/gallium/drivers/cell/ppu/cell_gen_fragment.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2009 VMware, Inc. All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -240,7 +240,7 @@ gen_alpha_test(const struct pipe_depth_stencil_alpha_state *dsa,
/**
* This pair of functions is used inline to allocate and deallocate
- * optional constant registers. Once a constant is discovered to be
+ * optional constant registers. Once a constant is discovered to be
* needed, we will likely need it again, so we don't want to deallocate
* it and have to allocate and load it again unnecessarily.
*/
@@ -417,7 +417,7 @@ gen_blend(const struct pipe_blend_state *blend,
/*
* Compute Src RGB terms. We're actually looking for the value
* of (the appropriate RGB factors) * (the incoming source RGB color),
- * because in some cases (like PIPE_BLENDFACTOR_ONE and
+ * because in some cases (like PIPE_BLENDFACTOR_ONE and
* PIPE_BLENDFACTOR_ZERO) we can avoid doing unnecessary math.
*/
switch (blend->rt[0].rgb_src_factor) {
@@ -446,7 +446,7 @@ gen_blend(const struct pipe_blend_state *blend,
spe_fm(f, term1B_reg, fragB_reg, fragA_reg);
break;
case PIPE_BLENDFACTOR_INV_SRC_COLOR:
- /* factors = (1-R,1-G,1-B), so term = (R*(1-R), G*(1-G), B*(1-B))
+ /* factors = (1-R,1-G,1-B), so term = (R*(1-R), G*(1-G), B*(1-B))
* or in other words term = (R-R*R, G-G*G, B-B*B)
* fnms(a,b,c,d) computes a = d - b*c
*/
@@ -485,7 +485,7 @@ gen_blend(const struct pipe_blend_state *blend,
spe_fm(f, term1B_reg, fragB_reg, fbA_reg);
break;
case PIPE_BLENDFACTOR_INV_DST_ALPHA:
- /* factors = (1-Afb, 1-Afb, 1-Afb), so term = (R*(1-Afb),G*(1-Afb),B*(1-Afb))
+ /* factors = (1-Afb, 1-Afb, 1-Afb), so term = (R*(1-Afb),G*(1-Afb),B*(1-Afb))
* or term = (R-R*Afb,G-G*Afb,b-B*Afb)
* fnms(a,b,c,d) computes a = d - b*c
*/
@@ -516,7 +516,7 @@ gen_blend(const struct pipe_blend_state *blend,
setup_const_register(f, &constR_reg, blend_color->color[0]);
setup_const_register(f, &constG_reg, blend_color->color[1]);
setup_const_register(f, &constB_reg, blend_color->color[2]);
- /* factor = (1-Rc,1-Gc,1-Bc), so term = (R*(1-Rc),G*(1-Gc),B*(1-Bc))
+ /* factor = (1-Rc,1-Gc,1-Bc), so term = (R*(1-Rc),G*(1-Gc),B*(1-Bc))
* or term = (R-R*Rc, G-G*Gc, B-B*Bc)
* fnms(a,b,c,d) computes a = d - b*c
*/
@@ -540,7 +540,7 @@ gen_blend(const struct pipe_blend_state *blend,
case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE:
/* We'll need the optional {1,1,1,1} register */
setup_const_register(f, &one_reg, 1.0f);
- /* factor = (min(A,1-Afb),min(A,1-Afb),min(A,1-Afb)), so
+ /* factor = (min(A,1-Afb),min(A,1-Afb),min(A,1-Afb)), so
* term = (R*min(A,1-Afb), G*min(A,1-Afb), B*min(A,1-Afb))
* We could expand the term (as a*min(b,c) == min(a*b,a*c)
* as long as a is positive), but then we'd have to do three
@@ -668,7 +668,7 @@ gen_blend(const struct pipe_blend_state *blend,
spe_fm(f, term2B_reg, fbB_reg, fragB_reg);
break;
case PIPE_BLENDFACTOR_INV_SRC_COLOR:
- /* factors = (1-R,1-G,1-B), so term = (Rfb*(1-R), Gfb*(1-G), Bfb*(1-B))
+ /* factors = (1-R,1-G,1-B), so term = (Rfb*(1-R), Gfb*(1-G), Bfb*(1-B))
* or in other words term = (Rfb-Rfb*R, Gfb-Gfb*G, Bfb-Bfb*B)
* fnms(a,b,c,d) computes a = d - b*c
*/
@@ -712,7 +712,7 @@ gen_blend(const struct pipe_blend_state *blend,
spe_fm(f, term2B_reg, fbB_reg, fbA_reg);
break;
case PIPE_BLENDFACTOR_INV_DST_ALPHA:
- /* factors = (1-Afb, 1-Afb, 1-Afb), so term = (Rfb*(1-Afb),Gfb*(1-Afb),Bfb*(1-Afb))
+ /* factors = (1-Afb, 1-Afb, 1-Afb), so term = (Rfb*(1-Afb),Gfb*(1-Afb),Bfb*(1-Afb))
* or term = (Rfb-Rfb*Afb,Gfb-Gfb*Afb,Bfb-Bfb*Afb)
* fnms(a,b,c,d) computes a = d - b*c
*/
@@ -743,7 +743,7 @@ gen_blend(const struct pipe_blend_state *blend,
setup_const_register(f, &constR_reg, blend_color->color[0]);
setup_const_register(f, &constG_reg, blend_color->color[1]);
setup_const_register(f, &constB_reg, blend_color->color[2]);
- /* factor = (1-Rc,1-Gc,1-Bc), so term = (Rfb*(1-Rc),Gfb*(1-Gc),Bfb*(1-Bc))
+ /* factor = (1-Rc,1-Gc,1-Bc), so term = (Rfb*(1-Rc),Gfb*(1-Gc),Bfb*(1-Bc))
* or term = (Rfb-Rfb*Rc, Gfb-Gfb*Gc, Bfb-Bfb*Bc)
* fnms(a,b,c,d) computes a = d - b*c
*/
@@ -1114,8 +1114,8 @@ gen_colormask(struct spe_function *f,
ASSERT(0);
}
- /* For each R, G, B, and A component we're supposed to mask out,
- * clear its bits. Then our mask operation later will work
+ /* For each R, G, B, and A component we're supposed to mask out,
+ * clear its bits. Then our mask operation later will work
* as expected.
*/
if (!(colormask & PIPE_MASK_R)) {
@@ -1144,7 +1144,7 @@ gen_colormask(struct spe_function *f,
/* Use the mask register to select between the fragment color
* values and the frame buffer color values. Wherever the
* mask has a 0 bit, the current frame buffer color should override
- * the fragment color. Wherever the mask has a 1 bit, the
+ * the fragment color. Wherever the mask has a 1 bit, the
* fragment color should persevere. The Select Bits (selb rt, rA, rB, rM)
* instruction will select bits from its first operand rA wherever the
* the mask bits rM are 0, and from its second operand rB wherever the
@@ -1162,7 +1162,7 @@ gen_colormask(struct spe_function *f,
* This function is annoyingly similar to gen_depth_test(), above, except
* that instead of comparing two varying values (i.e. fragment and buffer),
* we're comparing a varying value with a static value. As such, we have
- * access to the Compare Immediate instructions where we don't in
+ * access to the Compare Immediate instructions where we don't in
* gen_depth_test(), which is what makes us very different.
*
* There's some added complexity if there's a non-trivial state->mask
@@ -1179,7 +1179,7 @@ gen_stencil_test(struct spe_function *f,
const unsigned ref_value,
uint stencil_max_value,
int fragment_mask_reg,
- int fbS_reg,
+ int fbS_reg,
int stencil_pass_reg)
{
/* Generate code that puts the set of passing fragments into the
@@ -1242,8 +1242,8 @@ gen_stencil_test(struct spe_function *f,
if (state->valuemask == stencil_max_value) {
/* stencil_pass = fragment_mask & (reference > s) */
/* There's no convenient Compare Less Than Immediate instruction, so
- * we'll have to do this one the harder way, by loading a register and
- * comparing directly. Compare Logical Greater Than Word (clgt)
+ * we'll have to do this one the harder way, by loading a register and
+ * comparing directly. Compare Logical Greater Than Word (clgt)
* treats its operands as unsigned - no sign extension.
*/
int tmp_reg = spe_allocate_available_register(f);
@@ -1267,7 +1267,7 @@ gen_stencil_test(struct spe_function *f,
case PIPE_FUNC_GEQUAL:
if (state->valuemask == stencil_max_value) {
- /* stencil_pass = fragment_mask & (reference >= s)
+ /* stencil_pass = fragment_mask & (reference >= s)
* = fragment_mask & ~(s > reference) */
spe_compare_greater_uint(f, stencil_pass_reg, fbS_reg,
ref_value);
@@ -1353,9 +1353,9 @@ gen_stencil_values(struct spe_function *f,
ASSERT(fbS_reg != newS_reg);
/* The code also assumes that the stencil_max_value is of the form
- * 2^n-1 and can therefore be used as a mask for the valid bits in
+ * 2^n-1 and can therefore be used as a mask for the valid bits in
* addition to a maximum. Make sure this is the case as well.
- * The clever math below exploits the fact that incrementing a
+ * The clever math below exploits the fact that incrementing a
* binary number serves to flip all the bits of a number starting at
* the LSB and continuing to (and including) the first zero bit
* found. That means that a number and its increment will always
@@ -1411,7 +1411,7 @@ gen_stencil_values(struct spe_function *f,
}
case PIPE_STENCIL_OP_INCR_WRAP:
/* newS = (s == max ? 0 : s + 1), but since max is 2^n-1, we can
- * do a normal add and mask off the correct bits
+ * do a normal add and mask off the correct bits
*/
spe_ai(f, newS_reg, fbS_reg, 1);
spe_and_uint(f, newS_reg, newS_reg, stencil_max_value);
@@ -1443,7 +1443,7 @@ gen_stencil_values(struct spe_function *f,
* and calculates a new set of values based on the stencil operation,
* or it reuses a register allocation and calculation done for an
* earlier (matching) operation, or it reuses the fbS_reg register
- * (if the stencil operation is KEEP, which doesn't change the
+ * (if the stencil operation is KEEP, which doesn't change the
* stencil buffer).
*
* Since this function allocates a variable number of registers,
@@ -1456,9 +1456,9 @@ gen_get_stencil_values(struct spe_function *f,
const struct pipe_stencil_state *stencil,
const unsigned ref_value,
const uint depth_enabled,
- int fbS_reg,
+ int fbS_reg,
int *fail_reg,
- int *zfail_reg,
+ int *zfail_reg,
int *zpass_reg)
{
uint zfail_op;
@@ -1490,7 +1490,7 @@ gen_get_stencil_values(struct spe_function *f,
}
else {
*fail_reg = spe_allocate_available_register(f);
- gen_stencil_values(f, stencil->fail_op, ref_value,
+ gen_stencil_values(f, stencil->fail_op, ref_value,
0xff, fbS_reg, *fail_reg);
}
@@ -1503,7 +1503,7 @@ gen_get_stencil_values(struct spe_function *f,
}
else {
*zfail_reg = spe_allocate_available_register(f);
- gen_stencil_values(f, stencil->zfail_op, ref_value,
+ gen_stencil_values(f, stencil->zfail_op, ref_value,
0xff, fbS_reg, *zfail_reg);
}
@@ -1518,7 +1518,7 @@ gen_get_stencil_values(struct spe_function *f,
}
else {
*zpass_reg = spe_allocate_available_register(f);
- gen_stencil_values(f, stencil->zpass_op, ref_value,
+ gen_stencil_values(f, stencil->zpass_op, ref_value,
0xff, fbS_reg, *zpass_reg);
}
}
@@ -1529,11 +1529,11 @@ gen_get_stencil_values(struct spe_function *f,
* the register if depth is not enabled.
*/
static boolean
-gen_stencil_depth_test(struct spe_function *f,
+gen_stencil_depth_test(struct spe_function *f,
const struct pipe_depth_stencil_alpha_state *dsa,
const struct pipe_stencil_ref *stencil_ref,
const uint facing,
- const int mask_reg, const int fragZ_reg,
+ const int mask_reg, const int fragZ_reg,
const int fbZ_reg, const int fbS_reg)
{
/* True if we've generated code that could require writeback to the
@@ -1556,17 +1556,17 @@ gen_stencil_depth_test(struct spe_function *f,
int newS_reg;
unsigned ref_value;
- /* Stenciling is quite complex: up to six different configurable stencil
+ /* Stenciling is quite complex: up to six different configurable stencil
* operations/calculations can be required (three each for front-facing
- * and back-facing fragments). Many of those operations will likely
- * be identical, so there's good reason to try to avoid calculating
- * the same values more than once (which unfortunately makes the code less
+ * and back-facing fragments). Many of those operations will likely
+ * be identical, so there's good reason to try to avoid calculating
+ * the same values more than once (which unfortunately makes the code less
* straightforward).
*
- * To make register management easier, we start a new
+ * To make register management easier, we start a new
* register set; we can release all the registers in the set at
* once, and avoid having to keep track of exactly which registers
- * we allocate. We can still allocate and free registers as
+ * we allocate. We can still allocate and free registers as
* desired (if we know we no longer need a register), but we don't
* have to spend the complexity to track the more difficult variant
* register usage scenarios.
@@ -1654,7 +1654,7 @@ gen_stencil_depth_test(struct spe_function *f,
* the mask of valid fragments that failed the stencil test. We
* have to do this before we run a depth test (because the
* depth test should not be performed on fragments that failed the
- * stencil test, and because the depth test will update the
+ * stencil test, and because the depth test will update the
* mask of valid fragments based on the results of the depth test).
*/
spe_comment(f, 0, "Computing stencil fail mask and updating fragment mask");
@@ -1684,12 +1684,12 @@ gen_stencil_depth_test(struct spe_function *f,
spe_comment(f, 0, facing == CELL_FACING_FRONT
? "Computing front-facing stencil values"
: "Computing back-facing stencil values");
- gen_get_stencil_values(f, stencil, ref_value, dsa->depth.enabled, fbS_reg,
- &stencil_fail_values, &stencil_pass_depth_fail_values,
+ gen_get_stencil_values(f, stencil, ref_value, dsa->depth.enabled, fbS_reg,
+ &stencil_fail_values, &stencil_pass_depth_fail_values,
&stencil_pass_depth_pass_values);
- }
+ }
- /* We now have all the stencil values we need. We also need
+ /* We now have all the stencil values we need. We also need
* the results of the depth test to figure out which
* stencil values will become the new stencil values. (Even if
* we aren't actually calculating stencil values, we need to apply
@@ -1943,7 +1943,7 @@ gen_depth_stencil(struct cell_context *cell,
spe_comment(f, 0, "Perform stencil test");
/* Note that fbZ_reg may not be set on entry, if stenciling
- * is enabled but there's no Z-buffer. The
+ * is enabled but there's no Z-buffer. The
* gen_stencil_depth_test() function must ignore the
* fbZ_reg register if depth is not enabled.
*/
@@ -2023,7 +2023,7 @@ gen_depth_stencil(struct cell_context *cell,
* should be much faster.
*
* \param cell the rendering context (in)
- * \param facing whether the generated code is for front-facing or
+ * \param facing whether the generated code is for front-facing or
* back-facing fragments
* \param f the generated function (in/out); on input, the function
* must already have been initialized. On exit, whatever
@@ -2182,7 +2182,7 @@ cell_gen_fragment_function(struct cell_context *cell,
if (cell->debug_flags & CELL_DEBUG_ASM) {
char buffer[1024];
- sprintf(buffer, "End %s-facing per-fragment ops: %d instructions",
+ sprintf(buffer, "End %s-facing per-fragment ops: %d instructions",
facing == CELL_FACING_FRONT ? "front" : "back", f->num_inst);
spe_comment(f, -4, buffer);
}
diff --git a/src/gallium/drivers/cell/ppu/cell_gen_fragment.h b/src/gallium/drivers/cell/ppu/cell_gen_fragment.h
index 21b35d1..0519463 100644
--- a/src/gallium/drivers/cell/ppu/cell_gen_fragment.h
+++ b/src/gallium/drivers/cell/ppu/cell_gen_fragment.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/ppu/cell_pipe_state.h b/src/gallium/drivers/cell/ppu/cell_pipe_state.h
index 1889bd5..ab40183 100644
--- a/src/gallium/drivers/cell/ppu/cell_pipe_state.h
+++ b/src/gallium/drivers/cell/ppu/cell_pipe_state.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/ppu/cell_render.c b/src/gallium/drivers/cell/ppu/cell_render.c
index f648482..e9e7c76 100644
--- a/src/gallium/drivers/cell/ppu/cell_render.c
+++ b/src/gallium/drivers/cell/ppu/cell_render.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
diff --git a/src/gallium/drivers/cell/ppu/cell_render.h b/src/gallium/drivers/cell/ppu/cell_render.h
index 826dcba..fa2d834 100644
--- a/src/gallium/drivers/cell/ppu/cell_render.h
+++ b/src/gallium/drivers/cell/ppu/cell_render.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef CELL_RENDER_H
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.c b/src/gallium/drivers/cell/ppu/cell_screen.c
index 8d2b4b9..7b06019 100644
--- a/src/gallium/drivers/cell/ppu/cell_screen.c
+++ b/src/gallium/drivers/cell/ppu/cell_screen.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/ppu/cell_screen.h b/src/gallium/drivers/cell/ppu/cell_screen.h
index baff9d3..dc60213 100644
--- a/src/gallium/drivers/cell/ppu/cell_screen.h
+++ b/src/gallium/drivers/cell/ppu/cell_screen.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -42,7 +42,7 @@ struct cell_screen {
/* Increments whenever textures are modified. Contexts can track
* this.
*/
- unsigned timestamp;
+ unsigned timestamp;
};
static INLINE struct cell_screen *
diff --git a/src/gallium/drivers/cell/ppu/cell_spu.c b/src/gallium/drivers/cell/ppu/cell_spu.c
index 39284f3..ed0e39d 100644
--- a/src/gallium/drivers/cell/ppu/cell_spu.c
+++ b/src/gallium/drivers/cell/ppu/cell_spu.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -104,7 +104,7 @@ wait_mbox_message(spe_context_ptr_t ctx)
if (count == 1) {
return data;
}
-
+
if (count < 0) {
/* error */ ;
}
@@ -187,7 +187,7 @@ cell_start_spus(struct cell_context *cell)
fprintf(stderr, "spe_program_load() failed\n");
exit(1);
}
-
+
pthread_create(&cell_global.spe_threads[i], /* returned thread handle */
NULL, /* pthread attribs */
&cell_thread_function, /* start routine */
diff --git a/src/gallium/drivers/cell/ppu/cell_spu.h b/src/gallium/drivers/cell/ppu/cell_spu.h
index c93958a..e58dbad 100644
--- a/src/gallium/drivers/cell/ppu/cell_spu.h
+++ b/src/gallium/drivers/cell/ppu/cell_spu.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef CELL_SPU
diff --git a/src/gallium/drivers/cell/ppu/cell_state.h b/src/gallium/drivers/cell/ppu/cell_state.h
index 7adedcd..6906b51 100644
--- a/src/gallium/drivers/cell/ppu/cell_state.h
+++ b/src/gallium/drivers/cell/ppu/cell_state.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/ppu/cell_state_derived.c b/src/gallium/drivers/cell/ppu/cell_state_derived.c
index b723e79..44e158c 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_derived.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_derived.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_memory.h"
@@ -82,7 +82,7 @@ calculate_vertex_layout( struct cell_context *cell )
break;
case TGSI_SEMANTIC_COLOR:
- src = draw_find_shader_output(cell->draw, TGSI_SEMANTIC_COLOR,
+ src = draw_find_shader_output(cell->draw, TGSI_SEMANTIC_COLOR,
fs->info.input_semantic_index[i]);
assert(src >= 0);
draw_emit_vertex_attr(vinfo, EMIT_4F, colorInterp, src);
diff --git a/src/gallium/drivers/cell/ppu/cell_state_emit.c b/src/gallium/drivers/cell/ppu/cell_state_emit.c
index bb11c68..7a7474e 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_emit.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_emit.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_inlines.h"
@@ -180,7 +180,7 @@ static void
emit_state_cmd(struct cell_context *cell, uint cmd,
const void *state, uint state_size)
{
- uint32_t *dst = (uint32_t *)
+ uint32_t *dst = (uint32_t *)
cell_batch_alloc16(cell, ROUNDUP16(sizeof(opcode_t) + state_size));
*dst = cmd;
memcpy(dst + 4, state, state_size);
diff --git a/src/gallium/drivers/cell/ppu/cell_state_emit.h b/src/gallium/drivers/cell/ppu/cell_state_emit.h
index 59f8aff..9422685 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_emit.h
+++ b/src/gallium/drivers/cell/ppu/cell_state_emit.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef CELL_STATE_EMIT_H
diff --git a/src/gallium/drivers/cell/ppu/cell_state_shader.c b/src/gallium/drivers/cell/ppu/cell_state_shader.c
index ddf1477..dfbd9e2 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_shader.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_shader.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "pipe/p_defines.h"
diff --git a/src/gallium/drivers/cell/ppu/cell_state_vertex.c b/src/gallium/drivers/cell/ppu/cell_state_vertex.c
index a065d68..48a55dc 100644
--- a/src/gallium/drivers/cell/ppu/cell_state_vertex.c
+++ b/src/gallium/drivers/cell/ppu/cell_state_vertex.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/cell/ppu/cell_surface.c b/src/gallium/drivers/cell/ppu/cell_surface.c
index 7774544..1d03d71 100644
--- a/src/gallium/drivers/cell/ppu/cell_surface.c
+++ b/src/gallium/drivers/cell/ppu/cell_surface.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_surface.h"
diff --git a/src/gallium/drivers/cell/ppu/cell_surface.h b/src/gallium/drivers/cell/ppu/cell_surface.h
index 9e58f32..17b1330 100644
--- a/src/gallium/drivers/cell/ppu/cell_surface.h
+++ b/src/gallium/drivers/cell/ppu/cell_surface.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/cell/ppu/cell_texture.c b/src/gallium/drivers/cell/ppu/cell_texture.c
index 946a705..1782360 100644
--- a/src/gallium/drivers/cell/ppu/cell_texture.c
+++ b/src/gallium/drivers/cell/ppu/cell_texture.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
* Authors:
@@ -49,7 +49,7 @@
static boolean
-cell_resource_layout(struct pipe_screen *screen,
+cell_resource_layout(struct pipe_screen *screen,
struct cell_resource *ct)
{
struct pipe_resource *pt = &ct->base;
@@ -88,7 +88,7 @@ cell_resource_layout(struct pipe_screen *screen,
}
ct->data = align_malloc(ct->buffer_size, 16);
-
+
return ct->data != NULL;
}
@@ -107,7 +107,7 @@ cell_displaytarget_layout(struct pipe_screen *screen,
ct->dt = winsys->displaytarget_create(winsys,
ct->base.bind,
ct->base.format,
- ct->base.width0,
+ ct->base.width0,
ct->base.height0,
16,
&ct->dt_stride );
@@ -267,13 +267,13 @@ untwiddle_image_uint(uint w, uint h, uint tile_size, uint *dst,
dst_stride /= 4; /* convert from bytes to pixels */
tile_buf = align_malloc(tile_size * tile_size * 4, 16);
-
+
/* loop over src tiles */
for (it = 0; it < h_t; it++) {
for (jt = 0; jt < w_t; jt++) {
/* start of src tile: */
const uint *tsrc = src + (it * w_t + jt) * tile_size2;
-
+
twiddle_tile(tsrc, tile_buf);
tsrc = tile_buf;
@@ -330,7 +330,7 @@ cell_create_surface(struct pipe_context *ctx,
}
-static void
+static void
cell_surface_destroy(struct pipe_context *ctx, struct pipe_surface *surf)
{
pipe_resource_reference(&surf->texture, NULL);
@@ -387,7 +387,7 @@ cell_get_transfer(struct pipe_context *ctx,
}
-static void
+static void
cell_transfer_destroy(struct pipe_context *ctx, struct pipe_transfer *t)
{
struct cell_transfer *transfer = cell_transfer(t);
@@ -459,7 +459,7 @@ cell_transfer_map(struct pipe_context *ctx, struct pipe_transfer *transfer)
enum pipe_format format = pt->format;
unsigned blocksize = util_format_get_blocksize(format);
- ctrans->map = (ct->mapped +
+ ctrans->map = (ct->mapped +
ctrans->offset +
ctrans->base.box.y / util_format_get_blockheight(format) * stride +
ctrans->base.box.x / util_format_get_blockwidth(format) * blocksize);
@@ -507,7 +507,7 @@ cell_transfer_unmap(struct pipe_context *ctx,
// xxx fix
}
}
-
+
align_free(ctrans->map);
}
else {
@@ -606,7 +606,7 @@ cell_resource_from_handle(struct pipe_screen *screen,
}
-static boolean
+static boolean
cell_resource_get_handle(struct pipe_screen *scree,
struct pipe_resource *tex,
struct winsys_handle *handle)
diff --git a/src/gallium/drivers/cell/ppu/cell_texture.h b/src/gallium/drivers/cell/ppu/cell_texture.h
index bd8224b..a483980 100644
--- a/src/gallium/drivers/cell/ppu/cell_texture.h
+++ b/src/gallium/drivers/cell/ppu/cell_texture.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef CELL_TEXTURE_H
diff --git a/src/gallium/drivers/cell/ppu/cell_vbuf.c b/src/gallium/drivers/cell/ppu/cell_vbuf.c
index 37b7195..0bc670b 100644
--- a/src/gallium/drivers/cell/ppu/cell_vbuf.c
+++ b/src/gallium/drivers/cell/ppu/cell_vbuf.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -142,8 +142,8 @@ cell_vbuf_map_vertices(struct vbuf_render *vbr)
}
-static void
-cell_vbuf_unmap_vertices(struct vbuf_render *vbr,
+static void
+cell_vbuf_unmap_vertices(struct vbuf_render *vbr,
ushort min_index,
ushort max_index )
{
diff --git a/src/gallium/drivers/cell/ppu/cell_vbuf.h b/src/gallium/drivers/cell/ppu/cell_vbuf.h
index d265cbf..b4dc64e 100644
--- a/src/gallium/drivers/cell/ppu/cell_vbuf.h
+++ b/src/gallium/drivers/cell/ppu/cell_vbuf.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef CELL_VBUF_H
diff --git a/src/gallium/drivers/cell/ppu/cell_vertex_fetch.c b/src/gallium/drivers/cell/ppu/cell_vertex_fetch.c
index 9cba537..e27e103 100644
--- a/src/gallium/drivers/cell/ppu/cell_vertex_fetch.c
+++ b/src/gallium/drivers/cell/ppu/cell_vertex_fetch.c
@@ -51,7 +51,7 @@
* \c row2, and \c row3 are scratch and can be modified by the generated code.
* Furthermore, these registers will be released, via calls to
* \c release_register, by this function.
- *
+ *
* \note
* This function requires that four temporary are available on entry.
*/
@@ -173,7 +173,7 @@ emit_fetch(struct spe_function *p,
spe_lqd(p, v2, in_ptr, (2 + offset[0]) * 16);
spe_lqd(p, v3, in_ptr, (3 + offset[0]) * 16);
offset[0] += 4;
-
+
switch (bytes) {
case 1:
scale_signed = 1.0f / 127.0f;
@@ -230,7 +230,7 @@ emit_fetch(struct spe_function *p,
float_one = spe_allocate_available_register(p);
spe_il(p, float_one, 1);
spe_cuflt(p, float_one, float_one, 0);
-
+
if (count < 3) {
float_zero = spe_allocate_available_register(p);
spe_il(p, float_zero, 0);
@@ -290,7 +290,7 @@ void cell_update_vertex_fetch(struct draw_context *draw)
break;
}
}
-
+
if (j == i) {
unique_attr_formats++;
}
@@ -318,7 +318,7 @@ void cell_update_vertex_fetch(struct draw_context *draw)
unsigned offset;
if (function_index[i] == i) {
- cell->attrib_fetch_offsets[i] = (unsigned) ((void *) p->csr
+ cell->attrib_fetch_offsets[i] = (unsigned) ((void *) p->csr
- (void *) p->store);
offset = 0;
@@ -336,7 +336,7 @@ void cell_update_vertex_fetch(struct draw_context *draw)
/* Use the same function entry-point as a previously seen attribute
* with the same format.
*/
- cell->attrib_fetch_offsets[i] =
+ cell->attrib_fetch_offsets[i] =
cell->attrib_fetch_offsets[function_index[i]];
}
}
diff --git a/src/gallium/drivers/cell/ppu/cell_vertex_shader.c b/src/gallium/drivers/cell/ppu/cell_vertex_shader.c
index 3d389d6..16cadca 100644
--- a/src/gallium/drivers/cell/ppu/cell_vertex_shader.c
+++ b/src/gallium/drivers/cell/ppu/cell_vertex_shader.c
@@ -61,7 +61,7 @@ cell_vertex_shader_queue_flush(struct draw_context *draw)
assert(draw->vs.queue_nr != 0);
- /* XXX: do this on statechange:
+ /* XXX: do this on statechange:
*/
draw_update_vertex_fetch(draw);
cell_update_vertex_fetch(draw);
@@ -71,7 +71,7 @@ cell_vertex_shader_queue_flush(struct draw_context *draw)
batch[0] = CELL_CMD_STATE_ATTRIB_FETCH;
cf = (struct cell_attribute_fetch_code *) (&batch[1]);
cf->base = (uint64_t) cell->attrib_fetch.store;
- cf->size = ROUNDUP16((unsigned)((void *) cell->attrib_fetch.csr
+ cf->size = ROUNDUP16((unsigned)((void *) cell->attrib_fetch.csr
- (void *) cell->attrib_fetch.store));
diff --git a/src/gallium/drivers/cell/spu/spu_colorpack.h b/src/gallium/drivers/cell/spu/spu_colorpack.h
index d7ce005..b2e6b69 100644
--- a/src/gallium/drivers/cell/spu/spu_colorpack.h
+++ b/src/gallium/drivers/cell/spu/spu_colorpack.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -41,7 +41,7 @@ spu_pack_R8G8B8A8(vector float rgba)
vector unsigned int out = spu_convtu(rgba, 32);
out = spu_shuffle(out, out, ((vector unsigned char) {
- 0, 4, 8, 12, 0, 0, 0, 0,
+ 0, 4, 8, 12, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 }) );
return spu_extract(out, 0);
@@ -53,7 +53,7 @@ spu_pack_A8R8G8B8(vector float rgba)
{
vector unsigned int out = spu_convtu(rgba, 32);
out = spu_shuffle(out, out, ((vector unsigned char) {
- 12, 0, 4, 8, 0, 0, 0, 0,
+ 12, 0, 4, 8, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0}) );
return spu_extract(out, 0);
}
@@ -64,7 +64,7 @@ spu_pack_B8G8R8A8(vector float rgba)
{
vector unsigned int out = spu_convtu(rgba, 32);
out = spu_shuffle(out, out, ((vector unsigned char) {
- 8, 4, 0, 12, 0, 0, 0, 0,
+ 8, 4, 0, 12, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0}) );
return spu_extract(out, 0);
}
diff --git a/src/gallium/drivers/cell/spu/spu_command.c b/src/gallium/drivers/cell/spu/spu_command.c
index f16cabc..56a56dc 100644
--- a/src/gallium/drivers/cell/spu/spu_command.c
+++ b/src/gallium/drivers/cell/spu/spu_command.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/spu/spu_command.h b/src/gallium/drivers/cell/spu/spu_command.h
index 83dcdad..a935344 100644
--- a/src/gallium/drivers/cell/spu/spu_command.h
+++ b/src/gallium/drivers/cell/spu/spu_command.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
extern void
diff --git a/src/gallium/drivers/cell/spu/spu_dcache.c b/src/gallium/drivers/cell/spu/spu_dcache.c
index a6d6763..3c65d0b 100644
--- a/src/gallium/drivers/cell/spu/spu_dcache.c
+++ b/src/gallium/drivers/cell/spu/spu_dcache.c
@@ -100,7 +100,7 @@ spu_dcache_fetch_unaligned(qword *dst, unsigned ea, unsigned size)
*(dst++) = si_or((qword) spu_slqwbyte(hi, shift), si_il(0));
}
}
-
+
ASSERT((ea + i) == last_read);
ASSERT(dst == last_write);
}
@@ -114,7 +114,7 @@ spu_dcache_mark_dirty(unsigned ea, unsigned size)
{
unsigned i;
const unsigned aligned_start = (ea & ALIGN_MASK);
- const unsigned aligned_end = (ea + size + (LINE_SIZE - 1))
+ const unsigned aligned_end = (ea + size + (LINE_SIZE - 1))
& ALIGN_MASK;
diff --git a/src/gallium/drivers/cell/spu/spu_exec.c b/src/gallium/drivers/cell/spu/spu_exec.c
index e4ebeb5..306e8c5 100644
--- a/src/gallium/drivers/cell/spu/spu_exec.c
+++ b/src/gallium/drivers/cell/spu/spu_exec.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -661,7 +661,7 @@ fetch_texel( struct spu_sampler *sampler,
qword rgba[4];
qword out[4];
- sampler->get_samples(sampler, s->f, t->f, p->f, lodbias,
+ sampler->get_samples(sampler, s->f, t->f, p->f, lodbias,
(float (*)[4]) rgba);
_transpose_matrix4x4((vec_float4 *) out, (vec_float4 *) rgba);
diff --git a/src/gallium/drivers/cell/spu/spu_exec.h b/src/gallium/drivers/cell/spu/spu_exec.h
index 68f4479..0ee0b4d 100644
--- a/src/gallium/drivers/cell/spu/spu_exec.h
+++ b/src/gallium/drivers/cell/spu/spu_exec.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#if !defined SPU_EXEC_H
@@ -100,7 +100,7 @@ struct spu_exec_machine
* 1 address
*/
PIPE_ALIGN_VAR(16)
- struct spu_exec_vector Temps[TGSI_EXEC_NUM_TEMPS
+ struct spu_exec_vector Temps[TGSI_EXEC_NUM_TEMPS
+ TGSI_EXEC_NUM_TEMP_EXTRAS + 1];
struct spu_exec_vector *Addrs;
diff --git a/src/gallium/drivers/cell/spu/spu_funcs.c b/src/gallium/drivers/cell/spu/spu_funcs.c
index 98919c4..c7be85e 100644
--- a/src/gallium/drivers/cell/spu/spu_funcs.c
+++ b/src/gallium/drivers/cell/spu/spu_funcs.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/spu/spu_funcs.h b/src/gallium/drivers/cell/spu/spu_funcs.h
index 3adb6ae..d7afd15 100644
--- a/src/gallium/drivers/cell/spu/spu_funcs.h
+++ b/src/gallium/drivers/cell/spu/spu_funcs.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SPU_FUNCS_H
diff --git a/src/gallium/drivers/cell/spu/spu_main.c b/src/gallium/drivers/cell/spu/spu_main.c
index 97c86d1..f0a3d30 100644
--- a/src/gallium/drivers/cell/spu/spu_main.c
+++ b/src/gallium/drivers/cell/spu/spu_main.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/spu/spu_main.h b/src/gallium/drivers/cell/spu/spu_main.h
index a9d72f8..0cb7ec9 100644
--- a/src/gallium/drivers/cell/spu/spu_main.h
+++ b/src/gallium/drivers/cell/spu/spu_main.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SPU_MAIN_H
diff --git a/src/gallium/drivers/cell/spu/spu_per_fragment_op.c b/src/gallium/drivers/cell/spu/spu_per_fragment_op.c
index 3b95660..28e5059 100644
--- a/src/gallium/drivers/cell/spu/spu_per_fragment_op.c
+++ b/src/gallium/drivers/cell/spu/spu_per_fragment_op.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
diff --git a/src/gallium/drivers/cell/spu/spu_per_fragment_op.h b/src/gallium/drivers/cell/spu/spu_per_fragment_op.h
index f817abf..46fe717 100644
--- a/src/gallium/drivers/cell/spu/spu_per_fragment_op.h
+++ b/src/gallium/drivers/cell/spu/spu_per_fragment_op.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SPU_PER_FRAGMENT_OP
diff --git a/src/gallium/drivers/cell/spu/spu_render.c b/src/gallium/drivers/cell/spu/spu_render.c
index 14987e3..2c6436b 100644
--- a/src/gallium/drivers/cell/spu/spu_render.c
+++ b/src/gallium/drivers/cell/spu/spu_render.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -325,7 +325,7 @@ cmd_render(const struct cell_command_render *render, uint *pos_incr)
vs6 = si_mpya(vs6, vertex_sizes, verticess);
vs7 = si_mpya(vs7, vertex_sizes, verticess);
- /* Select the appropriate call based on the number of vertices
+ /* Select the appropriate call based on the number of vertices
* remaining */
switch(num_indexes - j) {
default: drawn += tri_draw(vs7, tx, ty);
diff --git a/src/gallium/drivers/cell/spu/spu_render.h b/src/gallium/drivers/cell/spu/spu_render.h
index 493434f..7e4fa8f 100644
--- a/src/gallium/drivers/cell/spu/spu_render.h
+++ b/src/gallium/drivers/cell/spu/spu_render.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/spu/spu_shuffle.h b/src/gallium/drivers/cell/spu/spu_shuffle.h
index 74f2a0b..b4d9efc 100644
--- a/src/gallium/drivers/cell/spu/spu_shuffle.h
+++ b/src/gallium/drivers/cell/spu/spu_shuffle.h
@@ -4,7 +4,7 @@
/*
* Generate shuffle patterns with minimal fuss.
*
- * Based on ideas from
+ * Based on ideas from
* http://www.insomniacgames.com/tech/articles/0408/files/shuffles.pdf
*
* A-P indicates 0-15th position in first vector
@@ -24,10 +24,10 @@
* 8 indicates 0x80
* 0 indicates 0x00
*
- * The macros SHUFFLE4() SHUFFLE8() and SHUFFLE16() provide a const vector
+ * The macros SHUFFLE4() SHUFFLE8() and SHUFFLE16() provide a const vector
* unsigned char literal suitable for use with spu_shuffle().
*
- * The macros SHUFB4() SHUFB8() and SHUFB16() provide a const qword vector
+ * The macros SHUFB4() SHUFB8() and SHUFB16() provide a const qword vector
* literal suitable for use with si_shufb().
*
*
@@ -35,7 +35,7 @@
* SHUFB4(A,A,A,A)
* expands to :
* ((const qword){0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3})
- *
+ *
* SHUFFLE8(A,B,a,b,C,c,8,8)
* expands to :
* ((const vector unsigned char){0x00,0x01,0x02,0x03,0x10,0x11,0x12,0x13,
diff --git a/src/gallium/drivers/cell/spu/spu_texture.c b/src/gallium/drivers/cell/spu/spu_texture.c
index 69784c8..aa5754a 100644
--- a/src/gallium/drivers/cell/spu/spu_texture.c
+++ b/src/gallium/drivers/cell/spu/spu_texture.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -90,9 +90,9 @@ get_four_texels(const struct spu_texture_level *tlevel, uint face,
qword texel_offset = si_a(si_mpyui(offset_y, 32), offset_x);
texel_offset = si_mpyui(texel_offset, 4);
-
+
vec_uint4 offset = (vec_uint4) si_a(tile_offset, texel_offset);
-
+
texture_ea = texture_ea + face * tlevel->bytes_per_image;
spu_dcache_fetch_unaligned((qword *) & texels[0],
@@ -604,7 +604,7 @@ sample_texture_cube(vector float s, vector float t, vector float r,
/* Compute cube faces referenced by the four sets of texcoords.
* XXX we should SIMD-ize this.
*/
- for (p = 0; p < 4; p++) {
+ for (p = 0; p < 4; p++) {
float rx = spu_extract(s, p);
float ry = spu_extract(t, p);
float rz = spu_extract(r, p);
@@ -621,7 +621,7 @@ sample_texture_cube(vector float s, vector float t, vector float r,
}
else {
/* BAD! The four texcoords refer to different faces */
- for (p = 0; p < 4; p++) {
+ for (p = 0; p < 4; p++) {
vector float c[4];
spu.sample_texture_2d[unit](spu_splats(newS[p]), spu_splats(newT[p]),
diff --git a/src/gallium/drivers/cell/spu/spu_texture.h b/src/gallium/drivers/cell/spu/spu_texture.h
index 7b75b00..d0a06dd 100644
--- a/src/gallium/drivers/cell/spu/spu_texture.h
+++ b/src/gallium/drivers/cell/spu/spu_texture.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SPU_TEXTURE_H
diff --git a/src/gallium/drivers/cell/spu/spu_tgsi_exec.h b/src/gallium/drivers/cell/spu/spu_tgsi_exec.h
index 6f2a3d3..36fff68 100644
--- a/src/gallium/drivers/cell/spu/spu_tgsi_exec.h
+++ b/src/gallium/drivers/cell/spu/spu_tgsi_exec.h
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2009-2010 VMware, Inc. All rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SPU_TGSI_EXEC_H
diff --git a/src/gallium/drivers/cell/spu/spu_tile.c b/src/gallium/drivers/cell/spu/spu_tile.c
index 6905015..df141ed 100644
--- a/src/gallium/drivers/cell/spu/spu_tile.c
+++ b/src/gallium/drivers/cell/spu/spu_tile.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/spu/spu_tile.h b/src/gallium/drivers/cell/spu/spu_tile.h
index 7bfb52b..5395b12 100644
--- a/src/gallium/drivers/cell/spu/spu_tile.h
+++ b/src/gallium/drivers/cell/spu/spu_tile.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SPU_TILE_H
diff --git a/src/gallium/drivers/cell/spu/spu_tri.c b/src/gallium/drivers/cell/spu/spu_tri.c
index efeebca..8bd5563 100644
--- a/src/gallium/drivers/cell/spu/spu_tri.c
+++ b/src/gallium/drivers/cell/spu/spu_tri.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -386,7 +386,7 @@ flush_spans(void)
}
/* XXX this loop could be moved into the above switch cases... */
-
+
/* Setup for mask calculation */
const vec_int4 quad_LlRr = setup.span.quad;
const vec_int4 quad_RrLl = spu_rlqwbyte(quad_LlRr, 8);
@@ -403,11 +403,11 @@ flush_spans(void)
* Computes mask to indicate which pixels in the 2x2 quad are actually
* inside the triangle's bounds.
*/
-
+
/* Calculate ({x,x+1,x,x+1} >= {l[0],l[0],l[1],l[1]}) */
const mask_t gt_LLll_xs = spu_cmpgt(quad_LLll, xs);
- const mask_t gte_xs_LLll = spu_nand(gt_LLll_xs, gt_LLll_xs);
-
+ const mask_t gte_xs_LLll = spu_nand(gt_LLll_xs, gt_LLll_xs);
+
/* Calculate ({r[0],r[0],r[1],r[1]} > {x,x+1,x,x+1}) */
const mask_t gt_RRrr_xs = spu_cmpgt(quad_RRrr, xs);
@@ -431,7 +431,7 @@ print_vertex(const struct vertex_header *v)
uint i;
fprintf(stderr, " Vertex: (%p)\n", v);
for (i = 0; i < spu.vertex_info.num_attribs; i++) {
- fprintf(stderr, " %d: %f %f %f %f\n", i,
+ fprintf(stderr, " %d: %f %f %f %f\n", i,
spu_extract(v->data[i], 0),
spu_extract(v->data[i], 1),
spu_extract(v->data[i], 2),
@@ -578,7 +578,7 @@ setup_sort_vertices(const qword vs)
* Compute a0 for a constant-valued coefficient (GL_FLAT shading).
* The value value comes from vertex->data[slot].
* The result will be put into setup.coef[slot].a0.
- * \param slot which attribute slot
+ * \param slot which attribute slot
*/
static INLINE void
const_coeff4(uint slot)
@@ -614,7 +614,7 @@ tri_linear_coeff4(uint slot)
vector float tempx = spu_mul(setup.coef[slot].dadx, xxxx);
vector float tempy = spu_mul(setup.coef[slot].dady, yyyy);
-
+
setup.coef[slot].a0 = spu_sub(vmin_d, spu_add(tempx, tempy));
}
@@ -658,7 +658,7 @@ tri_persp_coeff4(uint slot)
vector float tempx = spu_mul(setup.coef[slot].dadx, xxxx);
vector float tempy = spu_mul(setup.coef[slot].dady, yyyy);
-
+
setup.coef[slot].a0 = spu_sub(vmin_d, spu_add(tempx, tempy));
}
@@ -752,7 +752,7 @@ subtriangle(struct edge *eleft, struct edge *eright, unsigned lines)
finish_y -= sy;
/*
- printf("%s %d %d\n", __FUNCTION__, start_y, finish_y);
+ printf("%s %d %d\n", __FUNCTION__, start_y, finish_y);
*/
for (y = start_y; y < finish_y; y++) {
diff --git a/src/gallium/drivers/cell/spu/spu_tri.h b/src/gallium/drivers/cell/spu/spu_tri.h
index 82e3b19..22c8fbd 100644
--- a/src/gallium/drivers/cell/spu/spu_tri.h
+++ b/src/gallium/drivers/cell/spu/spu_tri.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/cell/spu/spu_vertex_fetch.c b/src/gallium/drivers/cell/spu/spu_vertex_fetch.c
index 0879639..9a984dc 100644
--- a/src/gallium/drivers/cell/spu/spu_vertex_fetch.c
+++ b/src/gallium/drivers/cell/spu/spu_vertex_fetch.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* (C) Copyright IBM Corporation 2008
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -58,14 +58,14 @@ fetch_shuffle_data[5] = {
0x00, 0x80, 0x80, 0x80, 0x01, 0x80, 0x80, 0x80,
0x02, 0x80, 0x80, 0x80, 0x03, 0x80, 0x80, 0x80,
},
-
+
/* Shuffle used by CVT_16_USCALED and CVT_16_SSCALED
*/
{
0x00, 0x01, 0x80, 0x80, 0x02, 0x03, 0x80, 0x80,
0x04, 0x05, 0x80, 0x80, 0x06, 0x07, 0x80, 0x80,
},
-
+
/* High value shuffle used by trans4x4.
*/
{
@@ -96,7 +96,7 @@ static void generic_vertex_fetch(struct spu_vs_context *draw,
ASSERT(count <= 4);
#if DRAW_DBG
- printf("SPU: %s count = %u, nr_attrs = %u\n",
+ printf("SPU: %s count = %u, nr_attrs = %u\n",
__FUNCTION__, count, nr_attrs);
#endif
@@ -114,7 +114,7 @@ static void generic_vertex_fetch(struct spu_vs_context *draw,
PIPE_ALIGN_VAR(16) qword in[2 * 4];
- /* Fetch four attributes for four vertices.
+ /* Fetch four attributes for four vertices.
*/
idx = 0;
for (i = 0; i < count; i++) {
diff --git a/src/gallium/drivers/cell/spu/spu_vertex_shader.c b/src/gallium/drivers/cell/spu/spu_vertex_shader.c
index 3e9804b..7964731 100644
--- a/src/gallium/drivers/cell/spu/spu_vertex_shader.c
+++ b/src/gallium/drivers/cell/spu/spu_vertex_shader.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
@@ -83,7 +83,7 @@ compute_clipmask(const float *clip, /*const*/ float plane[][4], unsigned nr)
/* Followed by any remaining ones:
*/
for (i = 6; i < nr; i++) {
- if (dot4(clip, plane[i]) < 0)
+ if (dot4(clip, plane[i]) < 0)
mask |= (1<num_vs_outputs));
mfc_get(tmpOut, vOut[j], vert_size, TAG_VERTEX_BUFFER, 0, 0);
@@ -196,10 +196,10 @@ spu_bind_vertex_shader(struct spu_vs_context *draw,
struct cell_shader_info *vs)
{
const unsigned immediate_addr = vs->immediates;
- const unsigned immediate_size =
+ const unsigned immediate_size =
ROUNDUP16((sizeof(float) * 4 * vs->num_immediates)
+ (immediate_addr & 0x0f));
-
+
mfc_get(immediates, immediate_addr & ~0x0f, immediate_size,
TAG_VERTEX_BUFFER, 0, 0);
diff --git a/src/gallium/drivers/cell/spu/spu_vertex_shader.h b/src/gallium/drivers/cell/spu/spu_vertex_shader.h
index 4c74f5e..20977f6 100644
--- a/src/gallium/drivers/cell/spu/spu_vertex_shader.h
+++ b/src/gallium/drivers/cell/spu/spu_vertex_shader.h
@@ -26,7 +26,7 @@ struct spu_vs_context {
spu_full_fetch_func fetch_func;
void *code;
} vertex_fetch;
-
+
/* Clip derived state:
*/
float plane[12][4];
@@ -49,7 +49,7 @@ static INLINE void spu_vertex_fetch(struct spu_vs_context *draw,
spu_update_vertex_fetch(draw);
draw->vertex_fetch.dirty = 0;
}
-
+
(*draw->vertex_fetch.fetch_func)(draw, machine, elts, count);
}
diff --git a/src/gallium/drivers/failover/Makefile b/src/gallium/drivers/failover/Makefile
index dfb7f5d..c5dbd1f 100644
--- a/src/gallium/drivers/failover/Makefile
+++ b/src/gallium/drivers/failover/Makefile
@@ -6,6 +6,6 @@ LIBNAME = failover
C_SOURCES = \
fo_state.c \
fo_state_emit.c \
- fo_context.c
+ fo_context.c
include ../../Makefile.template
diff --git a/src/gallium/drivers/failover/fo_context.c b/src/gallium/drivers/failover/fo_context.c
index e4d289c..ced52d6 100644
--- a/src/gallium/drivers/failover/fo_context.c
+++ b/src/gallium/drivers/failover/fo_context.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/failover/fo_context.h b/src/gallium/drivers/failover/fo_context.h
index 1afa6c9..2694b2d 100644
--- a/src/gallium/drivers/failover/fo_context.h
+++ b/src/gallium/drivers/failover/fo_context.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/failover/fo_state.c b/src/gallium/drivers/failover/fo_state.c
index c265f38..c04f321 100644
--- a/src/gallium/drivers/failover/fo_state.c
+++ b/src/gallium/drivers/failover/fo_state.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -35,13 +35,13 @@
/* This looks like a lot of work at the moment - we're keeping a
- * duplicate copy of the state up-to-date.
+ * duplicate copy of the state up-to-date.
*
* This can change in two ways:
* - With constant state objects we would only need to save a pointer,
* not the whole object.
* - By adding a callback in the state tracker to re-emit state. The
- * state tracker knows the current state already and can re-emit it
+ * state tracker knows the current state already and can re-emit it
* without additional complexity.
*
* This works as a proof-of-concept, but a final version will have
@@ -113,7 +113,7 @@ failover_set_stencil_ref( struct pipe_context *pipe,
failover->hw->set_stencil_ref( failover->hw, stencil_ref );
}
-static void
+static void
failover_set_clip_state( struct pipe_context *pipe,
const struct pipe_clip_state *clip )
{
@@ -312,7 +312,7 @@ failover_delete_vertex_elements_state( struct pipe_context *pipe,
FREE(state);
}
-static void
+static void
failover_set_polygon_stipple( struct pipe_context *pipe,
const struct pipe_poly_stipple *stipple )
{
@@ -366,7 +366,7 @@ failover_delete_rasterizer_state(struct pipe_context *pipe,
}
-static void
+static void
failover_set_scissor_state( struct pipe_context *pipe,
const struct pipe_scissor_state *scissor )
{
@@ -554,13 +554,13 @@ failover_set_vertex_sampler_views(struct pipe_context *pipe,
}
-static void
+static void
failover_set_viewport_state( struct pipe_context *pipe,
const struct pipe_viewport_state *viewport )
{
struct failover_context *failover = failover_context(pipe);
- failover->viewport = *viewport;
+ failover->viewport = *viewport;
failover->dirty |= FO_NEW_VIEWPORT;
failover->sw->set_viewport_state( failover->sw, viewport );
failover->hw->set_viewport_state( failover->hw, viewport );
diff --git a/src/gallium/drivers/failover/fo_state_emit.c b/src/gallium/drivers/failover/fo_state_emit.c
index 7f434ff..de13fad 100644
--- a/src/gallium/drivers/failover/fo_state_emit.c
+++ b/src/gallium/drivers/failover/fo_state_emit.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -31,13 +31,13 @@
#include "fo_context.h"
/* This looks like a lot of work at the moment - we're keeping a
- * duplicate copy of the state up-to-date.
+ * duplicate copy of the state up-to-date.
*
* This can change in two ways:
* - With constant state objects we would only need to save a pointer,
* not the whole object.
* - By adding a callback in the state tracker to re-emit state. The
- * state tracker knows the current state already and can re-emit it
+ * state tracker knows the current state already and can re-emit it
* without additional complexity.
*
* This works as a proof-of-concept, but a final version will have
@@ -46,7 +46,7 @@
/* Bring the software pipe uptodate with current state.
- *
+ *
* With constant state objects we would probably just send all state
* to both rasterizers all the time???
*/
diff --git a/src/gallium/drivers/failover/fo_winsys.h b/src/gallium/drivers/failover/fo_winsys.h
index 533122b..dc29259 100644
--- a/src/gallium/drivers/failover/fo_winsys.h
+++ b/src/gallium/drivers/failover/fo_winsys.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef FO_WINSYS_H
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index a572ad2..12d01b9 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -924,7 +924,7 @@ galahad_context_transfer_unmap(struct pipe_context *_context,
if (glhd_resource->map_count < 1) {
glhd_warn("context::transfer_unmap() called too many times"
- " (count = %d)\n", glhd_resource->map_count);
+ " (count = %d)\n", glhd_resource->map_count);
}
glhd_resource->map_count--;
diff --git a/src/gallium/drivers/i915/Makefile b/src/gallium/drivers/i915/Makefile
index b3f387f..ebd061b 100644
--- a/src/gallium/drivers/i915/Makefile
+++ b/src/gallium/drivers/i915/Makefile
@@ -26,6 +26,6 @@ C_SOURCES = \
i915_resource_buffer.c \
i915_fpc_emit.c \
i915_fpc_translate.c \
- i915_surface.c
+ i915_surface.c
include ../../Makefile.template
diff --git a/src/gallium/drivers/i915/i915_batch.h b/src/gallium/drivers/i915/i915_batch.h
index 6e93da7..7a99dde 100644
--- a/src/gallium/drivers/i915/i915_batch.h
+++ b/src/gallium/drivers/i915/i915_batch.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef I915_BATCH_H
diff --git a/src/gallium/drivers/i915/i915_blit.c b/src/gallium/drivers/i915/i915_blit.c
index 97c2566..fe65135 100644
--- a/src/gallium/drivers/i915/i915_blit.c
+++ b/src/gallium/drivers/i915/i915_blit.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -39,8 +39,8 @@ i915_fill_blit(struct i915_context *i915,
unsigned short dst_pitch,
struct i915_winsys_buffer *dst_buffer,
unsigned dst_offset,
- short x, short y,
- short w, short h,
+ short x, short y,
+ short w, short h,
unsigned color)
{
unsigned BR13, CMD;
@@ -88,7 +88,7 @@ i915_copy_blit(struct i915_context *i915,
struct i915_winsys_buffer *dst_buffer,
unsigned dst_offset,
short src_x, short src_y,
- short dst_x, short dst_y,
+ short dst_x, short dst_y,
short w, short h)
{
unsigned CMD, BR13;
diff --git a/src/gallium/drivers/i915/i915_blit.h b/src/gallium/drivers/i915/i915_blit.h
index d82d2f2..9743d20 100644
--- a/src/gallium/drivers/i915/i915_blit.h
+++ b/src/gallium/drivers/i915/i915_blit.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef I915_BLIT_H
diff --git a/src/gallium/drivers/i915/i915_clear.c b/src/gallium/drivers/i915/i915_clear.c
index 6d824a5..03693a9 100644
--- a/src/gallium/drivers/i915/i915_clear.c
+++ b/src/gallium/drivers/i915/i915_clear.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors:
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c
index 847dd6d..0d1baea 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "i915_context.h"
@@ -72,7 +72,7 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0,
i915->current.constants[PIPE_SHADER_VERTEX],
- (i915->current.num_user_constants[PIPE_SHADER_VERTEX] *
+ (i915->current.num_user_constants[PIPE_SHADER_VERTEX] *
4 * sizeof(float)));
/*
@@ -103,7 +103,7 @@ static void i915_destroy(struct pipe_context *pipe)
int i;
draw_destroy(i915->draw);
-
+
if(i915->batch)
i915->iws->batchbuffer_destroy(i915->batch);
diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h
index 7103a1b..eeca6a3 100644
--- a/src/gallium/drivers/i915/i915_context.h
+++ b/src/gallium/drivers/i915/i915_context.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef I915_CONTEXT_H
@@ -47,18 +47,18 @@ struct i915_winsys_batchbuffer;
#define I915_DYNAMIC_MODES4 0
#define I915_DYNAMIC_DEPTHSCALE_0 1 /* just the header */
-#define I915_DYNAMIC_DEPTHSCALE_1 2
+#define I915_DYNAMIC_DEPTHSCALE_1 2
#define I915_DYNAMIC_IAB 3
#define I915_DYNAMIC_BC_0 4 /* just the header */
#define I915_DYNAMIC_BC_1 5
-#define I915_DYNAMIC_BFO_0 6
+#define I915_DYNAMIC_BFO_0 6
#define I915_DYNAMIC_BFO_1 7
-#define I915_DYNAMIC_STP_0 8
-#define I915_DYNAMIC_STP_1 9
-#define I915_DYNAMIC_SC_ENA_0 10
-#define I915_DYNAMIC_SC_RECT_0 11
-#define I915_DYNAMIC_SC_RECT_1 12
-#define I915_DYNAMIC_SC_RECT_2 13
+#define I915_DYNAMIC_STP_0 8
+#define I915_DYNAMIC_STP_1 9
+#define I915_DYNAMIC_SC_ENA_0 10
+#define I915_DYNAMIC_SC_RECT_0 11
+#define I915_DYNAMIC_SC_RECT_1 12
+#define I915_DYNAMIC_SC_RECT_2 13
#define I915_MAX_DYNAMIC 14
@@ -75,7 +75,7 @@ struct i915_winsys_batchbuffer;
/* These must mach the order of LI0_STATE_* bits, as they will be used
* to generate hardware packets:
*/
-#define I915_CACHE_STATIC 0
+#define I915_CACHE_STATIC 0
#define I915_CACHE_DYNAMIC 1 /* handled specially */
#define I915_CACHE_SAMPLER 2
#define I915_CACHE_MAP 3
@@ -127,9 +127,9 @@ struct i915_fragment_shader
struct i915_cache_context;
/* Use to calculate differences between state emitted to hardware and
- * current driver-calculated state.
+ * current driver-calculated state.
*/
-struct i915_state
+struct i915_state
{
unsigned immediate[I915_MAX_IMMEDIATE];
unsigned dynamic[I915_MAX_DYNAMIC];
@@ -276,33 +276,33 @@ struct i915_context {
/***********************************************************************
- * i915_prim_emit.c:
+ * i915_prim_emit.c:
*/
struct draw_stage *i915_draw_render_stage( struct i915_context *i915 );
/***********************************************************************
- * i915_prim_vbuf.c:
+ * i915_prim_vbuf.c:
*/
struct draw_stage *i915_draw_vbuf_stage( struct i915_context *i915 );
/***********************************************************************
- * i915_state_emit.c:
+ * i915_state_emit.c:
*/
void i915_emit_hardware_state(struct i915_context *i915 );
/***********************************************************************
- * i915_clear.c:
+ * i915_clear.c:
*/
void i915_clear( struct pipe_context *pipe, unsigned buffers, const float *rgba,
double depth, unsigned stencil);
/***********************************************************************
- *
+ *
*/
void i915_init_state_functions( struct i915_context *i915 );
void i915_init_flush_functions( struct i915_context *i915 );
diff --git a/src/gallium/drivers/i915/i915_debug.c b/src/gallium/drivers/i915/i915_debug.c
index d7150c9..6d02901 100644
--- a/src/gallium/drivers/i915/i915_debug.c
+++ b/src/gallium/drivers/i915/i915_debug.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "i915_reg.h"
@@ -78,7 +78,7 @@ static boolean debug( struct debug_stream *stream, const char *name, unsigned le
{
unsigned i;
unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
-
+
if (len == 0) {
PRINTF(stream, "Error - zero length packet (0x%08x)\n", stream->ptr[0]);
assert(0);
@@ -91,11 +91,11 @@ static boolean debug( struct debug_stream *stream, const char *name, unsigned le
PRINTF(stream, "%s (%d dwords):\n", name, len);
for (i = 0; i < len; i++)
- PRINTF(stream, "\t0x%08x\n", ptr[i]);
+ PRINTF(stream, "\t0x%08x\n", ptr[i]);
PRINTF(stream, "\n");
stream->offset += len * sizeof(unsigned);
-
+
return TRUE;
}
@@ -119,33 +119,33 @@ static const char *get_prim_name( unsigned val )
}
}
-static boolean debug_prim( struct debug_stream *stream, const char *name,
+static boolean debug_prim( struct debug_stream *stream, const char *name,
boolean dump_floats,
unsigned len )
{
unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
const char *prim = get_prim_name( ptr[0] );
unsigned i;
-
+
PRINTF(stream, "%s %s (%d dwords):\n", name, prim, len);
- PRINTF(stream, "\t0x%08x\n", ptr[0]);
+ PRINTF(stream, "\t0x%08x\n", ptr[0]);
for (i = 1; i < len; i++) {
if (dump_floats)
- PRINTF(stream, "\t0x%08x // %f\n", ptr[i], *(float *)&ptr[i]);
+ PRINTF(stream, "\t0x%08x // %f\n", ptr[i], *(float *)&ptr[i]);
else
- PRINTF(stream, "\t0x%08x\n", ptr[i]);
+ PRINTF(stream, "\t0x%08x\n", ptr[i]);
}
-
+
PRINTF(stream, "\n");
stream->offset += len * sizeof(unsigned);
-
+
return TRUE;
}
-
+
@@ -181,12 +181,12 @@ static boolean debug_chain( struct debug_stream *stream, const char *name, unsig
PRINTF(stream, "\t0x%08x\n", ptr[i]);
stream->offset = ptr[1] & ~0x3;
-
+
if (stream->offset < old_offset)
- PRINTF(stream, "\n... skipping backwards from 0x%x --> 0x%x ...\n\n",
+ PRINTF(stream, "\n... skipping backwards from 0x%x --> 0x%x ...\n\n",
old_offset, stream->offset );
else
- PRINTF(stream, "\n... skipping from 0x%x --> 0x%x ...\n\n",
+ PRINTF(stream, "\n... skipping from 0x%x --> 0x%x ...\n\n",
old_offset, stream->offset );
@@ -278,7 +278,7 @@ static boolean debug_load_immediate( struct debug_stream *stream,
unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
unsigned bits = (ptr[0] >> 4) & 0xff;
unsigned j = 0;
-
+
PRINTF(stream, "%s (%d dwords, flags: %x):\n", name, len, bits);
PRINTF(stream, "\t0x%08x\n", ptr[j++]);
@@ -362,7 +362,7 @@ static boolean debug_load_immediate( struct debug_stream *stream,
BITS(stream, ptr[j], 7, 4, "blend dst factor");
FLAG(stream, ptr[j], 3, "depth write enable");
FLAG(stream, ptr[j], 2, "color write enable");
- BITS(stream, ptr[j], 1, 0, "provoking vertex");
+ BITS(stream, ptr[j], 1, 0, "provoking vertex");
j++;
}
@@ -372,10 +372,10 @@ static boolean debug_load_immediate( struct debug_stream *stream,
assert(j == len);
stream->offset += len * sizeof(unsigned);
-
+
return TRUE;
}
-
+
static boolean debug_load_indirect( struct debug_stream *stream,
@@ -385,7 +385,7 @@ static boolean debug_load_indirect( struct debug_stream *stream,
unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
unsigned bits = (ptr[0] >> 8) & 0x3f;
unsigned i, j = 0;
-
+
PRINTF(stream, "%s (%d dwords):\n", name, len);
PRINTF(stream, "\t0x%08x\n", ptr[j++]);
@@ -432,10 +432,10 @@ static boolean debug_load_indirect( struct debug_stream *stream,
assert(j == len);
stream->offset += len * sizeof(unsigned);
-
+
return TRUE;
}
-
+
static void BR13( struct debug_stream *stream,
unsigned val )
{
@@ -495,7 +495,7 @@ static void BR16( struct debug_stream *stream,
{
PRINTF(stream, "\t0x%08x -- color\n", val);
}
-
+
static boolean debug_copy_blit( struct debug_stream *stream,
const char *name,
unsigned len )
@@ -505,7 +505,7 @@ static boolean debug_copy_blit( struct debug_stream *stream,
PRINTF(stream, "%s (%d dwords):\n", name, len);
PRINTF(stream, "\t0x%08x\n", ptr[j++]);
-
+
BR13(stream, ptr[j++]);
BR22(stream, ptr[j++]);
BR23(stream, ptr[j++]);
@@ -570,7 +570,7 @@ static boolean debug_map_state( struct debug_stream *stream,
PRINTF(stream, "%s (%d dwords):\n", name, len);
PRINTF(stream, "\t0x%08x\n", ptr[j++]);
-
+
{
PRINTF(stream, "\t0x%08x\n", ptr[j]);
BITS(stream, ptr[j], 15, 0, "map mask");
@@ -622,7 +622,7 @@ static boolean debug_sampler_state( struct debug_stream *stream,
PRINTF(stream, "%s (%d dwords):\n", name, len);
PRINTF(stream, "\t0x%08x\n", ptr[j++]);
-
+
{
PRINTF(stream, "\t0x%08x\n", ptr[j]);
BITS(stream, ptr[j], 15, 0, "sampler mask");
@@ -702,7 +702,7 @@ static boolean debug_dest_vars( struct debug_stream *stream,
FLAG(stream, ptr[j], 1, "vert line stride offset");
j++;
}
-
+
stream->offset += len * sizeof(unsigned);
assert(j == len);
return TRUE;
@@ -730,7 +730,7 @@ static boolean debug_buf_info( struct debug_stream *stream,
MBZ (ptr[j], 2, 0);
j++;
}
-
+
PRINTF(stream, "\t0x%08x -- buffer base address\n", ptr[j++]);
stream->offset += len * sizeof(unsigned);
@@ -742,7 +742,7 @@ static boolean i915_debug_packet( struct debug_stream *stream )
{
unsigned *ptr = (unsigned *)(stream->ptr + stream->offset);
unsigned cmd = *ptr;
-
+
switch (((cmd >> 29) & 0x7)) {
case 0x0:
switch ((cmd >> 23) & 0x3f) {
@@ -770,7 +770,7 @@ static boolean i915_debug_packet( struct debug_stream *stream )
assert(0);
break;
case 0x2:
- switch ((cmd >> 22) & 0xff) {
+ switch ((cmd >> 22) & 0xff) {
case 0x50:
return debug_color_blit(stream, "XY_COLOR_BLT", (cmd & 0xff) + 2);
case 0x53:
@@ -780,7 +780,7 @@ static boolean i915_debug_packet( struct debug_stream *stream )
}
break;
case 0x3:
- switch ((cmd >> 24) & 0x1f) {
+ switch ((cmd >> 24) & 0x1f) {
case 0x6:
return debug(stream, "3DSTATE_ANTI_ALIASING", 1);
case 0x7:
@@ -792,7 +792,7 @@ static boolean i915_debug_packet( struct debug_stream *stream )
case 0xb:
return debug(stream, "3DSTATE_INDEPENDENT_ALPHA_BLEND", 1);
case 0xc:
- return debug(stream, "3DSTATE_MODES5", 1);
+ return debug(stream, "3DSTATE_MODES5", 1);
case 0xd:
return debug_modes4(stream, "3DSTATE_MODES4", 1);
case 0x15:
@@ -863,9 +863,9 @@ static boolean i915_debug_packet( struct debug_stream *stream )
return debug(stream, "", 1);
break;
case 0x1f:
- if ((cmd & (1 << 23)) == 0)
+ if ((cmd & (1 << 23)) == 0)
return debug_prim(stream, "3DPRIM (inline)", 1, (cmd & 0x1ffff) + 2);
- else if (cmd & (1 << 17))
+ else if (cmd & (1 << 17))
{
if ((cmd & 0xffff) == 0)
return debug_variable_length_prim(stream);
@@ -873,7 +873,7 @@ static boolean i915_debug_packet( struct debug_stream *stream )
return debug_prim(stream, "3DPRIM (indexed)", 0, (((cmd & 0xffff) + 1) / 2) + 1);
}
else
- return debug_prim(stream, "3DPRIM (indirect sequential)", 0, 2);
+ return debug_prim(stream, "3DPRIM (indirect sequential)", 0, 2);
break;
default:
return debug(stream, "", 0);
@@ -907,7 +907,7 @@ i915_dump_batchbuffer( struct i915_winsys_batchbuffer *batch )
debug_printf( "\n\nBATCH: ???\n");
return;
}
-
+
debug_printf( "\n\nBATCH: (%d)\n", (int)bytes / 4);
while (!done &&
diff --git a/src/gallium/drivers/i915/i915_debug.h b/src/gallium/drivers/i915/i915_debug.h
index 11af766..5f4a059 100644
--- a/src/gallium/drivers/i915/i915_debug.h
+++ b/src/gallium/drivers/i915/i915_debug.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/i915/i915_debug_fp.c b/src/gallium/drivers/i915/i915_debug_fp.c
index 50f49c5..66fdce8 100644
--- a/src/gallium/drivers/i915/i915_debug_fp.c
+++ b/src/gallium/drivers/i915/i915_debug_fp.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -254,7 +254,7 @@ print_dest_reg(struct debug_stream *stream, unsigned dword)
static void
-print_arith_op(struct debug_stream *stream,
+print_arith_op(struct debug_stream *stream,
unsigned opcode, const unsigned * program)
{
if (opcode != A0_NOP) {
@@ -288,7 +288,7 @@ print_arith_op(struct debug_stream *stream,
static void
-print_tex_op(struct debug_stream *stream,
+print_tex_op(struct debug_stream *stream,
unsigned opcode, const unsigned * program)
{
print_dest_reg(stream, program[0] | A0_DEST_CHANNEL_ALL);
@@ -298,7 +298,7 @@ print_tex_op(struct debug_stream *stream,
PRINTF(stream, "S[%d],", program[0] & T0_SAMPLER_NR_MASK);
- print_reg_type_nr(stream,
+ print_reg_type_nr(stream,
(program[1] >> T1_ADDRESS_REG_TYPE_SHIFT) &
REG_TYPE_MASK,
(program[1] >> T1_ADDRESS_REG_NR_SHIFT) & REG_NR_MASK);
@@ -306,12 +306,12 @@ print_tex_op(struct debug_stream *stream,
}
static void
-print_texkil_op(struct debug_stream *stream,
+print_texkil_op(struct debug_stream *stream,
unsigned opcode, const unsigned * program)
{
PRINTF(stream, "TEXKIL ");
- print_reg_type_nr(stream,
+ print_reg_type_nr(stream,
(program[1] >> T1_ADDRESS_REG_TYPE_SHIFT) &
REG_TYPE_MASK,
(program[1] >> T1_ADDRESS_REG_NR_SHIFT) & REG_NR_MASK);
@@ -319,18 +319,18 @@ print_texkil_op(struct debug_stream *stream,
}
static void
-print_dcl_op(struct debug_stream *stream,
+print_dcl_op(struct debug_stream *stream,
unsigned opcode, const unsigned * program)
{
PRINTF(stream, "%s ", opcodes[opcode]);
- print_dest_reg(stream,
+ print_dest_reg(stream,
program[0] | A0_DEST_CHANNEL_ALL);
PRINTF(stream, "\n");
}
void
-i915_disassemble_program(struct debug_stream *stream,
+i915_disassemble_program(struct debug_stream *stream,
const unsigned * program, unsigned sz)
{
unsigned i;
diff --git a/src/gallium/drivers/i915/i915_debug_private.h b/src/gallium/drivers/i915/i915_debug_private.h
index b3668d0..2260b03 100644
--- a/src/gallium/drivers/i915/i915_debug_private.h
+++ b/src/gallium/drivers/i915/i915_debug_private.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -31,7 +31,7 @@
#ifndef I915_DEBUG_PRIVATE_H
#define I915_DEBUG_PRIVATE_H
-struct debug_stream
+struct debug_stream
{
unsigned offset; /* current gtt offset */
char *ptr; /* pointer to gtt offset zero */
@@ -39,7 +39,7 @@ struct debug_stream
unsigned print_addresses;
};
-void i915_disassemble_program(struct debug_stream *stream,
+void i915_disassemble_program(struct debug_stream *stream,
const unsigned *program, unsigned sz);
#endif
diff --git a/src/gallium/drivers/i915/i915_flush.c b/src/gallium/drivers/i915/i915_flush.c
index a2c70b1..6b32645 100644
--- a/src/gallium/drivers/i915/i915_flush.c
+++ b/src/gallium/drivers/i915/i915_flush.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
@@ -52,7 +52,7 @@ static void i915_flush_pipe( struct pipe_context *pipe,
*/
if (flags & (PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_TEXTURE_CACHE)) {
unsigned flush = MI_FLUSH;
-
+
if (!(flags & PIPE_FLUSH_RENDER_CACHE))
flush |= INHIBIT_FLUSH_RENDER_CACHE;
diff --git a/src/gallium/drivers/i915/i915_fpc.h b/src/gallium/drivers/i915/i915_fpc.h
index 2f0f99d..d6b0b39 100644
--- a/src/gallium/drivers/i915/i915_fpc.h
+++ b/src/gallium/drivers/i915/i915_fpc.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -129,7 +129,7 @@ struct i915_fp_compile {
#define UREG_XYZW_CHANNEL_MASK 0x00ffff00
-/* One neat thing about the UREG representation:
+/* One neat thing about the UREG representation:
*/
static INLINE int
swizzle(int reg, uint x, uint y, uint z, uint w)
diff --git a/src/gallium/drivers/i915/i915_fpc_emit.c b/src/gallium/drivers/i915/i915_fpc_emit.c
index 76c24d2..af4f2e8 100644
--- a/src/gallium/drivers/i915/i915_fpc_emit.c
+++ b/src/gallium/drivers/i915/i915_fpc_emit.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "i915_reg.h"
@@ -232,7 +232,7 @@ uint i915_emit_texld( struct i915_fp_compile *p,
coord = tempReg;
}
- /* Don't worry about saturate as we only support
+ /* Don't worry about saturate as we only support
*/
if (destmask != A0_DEST_CHANNEL_ALL) {
/* if not writing to XYZW... */
@@ -250,7 +250,7 @@ uint i915_emit_texld( struct i915_fp_compile *p,
p->nr_tex_indirect++;
}
- *(p->csr++) = (opcode |
+ *(p->csr++) = (opcode |
T0_DEST( dest ) |
T0_SAMPLER( sampler ));
diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c
index 25c5321..d04a434 100644
--- a/src/gallium/drivers/i915/i915_fpc_translate.c
+++ b/src/gallium/drivers/i915/i915_fpc_translate.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -46,24 +46,24 @@
* Simple pass-through fragment shader to use when we don't have
* a real shader (or it fails to compile for some reason).
*/
-static unsigned passthrough[] =
+static unsigned passthrough[] =
{
_3DSTATE_PIXEL_SHADER_PROGRAM | ((2*3)-1),
/* declare input color:
*/
- (D0_DCL |
- (REG_TYPE_T << D0_TYPE_SHIFT) |
- (T_DIFFUSE << D0_NR_SHIFT) |
+ (D0_DCL |
+ (REG_TYPE_T << D0_TYPE_SHIFT) |
+ (T_DIFFUSE << D0_NR_SHIFT) |
D0_CHANNEL_ALL),
0,
0,
/* move to output color:
*/
- (A0_MOV |
- (REG_TYPE_OC << A0_DEST_TYPE_SHIFT) |
- A0_DEST_CHANNEL_ALL |
+ (A0_MOV |
+ (REG_TYPE_OC << A0_DEST_TYPE_SHIFT) |
+ A0_DEST_CHANNEL_ALL |
(REG_TYPE_T << A0_SRC0_TYPE_SHIFT) |
(T_DIFFUSE << A0_SRC0_NR_SHIFT)),
0x01230000, /* .xyzw */
@@ -124,7 +124,7 @@ i915_program_error(struct i915_fp_compile *p, const char *msg, ...)
char buffer[1024];
debug_printf("i915_program_error: ");
- va_start( args, msg );
+ va_start( args, msg );
util_vsnprintf( buffer, sizeof(buffer), msg, args );
va_end( args );
debug_printf("%s", buffer);
@@ -161,7 +161,7 @@ src_vector(struct i915_fp_compile *p,
* components wide. Could use a texcoord to pass these
* attributes if necessary, but that won't work in the general
* case.
- *
+ *
* We also use a texture coordinate to pass wpos when possible.
*/
@@ -412,7 +412,7 @@ emit_simple_arith_swap2(struct i915_fp_compile *p,
* SIN, COS -- could use another taylor step?
* LIT -- results seem a little different to sw mesa
* LOG -- different to mesa on negative numbers, but this is conformant.
- */
+ */
static void
i915_translate_instruction(struct i915_fp_compile *p,
const struct tgsi_full_instruction *inst)
@@ -439,9 +439,9 @@ i915_translate_instruction(struct i915_fp_compile *p,
src0 = src_vector(p, &inst->Src[0]);
src1 = src_vector(p, &inst->Src[1]);
src2 = src_vector(p, &inst->Src[2]);
- i915_emit_arith(p, A0_CMP,
+ i915_emit_arith(p, A0_CMP,
get_result_vector(p, &inst->Dst[0]),
- get_result_flags(inst),
+ get_result_flags(inst),
0, src0, src2, src1); /* NOTE: order of src2, src1 */
break;
@@ -463,7 +463,7 @@ i915_translate_instruction(struct i915_fp_compile *p,
tmp, A0_DEST_CHANNEL_X, 0,
tmp, i915_emit_const1f(p, (float) (M_PI * 2.0)), 0);
- /*
+ /*
* t0.xy = MUL x.xx11, x.x1111 ; x^2, x, 1, 1
* t0 = MUL t0.xyxy t0.xx11 ; x^4, x^3, x^2, 1
* t0 = MUL t0.xxz1 t0.z111 ; x^6 x^4 x^2 1
@@ -622,10 +622,10 @@ i915_translate_instruction(struct i915_fp_compile *p,
/* b*a + c*(1-a)
*
- * b*a + c - ca
+ * b*a + c - ca
*
- * tmp = b*a + c,
- * result = (-c)*a + tmp
+ * tmp = b*a + c,
+ * result = (-c)*a + tmp
*/
i915_emit_arith(p, A0_MAD, tmp,
flags & A0_DEST_CHANNEL_ALL, 0, src1, src0, src2);
@@ -689,11 +689,11 @@ i915_translate_instruction(struct i915_fp_compile *p,
get_result_vector(p, &inst->Dst[0]),
flags, 0, swizzle(tmp, X, X, X, X), 0, 0);
break;
-
+
case TGSI_OPCODE_RET:
/* XXX: no-op? */
break;
-
+
case TGSI_OPCODE_RCP:
src0 = src_vector(p, &inst->Src[0]);
@@ -718,7 +718,7 @@ i915_translate_instruction(struct i915_fp_compile *p,
src0 = src_vector(p, &inst->Src[0]);
tmp = i915_get_utemp(p);
- /*
+ /*
* t0.xy = MUL x.xx11, x.x1111 ; x^2, x, 1, 1
* t0 = MUL t0.xyxy t0.xx11 ; x^4, x^3, x^2, x
* t1 = MUL t0.xyyw t0.yz11 ; x^7 x^5 x^3 x
@@ -805,7 +805,7 @@ i915_translate_instruction(struct i915_fp_compile *p,
tmp, A0_DEST_CHANNEL_X, 0,
tmp, i915_emit_const1f(p, (float) (M_PI * 2.0)), 0);
- /*
+ /*
* t0.xy = MUL x.xx11, x.x1111 ; x^2, x, 1, 1
* t0 = MUL t0.xyxy t0.xx11 ; x^4, x^3, x^2, x
* t1 = MUL t0.xyyw t0.yz11 ; x^7 x^5 x^3 x
@@ -1078,7 +1078,7 @@ i915_fini_compile(struct i915_context *i915, struct i915_fp_compile *p)
/* patch in the program length */
p->declarations[0] |= program_size + decl_size - 2;
- /* Copy compilation results to fragment program struct:
+ /* Copy compilation results to fragment program struct:
*/
assert(!ifs->program);
ifs->program
@@ -1087,16 +1087,16 @@ i915_fini_compile(struct i915_context *i915, struct i915_fp_compile *p)
ifs->program_len = program_size + decl_size;
memcpy(ifs->program,
- p->declarations,
+ p->declarations,
decl_size * sizeof(uint));
- memcpy(ifs->program + decl_size,
- p->program,
+ memcpy(ifs->program + decl_size,
+ p->program,
program_size * sizeof(uint));
}
}
- /* Release the compilation struct:
+ /* Release the compilation struct:
*/
FREE(p);
}
diff --git a/src/gallium/drivers/i915/i915_prim_emit.c b/src/gallium/drivers/i915/i915_prim_emit.c
index dd997e2..7b67c51 100644
--- a/src/gallium/drivers/i915/i915_prim_emit.c
+++ b/src/gallium/drivers/i915/i915_prim_emit.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -45,7 +45,7 @@
struct setup_stage {
struct draw_stage stage; /**< This must be first (base class) */
- struct i915_context *i915;
+ struct i915_context *i915;
};
@@ -124,8 +124,8 @@ emit_hw_vertex( struct i915_context *i915,
-static INLINE void
-emit_prim( struct draw_stage *stage,
+static INLINE void
+emit_prim( struct draw_stage *stage,
struct prim_header *prim,
unsigned hwprim,
unsigned nr )
@@ -147,7 +147,7 @@ emit_prim( struct draw_stage *stage,
if (!BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 )) {
FLUSH_BATCH(NULL);
- /* Make sure state is re-emitted after a flush:
+ /* Make sure state is re-emitted after a flush:
*/
i915_update_derived( i915 );
i915_emit_hardware_state( i915 );
@@ -161,7 +161,7 @@ emit_prim( struct draw_stage *stage,
/* Emit each triangle as a single primitive. I told you this was
* simple.
*/
- OUT_BATCH(_3DPRIMITIVE |
+ OUT_BATCH(_3DPRIMITIVE |
hwprim |
((4 + vertex_size * nr)/4 - 2));
@@ -170,7 +170,7 @@ emit_prim( struct draw_stage *stage,
}
-static void
+static void
setup_tri( struct draw_stage *stage, struct prim_header *prim )
{
emit_prim( stage, prim, PRIM3D_TRILIST, 3 );
diff --git a/src/gallium/drivers/i915/i915_prim_vbuf.c b/src/gallium/drivers/i915/i915_prim_vbuf.c
index baebbc7..6c8e55c 100644
--- a/src/gallium/drivers/i915/i915_prim_vbuf.c
+++ b/src/gallium/drivers/i915/i915_prim_vbuf.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -31,8 +31,8 @@
* lists by hooking into the end of the primitive pipeline and
* manipulating the vertex_id field in the vertex headers.
*
- * XXX: work in progress
- *
+ * XXX: work in progress
+ *
* \author José Fonseca
* \author Keith Whitwell
*/
@@ -324,7 +324,7 @@ i915_vbuf_ensure_index_bounds(struct vbuf_render *render,
}
static boolean
-i915_vbuf_render_set_primitive(struct vbuf_render *render,
+i915_vbuf_render_set_primitive(struct vbuf_render *render,
unsigned prim)
{
struct i915_vbuf_render *i915_render = i915_vbuf_render(render);
@@ -613,7 +613,7 @@ draw_calc_nr_indices(uint nr_indices, unsigned type)
}
}
-static void
+static void
i915_vbuf_render_draw_elements(struct vbuf_render *render,
const ushort *indices,
uint nr_indices)
@@ -639,7 +639,7 @@ i915_vbuf_render_draw_elements(struct vbuf_render *render,
if (!BEGIN_BATCH(1 + (nr_indices + 1)/2, 1)) {
FLUSH_BATCH(NULL);
- /* Make sure state is re-emitted after a flush:
+ /* Make sure state is re-emitted after a flush:
*/
i915_update_derived(i915);
i915_emit_hardware_state(i915);
@@ -701,7 +701,7 @@ i915_vbuf_render_create(struct i915_context *i915)
i915_render->base.max_vertex_buffer_bytes = 16*4096;
- /* NOTE: it must be such that state and vertices indices fit in a single
+ /* NOTE: it must be such that state and vertices indices fit in a single
* batch buffer.
*/
i915_render->base.max_indices = 16*1024;
@@ -752,11 +752,11 @@ struct draw_stage *i915_draw_vbuf_stage(struct i915_context *i915)
{
struct vbuf_render *render;
struct draw_stage *stage;
-
+
render = i915_vbuf_render_create(i915);
if(!render)
return NULL;
-
+
stage = draw_vbuf_stage(i915->draw, render);
if(!stage) {
render->destroy(render);
diff --git a/src/gallium/drivers/i915/i915_reg.h b/src/gallium/drivers/i915/i915_reg.h
index 5e4e80d..a8c2c6f 100644
--- a/src/gallium/drivers/i915/i915_reg.h
+++ b/src/gallium/drivers/i915/i915_reg.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -490,7 +490,7 @@
#define REG_TYPE_R 0 /* temporary regs, no need to
* dcl, must be written before
* read -- Preserved between
- * phases.
+ * phases.
*/
#define REG_TYPE_T 1 /* Interpolated values, must be
* dcl'ed before use.
@@ -535,7 +535,7 @@
/* Arithmetic instructions */
/* .replicate_swizzle == selection and replication of a particular
- * scalar channel, ie., .xxxx, .yyyy, .zzzz or .wwww
+ * scalar channel, ie., .xxxx, .yyyy, .zzzz or .wwww
*/
#define A0_NOP (0x0<<24) /* no operation */
#define A0_ADD (0x1<<24) /* dst = src0 + src1 */
@@ -636,11 +636,11 @@
#define T0_DEST_TYPE_SHIFT 19
/* Allow: R, OC, OD, U */
/* Note: U (unpreserved) regs do not retain their values between
- * phases (cannot be used for feedback)
+ * phases (cannot be used for feedback)
*
* Note: oC and OD registers can only be used as the destination of a
* texture instruction once per phase (this is an implementation
- * restriction).
+ * restriction).
*/
#define T0_DEST_NR_SHIFT 14
/* Allow R: 0..15, OC,OD: 0..0, U: 0..2 */
@@ -677,9 +677,9 @@
#define D0_CHANNEL_XYZ (D0_CHANNEL_XY|D0_CHANNEL_Z)
/* I915 Errata: Do not allow (xz), (xw), (xzw) combinations for diffuse
- * or specular declarations.
+ * or specular declarations.
*
- * For T dcls, only allow: (x), (xy), (xyz), (w), (xyzw)
+ * For T dcls, only allow: (x), (xy), (xyz), (w), (xyzw)
*
* Must be zero for S (sampler) dcls
*/
diff --git a/src/gallium/drivers/i915/i915_resource.h b/src/gallium/drivers/i915/i915_resource.h
index 86620e6..81f0879 100644
--- a/src/gallium/drivers/i915/i915_resource.h
+++ b/src/gallium/drivers/i915/i915_resource.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef I915_RESOURCE_H
diff --git a/src/gallium/drivers/i915/i915_resource_buffer.c b/src/gallium/drivers/i915/i915_resource_buffer.c
index 450203d..8e0c51a 100644
--- a/src/gallium/drivers/i915/i915_resource_buffer.c
+++ b/src/gallium/drivers/i915/i915_resource_buffer.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
* Authors:
@@ -87,7 +87,7 @@ i915_buffer_transfer_inline_write( struct pipe_context *rm_ctx,
}
-struct u_resource_vtbl i915_buffer_vtbl =
+struct u_resource_vtbl i915_buffer_vtbl =
{
i915_buffer_get_handle, /* get_handle */
i915_buffer_destroy, /* resource_destroy */
diff --git a/src/gallium/drivers/i915/i915_resource_texture.c b/src/gallium/drivers/i915/i915_resource_texture.c
index f19106f..0c2a720 100644
--- a/src/gallium/drivers/i915/i915_resource_texture.c
+++ b/src/gallium/drivers/i915/i915_resource_texture.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
* Authors:
@@ -365,7 +365,7 @@ i915_texture_layout_3d(struct i915_texture *tex)
unsigned nblocksy = util_format_get_nblocksy(pt->format, pt->height0);
unsigned stack_nblocksy = 0;
- /* Calculate the size of a single slice.
+ /* Calculate the size of a single slice.
*/
tex->stride = align(util_format_get_stride(pt->format, pt->width0), 4);
@@ -381,11 +381,11 @@ i915_texture_layout_3d(struct i915_texture *tex)
nblocksy = util_format_get_nblocksy(pt->format, height);
}
- /* Fixup depth image_offsets:
+ /* Fixup depth image_offsets:
*/
for (level = 0; level <= pt->last_level; level++) {
unsigned i;
- for (i = 0; i < depth; i++)
+ for (i = 0; i < depth; i++)
i915_texture_set_image_offset(tex, level, i, 0, i * stack_nblocksy);
depth = u_minify(depth, 1);
@@ -715,7 +715,7 @@ i915_texture_destroy(struct pipe_screen *screen,
FREE(tex);
}
-static struct pipe_transfer *
+static struct pipe_transfer *
i915_texture_get_transfer(struct pipe_context *context,
struct pipe_resource *resource,
unsigned level,
@@ -775,7 +775,7 @@ i915_texture_transfer_unmap(struct pipe_context *pipe,
-struct u_resource_vtbl i915_texture_vtbl =
+struct u_resource_vtbl i915_texture_vtbl =
{
i915_texture_get_handle, /* get_handle */
i915_texture_destroy, /* resource_destroy */
diff --git a/src/gallium/drivers/i915/i915_screen.c b/src/gallium/drivers/i915/i915_screen.c
index f66478e..9eb959b 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -361,7 +361,7 @@ i915_screen_create(struct i915_winsys *iws)
break;
default:
- debug_printf("%s: unknown pci id 0x%x, cannot create screen\n",
+ debug_printf("%s: unknown pci id 0x%x, cannot create screen\n",
__FUNCTION__, iws->pci_id);
FREE(is);
return NULL;
diff --git a/src/gallium/drivers/i915/i915_screen.h b/src/gallium/drivers/i915/i915_screen.h
index 0c4186c..d0cdc29 100644
--- a/src/gallium/drivers/i915/i915_screen.h
+++ b/src/gallium/drivers/i915/i915_screen.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef I915_SCREEN_H
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index bbfcff6..233b53a 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -57,7 +57,7 @@ translate_wrap_mode(unsigned wrap)
return TEXCOORDMODE_CLAMP_EDGE;
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
return TEXCOORDMODE_CLAMP_BORDER;
- /*
+ /*
case PIPE_TEX_WRAP_MIRRORED_REPEAT:
return TEXCOORDMODE_MIRROR;
*/
@@ -228,7 +228,7 @@ i915_create_sampler_state(struct pipe_context *pipe,
mipFilt = translate_mip_filter(sampler->min_mip_filter);
minFilt = translate_img_filter( sampler->min_img_filter );
magFilt = translate_img_filter( sampler->mag_img_filter );
-
+
if (sampler->max_anisotropy > 1)
minFilt = magFilt = FILTER_ANISOTROPIC;
@@ -244,7 +244,7 @@ i915_create_sampler_state(struct pipe_context *pipe,
/* Shadow:
*/
- if (sampler->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE)
+ if (sampler->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE)
{
cso->state[0] |= (SS2_SHADOW_ENABLE |
i915_translate_compare_func(sampler->compare_func));
@@ -688,13 +688,13 @@ i915_create_rasterizer_state(struct pipe_context *pipe,
case PIPE_FACE_FRONT:
if (rasterizer->front_ccw)
cso->LIS4 |= S4_CULLMODE_CCW;
- else
+ else
cso->LIS4 |= S4_CULLMODE_CW;
break;
case PIPE_FACE_BACK:
if (rasterizer->front_ccw)
cso->LIS4 |= S4_CULLMODE_CW;
- else
+ else
cso->LIS4 |= S4_CULLMODE_CCW;
break;
case PIPE_FACE_FRONT_AND_BACK:
diff --git a/src/gallium/drivers/i915/i915_state.h b/src/gallium/drivers/i915/i915_state.h
index b4074dc..a5f5880 100644
--- a/src/gallium/drivers/i915/i915_state.h
+++ b/src/gallium/drivers/i915/i915_state.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/i915/i915_state_derived.c b/src/gallium/drivers/i915/i915_state_derived.c
index 1d4026a..e261a02 100644
--- a/src/gallium/drivers/i915/i915_state_derived.c
+++ b/src/gallium/drivers/i915/i915_state_derived.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -82,7 +82,7 @@ static void calculate_vertex_layout(struct i915_context *i915)
}
}
-
+
/* pos */
src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_POSITION, 0);
if (needW) {
diff --git a/src/gallium/drivers/i915/i915_state_emit.c b/src/gallium/drivers/i915/i915_state_emit.c
index c48d53f..afe4241 100644
--- a/src/gallium/drivers/i915/i915_state_emit.c
+++ b/src/gallium/drivers/i915/i915_state_emit.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -109,19 +109,19 @@ void
i915_emit_hardware_state(struct i915_context *i915 )
{
/* XXX: there must be an easier way */
- const unsigned dwords = ( 14 +
- 7 +
- I915_MAX_DYNAMIC +
- 8 +
- 2 + I915_TEX_UNITS*3 +
+ const unsigned dwords = ( 14 +
+ 7 +
+ I915_MAX_DYNAMIC +
+ 8 +
2 + I915_TEX_UNITS*3 +
- 2 + I915_MAX_CONSTANT*4 +
+ 2 + I915_TEX_UNITS*3 +
+ 2 + I915_MAX_CONSTANT*4 +
#if 0
- i915->current.program_len +
+ i915->current.program_len +
#else
- i915->fs->program_len +
+ i915->fs->program_len +
#endif
- 6
+ 6
) * 3/2; /* plus 50% margin */
const unsigned relocs = ( I915_TEX_UNITS +
3
@@ -154,7 +154,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
OUT_BATCH(_3DSTATE_DFLT_SPEC_CMD);
OUT_BATCH(0);
-
+
OUT_BATCH(_3DSTATE_DFLT_Z_CMD);
OUT_BATCH(0);
@@ -163,9 +163,9 @@ i915_emit_hardware_state(struct i915_context *i915 )
CSB_TCB(1, 1) |
CSB_TCB(2, 2) |
CSB_TCB(3, 3) |
- CSB_TCB(4, 4) |
- CSB_TCB(5, 5) |
- CSB_TCB(6, 6) |
+ CSB_TCB(4, 4) |
+ CSB_TCB(5, 5) |
+ CSB_TCB(6, 6) |
CSB_TCB(7, 7));
OUT_BATCH(_3DSTATE_RASTER_RULES_CMD |
@@ -174,8 +174,8 @@ i915_emit_hardware_state(struct i915_context *i915 )
ENABLE_LINE_STRIP_PROVOKE_VRTX |
ENABLE_TRI_FAN_PROVOKE_VRTX |
LINE_STRIP_PROVOKE_VRTX(1) |
- TRI_FAN_PROVOKE_VRTX(2) |
- ENABLE_TEXKILL_3D_4D |
+ TRI_FAN_PROVOKE_VRTX(2) |
+ ENABLE_TEXKILL_3D_4D |
TEXKILL_4D);
/* Need to initialize this to zero.
@@ -194,15 +194,15 @@ i915_emit_hardware_state(struct i915_context *i915 )
/* 7 dwords, 1 relocs */
if (i915->hardware_dirty & I915_HW_IMMEDIATE)
{
- OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
+ OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
I1_LOAD_S(0) |
I1_LOAD_S(1) |
I1_LOAD_S(2) |
I1_LOAD_S(4) |
I1_LOAD_S(5) |
- I1_LOAD_S(6) |
+ I1_LOAD_S(6) |
(5));
-
+
if(i915->vbo)
OUT_RELOC(i915->vbo,
I915_USAGE_VERTEX,
@@ -215,11 +215,11 @@ i915_emit_hardware_state(struct i915_context *i915 )
OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S4]);
OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S5]);
OUT_BATCH(i915->current.immediate[I915_IMMEDIATE_S6]);
- }
+ }
#if 01
/* I915_MAX_DYNAMIC dwords, 0 relocs */
- if (i915->hardware_dirty & I915_HW_DYNAMIC)
+ if (i915->hardware_dirty & I915_HW_DYNAMIC)
{
int i;
for (i = 0; i < I915_MAX_DYNAMIC; i++) {
@@ -280,7 +280,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
cformat = PIPE_FORMAT_B8G8R8A8_UNORM; /* arbitrary */
cformat = translate_format(cformat);
- if (depth_surface)
+ if (depth_surface)
zformat = translate_depth_format( i915->framebuffer.zsbuf->format );
OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD);
@@ -327,12 +327,12 @@ i915_emit_hardware_state(struct i915_context *i915 )
#if 01
/* samplers */
/* 2 + I915_TEX_UNITS*3 dwords, 0 relocs */
- if (i915->hardware_dirty & I915_HW_SAMPLER)
+ if (i915->hardware_dirty & I915_HW_SAMPLER)
{
if (i915->current.sampler_enable_nr) {
int i;
- OUT_BATCH( _3DSTATE_SAMPLER_STATE |
+ OUT_BATCH( _3DSTATE_SAMPLER_STATE |
(3 * i915->current.sampler_enable_nr) );
OUT_BATCH( i915->current.sampler_enable_flags );
diff --git a/src/gallium/drivers/i915/i915_state_inlines.h b/src/gallium/drivers/i915/i915_state_inlines.h
index b589117..9d512f8 100644
--- a/src/gallium/drivers/i915/i915_state_inlines.h
+++ b/src/gallium/drivers/i915/i915_state_inlines.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef I915_STATE_INLINES_H
diff --git a/src/gallium/drivers/i915/i915_state_sampler.c b/src/gallium/drivers/i915/i915_state_sampler.c
index 916cb76..ae206b9 100644
--- a/src/gallium/drivers/i915/i915_state_sampler.c
+++ b/src/gallium/drivers/i915/i915_state_sampler.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "pipe/p_context.h"
@@ -97,12 +97,12 @@ static void update_sampler(struct i915_context *i915,
/* 3D textures don't seem to respect the border color.
* Fallback if there's ever a danger that they might refer to
- * it.
- *
+ * it.
+ *
* Effectively this means fallback on 3D clamp or
* clamp_to_border.
*
- * XXX: Check if this is true on i945.
+ * XXX: Check if this is true on i945.
* XXX: Check if this bug got fixed in release silicon.
*/
#if 0
@@ -117,7 +117,7 @@ static void update_sampler(struct i915_context *i915,
wt == PIPE_TEX_WRAP_CLAMP ||
wr == PIPE_TEX_WRAP_CLAMP ||
ws == PIPE_TEX_WRAP_CLAMP_TO_BORDER ||
- wt == PIPE_TEX_WRAP_CLAMP_TO_BORDER ||
+ wt == PIPE_TEX_WRAP_CLAMP_TO_BORDER ||
wr == PIPE_TEX_WRAP_CLAMP_TO_BORDER)) {
if (i915->conformance_mode > 0) {
assert(0);
diff --git a/src/gallium/drivers/i915/i915_surface.c b/src/gallium/drivers/i915/i915_surface.c
index becc6e9..92b8832 100644
--- a/src/gallium/drivers/i915/i915_surface.c
+++ b/src/gallium/drivers/i915/i915_surface.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "i915_surface.h"
diff --git a/src/gallium/drivers/i915/i915_surface.h b/src/gallium/drivers/i915/i915_surface.h
index 70b61de..43fef6a 100644
--- a/src/gallium/drivers/i915/i915_surface.h
+++ b/src/gallium/drivers/i915/i915_surface.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef I915_SURFACE_H
diff --git a/src/gallium/drivers/i965/brw_batchbuffer.c b/src/gallium/drivers/i965/brw_batchbuffer.c
index e80067f..5b03089 100644
--- a/src/gallium/drivers/i965/brw_batchbuffer.c
+++ b/src/gallium/drivers/i965/brw_batchbuffer.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_memory.h"
@@ -90,7 +90,7 @@ brw_batchbuffer_free(struct brw_batchbuffer *batch)
void
-_brw_batchbuffer_flush(struct brw_batchbuffer *batch,
+_brw_batchbuffer_flush(struct brw_batchbuffer *batch,
const char *file,
int line)
{
@@ -103,7 +103,7 @@ _brw_batchbuffer_flush(struct brw_batchbuffer *batch,
*/
if (BRW_DEBUG & DEBUG_BATCH)
- debug_printf("%s:%d: Batchbuffer flush with %db used\n",
+ debug_printf("%s:%d: Batchbuffer flush with %db used\n",
file, line, used);
if (ALWAYS_EMIT_MI_FLUSH) {
@@ -112,7 +112,7 @@ _brw_batchbuffer_flush(struct brw_batchbuffer *batch,
used = batch->ptr - batch->map;
}
- /* Round batchbuffer usage to 2 DWORDs.
+ /* Round batchbuffer usage to 2 DWORDs.
*/
if ((used & 4) == 0) {
*(GLuint *) (batch->ptr) = 0; /* noop */
@@ -120,7 +120,7 @@ _brw_batchbuffer_flush(struct brw_batchbuffer *batch,
used = batch->ptr - batch->map;
}
- /* Mark the end of the buffer.
+ /* Mark the end of the buffer.
*/
*(GLuint *) (batch->ptr) = MI_BATCH_BUFFER_END;
batch->ptr += 4;
@@ -130,7 +130,7 @@ _brw_batchbuffer_flush(struct brw_batchbuffer *batch,
batch->sws->bo_unmap(batch->buf);
batch->map = NULL;
batch->ptr = NULL;
-
+
batch->sws->bo_exec(batch->buf, used );
if (BRW_DEBUG & DEBUG_SYNC) {
@@ -169,7 +169,7 @@ brw_batchbuffer_emit_reloc(struct brw_batchbuffer *batch,
ret = batch->sws->bo_emit_reloc(batch->buf,
usage,
- delta,
+ delta,
batch->ptr - batch->map,
buffer);
if (ret != 0)
diff --git a/src/gallium/drivers/i965/brw_cc.c b/src/gallium/drivers/i965/brw_cc.c
index cc8e380..99de542 100644
--- a/src/gallium/drivers/i965/brw_cc.c
+++ b/src/gallium/drivers/i965/brw_cc.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -36,7 +36,7 @@
static enum pipe_error prepare_cc_vp( struct brw_context *brw )
{
- return brw_cache_data( &brw->cache,
+ return brw_cache_data( &brw->cache,
BRW_CC_VP,
&brw->curr.ccv,
NULL, 0,
diff --git a/src/gallium/drivers/i965/brw_clip.c b/src/gallium/drivers/i965/brw_clip.c
index ccba205..4eb7223 100644
--- a/src/gallium/drivers/i965/brw_clip.c
+++ b/src/gallium/drivers/i965/brw_clip.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -59,7 +59,7 @@ compile_clip_prog( struct brw_context *brw,
GLuint delta;
memset(&c, 0, sizeof(c));
-
+
/* Begin the compilation:
*/
brw_init_compile(brw, &c.func);
@@ -96,7 +96,7 @@ compile_clip_prog( struct brw_context *brw,
if (c.key.output_edgeflag != BRW_OUTPUT_NOT_PRESENT)
c.offset_edgeflag = delta + c.key.output_edgeflag * ATTR_SIZE;
-
+
if (BRW_IS_IGDNG(brw))
c.nr_regs = (c.key.nr_attrs + 1) / 2 + 3; /* are vertices packed, or reg-aligned? */
else
@@ -107,7 +107,7 @@ compile_clip_prog( struct brw_context *brw,
c.prog_data.clip_mode = c.key.clip_mode; /* XXX */
/* For some reason the thread is spawned with only 4 channels
- * unmasked.
+ * unmasked.
*/
brw_set_mask_control(&c.func, BRW_MASK_DISABLE);
@@ -116,7 +116,7 @@ compile_clip_prog( struct brw_context *brw,
* do all three:
*/
switch (key->primitive) {
- case PIPE_PRIM_TRIANGLES:
+ case PIPE_PRIM_TRIANGLES:
if (key->do_unfilled)
brw_emit_unfilled_clip( &c );
else
@@ -133,7 +133,7 @@ compile_clip_prog( struct brw_context *brw,
return PIPE_ERROR_BAD_INPUT;
}
-
+
/* get the program
*/
@@ -167,12 +167,12 @@ upload_clip_prog(struct brw_context *brw)
enum pipe_error ret;
/* Populate the key, starting from the almost-complete version from
- * the rast state.
+ * the rast state.
*/
/* PIPE_NEW_RAST */
key = brw->curr.rast->clip_key;
-
+
/* BRW_NEW_REDUCED_PRIMITIVE */
key.primitive = brw->reduced_primitive;
@@ -214,7 +214,7 @@ upload_clip_prog(struct brw_context *brw)
const struct brw_tracked_state brw_clip_prog = {
.dirty = {
- .mesa = (PIPE_NEW_RAST |
+ .mesa = (PIPE_NEW_RAST |
PIPE_NEW_CLIP),
.brw = (BRW_NEW_REDUCED_PRIMITIVE),
.cache = CACHE_NEW_VS_PROG
diff --git a/src/gallium/drivers/i965/brw_clip.h b/src/gallium/drivers/i965/brw_clip.h
index 80e3a11..58ff1ab 100644
--- a/src/gallium/drivers/i965/brw_clip.h
+++ b/src/gallium/drivers/i965/brw_clip.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -36,7 +36,7 @@
#include "brw_reg.h"
#include "brw_eu.h"
-#define MAX_VERTS (3+6+6)
+#define MAX_VERTS (3+6+6)
/* Note that if unfilled primitives are being emitted, we have to fix
* up polygon offset and flatshading at this point:
@@ -62,7 +62,7 @@ struct brw_clip_prog_key {
GLuint output_bfc1:6;
GLuint output_edgeflag:6;
GLuint pad1:2;
-
+
GLfloat offset_factor;
GLfloat offset_units;
};
@@ -86,7 +86,7 @@ struct brw_clip_compile {
struct brw_compile func;
struct brw_clip_prog_key key;
struct brw_clip_prog_data prog_data;
-
+
struct {
struct brw_reg R0;
struct brw_reg vertex[MAX_VERTS];
@@ -108,10 +108,10 @@ struct brw_clip_compile {
struct brw_reg dir;
struct brw_reg tmp0, tmp1;
struct brw_reg offset;
-
+
struct brw_reg fixed_planes;
struct brw_reg plane_equation;
-
+
struct brw_reg ff_sync;
} reg;
@@ -158,7 +158,7 @@ void brw_clip_tri_init_vertices( struct brw_clip_compile *c );
void brw_clip_tri_flat_shade( struct brw_clip_compile *c );
void brw_clip_tri( struct brw_clip_compile *c );
void brw_clip_tri_emit_polygon( struct brw_clip_compile *c );
-void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
+void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
GLuint nr_verts );
@@ -174,7 +174,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
void brw_clip_init_planes( struct brw_clip_compile *c );
-void brw_clip_emit_vue(struct brw_clip_compile *c,
+void brw_clip_emit_vue(struct brw_clip_compile *c,
struct brw_indirect vert,
GLboolean allocate,
GLboolean eot,
diff --git a/src/gallium/drivers/i965/brw_clip_line.c b/src/gallium/drivers/i965/brw_clip_line.c
index 66caadc..ecfb19e 100644
--- a/src/gallium/drivers/i965/brw_clip_line.c
+++ b/src/gallium/drivers/i965/brw_clip_line.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -75,7 +75,7 @@ static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
i++;
if (!c->key.nr_userclip) {
- c->reg.fixed_planes = brw_vec8_grf(i, 0);
+ c->reg.fixed_planes = brw_vec8_grf(i, 0);
i++;
}
@@ -107,7 +107,7 @@ static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
* GLfloat t = dp0 / (dp0 - dp1);
* if (t > t0) t0 = t;
* }
- *
+ *
* if (t0 + t1 >= 1.0)
* return;
* }
@@ -138,7 +138,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_MOV(p, get_addr_reg(newvtx1), brw_address(c->reg.vertex[3]));
brw_MOV(p, get_addr_reg(plane_ptr), brw_clip_plane0_address(c));
- /* Note: init t0, t1 together:
+ /* Note: init t0, t1 together:
*/
brw_MOV(p, vec2(c->reg.t0), brw_imm_f(0));
@@ -161,7 +161,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
*/
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, v1_null_ud, c->reg.planemask, brw_imm_ud(1));
-
+
plane_active = brw_IF(p, BRW_EXECUTE_1);
{
if (c->key.nr_userclip)
@@ -169,11 +169,11 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
else
brw_MOV(p, c->reg.plane_equation, deref_4b(plane_ptr, 0));
- /* dp = DP4(vtx->position, plane)
+ /* dp = DP4(vtx->position, plane)
*/
brw_DP4(p, vec4(c->reg.dp0), deref_4f(vtx0, c->offset_hpos), c->reg.plane_equation);
- /* if (IS_NEGATIVE(dp1))
+ /* if (IS_NEGATIVE(dp1))
*/
brw_set_conditionalmod(p, BRW_CONDITIONAL_L);
brw_DP4(p, vec4(c->reg.dp1), deref_4f(vtx1, c->offset_hpos), c->reg.plane_equation);
@@ -199,7 +199,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_G, c->reg.t, c->reg.t1 );
brw_MOV(p, c->reg.t1, c->reg.t);
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
- }
+ }
is_negative = brw_ELSE(p, is_negative);
{
/* Coming back in. We know that both cannot be negative
@@ -227,10 +227,10 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_ENDIF(p, is_neg2);
}
}
- brw_ENDIF(p, is_negative);
+ brw_ENDIF(p, is_negative);
}
brw_ENDIF(p, plane_active);
-
+
/* plane_ptr++;
*/
brw_ADD(p, get_addr_reg(plane_ptr), get_addr_reg(plane_ptr), brw_clip_plane_stride(c));
@@ -250,7 +250,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_clip_interp_vertex(c, newvtx1, vtx1, vtx0, c->reg.t1, FALSE);
brw_clip_emit_vue(c, newvtx0, 1, 0, (_3DPRIM_LINESTRIP << 2) | R02_PRIM_START);
- brw_clip_emit_vue(c, newvtx1, 0, 1, (_3DPRIM_LINESTRIP << 2) | R02_PRIM_END);
+ brw_clip_emit_vue(c, newvtx1, 0, 1, (_3DPRIM_LINESTRIP << 2) | R02_PRIM_END);
}
brw_ENDIF(p, not_culled);
brw_clip_kill_thread(c);
@@ -265,6 +265,6 @@ void brw_emit_line_clip( struct brw_clip_compile *c )
if (c->key.do_flat_shading)
brw_clip_copy_colors(c, 0, 1);
-
+
clip_and_emit_line(c);
}
diff --git a/src/gallium/drivers/i965/brw_clip_point.c b/src/gallium/drivers/i965/brw_clip_point.c
index 124156c..777ba8a 100644
--- a/src/gallium/drivers/i965/brw_clip_point.c
+++ b/src/gallium/drivers/i965/brw_clip_point.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
diff --git a/src/gallium/drivers/i965/brw_clip_state.c b/src/gallium/drivers/i965/brw_clip_state.c
index 5c3ccfd..53991a5 100644
--- a/src/gallium/drivers/i965/brw_clip_state.c
+++ b/src/gallium/drivers/i965/brw_clip_state.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -105,12 +105,12 @@ clip_unit_create_from_key(struct brw_context *brw,
* even number.
*/
assert(key->nr_urb_entries % 2 == 0);
-
- /* Although up to 16 concurrent Clip threads are allowed on IGDNG,
+
+ /* Although up to 16 concurrent Clip threads are allowed on IGDNG,
* only 2 threads can output VUEs at a time.
*/
if (BRW_IS_IGDNG(brw))
- clip.thread4.max_threads = 16 - 1;
+ clip.thread4.max_threads = 16 - 1;
else
clip.thread4.max_threads = 2 - 1;
} else {
@@ -186,15 +186,15 @@ static int upload_clip_unit( struct brw_context *brw )
NULL,
&brw->clip.state_bo))
return PIPE_OK;
-
+
/* Create new:
*/
- ret = clip_unit_create_from_key(brw, &key,
+ ret = clip_unit_create_from_key(brw, &key,
reloc,
&brw->clip.state_bo);
if (ret)
return ret;
-
+
return PIPE_OK;
}
diff --git a/src/gallium/drivers/i965/brw_clip_tri.c b/src/gallium/drivers/i965/brw_clip_tri.c
index 069524b..5ce2823 100644
--- a/src/gallium/drivers/i965/brw_clip_tri.c
+++ b/src/gallium/drivers/i965/brw_clip_tri.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -39,7 +39,7 @@ static void release_tmps( struct brw_clip_compile *c )
}
-void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
+void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
GLuint nr_verts )
{
GLuint i = 0,j;
@@ -97,7 +97,7 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
i++;
if (!c->key.nr_userclip) {
- c->reg.fixed_planes = brw_vec8_grf(i, 0);
+ c->reg.fixed_planes = brw_vec8_grf(i, 0);
i++;
}
@@ -132,10 +132,10 @@ void brw_clip_tri_init_vertices( struct brw_clip_compile *c )
/* Initial list of indices for incoming vertexes:
*/
- brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK));
- brw_CMP(p,
- vec1(brw_null_reg()),
- BRW_CONDITIONAL_EQ,
+ brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK));
+ brw_CMP(p,
+ vec1(brw_null_reg()),
+ BRW_CONDITIONAL_EQ,
tmp0,
brw_imm_ud(_3DPRIM_TRISTRIP_REVERSE));
@@ -143,7 +143,7 @@ void brw_clip_tri_init_vertices( struct brw_clip_compile *c )
* second tristrip element: Can ignore sometimes?
*/
is_rev = brw_IF(p, BRW_EXECUTE_1);
- {
+ {
brw_MOV(p, get_element(c->reg.inlist, 0), brw_address(c->reg.vertex[1]) );
brw_MOV(p, get_element(c->reg.inlist, 1), brw_address(c->reg.vertex[0]) );
if (c->need_direction)
@@ -171,15 +171,15 @@ void brw_clip_tri_flat_shade( struct brw_clip_compile *c )
struct brw_instruction *is_poly;
struct brw_reg tmp0 = c->reg.loopcount; /* handy temporary */
- brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK));
- brw_CMP(p,
- vec1(brw_null_reg()),
- BRW_CONDITIONAL_EQ,
+ brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK));
+ brw_CMP(p,
+ vec1(brw_null_reg()),
+ BRW_CONDITIONAL_EQ,
tmp0,
brw_imm_ud(_3DPRIM_POLYGON));
is_poly = brw_IF(p, BRW_EXECUTE_1);
- {
+ {
brw_clip_copy_colors(c, 1, 0);
brw_clip_copy_colors(c, 2, 0);
}
@@ -210,7 +210,7 @@ void brw_clip_tri( struct brw_clip_compile *c )
struct brw_instruction *vertex_loop;
struct brw_instruction *next_test;
struct brw_instruction *prev_test;
-
+
brw_MOV(p, get_addr_reg(vtxPrev), brw_address(c->reg.vertex[2]) );
brw_MOV(p, get_addr_reg(plane_ptr), brw_clip_plane0_address(c));
brw_MOV(p, get_addr_reg(inlist_ptr), brw_address(c->reg.inlist));
@@ -224,10 +224,10 @@ void brw_clip_tri( struct brw_clip_compile *c )
*/
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, vec1(brw_null_reg()), c->reg.planemask, brw_imm_ud(1));
-
+
plane_active = brw_IF(p, BRW_EXECUTE_1);
{
- /* vtxOut = freelist_ptr++
+ /* vtxOut = freelist_ptr++
*/
brw_MOV(p, get_addr_reg(vtxOut), get_addr_reg(freelist_ptr) );
brw_ADD(p, get_addr_reg(freelist_ptr), get_addr_reg(freelist_ptr), brw_imm_uw(c->nr_regs * REG_SIZE));
@@ -236,7 +236,7 @@ void brw_clip_tri( struct brw_clip_compile *c )
brw_MOV(p, c->reg.plane_equation, deref_4f(plane_ptr, 0));
else
brw_MOV(p, c->reg.plane_equation, deref_4b(plane_ptr, 0));
-
+
brw_MOV(p, c->reg.loopcount, c->reg.nr_verts);
brw_MOV(p, c->reg.nr_verts, brw_imm_ud(0));
@@ -273,7 +273,7 @@ void brw_clip_tri( struct brw_clip_compile *c )
brw_clip_interp_vertex(c, vtxOut, vtxPrev, vtx, c->reg.t, GL_FALSE);
/* *outlist_ptr++ = vtxOut;
- * nr_verts++;
+ * nr_verts++;
* vtxOut = 0;
*/
brw_MOV(p, deref_1uw(outlist_ptr, 0), get_addr_reg(vtxOut));
@@ -282,7 +282,7 @@ void brw_clip_tri( struct brw_clip_compile *c )
brw_MOV(p, get_addr_reg(vtxOut), brw_imm_uw(0) );
}
brw_ENDIF(p, next_test);
-
+
}
prev_test = brw_ELSE(p, prev_test);
{
@@ -312,21 +312,21 @@ void brw_clip_tri( struct brw_clip_compile *c )
brw_MOV(p, get_addr_reg(vtxOut), get_addr_reg(vtx) );
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
- brw_clip_interp_vertex(c, vtxOut, vtx, vtxPrev, c->reg.t, GL_TRUE);
+ brw_clip_interp_vertex(c, vtxOut, vtx, vtxPrev, c->reg.t, GL_TRUE);
/* *outlist_ptr++ = vtxOut;
- * nr_verts++;
+ * nr_verts++;
* vtxOut = 0;
*/
brw_MOV(p, deref_1uw(outlist_ptr, 0), get_addr_reg(vtxOut));
brw_ADD(p, get_addr_reg(outlist_ptr), get_addr_reg(outlist_ptr), brw_imm_uw(sizeof(short)));
brw_ADD(p, c->reg.nr_verts, c->reg.nr_verts, brw_imm_ud(1));
brw_MOV(p, get_addr_reg(vtxOut), brw_imm_uw(0) );
- }
+ }
brw_ENDIF(p, next_test);
}
brw_ENDIF(p, prev_test);
-
+
/* vtxPrev = vtx;
* inlist_ptr++;
*/
@@ -337,7 +337,7 @@ void brw_clip_tri( struct brw_clip_compile *c )
*/
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1));
- }
+ }
brw_WHILE(p, vertex_loop);
/* vtxPrev = *(outlist_ptr-1) OR: outlist[nr_verts-1]
@@ -352,19 +352,19 @@ void brw_clip_tri( struct brw_clip_compile *c )
brw_MOV(p, get_addr_reg(outlist_ptr), brw_address(c->reg.outlist));
}
brw_ENDIF(p, plane_active);
-
+
/* plane_ptr++;
*/
brw_ADD(p, get_addr_reg(plane_ptr), get_addr_reg(plane_ptr), brw_clip_plane_stride(c));
- /* nr_verts >= 3
+ /* nr_verts >= 3
*/
brw_CMP(p,
vec1(brw_null_reg()),
BRW_CONDITIONAL_GE,
c->reg.nr_verts,
brw_imm_ud(3));
-
+
/* && (planemask>>=1) != 0
*/
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
@@ -397,14 +397,14 @@ void brw_clip_tri_emit_polygon(struct brw_clip_compile *c)
brw_MOV(p, get_addr_reg(v0), deref_1uw(vptr, 0));
brw_clip_emit_vue(c, v0, 1, 0, ((_3DPRIM_TRIFAN << 2) | R02_PRIM_START));
-
+
brw_ADD(p, get_addr_reg(vptr), get_addr_reg(vptr), brw_imm_uw(2));
brw_MOV(p, get_addr_reg(v0), deref_1uw(vptr, 0));
loop = brw_DO(p, BRW_EXECUTE_1);
{
brw_clip_emit_vue(c, v0, 1, 0, (_3DPRIM_TRIFAN << 2));
-
+
brw_ADD(p, get_addr_reg(vptr), get_addr_reg(vptr), brw_imm_uw(2));
brw_MOV(p, get_addr_reg(v0), deref_1uw(vptr, 0));
@@ -468,11 +468,11 @@ static void brw_clip_test( struct brw_clip_compile *c )
/* test nearz, xmin, ymin plane */
/* clip.xyz < -clip.w */
- brw_CMP(p, t1, BRW_CONDITIONAL_L, v0, negate(get_element(v0, 3)));
+ brw_CMP(p, t1, BRW_CONDITIONAL_L, v0, negate(get_element(v0, 3)));
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
- brw_CMP(p, t2, BRW_CONDITIONAL_L, v1, negate(get_element(v1, 3)));
+ brw_CMP(p, t2, BRW_CONDITIONAL_L, v1, negate(get_element(v1, 3)));
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
- brw_CMP(p, t3, BRW_CONDITIONAL_L, v2, negate(get_element(v2, 3)));
+ brw_CMP(p, t3, BRW_CONDITIONAL_L, v2, negate(get_element(v2, 3)));
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
/* All vertices are outside of a plane, rejected */
@@ -509,11 +509,11 @@ static void brw_clip_test( struct brw_clip_compile *c )
/* test farz, xmax, ymax plane */
/* clip.xyz > clip.w */
- brw_CMP(p, t1, BRW_CONDITIONAL_G, v0, get_element(v0, 3));
+ brw_CMP(p, t1, BRW_CONDITIONAL_G, v0, get_element(v0, 3));
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
- brw_CMP(p, t2, BRW_CONDITIONAL_G, v1, get_element(v1, 3));
+ brw_CMP(p, t2, BRW_CONDITIONAL_G, v1, get_element(v1, 3));
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
- brw_CMP(p, t3, BRW_CONDITIONAL_G, v2, get_element(v2, 3));
+ brw_CMP(p, t3, BRW_CONDITIONAL_G, v2, get_element(v2, 3));
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
/* All vertices are outside of a plane, rejected */
@@ -561,13 +561,13 @@ void brw_emit_tri_clip( struct brw_clip_compile *c )
brw_clip_init_clipmask(c);
brw_clip_init_ff_sync(c);
- /* if -ve rhw workaround bit is set,
+ /* if -ve rhw workaround bit is set,
do cliptest */
if (c->chipset.is_965) {
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
- brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
+ brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
brw_imm_ud(1<<20));
- neg_rhw = brw_IF(p, BRW_EXECUTE_1);
+ neg_rhw = brw_IF(p, BRW_EXECUTE_1);
{
brw_clip_test(c);
}
@@ -577,13 +577,13 @@ void brw_emit_tri_clip( struct brw_clip_compile *c )
* flatshading, need to apply the flatshade here because we don't
* respect the PV when converting to trifan for emit:
*/
- if (c->key.do_flat_shading)
- brw_clip_tri_flat_shade(c);
-
+ if (c->key.do_flat_shading)
+ brw_clip_tri_flat_shade(c);
+
if ((c->key.clip_mode == BRW_CLIPMODE_NORMAL) ||
(c->key.clip_mode == BRW_CLIPMODE_KERNEL_CLIP))
do_clip_tri(c);
- else
+ else
maybe_do_clip_tri(c);
brw_clip_tri_emit_polygon(c);
diff --git a/src/gallium/drivers/i965/brw_clip_unfilled.c b/src/gallium/drivers/i965/brw_clip_unfilled.c
index aec835b..407e6b5 100644
--- a/src/gallium/drivers/i965/brw_clip_unfilled.c
+++ b/src/gallium/drivers/i965/brw_clip_unfilled.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -45,9 +45,9 @@ static void compute_tri_direction( struct brw_clip_compile *c )
struct brw_compile *p = &c->func;
struct brw_reg e = c->reg.tmp0;
struct brw_reg f = c->reg.tmp1;
- struct brw_reg v0 = byte_offset(c->reg.vertex[0], c->offset_hpos);
- struct brw_reg v1 = byte_offset(c->reg.vertex[1], c->offset_hpos);
- struct brw_reg v2 = byte_offset(c->reg.vertex[2], c->offset_hpos);
+ struct brw_reg v0 = byte_offset(c->reg.vertex[0], c->offset_hpos);
+ struct brw_reg v1 = byte_offset(c->reg.vertex[1], c->offset_hpos);
+ struct brw_reg v2 = byte_offset(c->reg.vertex[2], c->offset_hpos);
struct brw_reg v0n = get_tmp(c);
@@ -72,8 +72,8 @@ static void compute_tri_direction( struct brw_clip_compile *c )
/* Calculate the vectors of two edges of the triangle:
*/
- brw_ADD(p, e, v0n, negate(v2n));
- brw_ADD(p, f, v1n, negate(v2n));
+ brw_ADD(p, e, v0n, negate(v2n));
+ brw_ADD(p, f, v1n, negate(v2n));
/* Take their crossproduct:
*/
@@ -105,7 +105,7 @@ static void cull_direction( struct brw_clip_compile *c )
conditional,
get_element(c->reg.dir, 2),
brw_imm_f(0));
-
+
ccw = brw_IF(p, BRW_EXECUTE_1);
{
brw_clip_kill_thread(c);
@@ -121,7 +121,7 @@ static void copy_bfc( struct brw_clip_compile *c )
struct brw_instruction *ccw;
GLuint conditional;
- /* Do we have any colors to copy?
+ /* Do we have any colors to copy?
*/
if ((c->offset_color0 == 0 || c->offset_bfc0 == 0) &&
(c->offset_color1 == 0 || c->offset_bfc1 == 0))
@@ -141,19 +141,19 @@ static void copy_bfc( struct brw_clip_compile *c )
conditional,
get_element(c->reg.dir, 2),
brw_imm_f(0));
-
+
ccw = brw_IF(p, BRW_EXECUTE_1);
{
GLuint i;
for (i = 0; i < 3; i++) {
if (c->offset_color0 && c->offset_bfc0)
- brw_MOV(p,
+ brw_MOV(p,
byte_offset(c->reg.vertex[i], c->offset_color0),
byte_offset(c->reg.vertex[i], c->offset_bfc0));
if (c->offset_color1 && c->offset_bfc1)
- brw_MOV(p,
+ brw_MOV(p,
byte_offset(c->reg.vertex[i], c->offset_color0),
byte_offset(c->reg.vertex[i], c->offset_bfc0));
}
@@ -177,14 +177,14 @@ static void compute_offset( struct brw_clip_compile *c )
struct brw_compile *p = &c->func;
struct brw_reg off = c->reg.offset;
struct brw_reg dir = c->reg.dir;
-
+
brw_math_invert(p, get_element(off, 2), get_element(dir, 2));
brw_MUL(p, vec2(off), dir, get_element(off, 2));
- brw_CMP(p,
- vec1(brw_null_reg()),
+ brw_CMP(p,
+ vec1(brw_null_reg()),
BRW_CONDITIONAL_GE,
- brw_abs(get_element(off, 0)),
+ brw_abs(get_element(off, 0)),
brw_abs(get_element(off, 1)));
brw_SEL(p, vec1(off), brw_abs(get_element(off, 0)), brw_abs(get_element(off, 1)));
@@ -201,10 +201,10 @@ static void merge_edgeflags( struct brw_clip_compile *c )
struct brw_instruction *is_poly;
struct brw_reg tmp0 = get_element_ud(c->reg.tmp0, 0);
- brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK));
- brw_CMP(p,
- vec1(brw_null_reg()),
- BRW_CONDITIONAL_EQ,
+ brw_AND(p, tmp0, get_element_ud(c->reg.R0, 2), brw_imm_ud(PRIM_MASK));
+ brw_CMP(p,
+ vec1(brw_null_reg()),
+ BRW_CONDITIONAL_EQ,
tmp0,
brw_imm_ud(_3DPRIM_POLYGON));
@@ -212,7 +212,7 @@ static void merge_edgeflags( struct brw_clip_compile *c )
* a _3DPRIM_TRISTRIP_REVERSE:
*/
is_poly = brw_IF(p, BRW_EXECUTE_1);
- {
+ {
brw_set_conditionalmod(p, BRW_CONDITIONAL_EQ);
brw_AND(p, vec1(brw_null_reg()), get_element_ud(c->reg.R0, 2), brw_imm_ud(1<<8));
brw_MOV(p, byte_offset(c->reg.vertex[0], c->offset_edgeflag), brw_imm_f(0));
@@ -264,9 +264,9 @@ static void emit_lines(struct brw_clip_compile *c,
{
brw_MOV(p, get_addr_reg(v0), deref_1uw(v0ptr, 0));
brw_ADD(p, get_addr_reg(v0ptr), get_addr_reg(v0ptr), brw_imm_uw(2));
-
+
apply_one_offset(c, v0);
-
+
brw_set_conditionalmod(p, BRW_CONDITIONAL_G);
brw_ADD(p, c->reg.loopcount, c->reg.loopcount, brw_imm_d(-1));
}
@@ -289,8 +289,8 @@ static void emit_lines(struct brw_clip_compile *c,
brw_ADD(p, get_addr_reg(v0ptr), get_addr_reg(v0ptr), brw_imm_uw(2));
/* draw edge if edgeflag != 0 */
- brw_CMP(p,
- vec1(brw_null_reg()), BRW_CONDITIONAL_NZ,
+ brw_CMP(p,
+ vec1(brw_null_reg()), BRW_CONDITIONAL_NZ,
deref_1f(v0, c->offset_edgeflag),
brw_imm_f(0));
draw_edge = brw_IF(p, BRW_EXECUTE_1);
@@ -326,10 +326,10 @@ static void emit_points(struct brw_clip_compile *c,
brw_MOV(p, get_addr_reg(v0), deref_1uw(v0ptr, 0));
brw_ADD(p, get_addr_reg(v0ptr), get_addr_reg(v0ptr), brw_imm_uw(2));
- /* draw if edgeflag != 0
+ /* draw if edgeflag != 0
*/
- brw_CMP(p,
- vec1(brw_null_reg()), BRW_CONDITIONAL_NZ,
+ brw_CMP(p,
+ vec1(brw_null_reg()), BRW_CONDITIONAL_NZ,
deref_1f(v0, c->offset_edgeflag),
brw_imm_f(0));
draw_point = brw_IF(p, BRW_EXECUTE_1);
@@ -354,7 +354,7 @@ static void emit_points(struct brw_clip_compile *c,
static void emit_primitives( struct brw_clip_compile *c,
- GLuint mode,
+ GLuint mode,
GLboolean do_offset )
{
switch (mode) {
@@ -374,7 +374,7 @@ static void emit_primitives( struct brw_clip_compile *c,
assert(0);
break;
}
-}
+}
@@ -394,7 +394,7 @@ static void emit_unfilled_primitives( struct brw_clip_compile *c )
BRW_CONDITIONAL_GE,
get_element(c->reg.dir, 2),
brw_imm_f(0));
-
+
ccw = brw_IF(p, BRW_EXECUTE_1);
{
emit_primitives(c, c->key.fill_ccw, c->key.offset_ccw);
@@ -408,7 +408,7 @@ static void emit_unfilled_primitives( struct brw_clip_compile *c )
else if (c->key.fill_cw != CLIP_CULL) {
emit_primitives(c, c->key.fill_cw, c->key.offset_cw);
}
- else if (c->key.fill_ccw != CLIP_CULL) {
+ else if (c->key.fill_ccw != CLIP_CULL) {
emit_primitives(c, c->key.fill_ccw, c->key.offset_ccw);
}
}
@@ -421,7 +421,7 @@ static void check_nr_verts( struct brw_clip_compile *c )
struct brw_compile *p = &c->func;
struct brw_instruction *if_insn;
- brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_L, c->reg.nr_verts, brw_imm_d(3));
+ brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_L, c->reg.nr_verts, brw_imm_d(3));
if_insn = brw_IF(p, BRW_EXECUTE_1);
{
brw_clip_kill_thread(c);
@@ -434,7 +434,7 @@ void brw_emit_unfilled_clip( struct brw_clip_compile *c )
{
struct brw_compile *p = &c->func;
struct brw_instruction *do_clip;
-
+
c->need_direction = ((c->key.offset_ccw || c->key.offset_cw) ||
(c->key.fill_ccw != c->key.fill_cw) ||
@@ -457,11 +457,11 @@ void brw_emit_unfilled_clip( struct brw_clip_compile *c )
merge_edgeflags(c);
- /* Need to use the inlist indirection here:
+ /* Need to use the inlist indirection here:
*/
- if (c->need_direction)
+ if (c->need_direction)
compute_tri_direction(c);
-
+
if (c->key.fill_ccw == CLIP_CULL ||
c->key.fill_cw == CLIP_CULL)
cull_direction(c);
@@ -478,7 +478,7 @@ void brw_emit_unfilled_clip( struct brw_clip_compile *c )
*/
if (c->key.do_flat_shading)
brw_clip_tri_flat_shade(c);
-
+
brw_clip_init_clipmask(c);
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_NZ, c->reg.planemask, brw_imm_ud(0));
do_clip = brw_IF(p, BRW_EXECUTE_1);
@@ -488,7 +488,7 @@ void brw_emit_unfilled_clip( struct brw_clip_compile *c )
check_nr_verts(c);
}
brw_ENDIF(p, do_clip);
-
+
emit_unfilled_primitives(c);
brw_clip_kill_thread(c);
}
diff --git a/src/gallium/drivers/i965/brw_clip_util.c b/src/gallium/drivers/i965/brw_clip_util.c
index 23e51ee..2e7608b 100644
--- a/src/gallium/drivers/i965/brw_clip_util.c
+++ b/src/gallium/drivers/i965/brw_clip_util.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -84,7 +84,7 @@ void brw_clip_project_position(struct brw_clip_compile *c, struct brw_reg pos )
{
struct brw_compile *p = &c->func;
- /* calc rhw
+ /* calc rhw
*/
brw_math_invert(p, get_element(pos, W), get_element(pos, W));
@@ -96,7 +96,7 @@ void brw_clip_project_position(struct brw_clip_compile *c, struct brw_reg pos )
}
-static void brw_clip_project_vertex( struct brw_clip_compile *c,
+static void brw_clip_project_vertex( struct brw_clip_compile *c,
struct brw_indirect vert_addr )
{
struct brw_compile *p = &c->func;
@@ -108,14 +108,14 @@ static void brw_clip_project_vertex( struct brw_clip_compile *c,
brw_MOV(p, tmp, deref_4f(vert_addr, c->offset_hpos));
brw_clip_project_position(c, tmp);
brw_MOV(p, deref_4f(vert_addr, c->header_position_offset), tmp);
-
+
release_tmp(c, tmp);
}
-/* Interpolate between two vertices and put the result into a0.0.
+/* Interpolate between two vertices and put the result into a0.0.
* Increment a0.0 accordingly.
*/
void brw_clip_interp_vertex( struct brw_clip_compile *c,
@@ -136,7 +136,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
* back on IGDNG, so needn't change it
*/
brw_copy_indirect_to_indirect(p, dest_ptr, v0_ptr, 1);
-
+
/* Iterate over each attribute (could be done in pairs?)
*/
for (i = 0; i < c->key.nr_attrs; i++) {
@@ -146,28 +146,28 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
delta = i * 16 + 32 * 3;
if (delta == c->offset_edgeflag) {
- if (force_edgeflag)
+ if (force_edgeflag)
brw_MOV(p, deref_4f(dest_ptr, delta), brw_imm_f(1));
else
brw_MOV(p, deref_4f(dest_ptr, delta), deref_4f(v0_ptr, delta));
}
else {
- /* Interpolate:
+ /* Interpolate:
*
* New = attr0 + t*attr1 - t*attr0
*/
- brw_MUL(p,
+ brw_MUL(p,
vec4(brw_null_reg()),
deref_4f(v1_ptr, delta),
t0);
- brw_MAC(p,
- tmp,
+ brw_MAC(p,
+ tmp,
negate(deref_4f(v0_ptr, delta)),
- t0);
-
+ t0);
+
brw_ADD(p,
- deref_4f(dest_ptr, delta),
+ deref_4f(dest_ptr, delta),
deref_4f(v0_ptr, delta),
tmp);
}
@@ -195,7 +195,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
#define MAX_MRF 16
-void brw_clip_emit_vue(struct brw_clip_compile *c,
+void brw_clip_emit_vue(struct brw_clip_compile *c,
struct brw_indirect vert,
GLboolean allocate,
GLboolean eot,
@@ -207,7 +207,7 @@ void brw_clip_emit_vue(struct brw_clip_compile *c,
brw_clip_ff_sync(c);
assert(!(allocate && eot));
-
+
/* Cycle through mrf regs - probably futile as we have to wait for
* the allocation response anyway. Also, the order this function
* is invoked doesn't correspond to the order the instructions will
@@ -219,7 +219,7 @@ void brw_clip_emit_vue(struct brw_clip_compile *c,
c->last_mrf = start + c->nr_regs + 1;
#endif
-
+
/* Copy the vertex from vertn into m1..mN+1:
*/
brw_copy_from_indirect(p, brw_message_reg(start+1), vert, c->nr_regs);
@@ -236,14 +236,14 @@ void brw_clip_emit_vue(struct brw_clip_compile *c,
* entry. Each of these writes instantiates a seperate
* urb entry - (I think... what about 'allocate'?)
*/
- brw_urb_WRITE(p,
+ brw_urb_WRITE(p,
allocate ? c->reg.R0 : retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
start,
c->reg.R0,
allocate,
1, /* used */
c->nr_regs + 1, /* msg length */
- allocate ? 1 : 0, /* response_length */
+ allocate ? 1 : 0, /* response_length */
eot, /* eot */
1, /* writes_complete */
0, /* urb offset */
@@ -260,7 +260,7 @@ void brw_clip_kill_thread(struct brw_clip_compile *c)
/* Send an empty message to kill the thread and release any
* allocated urb entry:
*/
- brw_urb_WRITE(p,
+ brw_urb_WRITE(p,
retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
0,
c->reg.R0,
@@ -303,22 +303,22 @@ void brw_clip_copy_colors( struct brw_clip_compile *c,
struct brw_compile *p = &c->func;
if (c->offset_color0)
- brw_MOV(p,
+ brw_MOV(p,
byte_offset(c->reg.vertex[to], c->offset_color0),
byte_offset(c->reg.vertex[from], c->offset_color0));
if (c->offset_color1)
- brw_MOV(p,
+ brw_MOV(p,
byte_offset(c->reg.vertex[to], c->offset_color1),
byte_offset(c->reg.vertex[from], c->offset_color1));
if (c->offset_bfc0)
- brw_MOV(p,
+ brw_MOV(p,
byte_offset(c->reg.vertex[to], c->offset_bfc0),
byte_offset(c->reg.vertex[from], c->offset_bfc0));
if (c->offset_bfc1)
- brw_MOV(p,
+ brw_MOV(p,
byte_offset(c->reg.vertex[to], c->offset_bfc1),
byte_offset(c->reg.vertex[from], c->offset_bfc1));
}
@@ -329,8 +329,8 @@ void brw_clip_init_clipmask( struct brw_clip_compile *c )
{
struct brw_compile *p = &c->func;
struct brw_reg incoming = get_element_ud(c->reg.R0, 2);
-
- /* Shift so that lowest outcode bit is rightmost:
+
+ /* Shift so that lowest outcode bit is rightmost:
*/
brw_SHR(p, c->reg.planemask, incoming, brw_imm_ud(26));
@@ -343,7 +343,7 @@ void brw_clip_init_clipmask( struct brw_clip_compile *c )
brw_AND(p, tmp, incoming, brw_imm_ud(0x3f<<14));
brw_SHR(p, tmp, tmp, brw_imm_ud(8));
brw_OR(p, c->reg.planemask, c->reg.planemask, tmp);
-
+
release_tmp(c, tmp);
}
}
@@ -359,11 +359,11 @@ void brw_clip_ff_sync(struct brw_clip_compile *c)
need_ff_sync = brw_IF(p, BRW_EXECUTE_1);
{
brw_OR(p, c->reg.ff_sync, c->reg.ff_sync, brw_imm_ud(0x1));
- brw_ff_sync(p,
+ brw_ff_sync(p,
c->reg.R0,
0,
c->reg.R0,
- 1,
+ 1,
1, /* used */
1, /* msg length */
1, /* response length */
@@ -381,7 +381,7 @@ void brw_clip_init_ff_sync(struct brw_clip_compile *c)
{
if (c->need_ff_sync) {
struct brw_compile *p = &c->func;
-
+
brw_MOV(p, c->reg.ff_sync, brw_imm_ud(0));
}
}
diff --git a/src/gallium/drivers/i965/brw_context.c b/src/gallium/drivers/i965/brw_context.c
index a2736f7..9c5ceaf 100644
--- a/src/gallium/drivers/i965/brw_context.c
+++ b/src/gallium/drivers/i965/brw_context.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
diff --git a/src/gallium/drivers/i965/brw_context.h b/src/gallium/drivers/i965/brw_context.h
index d927f38..004b8c7 100644
--- a/src/gallium/drivers/i965/brw_context.h
+++ b/src/gallium/drivers/i965/brw_context.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -53,7 +53,7 @@
*
* VUE - vertex URB entry. An urb entry holding a vertex and usually
* a vertex header. The header contains control information and
- * things like primitive type, Begin/end flags and clip codes.
+ * things like primitive type, Begin/end flags and clip codes.
*
* PUE - primitive URB entry. An urb entry produced by the setup (SF)
* unit holding rasterization and interpolation parameters.
@@ -192,7 +192,7 @@ struct brw_fs_signature {
};
#define brw_fs_signature_size(s) (offsetof(struct brw_fs_signature, input) + \
- ((s)->nr_inputs * sizeof (s)->input[0]))
+ ((s)->nr_inputs * sizeof (s)->input[0]))
struct brw_fragment_shader {
@@ -204,7 +204,7 @@ struct brw_fragment_shader {
unsigned iz_lookup;
/*unsigned wm_lookup;*/
-
+
unsigned uses_depth:1;
unsigned has_flow_control:1;
@@ -374,7 +374,7 @@ struct brw_vs_output_sizes {
* to surface binding table indexes, for WM.
*/
#define BTI_COLOR_BUF(d) (d)
-#define BTI_FRAGMENT_CONSTANTS (BRW_MAX_DRAW_BUFFERS)
+#define BTI_FRAGMENT_CONSTANTS (BRW_MAX_DRAW_BUFFERS)
#define BTI_TEXTURE(t) (BRW_MAX_DRAW_BUFFERS + 1 + (t))
/**
@@ -432,7 +432,7 @@ struct brw_cache_item {
GLuint data_size;
struct brw_cache_item *next;
-};
+};
@@ -448,7 +448,7 @@ struct brw_cache {
GLuint key_size[BRW_MAX_CACHE]; /* for fixed-size keys */
GLuint aux_size[BRW_MAX_CACHE];
char *name[BRW_MAX_CACHE];
-
+
/* Record of the last BOs chosen for each cache_id. Used to set
* brw->state.dirty.cache when a new cache item is chosen.
@@ -489,7 +489,7 @@ struct brw_cached_batch_item {
GLuint sz;
struct brw_cached_batch_item *next;
};
-
+
/* Protect against a future where VERT_ATTRIB_MAX > 32. Wouldn't life
@@ -526,7 +526,7 @@ struct brw_query_object {
/**
* brw_context is derived from pipe_context
*/
-struct brw_context
+struct brw_context
{
struct pipe_context base;
struct brw_chipset chipset;
@@ -538,7 +538,7 @@ struct brw_context
GLuint primitive;
GLuint reduced_primitive;
- /* Active state from the state tracker:
+ /* Active state from the state tracker:
*/
struct {
struct brw_vertex_shader *vertex_shader;
@@ -609,7 +609,7 @@ struct brw_context
struct {
struct u_upload_mgr *upload_vertex;
struct u_upload_mgr *upload_index;
-
+
/* Information on uploaded vertex buffers:
*/
struct {
@@ -657,8 +657,8 @@ struct brw_context
GLuint cs_start;
} urb;
-
- /* BRW_NEW_CURBE_OFFSETS:
+
+ /* BRW_NEW_CURBE_OFFSETS:
*/
struct {
GLuint wm_start; /**< pos of first wm const in CURBE buffer */
@@ -693,7 +693,7 @@ struct brw_context
/** Binding table of pointers to surf_bo entries */
struct brw_winsys_buffer *bind_bo;
struct brw_winsys_buffer *surf_bo[BRW_VS_MAX_SURF];
- GLuint nr_surfaces;
+ GLuint nr_surfaces;
} vs;
struct {
@@ -734,7 +734,7 @@ struct brw_context
struct brw_winsys_buffer *sdc_bo[BRW_MAX_TEX_UNIT];
GLuint render_surf;
- GLuint nr_surfaces;
+ GLuint nr_surfaces;
GLuint max_threads;
struct brw_winsys_buffer *scratch_bo;
diff --git a/src/gallium/drivers/i965/brw_curbe.c b/src/gallium/drivers/i965/brw_curbe.c
index a701de3..0d38109 100644
--- a/src/gallium/drivers/i965/brw_curbe.c
+++ b/src/gallium/drivers/i965/brw_curbe.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -50,7 +50,7 @@ static int calculate_curbe_offsets( struct brw_context *brw )
{
/* CACHE_NEW_WM_PROG */
const GLuint nr_fp_regs = brw->wm.prog_data->curb_read_length;
-
+
/* BRW_NEW_VERTEX_PROGRAM */
const GLuint nr_vp_regs = brw->vs.prog_data->curb_read_length;
GLuint nr_clip_regs = 0;
@@ -80,7 +80,7 @@ static int calculate_curbe_offsets( struct brw_context *brw )
GLuint reg = 0;
- /* Calculate a new layout:
+ /* Calculate a new layout:
*/
reg = 0;
brw->curbe.wm_start = reg;
@@ -185,7 +185,7 @@ static enum pipe_error prepare_curbe_buffer(struct brw_context *brw)
nr_immediate = fs->immediates.nr;
if (nr_immediate) {
- memcpy(&buf[offset],
+ memcpy(&buf[offset],
fs->immediates.data,
nr_immediate * 4 * sizeof(float));
@@ -240,7 +240,7 @@ static enum pipe_error prepare_curbe_buffer(struct brw_context *brw)
nr_immediate = vs->immediates.nr;
if (nr_immediate) {
- memcpy(&buf[offset],
+ memcpy(&buf[offset],
vs->immediates.data,
nr_immediate * 4 * sizeof(float));
@@ -253,7 +253,7 @@ static enum pipe_error prepare_curbe_buffer(struct brw_context *brw)
* buffer objects. If we want to keep on putting them into the
* curbe, makes sense to treat constbuf's specially with malloc.
*/
-
+
/* XXX: what if user's constant buffer is too small?
*/
pipe_buffer_read(&brw->base,
@@ -265,7 +265,7 @@ static enum pipe_error prepare_curbe_buffer(struct brw_context *brw)
}
if (BRW_DEBUG & DEBUG_CURBE) {
- for (i = 0; i < sz*16; i+=4)
+ for (i = 0; i < sz*16; i+=4)
debug_printf("curbe %d.%d: %f %f %f %f\n", i/8, i&4,
buf[i+0], buf[i+1], buf[i+2], buf[i+3]);
@@ -281,7 +281,7 @@ static enum pipe_error prepare_curbe_buffer(struct brw_context *brw)
memcmp(buf, brw->curbe.last_buf, bufsz) == 0) {
/* constants have not changed */
FREE(buf);
- }
+ }
else {
/* constants have changed */
FREE(brw->curbe.last_buf);
@@ -302,7 +302,7 @@ static enum pipe_error prepare_curbe_buffer(struct brw_context *brw)
* discard the curbe buffer after the batch is flushed to
* avoid synchronous updates.
*/
- ret = brw->sws->bo_alloc(brw->sws,
+ ret = brw->sws->bo_alloc(brw->sws,
BRW_BUFFER_TYPE_CURBE,
4096, 1 << 6,
&brw->curbe.curbe_bo);
@@ -374,7 +374,7 @@ const struct brw_tracked_state brw_curbe_buffer = {
BRW_NEW_PSP | /* Implicit - hardware requires this, not used above */
BRW_NEW_CURBE_OFFSETS |
BRW_NEW_BATCH),
- .cache = (CACHE_NEW_WM_PROG)
+ .cache = (CACHE_NEW_WM_PROG)
},
.prepare = prepare_curbe_buffer,
.emit = emit_curbe_buffer,
diff --git a/src/gallium/drivers/i965/brw_defines.h b/src/gallium/drivers/i965/brw_defines.h
index e201ce4..914a729 100644
--- a/src/gallium/drivers/i965/brw_defines.h
+++ b/src/gallium/drivers/i965/brw_defines.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#ifndef BRW_DEFINES_H
#define BRW_DEFINES_H
@@ -90,13 +90,13 @@
#define _3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL 0
#define _3DPRIM_VERTEXBUFFER_ACCESS_RANDOM 1
-#define BRW_ANISORATIO_2 0
-#define BRW_ANISORATIO_4 1
-#define BRW_ANISORATIO_6 2
-#define BRW_ANISORATIO_8 3
-#define BRW_ANISORATIO_10 4
-#define BRW_ANISORATIO_12 5
-#define BRW_ANISORATIO_14 6
+#define BRW_ANISORATIO_2 0
+#define BRW_ANISORATIO_4 1
+#define BRW_ANISORATIO_6 2
+#define BRW_ANISORATIO_8 3
+#define BRW_ANISORATIO_10 4
+#define BRW_ANISORATIO_12 5
+#define BRW_ANISORATIO_14 6
#define BRW_ANISORATIO_16 7
#define BRW_BLENDFACTOR_ONE 0x1
@@ -198,20 +198,20 @@
#define BRW_LOGICOPFUNCTION_COPY 12
#define BRW_LOGICOPFUNCTION_OR_REVERSE 13
#define BRW_LOGICOPFUNCTION_OR 14
-#define BRW_LOGICOPFUNCTION_SET 15
+#define BRW_LOGICOPFUNCTION_SET 15
-#define BRW_MAPFILTER_NEAREST 0x0
-#define BRW_MAPFILTER_LINEAR 0x1
+#define BRW_MAPFILTER_NEAREST 0x0
+#define BRW_MAPFILTER_LINEAR 0x1
#define BRW_MAPFILTER_ANISOTROPIC 0x2
-#define BRW_MIPFILTER_NONE 0
-#define BRW_MIPFILTER_NEAREST 1
+#define BRW_MIPFILTER_NONE 0
+#define BRW_MIPFILTER_NEAREST 1
#define BRW_MIPFILTER_LINEAR 3
#define BRW_POLYGON_FRONT_FACING 0
#define BRW_POLYGON_BACK_FACING 1
-#define BRW_PREFILTER_ALWAYS 0x0
+#define BRW_PREFILTER_ALWAYS 0x0
#define BRW_PREFILTER_NEVER 0x1
#define BRW_PREFILTER_LESS 0x2
#define BRW_PREFILTER_EQUAL 0x3
@@ -221,10 +221,10 @@
#define BRW_PREFILTER_GEQUAL 0x7
#define BRW_PROVOKING_VERTEX_0 0
-#define BRW_PROVOKING_VERTEX_1 1
+#define BRW_PROVOKING_VERTEX_1 1
#define BRW_PROVOKING_VERTEX_2 2
-#define BRW_RASTRULE_UPPER_LEFT 0
+#define BRW_RASTRULE_UPPER_LEFT 0
#define BRW_RASTRULE_UPPER_RIGHT 1
/* These are listed as "Reserved, but not seen as useful"
* in Intel documentation (page 212, "Point Rasterization Rule",
@@ -232,7 +232,7 @@
* "Intel® 965 Express Chipset Family and Intel® G35 Express
* Chipset Graphics Controller Programmer's Reference Manual,
* Volume 2: 3D/Media", Revision 1.0b as of January 2008,
- * available at
+ * available at
* http://intellinuxgraphics.org/documentation.html
* at the time of this writing).
*
@@ -261,85 +261,85 @@
#define BRW_SURFACE_MIPMAPLAYOUT_BELOW 0
#define BRW_SURFACE_MIPMAPLAYOUT_RIGHT 1
-#define BRW_SURFACEFORMAT_R32G32B32A32_FLOAT 0x000
-#define BRW_SURFACEFORMAT_R32G32B32A32_SINT 0x001
-#define BRW_SURFACEFORMAT_R32G32B32A32_UINT 0x002
-#define BRW_SURFACEFORMAT_R32G32B32A32_UNORM 0x003
-#define BRW_SURFACEFORMAT_R32G32B32A32_SNORM 0x004
-#define BRW_SURFACEFORMAT_R64G64_FLOAT 0x005
-#define BRW_SURFACEFORMAT_R32G32B32X32_FLOAT 0x006
+#define BRW_SURFACEFORMAT_R32G32B32A32_FLOAT 0x000
+#define BRW_SURFACEFORMAT_R32G32B32A32_SINT 0x001
+#define BRW_SURFACEFORMAT_R32G32B32A32_UINT 0x002
+#define BRW_SURFACEFORMAT_R32G32B32A32_UNORM 0x003
+#define BRW_SURFACEFORMAT_R32G32B32A32_SNORM 0x004
+#define BRW_SURFACEFORMAT_R64G64_FLOAT 0x005
+#define BRW_SURFACEFORMAT_R32G32B32X32_FLOAT 0x006
#define BRW_SURFACEFORMAT_R32G32B32A32_SSCALED 0x007
#define BRW_SURFACEFORMAT_R32G32B32A32_USCALED 0x008
-#define BRW_SURFACEFORMAT_R32G32B32_FLOAT 0x040
-#define BRW_SURFACEFORMAT_R32G32B32_SINT 0x041
-#define BRW_SURFACEFORMAT_R32G32B32_UINT 0x042
-#define BRW_SURFACEFORMAT_R32G32B32_UNORM 0x043
-#define BRW_SURFACEFORMAT_R32G32B32_SNORM 0x044
-#define BRW_SURFACEFORMAT_R32G32B32_SSCALED 0x045
-#define BRW_SURFACEFORMAT_R32G32B32_USCALED 0x046
-#define BRW_SURFACEFORMAT_R16G16B16A16_UNORM 0x080
-#define BRW_SURFACEFORMAT_R16G16B16A16_SNORM 0x081
-#define BRW_SURFACEFORMAT_R16G16B16A16_SINT 0x082
-#define BRW_SURFACEFORMAT_R16G16B16A16_UINT 0x083
-#define BRW_SURFACEFORMAT_R16G16B16A16_FLOAT 0x084
-#define BRW_SURFACEFORMAT_R32G32_FLOAT 0x085
-#define BRW_SURFACEFORMAT_R32G32_SINT 0x086
-#define BRW_SURFACEFORMAT_R32G32_UINT 0x087
-#define BRW_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS 0x088
-#define BRW_SURFACEFORMAT_X32_TYPELESS_G8X24_UINT 0x089
-#define BRW_SURFACEFORMAT_L32A32_FLOAT 0x08A
-#define BRW_SURFACEFORMAT_R32G32_UNORM 0x08B
-#define BRW_SURFACEFORMAT_R32G32_SNORM 0x08C
-#define BRW_SURFACEFORMAT_R64_FLOAT 0x08D
-#define BRW_SURFACEFORMAT_R16G16B16X16_UNORM 0x08E
-#define BRW_SURFACEFORMAT_R16G16B16X16_FLOAT 0x08F
-#define BRW_SURFACEFORMAT_A32X32_FLOAT 0x090
-#define BRW_SURFACEFORMAT_L32X32_FLOAT 0x091
-#define BRW_SURFACEFORMAT_I32X32_FLOAT 0x092
+#define BRW_SURFACEFORMAT_R32G32B32_FLOAT 0x040
+#define BRW_SURFACEFORMAT_R32G32B32_SINT 0x041
+#define BRW_SURFACEFORMAT_R32G32B32_UINT 0x042
+#define BRW_SURFACEFORMAT_R32G32B32_UNORM 0x043
+#define BRW_SURFACEFORMAT_R32G32B32_SNORM 0x044
+#define BRW_SURFACEFORMAT_R32G32B32_SSCALED 0x045
+#define BRW_SURFACEFORMAT_R32G32B32_USCALED 0x046
+#define BRW_SURFACEFORMAT_R16G16B16A16_UNORM 0x080
+#define BRW_SURFACEFORMAT_R16G16B16A16_SNORM 0x081
+#define BRW_SURFACEFORMAT_R16G16B16A16_SINT 0x082
+#define BRW_SURFACEFORMAT_R16G16B16A16_UINT 0x083
+#define BRW_SURFACEFORMAT_R16G16B16A16_FLOAT 0x084
+#define BRW_SURFACEFORMAT_R32G32_FLOAT 0x085
+#define BRW_SURFACEFORMAT_R32G32_SINT 0x086
+#define BRW_SURFACEFORMAT_R32G32_UINT 0x087
+#define BRW_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS 0x088
+#define BRW_SURFACEFORMAT_X32_TYPELESS_G8X24_UINT 0x089
+#define BRW_SURFACEFORMAT_L32A32_FLOAT 0x08A
+#define BRW_SURFACEFORMAT_R32G32_UNORM 0x08B
+#define BRW_SURFACEFORMAT_R32G32_SNORM 0x08C
+#define BRW_SURFACEFORMAT_R64_FLOAT 0x08D
+#define BRW_SURFACEFORMAT_R16G16B16X16_UNORM 0x08E
+#define BRW_SURFACEFORMAT_R16G16B16X16_FLOAT 0x08F
+#define BRW_SURFACEFORMAT_A32X32_FLOAT 0x090
+#define BRW_SURFACEFORMAT_L32X32_FLOAT 0x091
+#define BRW_SURFACEFORMAT_I32X32_FLOAT 0x092
#define BRW_SURFACEFORMAT_R16G16B16A16_SSCALED 0x093
#define BRW_SURFACEFORMAT_R16G16B16A16_USCALED 0x094
#define BRW_SURFACEFORMAT_R32G32_SSCALED 0x095
#define BRW_SURFACEFORMAT_R32G32_USCALED 0x096
-#define BRW_SURFACEFORMAT_B8G8R8A8_UNORM 0x0C0
-#define BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB 0x0C1
-#define BRW_SURFACEFORMAT_R10G10B10A2_UNORM 0x0C2
-#define BRW_SURFACEFORMAT_R10G10B10A2_UNORM_SRGB 0x0C3
-#define BRW_SURFACEFORMAT_R10G10B10A2_UINT 0x0C4
-#define BRW_SURFACEFORMAT_R10G10B10_SNORM_A2_UNORM 0x0C5
-#define BRW_SURFACEFORMAT_R8G8B8A8_UNORM 0x0C7
-#define BRW_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB 0x0C8
-#define BRW_SURFACEFORMAT_R8G8B8A8_SNORM 0x0C9
-#define BRW_SURFACEFORMAT_R8G8B8A8_SINT 0x0CA
-#define BRW_SURFACEFORMAT_R8G8B8A8_UINT 0x0CB
-#define BRW_SURFACEFORMAT_R16G16_UNORM 0x0CC
-#define BRW_SURFACEFORMAT_R16G16_SNORM 0x0CD
-#define BRW_SURFACEFORMAT_R16G16_SINT 0x0CE
-#define BRW_SURFACEFORMAT_R16G16_UINT 0x0CF
-#define BRW_SURFACEFORMAT_R16G16_FLOAT 0x0D0
-#define BRW_SURFACEFORMAT_B10G10R10A2_UNORM 0x0D1
-#define BRW_SURFACEFORMAT_B10G10R10A2_UNORM_SRGB 0x0D2
-#define BRW_SURFACEFORMAT_R11G11B10_FLOAT 0x0D3
-#define BRW_SURFACEFORMAT_R32_SINT 0x0D6
-#define BRW_SURFACEFORMAT_R32_UINT 0x0D7
-#define BRW_SURFACEFORMAT_R32_FLOAT 0x0D8
-#define BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS 0x0D9
-#define BRW_SURFACEFORMAT_X24_TYPELESS_G8_UINT 0x0DA
-#define BRW_SURFACEFORMAT_L16A16_UNORM 0x0DF
-#define BRW_SURFACEFORMAT_I24X8_UNORM 0x0E0
-#define BRW_SURFACEFORMAT_L24X8_UNORM 0x0E1
-#define BRW_SURFACEFORMAT_A24X8_UNORM 0x0E2
-#define BRW_SURFACEFORMAT_I32_FLOAT 0x0E3
-#define BRW_SURFACEFORMAT_L32_FLOAT 0x0E4
-#define BRW_SURFACEFORMAT_A32_FLOAT 0x0E5
-#define BRW_SURFACEFORMAT_B8G8R8X8_UNORM 0x0E9
-#define BRW_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB 0x0EA
-#define BRW_SURFACEFORMAT_R8G8B8X8_UNORM 0x0EB
-#define BRW_SURFACEFORMAT_R8G8B8X8_UNORM_SRGB 0x0EC
-#define BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP 0x0ED
-#define BRW_SURFACEFORMAT_B10G10R10X2_UNORM 0x0EE
-#define BRW_SURFACEFORMAT_L16A16_FLOAT 0x0F0
-#define BRW_SURFACEFORMAT_R32_UNORM 0x0F1
-#define BRW_SURFACEFORMAT_R32_SNORM 0x0F2
+#define BRW_SURFACEFORMAT_B8G8R8A8_UNORM 0x0C0
+#define BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB 0x0C1
+#define BRW_SURFACEFORMAT_R10G10B10A2_UNORM 0x0C2
+#define BRW_SURFACEFORMAT_R10G10B10A2_UNORM_SRGB 0x0C3
+#define BRW_SURFACEFORMAT_R10G10B10A2_UINT 0x0C4
+#define BRW_SURFACEFORMAT_R10G10B10_SNORM_A2_UNORM 0x0C5
+#define BRW_SURFACEFORMAT_R8G8B8A8_UNORM 0x0C7
+#define BRW_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB 0x0C8
+#define BRW_SURFACEFORMAT_R8G8B8A8_SNORM 0x0C9
+#define BRW_SURFACEFORMAT_R8G8B8A8_SINT 0x0CA
+#define BRW_SURFACEFORMAT_R8G8B8A8_UINT 0x0CB
+#define BRW_SURFACEFORMAT_R16G16_UNORM 0x0CC
+#define BRW_SURFACEFORMAT_R16G16_SNORM 0x0CD
+#define BRW_SURFACEFORMAT_R16G16_SINT 0x0CE
+#define BRW_SURFACEFORMAT_R16G16_UINT 0x0CF
+#define BRW_SURFACEFORMAT_R16G16_FLOAT 0x0D0
+#define BRW_SURFACEFORMAT_B10G10R10A2_UNORM 0x0D1
+#define BRW_SURFACEFORMAT_B10G10R10A2_UNORM_SRGB 0x0D2
+#define BRW_SURFACEFORMAT_R11G11B10_FLOAT 0x0D3
+#define BRW_SURFACEFORMAT_R32_SINT 0x0D6
+#define BRW_SURFACEFORMAT_R32_UINT 0x0D7
+#define BRW_SURFACEFORMAT_R32_FLOAT 0x0D8
+#define BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS 0x0D9
+#define BRW_SURFACEFORMAT_X24_TYPELESS_G8_UINT 0x0DA
+#define BRW_SURFACEFORMAT_L16A16_UNORM 0x0DF
+#define BRW_SURFACEFORMAT_I24X8_UNORM 0x0E0
+#define BRW_SURFACEFORMAT_L24X8_UNORM 0x0E1
+#define BRW_SURFACEFORMAT_A24X8_UNORM 0x0E2
+#define BRW_SURFACEFORMAT_I32_FLOAT 0x0E3
+#define BRW_SURFACEFORMAT_L32_FLOAT 0x0E4
+#define BRW_SURFACEFORMAT_A32_FLOAT 0x0E5
+#define BRW_SURFACEFORMAT_B8G8R8X8_UNORM 0x0E9
+#define BRW_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB 0x0EA
+#define BRW_SURFACEFORMAT_R8G8B8X8_UNORM 0x0EB
+#define BRW_SURFACEFORMAT_R8G8B8X8_UNORM_SRGB 0x0EC
+#define BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP 0x0ED
+#define BRW_SURFACEFORMAT_B10G10R10X2_UNORM 0x0EE
+#define BRW_SURFACEFORMAT_L16A16_FLOAT 0x0F0
+#define BRW_SURFACEFORMAT_R32_UNORM 0x0F1
+#define BRW_SURFACEFORMAT_R32_SNORM 0x0F2
#define BRW_SURFACEFORMAT_R10G10B10X2_USCALED 0x0F3
#define BRW_SURFACEFORMAT_R8G8B8A8_SSCALED 0x0F4
#define BRW_SURFACEFORMAT_R8G8B8A8_USCALED 0x0F5
@@ -347,25 +347,25 @@
#define BRW_SURFACEFORMAT_R16G16_USCALED 0x0F7
#define BRW_SURFACEFORMAT_R32_SSCALED 0x0F8
#define BRW_SURFACEFORMAT_R32_USCALED 0x0F9
-#define BRW_SURFACEFORMAT_B5G6R5_UNORM 0x100
-#define BRW_SURFACEFORMAT_B5G6R5_UNORM_SRGB 0x101
-#define BRW_SURFACEFORMAT_B5G5R5A1_UNORM 0x102
-#define BRW_SURFACEFORMAT_B5G5R5A1_UNORM_SRGB 0x103
-#define BRW_SURFACEFORMAT_B4G4R4A4_UNORM 0x104
-#define BRW_SURFACEFORMAT_B4G4R4A4_UNORM_SRGB 0x105
-#define BRW_SURFACEFORMAT_R8G8_UNORM 0x106
-#define BRW_SURFACEFORMAT_R8G8_SNORM 0x107
-#define BRW_SURFACEFORMAT_R8G8_SINT 0x108
-#define BRW_SURFACEFORMAT_R8G8_UINT 0x109
-#define BRW_SURFACEFORMAT_R16_UNORM 0x10A
-#define BRW_SURFACEFORMAT_R16_SNORM 0x10B
-#define BRW_SURFACEFORMAT_R16_SINT 0x10C
-#define BRW_SURFACEFORMAT_R16_UINT 0x10D
-#define BRW_SURFACEFORMAT_R16_FLOAT 0x10E
-#define BRW_SURFACEFORMAT_I16_UNORM 0x111
-#define BRW_SURFACEFORMAT_L16_UNORM 0x112
-#define BRW_SURFACEFORMAT_A16_UNORM 0x113
-#define BRW_SURFACEFORMAT_L8A8_UNORM 0x114
+#define BRW_SURFACEFORMAT_B5G6R5_UNORM 0x100
+#define BRW_SURFACEFORMAT_B5G6R5_UNORM_SRGB 0x101
+#define BRW_SURFACEFORMAT_B5G5R5A1_UNORM 0x102
+#define BRW_SURFACEFORMAT_B5G5R5A1_UNORM_SRGB 0x103
+#define BRW_SURFACEFORMAT_B4G4R4A4_UNORM 0x104
+#define BRW_SURFACEFORMAT_B4G4R4A4_UNORM_SRGB 0x105
+#define BRW_SURFACEFORMAT_R8G8_UNORM 0x106
+#define BRW_SURFACEFORMAT_R8G8_SNORM 0x107
+#define BRW_SURFACEFORMAT_R8G8_SINT 0x108
+#define BRW_SURFACEFORMAT_R8G8_UINT 0x109
+#define BRW_SURFACEFORMAT_R16_UNORM 0x10A
+#define BRW_SURFACEFORMAT_R16_SNORM 0x10B
+#define BRW_SURFACEFORMAT_R16_SINT 0x10C
+#define BRW_SURFACEFORMAT_R16_UINT 0x10D
+#define BRW_SURFACEFORMAT_R16_FLOAT 0x10E
+#define BRW_SURFACEFORMAT_I16_UNORM 0x111
+#define BRW_SURFACEFORMAT_L16_UNORM 0x112
+#define BRW_SURFACEFORMAT_A16_UNORM 0x113
+#define BRW_SURFACEFORMAT_L8A8_UNORM 0x114
#define BRW_SURFACEFORMAT_I16_FLOAT 0x115
#define BRW_SURFACEFORMAT_L16_FLOAT 0x116
#define BRW_SURFACEFORMAT_A16_FLOAT 0x117
@@ -377,45 +377,45 @@
#define BRW_SURFACEFORMAT_R8G8_USCALED 0x11D
#define BRW_SURFACEFORMAT_R16_SSCALED 0x11E
#define BRW_SURFACEFORMAT_R16_USCALED 0x11F
-#define BRW_SURFACEFORMAT_R8_UNORM 0x140
-#define BRW_SURFACEFORMAT_R8_SNORM 0x141
-#define BRW_SURFACEFORMAT_R8_SINT 0x142
-#define BRW_SURFACEFORMAT_R8_UINT 0x143
-#define BRW_SURFACEFORMAT_A8_UNORM 0x144
-#define BRW_SURFACEFORMAT_I8_UNORM 0x145
-#define BRW_SURFACEFORMAT_L8_UNORM 0x146
-#define BRW_SURFACEFORMAT_P4A4_UNORM 0x147
+#define BRW_SURFACEFORMAT_R8_UNORM 0x140
+#define BRW_SURFACEFORMAT_R8_SNORM 0x141
+#define BRW_SURFACEFORMAT_R8_SINT 0x142
+#define BRW_SURFACEFORMAT_R8_UINT 0x143
+#define BRW_SURFACEFORMAT_A8_UNORM 0x144
+#define BRW_SURFACEFORMAT_I8_UNORM 0x145
+#define BRW_SURFACEFORMAT_L8_UNORM 0x146
+#define BRW_SURFACEFORMAT_P4A4_UNORM 0x147
#define BRW_SURFACEFORMAT_A4P4_UNORM 0x148
#define BRW_SURFACEFORMAT_R8_SSCALED 0x149
#define BRW_SURFACEFORMAT_R8_USCALED 0x14A
#define BRW_SURFACEFORMAT_L8_UNORM_SRGB 0x14C
-#define BRW_SURFACEFORMAT_R1_UINT 0x181
-#define BRW_SURFACEFORMAT_YCRCB_NORMAL 0x182
-#define BRW_SURFACEFORMAT_YCRCB_SWAPUVY 0x183
-#define BRW_SURFACEFORMAT_BC1_UNORM 0x186
-#define BRW_SURFACEFORMAT_BC2_UNORM 0x187
-#define BRW_SURFACEFORMAT_BC3_UNORM 0x188
-#define BRW_SURFACEFORMAT_BC4_UNORM 0x189
-#define BRW_SURFACEFORMAT_BC5_UNORM 0x18A
-#define BRW_SURFACEFORMAT_BC1_UNORM_SRGB 0x18B
-#define BRW_SURFACEFORMAT_BC2_UNORM_SRGB 0x18C
-#define BRW_SURFACEFORMAT_BC3_UNORM_SRGB 0x18D
-#define BRW_SURFACEFORMAT_MONO8 0x18E
-#define BRW_SURFACEFORMAT_YCRCB_SWAPUV 0x18F
-#define BRW_SURFACEFORMAT_YCRCB_SWAPY 0x190
-#define BRW_SURFACEFORMAT_DXT1_RGB 0x191
-#define BRW_SURFACEFORMAT_FXT1 0x192
-#define BRW_SURFACEFORMAT_R8G8B8_UNORM 0x193
-#define BRW_SURFACEFORMAT_R8G8B8_SNORM 0x194
-#define BRW_SURFACEFORMAT_R8G8B8_SSCALED 0x195
-#define BRW_SURFACEFORMAT_R8G8B8_USCALED 0x196
-#define BRW_SURFACEFORMAT_R64G64B64A64_FLOAT 0x197
-#define BRW_SURFACEFORMAT_R64G64B64_FLOAT 0x198
-#define BRW_SURFACEFORMAT_BC4_SNORM 0x199
-#define BRW_SURFACEFORMAT_BC5_SNORM 0x19A
-#define BRW_SURFACEFORMAT_R16G16B16_UNORM 0x19C
-#define BRW_SURFACEFORMAT_R16G16B16_SNORM 0x19D
-#define BRW_SURFACEFORMAT_R16G16B16_SSCALED 0x19E
+#define BRW_SURFACEFORMAT_R1_UINT 0x181
+#define BRW_SURFACEFORMAT_YCRCB_NORMAL 0x182
+#define BRW_SURFACEFORMAT_YCRCB_SWAPUVY 0x183
+#define BRW_SURFACEFORMAT_BC1_UNORM 0x186
+#define BRW_SURFACEFORMAT_BC2_UNORM 0x187
+#define BRW_SURFACEFORMAT_BC3_UNORM 0x188
+#define BRW_SURFACEFORMAT_BC4_UNORM 0x189
+#define BRW_SURFACEFORMAT_BC5_UNORM 0x18A
+#define BRW_SURFACEFORMAT_BC1_UNORM_SRGB 0x18B
+#define BRW_SURFACEFORMAT_BC2_UNORM_SRGB 0x18C
+#define BRW_SURFACEFORMAT_BC3_UNORM_SRGB 0x18D
+#define BRW_SURFACEFORMAT_MONO8 0x18E
+#define BRW_SURFACEFORMAT_YCRCB_SWAPUV 0x18F
+#define BRW_SURFACEFORMAT_YCRCB_SWAPY 0x190
+#define BRW_SURFACEFORMAT_DXT1_RGB 0x191
+#define BRW_SURFACEFORMAT_FXT1 0x192
+#define BRW_SURFACEFORMAT_R8G8B8_UNORM 0x193
+#define BRW_SURFACEFORMAT_R8G8B8_SNORM 0x194
+#define BRW_SURFACEFORMAT_R8G8B8_SSCALED 0x195
+#define BRW_SURFACEFORMAT_R8G8B8_USCALED 0x196
+#define BRW_SURFACEFORMAT_R64G64B64A64_FLOAT 0x197
+#define BRW_SURFACEFORMAT_R64G64B64_FLOAT 0x198
+#define BRW_SURFACEFORMAT_BC4_SNORM 0x199
+#define BRW_SURFACEFORMAT_BC5_SNORM 0x19A
+#define BRW_SURFACEFORMAT_R16G16B16_UNORM 0x19C
+#define BRW_SURFACEFORMAT_R16G16B16_SNORM 0x19D
+#define BRW_SURFACEFORMAT_R16G16B16_SSCALED 0x19E
#define BRW_SURFACEFORMAT_R16G16B16_USCALED 0x19F
#define BRW_SURFACEFORMAT_INVALID 0xFFF
@@ -589,7 +589,7 @@
#define BRW_ARF_NULL 0x00
#define BRW_ARF_ADDRESS 0x10
-#define BRW_ARF_ACCUMULATOR 0x20
+#define BRW_ARF_ACCUMULATOR 0x20
#define BRW_ARF_FLAG 0x30
#define BRW_ARF_MASK 0x40
#define BRW_ARF_MASK_STACK 0x50
diff --git a/src/gallium/drivers/i965/brw_disasm.c b/src/gallium/drivers/i965/brw_disasm.c
index 28c8351..ed05c1d 100644
--- a/src/gallium/drivers/i965/brw_disasm.c
+++ b/src/gallium/drivers/i965/brw_disasm.c
@@ -904,7 +904,7 @@ int brw_disasm_insn (FILE *file, const struct brw_instruction *inst)
}
-int brw_disasm (FILE *file,
+int brw_disasm (FILE *file,
const struct brw_instruction *inst,
unsigned count)
{
diff --git a/src/gallium/drivers/i965/brw_disasm.h b/src/gallium/drivers/i965/brw_disasm.h
index ba5b109..21aa19b 100644
--- a/src/gallium/drivers/i965/brw_disasm.h
+++ b/src/gallium/drivers/i965/brw_disasm.h
@@ -28,7 +28,7 @@
struct brw_instruction;
int brw_disasm_insn (FILE *file, const struct brw_instruction *inst);
-int brw_disasm (FILE *file,
+int brw_disasm (FILE *file,
const struct brw_instruction *inst,
unsigned count);
diff --git a/src/gallium/drivers/i965/brw_draw.c b/src/gallium/drivers/i965/brw_draw.c
index 3ab9024..31312d0 100644
--- a/src/gallium/drivers/i965/brw_draw.c
+++ b/src/gallium/drivers/i965/brw_draw.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -64,7 +64,7 @@ static int brw_set_prim(struct brw_context *brw, unsigned prim )
if (BRW_DEBUG & DEBUG_PRIMS)
debug_printf("PRIM: %s\n", u_prim_name(prim));
-
+
if (prim != brw->primitive) {
unsigned reduced_prim;
@@ -94,7 +94,7 @@ static int brw_emit_prim(struct brw_context *brw,
if (BRW_DEBUG & DEBUG_PRIMS)
debug_printf("%s start %d count %d indexed %d hw_prim %d\n",
- __FUNCTION__, start, count, indexed, hw_prim);
+ __FUNCTION__, start, count, indexed, hw_prim);
prim_packet.header.opcode = CMD_3D_PRIM;
prim_packet.header.length = sizeof(prim_packet)/4 - 2;
@@ -143,7 +143,7 @@ static int brw_emit_prim(struct brw_context *brw,
static int
try_draw_range_elements(struct brw_context *brw,
boolean indexed,
- unsigned hw_prim,
+ unsigned hw_prim,
unsigned start, unsigned count)
{
int ret;
@@ -164,7 +164,7 @@ try_draw_range_elements(struct brw_context *brw,
ret = brw_upload_state(brw);
if (ret)
return ret;
-
+
ret = brw_emit_prim(brw, start, count, indexed, hw_prim);
if (ret)
return ret;
@@ -196,8 +196,8 @@ brw_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
* XXX: do we really care?
*/
if (brw->curr.min_index != info->min_index ||
- brw->curr.max_index != info->max_index)
- {
+ brw->curr.max_index != info->max_index)
+ {
brw->curr.min_index = info->min_index;
brw->curr.max_index = info->max_index;
brw->state.dirty.mesa |= PIPE_NEW_INDEX_RANGE;
@@ -222,7 +222,7 @@ brw_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
boolean brw_draw_init( struct brw_context *brw )
{
- /* Register our drawing function:
+ /* Register our drawing function:
*/
brw->base.draw_vbo = brw_draw_vbo;
diff --git a/src/gallium/drivers/i965/brw_draw.h b/src/gallium/drivers/i965/brw_draw.h
index 8dc5dbc..ef49c7e 100644
--- a/src/gallium/drivers/i965/brw_draw.h
+++ b/src/gallium/drivers/i965/brw_draw.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2005 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef BRW_DRAW_H
diff --git a/src/gallium/drivers/i965/brw_draw_upload.c b/src/gallium/drivers/i965/brw_draw_upload.c
index ebeb1e1..2978ca1 100644
--- a/src/gallium/drivers/i965/brw_draw_upload.c
+++ b/src/gallium/drivers/i965/brw_draw_upload.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "pipe/p_context.h"
@@ -70,7 +70,7 @@ static int brw_prepare_vertices(struct brw_context *brw)
struct brw_winsys_buffer *bo;
struct pipe_resource *upload_buf = NULL;
unsigned offset;
-
+
if (BRW_DEBUG & DEBUG_VERTS)
debug_printf("%s vb[%d] user:%d offset:0x%x sz:0x%x stride:0x%x\n",
__FUNCTION__, i,
@@ -85,12 +85,12 @@ static int brw_prepare_vertices(struct brw_context *brw)
* zero-stride buffers & have them use additional constants (or
* add support for >1 constant buffer) instead.
*/
- unsigned size = (vb->stride == 0 ?
+ unsigned size = (vb->stride == 0 ?
vb->buffer->width0 - vb->buffer_offset :
MAX2(vb->buffer->width0 - vb->buffer_offset,
vb->stride * (max_index + 1 - min_index)));
- ret = u_upload_buffer( brw->vb.upload_vertex,
+ ret = u_upload_buffer( brw->vb.upload_vertex,
vb->buffer_offset + min_index * vb->stride,
size,
vb->buffer,
@@ -100,7 +100,7 @@ static int brw_prepare_vertices(struct brw_context *brw)
return ret;
bo = brw_buffer(upload_buf)->bo;
-
+
assert(offset + size <= bo->size);
}
else
@@ -110,7 +110,7 @@ static int brw_prepare_vertices(struct brw_context *brw)
}
assert(offset < bo->size);
-
+
/* Set up post-upload info about this vertex buffer:
*/
brw->vb.vb[i].offset = offset;
@@ -280,7 +280,7 @@ static int brw_prepare_indices(struct brw_context *brw)
* In gallium this will happen in the case where successive draw
* calls are made with (distinct?) userbuffers, but the upload_mgr
* places the data into a single winsys buffer.
- *
+ *
* This statechange doesn't raise any state flags and is always
* just merged into the final draw packet:
*/
diff --git a/src/gallium/drivers/i965/brw_eu.c b/src/gallium/drivers/i965/brw_eu.c
index a8fcb5f..f540c36 100644
--- a/src/gallium/drivers/i965/brw_eu.c
+++ b/src/gallium/drivers/i965/brw_eu.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "util/u_memory.h"
#include "brw_context.h"
@@ -53,7 +53,7 @@ void brw_set_predicate_control_flag_value( struct brw_compile *p, GLuint value )
}
p->current->header.predicate_control = BRW_PREDICATE_NORMAL;
- }
+ }
}
void brw_set_predicate_control( struct brw_compile *p, GLuint pc )
@@ -90,7 +90,7 @@ void brw_push_insn_state( struct brw_compile *p )
{
assert(p->current != &p->stack[BRW_EU_MAX_INSN_STACK-1]);
memcpy(p->current+1, p->current, sizeof(struct brw_instruction));
- p->current++;
+ p->current++;
}
void brw_pop_insn_state( struct brw_compile *p )
@@ -114,7 +114,7 @@ void brw_init_compile( struct brw_context *brw, struct brw_compile *p )
brw_set_mask_control(p, BRW_MASK_ENABLE); /* what does this do? */
brw_set_saturate(p, 0);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
- brw_set_predicate_control_flag_value(p, 0xff);
+ brw_set_predicate_control_flag_value(p, 0xff);
}
diff --git a/src/gallium/drivers/i965/brw_eu.h b/src/gallium/drivers/i965/brw_eu.h
index af509b2..261857f 100644
--- a/src/gallium/drivers/i965/brw_eu.h
+++ b/src/gallium/drivers/i965/brw_eu.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#ifndef BRW_EU_H
#define BRW_EU_H
@@ -88,7 +88,7 @@ struct brw_reg
GLuint address_mode:1; /* relative addressing, hopefully! */
GLuint pad0:1;
- union {
+ union {
struct {
GLuint swizzle:8; /* src only, align16 only */
GLuint writemask:4; /* dest only, align16 only */
@@ -99,7 +99,7 @@ struct brw_reg
GLfloat f;
GLint d;
GLuint ud;
- } dw1;
+ } dw1;
};
@@ -313,7 +313,7 @@ static INLINE struct brw_reg retype( struct brw_reg reg,
static INLINE struct brw_reg suboffset( struct brw_reg reg,
GLuint delta )
-{
+{
reg.subnr += delta * type_sz(reg.type);
return reg;
}
@@ -335,7 +335,7 @@ static INLINE struct brw_reg byte_offset( struct brw_reg reg,
reg.subnr = newoffset % REG_SIZE;
return reg;
}
-
+
/** Construct unsigned word[16] register */
static INLINE struct brw_reg brw_uw16_reg( GLuint file,
@@ -371,7 +371,7 @@ static INLINE struct brw_reg brw_imm_reg( GLuint type )
BRW_WIDTH_1,
BRW_HORIZONTAL_STRIDE_0,
0,
- 0);
+ 0);
}
/** Construct float immediate register */
@@ -444,8 +444,8 @@ static INLINE struct brw_reg brw_imm_vf( GLuint v )
#define VF_ONE 0x30
#define VF_NEG (1<<7)
-static INLINE struct brw_reg brw_imm_vf4( GLuint v0,
- GLuint v1,
+static INLINE struct brw_reg brw_imm_vf4( GLuint v0,
+ GLuint v1,
GLuint v2,
GLuint v3)
{
@@ -505,15 +505,15 @@ static INLINE struct brw_reg brw_uw16_grf( GLuint nr, GLuint subnr )
/** Construct null register (usually used for setting condition codes) */
static INLINE struct brw_reg brw_null_reg( void )
{
- return brw_vec8_reg(BRW_ARCHITECTURE_REGISTER_FILE,
- BRW_ARF_NULL,
+ return brw_vec8_reg(BRW_ARCHITECTURE_REGISTER_FILE,
+ BRW_ARF_NULL,
0);
}
static INLINE struct brw_reg brw_address_reg( GLuint subnr )
{
- return brw_uw1_reg(BRW_ARCHITECTURE_REGISTER_FILE,
- BRW_ARF_ADDRESS,
+ return brw_uw1_reg(BRW_ARCHITECTURE_REGISTER_FILE,
+ BRW_ARF_ADDRESS,
subnr);
}
@@ -523,8 +523,8 @@ static INLINE struct brw_reg brw_address_reg( GLuint subnr )
*/
static INLINE struct brw_reg brw_ip_reg( void )
{
- return brw_reg(BRW_ARCHITECTURE_REGISTER_FILE,
- BRW_ARF_IP,
+ return brw_reg(BRW_ARCHITECTURE_REGISTER_FILE,
+ BRW_ARF_IP,
0,
BRW_REGISTER_TYPE_UD,
BRW_VERTICAL_STRIDE_4, /* ? */
@@ -536,8 +536,8 @@ static INLINE struct brw_reg brw_ip_reg( void )
static INLINE struct brw_reg brw_acc_reg( void )
{
- return brw_vec8_reg(BRW_ARCHITECTURE_REGISTER_FILE,
- BRW_ARF_ACCUMULATOR,
+ return brw_vec8_reg(BRW_ARCHITECTURE_REGISTER_FILE,
+ BRW_ARF_ACCUMULATOR,
0);
}
@@ -636,7 +636,7 @@ static INLINE struct brw_reg get_element_ud( struct brw_reg reg, GLuint elt )
static INLINE struct brw_reg brw_swizzle( struct brw_reg reg,
GLuint x,
- GLuint y,
+ GLuint y,
GLuint z,
GLuint w)
{
@@ -776,7 +776,7 @@ void brw_set_conditionalmod( struct brw_compile *p, GLuint conditional );
void brw_init_compile( struct brw_context *, struct brw_compile *p );
-enum pipe_error brw_get_program( struct brw_compile *p,
+enum pipe_error brw_get_program( struct brw_compile *p,
const GLuint **program,
GLuint *sz );
@@ -918,13 +918,13 @@ void brw_dp_WRITE_16( struct brw_compile *p,
/* If/else/endif. Works by manipulating the execution flags on each
* channel.
*/
-struct brw_instruction *brw_IF(struct brw_compile *p,
+struct brw_instruction *brw_IF(struct brw_compile *p,
GLuint execute_size);
-struct brw_instruction *brw_ELSE(struct brw_compile *p,
+struct brw_instruction *brw_ELSE(struct brw_compile *p,
struct brw_instruction *if_insn);
-void brw_ENDIF(struct brw_compile *p,
+void brw_ENDIF(struct brw_compile *p,
struct brw_instruction *if_or_else_insn);
@@ -933,14 +933,14 @@ void brw_ENDIF(struct brw_compile *p,
struct brw_instruction *brw_DO(struct brw_compile *p,
GLuint execute_size);
-struct brw_instruction *brw_WHILE(struct brw_compile *p,
+struct brw_instruction *brw_WHILE(struct brw_compile *p,
struct brw_instruction *patch_insn);
struct brw_instruction *brw_BREAK(struct brw_compile *p);
struct brw_instruction *brw_CONT(struct brw_compile *p);
/* Forward jumps:
*/
-void brw_land_fwd_jump(struct brw_compile *p,
+void brw_land_fwd_jump(struct brw_compile *p,
struct brw_instruction *jmp_insn);
@@ -959,7 +959,7 @@ void brw_CMP(struct brw_compile *p,
void brw_print_reg( struct brw_reg reg );
-/***********************************************************************
+/***********************************************************************
* brw_eu_util.c:
*/
@@ -983,7 +983,7 @@ void brw_copy8(struct brw_compile *p,
struct brw_reg src,
GLuint count);
-void brw_math_invert( struct brw_compile *p,
+void brw_math_invert( struct brw_compile *p,
struct brw_reg dst,
struct brw_reg src);
diff --git a/src/gallium/drivers/i965/brw_eu_debug.c b/src/gallium/drivers/i965/brw_eu_debug.c
index 5989f5a..cd87061 100644
--- a/src/gallium/drivers/i965/brw_eu_debug.c
+++ b/src/gallium/drivers/i965/brw_eu_debug.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "util/u_debug.h"
#include "brw_eu.h"
@@ -53,10 +53,10 @@ void brw_print_reg( struct brw_reg hwreg )
"f"
};
- debug_printf("%s%s",
+ debug_printf("%s%s",
hwreg.abs ? "abs/" : "",
hwreg.negate ? "-" : "");
-
+
if (hwreg.file == BRW_GENERAL_REGISTER_FILE &&
hwreg.nr % 2 == 0 &&
hwreg.subnr == 0 &&
@@ -71,7 +71,7 @@ void brw_print_reg( struct brw_reg hwreg )
hwreg.vstride == BRW_VERTICAL_STRIDE_0 &&
hwreg.width == BRW_WIDTH_1 &&
hwreg.hstride == BRW_HORIZONTAL_STRIDE_0 &&
- hwreg.type == BRW_REGISTER_TYPE_F) {
+ hwreg.type == BRW_REGISTER_TYPE_F) {
/* "scalar" register */
debug_printf("scl%d.%d", hwreg.nr, hwreg.subnr / 4);
}
@@ -79,13 +79,13 @@ void brw_print_reg( struct brw_reg hwreg )
debug_printf("imm %f", hwreg.dw1.f);
}
else {
- debug_printf("%s%d.%d<%d;%d,%d>:%s",
+ debug_printf("%s%d.%d<%d;%d,%d>:%s",
file[hwreg.file],
hwreg.nr,
hwreg.subnr / type_sz(hwreg.type),
hwreg.vstride ? (1<<(hwreg.vstride-1)) : 0,
1<
*/
-
+
#include "brw_context.h"
#include "brw_defines.h"
@@ -46,8 +46,8 @@
static void guess_execution_size( struct brw_instruction *insn,
struct brw_reg reg )
{
- if (reg.width == BRW_WIDTH_8 &&
- insn->header.compression_control == BRW_COMPRESSION_COMPRESSED)
+ if (reg.width == BRW_WIDTH_8 &&
+ insn->header.compression_control == BRW_COMPRESSION_COMPRESSED)
insn->header.execution_size = BRW_EXECUTE_16;
else
insn->header.execution_size = reg.width; /* note - definitions are compatible */
@@ -64,7 +64,7 @@ static void brw_set_dest( struct brw_instruction *insn,
insn->bits1.da1.dest_reg_type = dest.type;
insn->bits1.da1.dest_address_mode = dest.address_mode;
- if (dest.address_mode == BRW_ADDRESS_DIRECT) {
+ if (dest.address_mode == BRW_ADDRESS_DIRECT) {
insn->bits1.da1.dest_reg_nr = dest.nr;
if (insn->header.access_mode == BRW_ALIGN_1) {
@@ -116,13 +116,13 @@ static void brw_set_src0( struct brw_instruction *insn,
if (reg.file == BRW_IMMEDIATE_VALUE) {
insn->bits3.ud = reg.dw1.ud;
-
+
/* Required to set some fields in src1 as well:
*/
insn->bits1.da1.src1_reg_file = 0; /* arf */
insn->bits1.da1.src1_reg_type = reg.type;
}
- else
+ else
{
if (reg.address_mode == BRW_ADDRESS_DIRECT) {
if (insn->header.access_mode == BRW_ALIGN_1) {
@@ -138,7 +138,7 @@ static void brw_set_src0( struct brw_instruction *insn,
insn->bits2.ia1.src0_subreg_nr = reg.subnr;
if (insn->header.access_mode == BRW_ALIGN_1) {
- insn->bits2.ia1.src0_indirect_offset = reg.dw1.bits.indirect_offset;
+ insn->bits2.ia1.src0_indirect_offset = reg.dw1.bits.indirect_offset;
}
else {
insn->bits2.ia16.src0_subreg_nr = reg.dw1.bits.indirect_offset;
@@ -146,7 +146,7 @@ static void brw_set_src0( struct brw_instruction *insn,
}
if (insn->header.access_mode == BRW_ALIGN_1) {
- if (reg.width == BRW_WIDTH_1 &&
+ if (reg.width == BRW_WIDTH_1 &&
insn->header.execution_size == BRW_EXECUTE_1) {
insn->bits2.da1.src0_horiz_stride = BRW_HORIZONTAL_STRIDE_0;
insn->bits2.da1.src0_width = BRW_WIDTH_1;
@@ -212,7 +212,7 @@ void brw_set_src1( struct brw_instruction *insn,
}
if (insn->header.access_mode == BRW_ALIGN_1) {
- if (reg.width == BRW_WIDTH_1 &&
+ if (reg.width == BRW_WIDTH_1 &&
insn->header.execution_size == BRW_EXECUTE_1) {
insn->bits3.da1.src1_horiz_stride = BRW_HORIZONTAL_STRIDE_0;
insn->bits3.da1.src1_width = BRW_WIDTH_1;
@@ -470,14 +470,14 @@ static void brw_set_sampler_message(struct brw_context *brw,
-static struct brw_instruction *next_insn( struct brw_compile *p,
+static struct brw_instruction *next_insn( struct brw_compile *p,
GLuint opcode )
{
struct brw_instruction *insn;
if (0 && (BRW_DEBUG & DEBUG_DISASSEM))
{
- if (p->nr_insn)
+ if (p->nr_insn)
brw_disasm_insn(stderr, &p->store[p->nr_insn-1]);
}
@@ -486,7 +486,7 @@ static struct brw_instruction *next_insn( struct brw_compile *p,
insn = &p->store[p->nr_insn++];
memcpy(insn, p->current, sizeof(*insn));
- /* Reset this one-shot flag:
+ /* Reset this one-shot flag:
*/
if (p->current->header.destreg__conditionalmod) {
@@ -506,7 +506,7 @@ static struct brw_instruction *brw_alu1( struct brw_compile *p,
{
struct brw_instruction *insn = next_insn(p, opcode);
brw_set_dest(insn, dest);
- brw_set_src0(insn, src);
+ brw_set_src0(insn, src);
return insn;
}
@@ -516,7 +516,7 @@ static struct brw_instruction *brw_alu2(struct brw_compile *p,
struct brw_reg src0,
struct brw_reg src1 )
{
- struct brw_instruction *insn = next_insn(p, opcode);
+ struct brw_instruction *insn = next_insn(p, opcode);
brw_set_dest(insn, dest);
brw_set_src0(insn, src0);
brw_set_src1(insn, src1);
@@ -575,7 +575,7 @@ ALU2(LINE)
void brw_NOP(struct brw_compile *p)
{
- struct brw_instruction *insn = next_insn(p, BRW_OPCODE_NOP);
+ struct brw_instruction *insn = next_insn(p, BRW_OPCODE_NOP);
brw_set_dest(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD));
brw_set_src0(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD));
brw_set_src1(insn, brw_imm_ud(0x0));
@@ -589,7 +589,7 @@ void brw_NOP(struct brw_compile *p)
* Comparisons, if/else/endif
*/
-struct brw_instruction *brw_JMPI(struct brw_compile *p,
+struct brw_instruction *brw_JMPI(struct brw_compile *p,
struct brw_reg dest,
struct brw_reg src0,
struct brw_reg src1)
@@ -652,7 +652,7 @@ struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size)
}
-struct brw_instruction *brw_ELSE(struct brw_compile *p,
+struct brw_instruction *brw_ELSE(struct brw_compile *p,
struct brw_instruction *if_insn)
{
struct brw_instruction *insn;
@@ -694,14 +694,14 @@ struct brw_instruction *brw_ELSE(struct brw_compile *p,
return insn;
}
-void brw_ENDIF(struct brw_compile *p,
+void brw_ENDIF(struct brw_compile *p,
struct brw_instruction *patch_insn)
{
GLuint br = 1;
if (BRW_IS_IGDNG(p->brw))
- br = 2;
-
+ br = 2;
+
if (p->single_program_flow) {
/* In single program flow mode, there's no need to execute an ENDIF,
* since we don't need to do any stack operations, and if we're executing
@@ -807,7 +807,7 @@ struct brw_instruction *brw_DO(struct brw_compile *p, GLuint execute_size)
-struct brw_instruction *brw_WHILE(struct brw_compile *p,
+struct brw_instruction *brw_WHILE(struct brw_compile *p,
struct brw_instruction *do_insn)
{
struct brw_instruction *insn;
@@ -843,14 +843,14 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p,
/* insn->header.mask_control = BRW_MASK_ENABLE; */
/* insn->header.mask_control = BRW_MASK_DISABLE; */
- p->current->header.predicate_control = BRW_PREDICATE_NONE;
+ p->current->header.predicate_control = BRW_PREDICATE_NONE;
return insn;
}
/* FORWARD JUMPS:
*/
-void brw_land_fwd_jump(struct brw_compile *p,
+void brw_land_fwd_jump(struct brw_compile *p,
struct brw_instruction *jmp_insn)
{
struct brw_instruction *landing = &p->store[p->nr_insn];
@@ -889,7 +889,7 @@ void brw_CMP(struct brw_compile *p,
/* Make it so that future instructions will use the computed flag
* value until brw_set_predicate_control_flag_value() is called
- * again.
+ * again.
*/
if (dest.file == BRW_ARCHITECTURE_REGISTER_FILE &&
dest.nr == 0) {
@@ -916,20 +916,20 @@ void brw_math( struct brw_compile *p,
GLuint precision )
{
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
- GLuint msg_length = (function == BRW_MATH_FUNCTION_POW) ? 2 : 1;
- GLuint response_length = (function == BRW_MATH_FUNCTION_SINCOS) ? 2 : 1;
+ GLuint msg_length = (function == BRW_MATH_FUNCTION_POW) ? 2 : 1;
+ GLuint response_length = (function == BRW_MATH_FUNCTION_SINCOS) ? 2 : 1;
/* Example code doesn't set predicate_control for send
* instructions.
*/
- insn->header.predicate_control = 0;
+ insn->header.predicate_control = 0;
insn->header.destreg__conditionalmod = msg_reg_nr;
brw_set_dest(insn, dest);
brw_set_src0(insn, src);
brw_set_math_message(p->brw,
- insn,
- msg_length, response_length,
+ insn,
+ msg_length, response_length,
function,
BRW_MATH_INTEGER_UNSIGNED,
precision,
@@ -950,8 +950,8 @@ void brw_math_16( struct brw_compile *p,
GLuint precision )
{
struct brw_instruction *insn;
- GLuint msg_length = (function == BRW_MATH_FUNCTION_POW) ? 2 : 1;
- GLuint response_length = (function == BRW_MATH_FUNCTION_SINCOS) ? 2 : 1;
+ GLuint msg_length = (function == BRW_MATH_FUNCTION_POW) ? 2 : 1;
+ GLuint response_length = (function == BRW_MATH_FUNCTION_SINCOS) ? 2 : 1;
/* First instruction:
*/
@@ -965,8 +965,8 @@ void brw_math_16( struct brw_compile *p,
brw_set_dest(insn, dest);
brw_set_src0(insn, src);
brw_set_math_message(p->brw,
- insn,
- msg_length, response_length,
+ insn,
+ msg_length, response_length,
function,
BRW_MATH_INTEGER_UNSIGNED,
precision,
@@ -981,9 +981,9 @@ void brw_math_16( struct brw_compile *p,
brw_set_dest(insn, offset(dest,1));
brw_set_src0(insn, src);
- brw_set_math_message(p->brw,
- insn,
- msg_length, response_length,
+ brw_set_math_message(p->brw,
+ insn,
+ msg_length, response_length,
function,
BRW_MATH_INTEGER_UNSIGNED,
precision,
@@ -1021,11 +1021,11 @@ void brw_dp_WRITE_16( struct brw_compile *p,
GLuint msg_length = 3;
struct brw_reg dest = retype(brw_null_reg(), BRW_REGISTER_TYPE_UW);
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
-
+
insn->header.predicate_control = 0; /* XXX */
- insn->header.compression_control = BRW_COMPRESSION_NONE;
+ insn->header.compression_control = BRW_COMPRESSION_NONE;
insn->header.destreg__conditionalmod = msg_reg_nr;
-
+
brw_set_dest(insn, dest);
brw_set_src0(insn, src);
@@ -1067,11 +1067,11 @@ void brw_dp_READ_16( struct brw_compile *p,
{
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
-
+
insn->header.predicate_control = 0; /* XXX */
- insn->header.compression_control = BRW_COMPRESSION_NONE;
+ insn->header.compression_control = BRW_COMPRESSION_NONE;
insn->header.destreg__conditionalmod = msg_reg_nr;
-
+
brw_set_dest(insn, dest); /* UW? */
brw_set_src0(insn, retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW));
@@ -1121,12 +1121,12 @@ void brw_dp_READ_4( struct brw_compile *p,
{
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
-
+
insn->header.predicate_control = BRW_PREDICATE_NONE;
- insn->header.compression_control = BRW_COMPRESSION_NONE;
+ insn->header.compression_control = BRW_COMPRESSION_NONE;
insn->header.destreg__conditionalmod = msg_reg_nr;
insn->header.mask_control = BRW_MASK_DISABLE;
-
+
/* cast dest to a uword[8] vector */
dest = retype(vec8(dest), BRW_REGISTER_TYPE_UW);
@@ -1195,13 +1195,13 @@ void brw_dp_READ_4_vs(struct brw_compile *p,
{
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
-
+
insn->header.predicate_control = BRW_PREDICATE_NONE;
- insn->header.compression_control = BRW_COMPRESSION_NONE;
+ insn->header.compression_control = BRW_COMPRESSION_NONE;
insn->header.destreg__conditionalmod = msg_reg_nr;
insn->header.mask_control = BRW_MASK_DISABLE;
/*insn->header.access_mode = BRW_ALIGN_16;*/
-
+
brw_set_dest(insn, dest);
brw_set_src0(insn, brw_null_reg());
@@ -1229,11 +1229,11 @@ void brw_fb_WRITE(struct brw_compile *p,
GLboolean eot)
{
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
-
+
insn->header.predicate_control = 0; /* XXX */
- insn->header.compression_control = BRW_COMPRESSION_NONE;
+ insn->header.compression_control = BRW_COMPRESSION_NONE;
insn->header.destreg__conditionalmod = msg_reg_nr;
-
+
brw_set_dest(insn, dest);
brw_set_src0(insn, src0);
brw_set_dp_write_message(p->brw,
@@ -1243,7 +1243,7 @@ void brw_fb_WRITE(struct brw_compile *p,
BRW_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE, /* msg_type */
msg_length,
1, /* pixel scoreboard */
- response_length,
+ response_length,
eot);
}
@@ -1268,12 +1268,12 @@ void brw_SAMPLE(struct brw_compile *p,
GLuint simd_mode)
{
GLboolean need_stall = 0;
-
+
if (writemask == 0) {
/*debug_printf("%s: zero writemask??\n", __FUNCTION__); */
return;
}
-
+
/* Hardware doesn't do destination dependency checking on send
* instructions properly. Add a workaround which generates the
* dependency by other means. In practice it seems like this bug
@@ -1306,7 +1306,7 @@ void brw_SAMPLE(struct brw_compile *p,
}
else {
struct brw_reg m1 = brw_message_reg(msg_reg_nr);
-
+
newmask = ~newmask & BRW_WRITEMASK_XYZW;
brw_push_insn_state(p);
@@ -1314,12 +1314,12 @@ void brw_SAMPLE(struct brw_compile *p,
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_set_mask_control(p, BRW_MASK_DISABLE);
- brw_MOV(p, m1, brw_vec8_grf(0,0));
- brw_MOV(p, get_element_ud(m1, 2), brw_imm_ud(newmask << 12));
+ brw_MOV(p, m1, brw_vec8_grf(0,0));
+ brw_MOV(p, get_element_ud(m1, 2), brw_imm_ud(newmask << 12));
brw_pop_insn_state(p);
- src0 = retype(brw_null_reg(), BRW_REGISTER_TYPE_UW);
+ src0 = retype(brw_null_reg(), BRW_REGISTER_TYPE_UW);
dest = offset(dest, dst_offset);
response_length = len * 2;
}
@@ -1327,7 +1327,7 @@ void brw_SAMPLE(struct brw_compile *p,
{
struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
-
+
insn->header.predicate_control = 0; /* XXX */
insn->header.compression_control = BRW_COMPRESSION_NONE;
insn->header.destreg__conditionalmod = msg_reg_nr;
@@ -1338,7 +1338,7 @@ void brw_SAMPLE(struct brw_compile *p,
binding_table_index,
sampler,
msg_type,
- response_length,
+ response_length,
msg_length,
eot,
header_present,
@@ -1352,7 +1352,7 @@ void brw_SAMPLE(struct brw_compile *p,
*/
brw_push_insn_state(p);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
- brw_MOV(p, reg, reg);
+ brw_MOV(p, reg, reg);
brw_pop_insn_state(p);
}
@@ -1390,9 +1390,9 @@ void brw_urb_WRITE(struct brw_compile *p,
allocate,
used,
msg_length,
- response_length,
- eot,
- writes_complete,
+ response_length,
+ eot,
+ writes_complete,
offset,
swizzle);
}
@@ -1425,9 +1425,9 @@ void brw_ff_sync(struct brw_compile *p,
allocate,
used,
msg_length,
- response_length,
- eot,
- writes_complete,
+ response_length,
+ eot,
+ writes_complete,
offset,
swizzle);
}
diff --git a/src/gallium/drivers/i965/brw_eu_util.c b/src/gallium/drivers/i965/brw_eu_util.c
index 5405cf1..0067ac9 100644
--- a/src/gallium/drivers/i965/brw_eu_util.c
+++ b/src/gallium/drivers/i965/brw_eu_util.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,30 +22,30 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_context.h"
#include "brw_defines.h"
#include "brw_eu.h"
-void brw_math_invert( struct brw_compile *p,
+void brw_math_invert( struct brw_compile *p,
struct brw_reg dst,
struct brw_reg src)
{
- brw_math( p,
+ brw_math( p,
dst,
- BRW_MATH_FUNCTION_INV,
+ BRW_MATH_FUNCTION_INV,
BRW_MATH_SATURATE_NONE,
0,
src,
- BRW_MATH_PRECISION_FULL,
+ BRW_MATH_PRECISION_FULL,
BRW_MATH_DATA_VECTOR );
}
diff --git a/src/gallium/drivers/i965/brw_gs.c b/src/gallium/drivers/i965/brw_gs.c
index 0682663..ff6523c 100644
--- a/src/gallium/drivers/i965/brw_gs.c
+++ b/src/gallium/drivers/i965/brw_gs.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_batchbuffer.h"
#include "brw_defines.h"
@@ -49,7 +49,7 @@ static enum pipe_error compile_gs_prog( struct brw_context *brw,
GLuint program_size;
memset(&c, 0, sizeof(c));
-
+
c.key = *key;
c.need_ff_sync = BRW_IS_IGDNG(brw);
/* Need to locate the two positions present in vertex + header.
@@ -64,7 +64,7 @@ static enum pipe_error compile_gs_prog( struct brw_context *brw,
c.nr_bytes = c.nr_regs * REG_SIZE;
-
+
/* Begin the compilation:
*/
brw_init_compile(brw, &c.func);
@@ -72,7 +72,7 @@ static enum pipe_error compile_gs_prog( struct brw_context *brw,
c.func.single_program_flow = 1;
/* For some reason the thread is spawned with only 4 channels
- * unmasked.
+ * unmasked.
*/
brw_set_mask_control(&c.func, BRW_MASK_DISABLE);
@@ -82,7 +82,7 @@ static enum pipe_error compile_gs_prog( struct brw_context *brw,
*/
switch (key->primitive) {
case PIPE_PRIM_QUADS:
- brw_gs_quads( &c );
+ brw_gs_quads( &c );
break;
case PIPE_PRIM_QUAD_STRIP:
brw_gs_quad_strip( &c );
@@ -137,7 +137,7 @@ static enum pipe_error compile_gs_prog( struct brw_context *brw,
return PIPE_OK;
}
-static const unsigned gs_prim[PIPE_PRIM_MAX] = {
+static const unsigned gs_prim[PIPE_PRIM_MAX] = {
PIPE_PRIM_POINTS,
PIPE_PRIM_LINES,
PIPE_PRIM_LINE_LOOP,
diff --git a/src/gallium/drivers/i965/brw_gs.h b/src/gallium/drivers/i965/brw_gs.h
index 6e616dc..0f88e2b 100644
--- a/src/gallium/drivers/i965/brw_gs.h
+++ b/src/gallium/drivers/i965/brw_gs.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#ifndef BRW_GS_H
#define BRW_GS_H
@@ -37,7 +37,7 @@
#include "brw_context.h"
#include "brw_eu.h"
-#define MAX_GS_VERTS (4)
+#define MAX_GS_VERTS (4)
struct brw_gs_prog_key {
GLuint nr_attrs:8;
@@ -51,7 +51,7 @@ struct brw_gs_compile {
struct brw_compile func;
struct brw_gs_prog_key key;
struct brw_gs_prog_data prog_data;
-
+
struct {
struct brw_reg R0;
struct brw_reg vertex[MAX_GS_VERTS];
diff --git a/src/gallium/drivers/i965/brw_gs_emit.c b/src/gallium/drivers/i965/brw_gs_emit.c
index 9b58773..405698d 100644
--- a/src/gallium/drivers/i965/brw_gs_emit.c
+++ b/src/gallium/drivers/i965/brw_gs_emit.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_batchbuffer.h"
@@ -53,12 +53,12 @@ static void brw_gs_alloc_regs( struct brw_gs_compile *c,
i += c->nr_regs;
}
- c->prog_data.urb_read_length = c->nr_regs;
+ c->prog_data.urb_read_length = c->nr_regs;
c->prog_data.total_grf = i;
}
-static void brw_gs_emit_vue(struct brw_gs_compile *c,
+static void brw_gs_emit_vue(struct brw_gs_compile *c,
struct brw_reg vert,
GLboolean last,
GLuint header)
@@ -81,7 +81,7 @@ static void brw_gs_emit_vue(struct brw_gs_compile *c,
* writes instantiates a seperate urb entry, and a new one must be
* allocated each time.
*/
- brw_urb_WRITE(p,
+ brw_urb_WRITE(p,
allocate ? c->reg.R0 : retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
0,
c->reg.R0,
@@ -99,11 +99,11 @@ static void brw_gs_ff_sync(struct brw_gs_compile *c, int num_prim)
{
struct brw_compile *p = &c->func;
brw_MOV(p, get_element_ud(c->reg.R0, 1), brw_imm_ud(num_prim));
- brw_ff_sync(p,
+ brw_ff_sync(p,
c->reg.R0,
0,
c->reg.R0,
- 1,
+ 1,
1, /* used */
1, /* msg length */
1, /* response length */
@@ -117,27 +117,27 @@ static void brw_gs_ff_sync(struct brw_gs_compile *c, int num_prim)
void brw_gs_quads( struct brw_gs_compile *c )
{
brw_gs_alloc_regs(c, 4);
-
+
/* Use polygons for correct edgeflag behaviour. Note that vertex 3
* is the PV for quads, but vertex 0 for polygons:
*/
if (c->need_ff_sync)
- brw_gs_ff_sync(c, 1);
+ brw_gs_ff_sync(c, 1);
brw_gs_emit_vue(c, c->reg.vertex[3], 0, ((_3DPRIM_POLYGON << 2) | R02_PRIM_START));
brw_gs_emit_vue(c, c->reg.vertex[0], 0, (_3DPRIM_POLYGON << 2));
- brw_gs_emit_vue(c, c->reg.vertex[1], 0, (_3DPRIM_POLYGON << 2));
+ brw_gs_emit_vue(c, c->reg.vertex[1], 0, (_3DPRIM_POLYGON << 2));
brw_gs_emit_vue(c, c->reg.vertex[2], 1, ((_3DPRIM_POLYGON << 2) | R02_PRIM_END));
}
void brw_gs_quad_strip( struct brw_gs_compile *c )
{
brw_gs_alloc_regs(c, 4);
-
+
if (c->need_ff_sync)
- brw_gs_ff_sync(c, 1);
+ brw_gs_ff_sync(c, 1);
brw_gs_emit_vue(c, c->reg.vertex[2], 0, ((_3DPRIM_POLYGON << 2) | R02_PRIM_START));
brw_gs_emit_vue(c, c->reg.vertex[3], 0, (_3DPRIM_POLYGON << 2));
- brw_gs_emit_vue(c, c->reg.vertex[0], 0, (_3DPRIM_POLYGON << 2));
+ brw_gs_emit_vue(c, c->reg.vertex[0], 0, (_3DPRIM_POLYGON << 2));
brw_gs_emit_vue(c, c->reg.vertex[1], 1, ((_3DPRIM_POLYGON << 2) | R02_PRIM_END));
}
@@ -146,7 +146,7 @@ void brw_gs_tris( struct brw_gs_compile *c )
brw_gs_alloc_regs(c, 3);
if (c->need_ff_sync)
- brw_gs_ff_sync(c, 1);
+ brw_gs_ff_sync(c, 1);
brw_gs_emit_vue(c, c->reg.vertex[0], 0, ((_3DPRIM_TRILIST << 2) | R02_PRIM_START));
brw_gs_emit_vue(c, c->reg.vertex[1], 0, (_3DPRIM_TRILIST << 2));
brw_gs_emit_vue(c, c->reg.vertex[2], 1, ((_3DPRIM_TRILIST << 2) | R02_PRIM_END));
@@ -157,7 +157,7 @@ void brw_gs_lines( struct brw_gs_compile *c )
brw_gs_alloc_regs(c, 2);
if (c->need_ff_sync)
- brw_gs_ff_sync(c, 1);
+ brw_gs_ff_sync(c, 1);
brw_gs_emit_vue(c, c->reg.vertex[0], 0, ((_3DPRIM_LINESTRIP << 2) | R02_PRIM_START));
brw_gs_emit_vue(c, c->reg.vertex[1], 1, ((_3DPRIM_LINESTRIP << 2) | R02_PRIM_END));
}
@@ -167,7 +167,7 @@ void brw_gs_points( struct brw_gs_compile *c )
brw_gs_alloc_regs(c, 1);
if (c->need_ff_sync)
- brw_gs_ff_sync(c, 1);
+ brw_gs_ff_sync(c, 1);
brw_gs_emit_vue(c, c->reg.vertex[0], 1, ((_3DPRIM_POINTLIST << 2) | R02_PRIM_START | R02_PRIM_END));
}
diff --git a/src/gallium/drivers/i965/brw_gs_state.c b/src/gallium/drivers/i965/brw_gs_state.c
index b64ec28..e30907f 100644
--- a/src/gallium/drivers/i965/brw_gs_state.c
+++ b/src/gallium/drivers/i965/brw_gs_state.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "util/u_math.h"
#include "brw_context.h"
@@ -70,7 +70,7 @@ gs_unit_populate_key(struct brw_context *brw, struct brw_gs_unit_key *key)
}
static enum pipe_error
-gs_unit_create_from_key(struct brw_context *brw,
+gs_unit_create_from_key(struct brw_context *brw,
struct brw_gs_unit_key *key,
struct brw_winsys_reloc *reloc,
unsigned nr_reloc,
diff --git a/src/gallium/drivers/i965/brw_misc_state.c b/src/gallium/drivers/i965/brw_misc_state.c
index 6d89b5d..6e4c30b 100644
--- a/src/gallium/drivers/i965/brw_misc_state.c
+++ b/src/gallium/drivers/i965/brw_misc_state.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_debug.h"
@@ -111,7 +111,7 @@ static int upload_binding_table_pointers(struct brw_context *brw)
BEGIN_BATCH(6, IGNORE_CLIPRECTS);
OUT_BATCH(CMD_BINDING_TABLE_PTRS << 16 | (6 - 2));
if (brw->vs.bind_bo != NULL)
- OUT_RELOC(brw->vs.bind_bo,
+ OUT_RELOC(brw->vs.bind_bo,
BRW_USAGE_SAMPLER,
0); /* vs */
else
@@ -147,16 +147,16 @@ static int upload_pipelined_state_pointers(struct brw_context *brw )
{
BEGIN_BATCH(7, IGNORE_CLIPRECTS);
OUT_BATCH(CMD_PIPELINED_STATE_POINTERS << 16 | (7 - 2));
- OUT_RELOC(brw->vs.state_bo,
+ OUT_RELOC(brw->vs.state_bo,
BRW_USAGE_STATE,
0);
if (brw->gs.prog_active)
- OUT_RELOC(brw->gs.state_bo,
+ OUT_RELOC(brw->gs.state_bo,
BRW_USAGE_STATE,
1);
else
OUT_BATCH(0);
- OUT_RELOC(brw->clip.state_bo,
+ OUT_RELOC(brw->clip.state_bo,
BRW_USAGE_STATE,
1);
OUT_RELOC(brw->sf.state_bo,
@@ -189,7 +189,7 @@ static int prepare_psp_urb_cbs(struct brw_context *brw)
static int upload_psp_urb_cbs(struct brw_context *brw )
{
int ret;
-
+
ret = upload_pipelined_state_pointers(brw);
if (ret)
return ret;
@@ -209,12 +209,12 @@ const struct brw_tracked_state brw_psp_urb_cbs = {
.dirty = {
.mesa = 0,
.brw = BRW_NEW_URB_FENCE | BRW_NEW_BATCH,
- .cache = (CACHE_NEW_VS_UNIT |
- CACHE_NEW_GS_UNIT |
- CACHE_NEW_GS_PROG |
- CACHE_NEW_CLIP_UNIT |
- CACHE_NEW_SF_UNIT |
- CACHE_NEW_WM_UNIT |
+ .cache = (CACHE_NEW_VS_UNIT |
+ CACHE_NEW_GS_UNIT |
+ CACHE_NEW_GS_PROG |
+ CACHE_NEW_CLIP_UNIT |
+ CACHE_NEW_SF_UNIT |
+ CACHE_NEW_WM_UNIT |
CACHE_NEW_CC_UNIT)
},
.prepare = prepare_psp_urb_cbs,
@@ -223,7 +223,7 @@ const struct brw_tracked_state brw_psp_urb_cbs = {
/***********************************************************************
- * Depth buffer
+ * Depth buffer
*/
static int prepare_depthbuffer(struct brw_context *brw)
@@ -386,7 +386,7 @@ static int upload_invarient_state( struct brw_context *brw )
struct brw_global_depth_offset_clamp gdo;
memset(&gdo, 0, sizeof(gdo));
- /* Disable depth offset clamping.
+ /* Disable depth offset clamping.
*/
gdo.header.opcode = CMD_GLOBAL_DEPTH_OFFSET_CLAMP;
gdo.header.length = sizeof(gdo)/4 - 2;
@@ -413,17 +413,17 @@ static int upload_invarient_state( struct brw_context *brw )
struct brw_vf_statistics vfs;
memset(&vfs, 0, sizeof(vfs));
- if (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw))
+ if (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw))
vfs.opcode = CMD_VF_STATISTICS_GM45;
- else
+ else
vfs.opcode = CMD_VF_STATISTICS_965;
if (BRW_DEBUG & DEBUG_STATS)
- vfs.statistics_enable = 1;
+ vfs.statistics_enable = 1;
BRW_BATCH_STRUCT(brw, &vfs);
}
-
+
if (!BRW_IS_965(brw))
{
struct brw_aa_line_parameters balp;
@@ -432,13 +432,13 @@ static int upload_invarient_state( struct brw_context *brw )
memset(&balp, 0, sizeof(balp));
balp.header.opcode = CMD_AA_LINE_PARAMETERS;
balp.header.length = sizeof(balp) / 4 - 2;
-
+
BRW_BATCH_STRUCT(brw, &balp);
}
{
struct brw_polygon_stipple_offset bpso;
-
+
/* This is invarient state in gallium:
*/
memset(&bpso, 0, sizeof(bpso));
@@ -449,7 +449,7 @@ static int upload_invarient_state( struct brw_context *brw )
BRW_BATCH_STRUCT(brw, &bpso);
}
-
+
return 0;
}
@@ -464,7 +464,7 @@ const struct brw_tracked_state brw_invarient_state = {
/***********************************************************************
- * State base address
+ * State base address
*/
/**
diff --git a/src/gallium/drivers/i965/brw_pipe_blend.c b/src/gallium/drivers/i965/brw_pipe_blend.c
index 21f786f..7bc5faf 100644
--- a/src/gallium/drivers/i965/brw_pipe_blend.c
+++ b/src/gallium/drivers/i965/brw_pipe_blend.c
@@ -52,17 +52,17 @@ static int translate_logicop(unsigned logicop)
static unsigned translate_blend_equation( unsigned mode )
{
switch (mode) {
- case PIPE_BLEND_ADD:
- return BRW_BLENDFUNCTION_ADD;
- case PIPE_BLEND_MIN:
- return BRW_BLENDFUNCTION_MIN;
- case PIPE_BLEND_MAX:
- return BRW_BLENDFUNCTION_MAX;
- case PIPE_BLEND_SUBTRACT:
- return BRW_BLENDFUNCTION_SUBTRACT;
- case PIPE_BLEND_REVERSE_SUBTRACT:
- return BRW_BLENDFUNCTION_REVERSE_SUBTRACT;
- default:
+ case PIPE_BLEND_ADD:
+ return BRW_BLENDFUNCTION_ADD;
+ case PIPE_BLEND_MIN:
+ return BRW_BLENDFUNCTION_MIN;
+ case PIPE_BLEND_MAX:
+ return BRW_BLENDFUNCTION_MAX;
+ case PIPE_BLEND_SUBTRACT:
+ return BRW_BLENDFUNCTION_SUBTRACT;
+ case PIPE_BLEND_REVERSE_SUBTRACT:
+ return BRW_BLENDFUNCTION_REVERSE_SUBTRACT;
+ default:
assert(0);
return BRW_BLENDFUNCTION_ADD;
}
@@ -71,40 +71,40 @@ static unsigned translate_blend_equation( unsigned mode )
static unsigned translate_blend_factor( unsigned factor )
{
switch(factor) {
- case PIPE_BLENDFACTOR_ZERO:
- return BRW_BLENDFACTOR_ZERO;
- case PIPE_BLENDFACTOR_SRC_ALPHA:
- return BRW_BLENDFACTOR_SRC_ALPHA;
- case PIPE_BLENDFACTOR_ONE:
- return BRW_BLENDFACTOR_ONE;
- case PIPE_BLENDFACTOR_SRC_COLOR:
- return BRW_BLENDFACTOR_SRC_COLOR;
- case PIPE_BLENDFACTOR_INV_SRC_COLOR:
- return BRW_BLENDFACTOR_INV_SRC_COLOR;
- case PIPE_BLENDFACTOR_DST_COLOR:
- return BRW_BLENDFACTOR_DST_COLOR;
- case PIPE_BLENDFACTOR_INV_DST_COLOR:
- return BRW_BLENDFACTOR_INV_DST_COLOR;
+ case PIPE_BLENDFACTOR_ZERO:
+ return BRW_BLENDFACTOR_ZERO;
+ case PIPE_BLENDFACTOR_SRC_ALPHA:
+ return BRW_BLENDFACTOR_SRC_ALPHA;
+ case PIPE_BLENDFACTOR_ONE:
+ return BRW_BLENDFACTOR_ONE;
+ case PIPE_BLENDFACTOR_SRC_COLOR:
+ return BRW_BLENDFACTOR_SRC_COLOR;
+ case PIPE_BLENDFACTOR_INV_SRC_COLOR:
+ return BRW_BLENDFACTOR_INV_SRC_COLOR;
+ case PIPE_BLENDFACTOR_DST_COLOR:
+ return BRW_BLENDFACTOR_DST_COLOR;
+ case PIPE_BLENDFACTOR_INV_DST_COLOR:
+ return BRW_BLENDFACTOR_INV_DST_COLOR;
case PIPE_BLENDFACTOR_INV_SRC_ALPHA:
- return BRW_BLENDFACTOR_INV_SRC_ALPHA;
- case PIPE_BLENDFACTOR_DST_ALPHA:
- return BRW_BLENDFACTOR_DST_ALPHA;
+ return BRW_BLENDFACTOR_INV_SRC_ALPHA;
+ case PIPE_BLENDFACTOR_DST_ALPHA:
+ return BRW_BLENDFACTOR_DST_ALPHA;
case PIPE_BLENDFACTOR_INV_DST_ALPHA:
- return BRW_BLENDFACTOR_INV_DST_ALPHA;
- case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE:
+ return BRW_BLENDFACTOR_INV_DST_ALPHA;
+ case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE:
return BRW_BLENDFACTOR_SRC_ALPHA_SATURATE;
case PIPE_BLENDFACTOR_CONST_COLOR:
- return BRW_BLENDFACTOR_CONST_COLOR;
+ return BRW_BLENDFACTOR_CONST_COLOR;
case PIPE_BLENDFACTOR_INV_CONST_COLOR:
return BRW_BLENDFACTOR_INV_CONST_COLOR;
case PIPE_BLENDFACTOR_CONST_ALPHA:
- return BRW_BLENDFACTOR_CONST_ALPHA;
+ return BRW_BLENDFACTOR_CONST_ALPHA;
case PIPE_BLENDFACTOR_INV_CONST_ALPHA:
return BRW_BLENDFACTOR_INV_CONST_ALPHA;
default:
assert(0);
return BRW_BLENDFACTOR_ZERO;
- }
+ }
}
static void *brw_create_blend_state( struct pipe_context *pipe,
@@ -117,7 +117,7 @@ static void *brw_create_blend_state( struct pipe_context *pipe,
if (templ->logicop_enable) {
blend->cc2.logicop_enable = 1;
blend->cc5.logicop_func = translate_logicop(templ->logicop_func);
- }
+ }
else if (templ->rt[0].blend_enable) {
blend->cc6.dest_blend_factor = translate_blend_factor(templ->rt[0].rgb_dst_factor);
blend->cc6.src_blend_factor = translate_blend_factor(templ->rt[0].rgb_src_factor);
@@ -128,7 +128,7 @@ static void *brw_create_blend_state( struct pipe_context *pipe,
blend->cc5.ia_blend_function = translate_blend_equation(templ->rt[0].alpha_func);
blend->cc3.blend_enable = 1;
- blend->cc3.ia_blend_enable =
+ blend->cc3.ia_blend_enable =
(blend->cc6.dest_blend_factor != blend->cc5.ia_dest_blend_factor ||
blend->cc6.src_blend_factor != blend->cc5.ia_src_blend_factor ||
blend->cc6.blend_function != blend->cc5.ia_blend_function);
@@ -196,7 +196,7 @@ void brw_pipe_blend_init( struct brw_context *brw )
{
struct brw_blend_constant_color *bcc = &brw->curr.bcc;
- memset(bcc, 0, sizeof(*bcc));
+ memset(bcc, 0, sizeof(*bcc));
bcc->header.opcode = CMD_BLEND_CONSTANT_COLOR;
bcc->header.length = sizeof(*bcc)/4-2;
}
diff --git a/src/gallium/drivers/i965/brw_pipe_clear.c b/src/gallium/drivers/i965/brw_pipe_clear.c
index 7bf3ea6..923a5c9 100644
--- a/src/gallium/drivers/i965/brw_pipe_clear.c
+++ b/src/gallium/drivers/i965/brw_pipe_clear.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_pack_color.h"
@@ -109,7 +109,7 @@ try_clear( struct brw_context *brw,
-static void color_clear(struct brw_context *brw,
+static void color_clear(struct brw_context *brw,
struct brw_surface *bsurface,
const float *rgba )
{
@@ -199,7 +199,7 @@ static void zstencil_clear(struct brw_context *brw,
* Clear the given surface to the specified value.
* No masking, no scissor (clear entire buffer).
*/
-static void brw_clear(struct pipe_context *pipe,
+static void brw_clear(struct pipe_context *pipe,
unsigned buffers,
const float *rgba,
double depth,
@@ -210,7 +210,7 @@ static void brw_clear(struct pipe_context *pipe,
if (buffers & PIPE_CLEAR_COLOR) {
for (i = 0; i < brw->curr.fb.nr_cbufs; i++) {
- color_clear( brw,
+ color_clear( brw,
brw_surface(brw->curr.fb.cbufs[i]),
rgba );
}
diff --git a/src/gallium/drivers/i965/brw_pipe_fb.c b/src/gallium/drivers/i965/brw_pipe_fb.c
index a90b7c7..f71ed2d 100644
--- a/src/gallium/drivers/i965/brw_pipe_fb.c
+++ b/src/gallium/drivers/i965/brw_pipe_fb.c
@@ -8,7 +8,7 @@
/**
* called from intelDrawBuffer()
*/
-static void brw_set_framebuffer_state( struct pipe_context *pipe,
+static void brw_set_framebuffer_state( struct pipe_context *pipe,
const struct pipe_framebuffer_state *fb )
{
struct brw_context *brw = brw_context(pipe);
@@ -22,7 +22,7 @@ static void brw_set_framebuffer_state( struct pipe_context *pipe,
brw->curr.fb.height = fb->height;
brw->state.dirty.mesa |= PIPE_NEW_FRAMEBUFFER_DIMENSIONS;
}
-
+
/* Z/Stencil
*/
if (brw->curr.fb.zsbuf != fb->zsbuf) {
@@ -38,7 +38,7 @@ static void brw_set_framebuffer_state( struct pipe_context *pipe,
pipe_surface_reference(&brw->curr.fb.cbufs[i], fb->cbufs[i]);
}
}
-
+
if (brw->curr.fb.nr_cbufs != fb->nr_cbufs) {
brw->curr.fb.nr_cbufs = MIN2(BRW_MAX_DRAW_BUFFERS, fb->nr_cbufs);
brw->state.dirty.mesa |= PIPE_NEW_NR_CBUFS;
diff --git a/src/gallium/drivers/i965/brw_pipe_flush.c b/src/gallium/drivers/i965/brw_pipe_flush.c
index 0ae1a6b..9d432a6 100644
--- a/src/gallium/drivers/i965/brw_pipe_flush.c
+++ b/src/gallium/drivers/i965/brw_pipe_flush.c
@@ -12,7 +12,7 @@
void brw_context_flush( struct brw_context *brw )
{
/*
- *
+ *
*/
brw_emit_query_end(brw);
@@ -38,7 +38,7 @@ void brw_context_flush( struct brw_context *brw )
static void
brw_flush( struct pipe_context *pipe,
- unsigned flags,
+ unsigned flags,
struct pipe_fence_handle **fence )
{
brw_context_flush( brw_context( pipe ) );
diff --git a/src/gallium/drivers/i965/brw_pipe_query.c b/src/gallium/drivers/i965/brw_pipe_query.c
index 0745254..86a6c0f 100644
--- a/src/gallium/drivers/i965/brw_pipe_query.c
+++ b/src/gallium/drivers/i965/brw_pipe_query.c
@@ -60,14 +60,14 @@ brw_query_get_result(struct pipe_context *pipe,
if (query->bo) {
int i;
uint64_t *map;
-
+
if (brw->sws->bo_is_busy(query->bo) && !wait)
return FALSE;
-
+
map = bo_map_read(brw->sws, query->bo);
if (map == NULL)
return FALSE;
-
+
for (i = query->first_index; i <= query->last_index; i++) {
query->result += map[i * 2 + 1] - map[i * 2];
}
@@ -91,7 +91,7 @@ brw_query_create(struct pipe_context *pipe, unsigned type )
if (query == NULL)
return NULL;
return (struct pipe_query *)query;
-
+
default:
return NULL;
}
@@ -146,7 +146,7 @@ brw_query_end(struct pipe_context *pipe, struct pipe_query *q)
}
/***********************************************************************
- * Internal functions and callbacks to implement queries
+ * Internal functions and callbacks to implement queries
*/
/** Called to set up the query BO and account for its aperture space */
@@ -206,12 +206,12 @@ brw_emit_query_begin(struct brw_context *brw)
foreach(query, &brw->query.active_head) {
if (query->bo != brw->query.bo) {
uint64_t tmp;
-
+
/* Propogate the results from this buffer to all of the
* active queries, as the bo is going away.
*/
if (query->bo != NULL)
- brw_query_get_result( &brw->base,
+ brw_query_get_result( &brw->base,
(struct pipe_query *)query,
FALSE,
&tmp );
diff --git a/src/gallium/drivers/i965/brw_pipe_rast.c b/src/gallium/drivers/i965/brw_pipe_rast.c
index 4c1a6d7..79bdcd2 100644
--- a/src/gallium/drivers/i965/brw_pipe_rast.c
+++ b/src/gallium/drivers/i965/brw_pipe_rast.c
@@ -53,14 +53,14 @@ calculate_clip_key_rast( const struct brw_context *brw,
if (!(templ->cull_face & PIPE_FACE_FRONT)) {
if (templ->front_ccw)
key->fill_ccw = translate_fill(templ->fill_front);
- else
+ else
key->fill_cw = translate_fill(templ->fill_front);
}
if (!(templ->cull_face & PIPE_FACE_BACK)) {
if (templ->front_ccw)
key->fill_cw = translate_fill(templ->fill_back);
- else
+ else
key->fill_ccw = translate_fill(templ->fill_back);
}
@@ -96,10 +96,10 @@ calculate_clip_key_rast( const struct brw_context *brw,
break;
}
- if (templ->light_twoside && key->fill_cw != CLIP_CULL)
+ if (templ->light_twoside && key->fill_cw != CLIP_CULL)
key->copy_bfc_cw = 1;
-
- if (templ->light_twoside && key->fill_ccw != CLIP_CULL)
+
+ if (templ->light_twoside && key->fill_ccw != CLIP_CULL)
key->copy_bfc_ccw = 1;
}
@@ -131,7 +131,7 @@ static void *brw_create_rasterizer_state( struct pipe_context *pipe,
rast->templ = *templ;
calculate_clip_key_rast( brw, templ, rast, &rast->clip_key );
-
+
if (templ->line_stipple_enable)
calculate_line_stipple_rast( templ, &rast->bls );
diff --git a/src/gallium/drivers/i965/brw_pipe_sampler.c b/src/gallium/drivers/i965/brw_pipe_sampler.c
index 3fe753e..63f00c1 100644
--- a/src/gallium/drivers/i965/brw_pipe_sampler.c
+++ b/src/gallium/drivers/i965/brw_pipe_sampler.c
@@ -18,25 +18,25 @@
static GLuint translate_wrap_mode( unsigned wrap )
{
switch( wrap ) {
- case PIPE_TEX_WRAP_REPEAT:
+ case PIPE_TEX_WRAP_REPEAT:
return BRW_TEXCOORDMODE_WRAP;
case PIPE_TEX_WRAP_CLAMP:
case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
return BRW_TEXCOORDMODE_CLAMP;
-
+
case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
return BRW_TEXCOORDMODE_CLAMP_BORDER;
- case PIPE_TEX_WRAP_MIRROR_REPEAT:
+ case PIPE_TEX_WRAP_MIRROR_REPEAT:
return BRW_TEXCOORDMODE_MIRROR;
- case PIPE_TEX_WRAP_MIRROR_CLAMP:
- case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
- case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
+ case PIPE_TEX_WRAP_MIRROR_CLAMP:
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
return BRW_TEXCOORDMODE_MIRROR_ONCE;
- default:
+ default:
return BRW_TEXCOORDMODE_WRAP;
}
}
@@ -57,7 +57,7 @@ static GLuint translate_img_filter( unsigned filter )
static GLuint translate_mip_filter( unsigned filter )
{
switch (filter) {
- case PIPE_TEX_MIPFILTER_NONE:
+ case PIPE_TEX_MIPFILTER_NONE:
return BRW_MIPFILTER_NONE;
case PIPE_TEX_MIPFILTER_NEAREST:
return BRW_MIPFILTER_NEAREST;
@@ -76,21 +76,21 @@ static GLuint translate_mip_filter( unsigned filter )
static GLuint translate_shadow_compare_func( unsigned func )
{
switch (func) {
- case PIPE_FUNC_NEVER:
+ case PIPE_FUNC_NEVER:
return BRW_COMPAREFUNCTION_ALWAYS;
- case PIPE_FUNC_LESS:
+ case PIPE_FUNC_LESS:
return BRW_COMPAREFUNCTION_LEQUAL;
- case PIPE_FUNC_LEQUAL:
+ case PIPE_FUNC_LEQUAL:
return BRW_COMPAREFUNCTION_LESS;
- case PIPE_FUNC_GREATER:
+ case PIPE_FUNC_GREATER:
return BRW_COMPAREFUNCTION_GEQUAL;
- case PIPE_FUNC_GEQUAL:
+ case PIPE_FUNC_GEQUAL:
return BRW_COMPAREFUNCTION_GREATER;
- case PIPE_FUNC_NOTEQUAL:
+ case PIPE_FUNC_NOTEQUAL:
return BRW_COMPAREFUNCTION_EQUAL;
- case PIPE_FUNC_EQUAL:
+ case PIPE_FUNC_EQUAL:
return BRW_COMPAREFUNCTION_NOTEQUAL;
- case PIPE_FUNC_ALWAYS:
+ case PIPE_FUNC_ALWAYS:
return BRW_COMPAREFUNCTION_NEVER;
default:
assert(0);
@@ -112,10 +112,10 @@ brw_create_sampler_state( struct pipe_context *pipe,
sampler->ss0.mip_filter = translate_mip_filter( template->min_mip_filter );
- /* XXX: anisotropy logic slightly changed:
+ /* XXX: anisotropy logic slightly changed:
*/
if (template->max_anisotropy > 1) {
- sampler->ss0.min_filter = BRW_MAPFILTER_ANISOTROPIC;
+ sampler->ss0.min_filter = BRW_MAPFILTER_ANISOTROPIC;
sampler->ss0.mag_filter = BRW_MAPFILTER_ANISOTROPIC;
sampler->ss3.max_aniso = MIN2((template->max_anisotropy - 2) / 2,
@@ -126,16 +126,16 @@ brw_create_sampler_state( struct pipe_context *pipe,
sampler->ss1.s_wrap_mode = translate_wrap_mode(template->wrap_s);
sampler->ss1.t_wrap_mode = translate_wrap_mode(template->wrap_t);
- /* Set LOD bias:
+ /* Set LOD bias:
*/
- sampler->ss0.lod_bias =
+ sampler->ss0.lod_bias =
util_signed_fixed(CLAMP(template->lod_bias, -16, 15), 6);
sampler->ss0.lod_preclamp = 1; /* OpenGL mode */
sampler->ss0.default_color_mode = 0; /* OpenGL/DX10 mode */
- /* Set shadow function:
+ /* Set shadow function:
*/
if (template->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {
@@ -147,15 +147,15 @@ brw_create_sampler_state( struct pipe_context *pipe,
translate_shadow_compare_func(template->compare_func);
}
- /* Set BaseMipLevel, MaxLOD, MinLOD:
+ /* Set BaseMipLevel, MaxLOD, MinLOD:
*/
- sampler->ss0.base_level =
+ sampler->ss0.base_level =
util_unsigned_fixed(0, 1);
- sampler->ss1.max_lod =
+ sampler->ss1.max_lod =
util_unsigned_fixed(CLAMP(template->max_lod, 0, 13), 6);
- sampler->ss1.min_lod =
+ sampler->ss1.min_lod =
util_unsigned_fixed(CLAMP(template->min_lod, 0, 13), 6);
return (void *)sampler;
diff --git a/src/gallium/drivers/i965/brw_pipe_shader.c b/src/gallium/drivers/i965/brw_pipe_shader.c
index d9bee96..7072722 100644
--- a/src/gallium/drivers/i965/brw_pipe_shader.c
+++ b/src/gallium/drivers/i965/brw_pipe_shader.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -31,7 +31,7 @@
#include "util/u_inlines.h"
#include "util/u_memory.h"
-
+
#include "tgsi/tgsi_parse.h"
#include "tgsi/tgsi_scan.h"
@@ -84,7 +84,7 @@ static void scan_immediates(const struct tgsi_token *tokens,
for (; i < 4; i++)
imm->data[imm->nr][i] = id[i];
-
+
imm->nr++;
break;
}
@@ -101,7 +101,7 @@ static void brw_bind_fs_state( struct pipe_context *pipe, void *prog )
{
struct brw_fragment_shader *fs = (struct brw_fragment_shader *)prog;
struct brw_context *brw = brw_context(pipe);
-
+
if (brw->curr.fragment_shader == fs)
return;
@@ -228,7 +228,7 @@ static void *brw_create_vs_state( struct pipe_context *pipe,
}
}
-
+
/* Done:
*/
return (void *)vs;
diff --git a/src/gallium/drivers/i965/brw_pipe_surface.c b/src/gallium/drivers/i965/brw_pipe_surface.c
index 4deead9..6ba5eb4 100644
--- a/src/gallium/drivers/i965/brw_pipe_surface.c
+++ b/src/gallium/drivers/i965/brw_pipe_surface.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -89,7 +89,7 @@ static boolean need_linear_view( struct brw_screen *brw_screen,
/* Tiled 3d textures don't have subsets that look like 2d surfaces:
*/
-
+
/* Everything else should be fine to render to in-place:
*/
return GL_FALSE;
@@ -108,7 +108,7 @@ void brw_update_texture( struct brw_screen *brw_screen,
/* Create a new surface with linear layout to serve as a render-target
* where it would be illegal (perhaps due to tiling constraints) to do
* this in-place.
- *
+ *
* Currently not implemented, not sure if it's needed.
*/
static struct brw_surface *create_linear_view( struct brw_screen *brw_screen,
@@ -200,7 +200,7 @@ static struct brw_surface *create_in_place_view( struct brw_screen *brw_screen,
return surface;
}
-/* Get a surface which is view into a texture
+/* Get a surface which is view into a texture
*/
static struct pipe_surface *brw_create_surface(struct pipe_context *pipe,
struct pipe_resource *pt,
@@ -221,7 +221,7 @@ static struct pipe_surface *brw_create_surface(struct pipe_context *pipe,
else
type = BRW_VIEW_IN_PLACE;
-
+
foreach (surface, &tex->views[type]) {
if (id.value == surface->id.value)
return &surface->base;
diff --git a/src/gallium/drivers/i965/brw_pipe_vertex.c b/src/gallium/drivers/i965/brw_pipe_vertex.c
index 007239e..cb56860 100644
--- a/src/gallium/drivers/i965/brw_pipe_vertex.c
+++ b/src/gallium/drivers/i965/brw_pipe_vertex.c
@@ -258,8 +258,8 @@ static void brw_set_vertex_buffers(struct pipe_context *pipe,
return;
/* Adjust refcounts */
- for (i = 0; i < count; i++)
- pipe_resource_reference(&brw->curr.vertex_buffer[i].buffer,
+ for (i = 0; i < count; i++)
+ pipe_resource_reference(&brw->curr.vertex_buffer[i].buffer,
buffers[i].buffer);
for ( ; i < brw->curr.num_vertex_buffers; i++)
@@ -304,7 +304,7 @@ static void brw_set_index_buffer(struct pipe_context *pipe,
}
-void
+void
brw_pipe_vertex_init( struct brw_context *brw )
{
brw->base.set_vertex_buffers = brw_set_vertex_buffers;
@@ -315,7 +315,7 @@ brw_pipe_vertex_init( struct brw_context *brw )
}
-void
+void
brw_pipe_vertex_cleanup( struct brw_context *brw )
{
diff --git a/src/gallium/drivers/i965/brw_reg.h b/src/gallium/drivers/i965/brw_reg.h
index ba10f9d..1a5d3cc 100644
--- a/src/gallium/drivers/i965/brw_reg.h
+++ b/src/gallium/drivers/i965/brw_reg.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef BRW_REG_H
diff --git a/src/gallium/drivers/i965/brw_resource.h b/src/gallium/drivers/i965/brw_resource.h
index 78defb3..e9b57d5 100644
--- a/src/gallium/drivers/i965/brw_resource.h
+++ b/src/gallium/drivers/i965/brw_resource.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef BRW_RESOURCE_H
@@ -139,7 +139,7 @@ brw_buffer_is_user_buffer( const struct pipe_resource *buf )
/***********************************************************************
- * Internal functions
+ * Internal functions
*/
GLboolean brw_texture_layout(struct brw_screen *brw_screen,
struct brw_texture *tex );
diff --git a/src/gallium/drivers/i965/brw_resource_buffer.c b/src/gallium/drivers/i965/brw_resource_buffer.c
index afb96ee..93844de 100644
--- a/src/gallium/drivers/i965/brw_resource_buffer.c
+++ b/src/gallium/drivers/i965/brw_resource_buffer.c
@@ -35,7 +35,7 @@ static void *
brw_buffer_transfer_map( struct pipe_context *pipe,
struct pipe_transfer *transfer)
{
- struct brw_screen *bscreen = brw_screen(pipe->screen);
+ struct brw_screen *bscreen = brw_screen(pipe->screen);
struct brw_winsys_screen *sws = bscreen->sws;
struct brw_buffer *buf = brw_buffer(transfer->resource);
unsigned offset = transfer->box.x;
@@ -46,7 +46,7 @@ brw_buffer_transfer_map( struct pipe_context *pipe,
if (buf->user_buffer)
map = buf->user_buffer;
else
- map = sws->bo_map( buf->bo,
+ map = sws->bo_map( buf->bo,
BRW_DATA_OTHER,
offset,
length,
@@ -63,7 +63,7 @@ brw_buffer_transfer_flush_region( struct pipe_context *pipe,
struct pipe_transfer *transfer,
const struct pipe_box *box)
{
- struct brw_screen *bscreen = brw_screen(pipe->screen);
+ struct brw_screen *bscreen = brw_screen(pipe->screen);
struct brw_winsys_screen *sws = bscreen->sws;
struct brw_buffer *buf = brw_buffer(transfer->resource);
unsigned offset = box->x;
@@ -72,7 +72,7 @@ brw_buffer_transfer_flush_region( struct pipe_context *pipe,
if (buf->user_buffer)
return;
- sws->bo_flush_range( buf->bo,
+ sws->bo_flush_range( buf->bo,
offset,
length );
}
@@ -82,10 +82,10 @@ static void
brw_buffer_transfer_unmap( struct pipe_context *pipe,
struct pipe_transfer *transfer)
{
- struct brw_screen *bscreen = brw_screen(pipe->screen);
+ struct brw_screen *bscreen = brw_screen(pipe->screen);
struct brw_winsys_screen *sws = bscreen->sws;
struct brw_buffer *buf = brw_buffer( transfer->resource );
-
+
if (buf->bo)
sws->bo_unmap(buf->bo);
}
@@ -110,7 +110,7 @@ static unsigned brw_buffer_is_referenced( struct pipe_context *pipe,
}
-struct u_resource_vtbl brw_buffer_vtbl =
+struct u_resource_vtbl brw_buffer_vtbl =
{
brw_buffer_get_handle, /* get_handle */
brw_buffer_destroy, /* resource_destroy */
@@ -133,11 +133,11 @@ brw_buffer_create(struct pipe_screen *screen,
struct brw_buffer *buf;
unsigned buffer_type;
enum pipe_error ret;
-
+
buf = CALLOC_STRUCT(brw_buffer);
if (!buf)
return NULL;
-
+
buf->b.b = *template;
buf->b.vtbl = &brw_buffer_vtbl;
pipe_reference_init(&buf->b.b.reference, 1);
@@ -152,7 +152,7 @@ brw_buffer_create(struct pipe_screen *screen,
case (PIPE_BIND_VERTEX_BUFFER|PIPE_BIND_INDEX_BUFFER):
buffer_type = BRW_BUFFER_TYPE_VERTEX;
break;
-
+
case PIPE_BIND_CONSTANT_BUFFER:
buffer_type = BRW_BUFFER_TYPE_SHADER_CONSTANTS;
break;
@@ -161,15 +161,15 @@ brw_buffer_create(struct pipe_screen *screen,
buffer_type = BRW_BUFFER_TYPE_GENERIC;
break;
}
-
+
ret = sws->bo_alloc( sws, buffer_type,
template->width0,
64, /* alignment */
&buf->bo );
if (ret != PIPE_OK)
return NULL;
-
- return &buf->b.b;
+
+ return &buf->b.b;
}
@@ -180,11 +180,11 @@ brw_user_buffer_create(struct pipe_screen *screen,
unsigned bind)
{
struct brw_buffer *buf;
-
+
buf = CALLOC_STRUCT(brw_buffer);
if (!buf)
return NULL;
-
+
pipe_reference_init(&buf->b.b.reference, 1);
buf->b.vtbl = &brw_buffer_vtbl;
buf->b.b.screen = screen;
@@ -197,6 +197,6 @@ brw_user_buffer_create(struct pipe_screen *screen,
buf->b.b.array_size = 1;
buf->user_buffer = ptr;
-
- return &buf->b.b;
+
+ return &buf->b.b;
}
diff --git a/src/gallium/drivers/i965/brw_resource_texture.c b/src/gallium/drivers/i965/brw_resource_texture.c
index fded2da..bfb9ee0 100644
--- a/src/gallium/drivers/i965/brw_resource_texture.c
+++ b/src/gallium/drivers/i965/brw_resource_texture.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -62,21 +62,21 @@ brw_transfer(struct pipe_transfer *transfer)
static GLuint translate_tex_target( unsigned target )
{
switch (target) {
- case PIPE_TEXTURE_1D:
+ case PIPE_TEXTURE_1D:
return BRW_SURFACE_1D;
- case PIPE_TEXTURE_2D:
+ case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_RECT:
return BRW_SURFACE_2D;
- case PIPE_TEXTURE_3D:
+ case PIPE_TEXTURE_3D:
return BRW_SURFACE_3D;
case PIPE_TEXTURE_CUBE:
return BRW_SURFACE_CUBE;
- default:
- assert(0);
+ default:
+ assert(0);
return BRW_SURFACE_1D;
}
}
@@ -92,7 +92,7 @@ static GLuint translate_tex_format( enum pipe_format pf )
return BRW_SURFACEFORMAT_I8_UNORM;
case PIPE_FORMAT_A8_UNORM:
- return BRW_SURFACEFORMAT_A8_UNORM;
+ return BRW_SURFACEFORMAT_A8_UNORM;
case PIPE_FORMAT_L16_UNORM:
return BRW_SURFACEFORMAT_L16_UNORM;
@@ -102,7 +102,7 @@ static GLuint translate_tex_format( enum pipe_format pf )
return BRW_SURFACEFORMAT_I16_UNORM;
case PIPE_FORMAT_A16_UNORM:
- return BRW_SURFACEFORMAT_A16_UNORM;
+ return BRW_SURFACEFORMAT_A16_UNORM;
*/
case PIPE_FORMAT_L8A8_UNORM:
@@ -146,10 +146,10 @@ static GLuint translate_tex_format( enum pipe_format pf )
case PIPE_FORMAT_DXT1_RGBA:
return BRW_SURFACEFORMAT_BC1_UNORM;
-
+
case PIPE_FORMAT_DXT3_RGBA:
return BRW_SURFACEFORMAT_BC2_UNORM;
-
+
case PIPE_FORMAT_DXT5_RGBA:
return BRW_SURFACEFORMAT_BC3_UNORM;
@@ -257,7 +257,7 @@ static unsigned brw_texture_is_referenced( struct pipe_context *pipe,
if (!(layer == -1 || surf->id.bits.layer == layer) ||
surf->id.bits.level != level)
continue;
-
+
if (bscreen->sws->bo_references( batch_bo, surf->bo))
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
}
@@ -272,7 +272,7 @@ static unsigned brw_texture_is_referenced( struct pipe_context *pipe,
*/
-static struct pipe_transfer *
+static struct pipe_transfer *
brw_texture_get_transfer(struct pipe_context *context,
struct pipe_resource *resource,
unsigned level,
@@ -313,7 +313,7 @@ brw_texture_transfer_map(struct pipe_context *pipe,
assert(box->z == 0);
offset = tex->image_offset[transfer->level][box->z];
- map = sws->bo_map(tex->bo,
+ map = sws->bo_map(tex->bo,
BRW_DATA_OTHER,
0,
tex->bo->size,
@@ -343,7 +343,7 @@ brw_texture_transfer_unmap(struct pipe_context *pipe,
-struct u_resource_vtbl brw_texture_vtbl =
+struct u_resource_vtbl brw_texture_vtbl =
{
brw_texture_get_handle, /* get_handle */
brw_texture_destroy, /* resource_destroy */
@@ -363,13 +363,13 @@ struct u_resource_vtbl brw_texture_vtbl =
struct pipe_resource *
brw_texture_create( struct pipe_screen *screen,
const struct pipe_resource *template )
-{
+{
struct brw_screen *bscreen = brw_screen(screen);
struct brw_texture *tex;
enum brw_buffer_type buffer_type;
enum pipe_error ret;
GLuint format;
-
+
tex = CALLOC_STRUCT(brw_texture);
if (tex == NULL)
return NULL;
@@ -390,14 +390,14 @@ brw_texture_create( struct pipe_screen *screen,
/* XXX: No tiling with compressed textures??
*/
if (tex->compressed == 0 &&
- !bscreen->no_tiling)
+ !bscreen->no_tiling)
{
if (bscreen->chipset.is_965 &&
util_format_is_depth_or_stencil(template->format))
tex->tiling = BRW_TILING_Y;
else
tex->tiling = BRW_TILING_X;
- }
+ }
else {
tex->tiling = BRW_TILING_NONE;
}
@@ -406,7 +406,7 @@ brw_texture_create( struct pipe_screen *screen,
if (!brw_texture_layout( bscreen, tex ))
goto fail;
-
+
if (template->bind & (PIPE_BIND_SCANOUT |
PIPE_BIND_SHARED)) {
buffer_type = BRW_BUFFER_TYPE_SCANOUT;
@@ -461,7 +461,7 @@ brw_texture_create( struct pipe_screen *screen,
tex->ss.ss3.depth = tex->b.b.depth0 - 1;
tex->ss.ss4.min_lod = 0;
-
+
if (tex->b.b.target == PIPE_TEXTURE_CUBE) {
tex->ss.ss0.cube_pos_x = 1;
tex->ss.ss0.cube_pos_y = 1;
@@ -480,7 +480,7 @@ brw_texture_create( struct pipe_screen *screen,
}
-struct pipe_resource *
+struct pipe_resource *
brw_texture_from_handle(struct pipe_screen *screen,
const struct pipe_resource *template,
struct winsys_handle *whandle)
diff --git a/src/gallium/drivers/i965/brw_resource_texture_layout.c b/src/gallium/drivers/i965/brw_resource_texture_layout.c
index 2187bdd..8d551ca 100644
--- a/src/gallium/drivers/i965/brw_resource_texture_layout.c
+++ b/src/gallium/drivers/i965/brw_resource_texture_layout.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
#include "pipe/p_format.h"
@@ -37,7 +37,7 @@
/* Code to layout images in a mipmap tree for i965.
*/
-static int
+static int
brw_tex_pitch_align (struct brw_texture *tex,
int pitch)
{
@@ -70,8 +70,8 @@ brw_tex_pitch_align (struct brw_texture *tex,
}
-static void
-brw_tex_alignment_unit(enum pipe_format pf,
+static void
+brw_tex_alignment_unit(enum pipe_format pf,
GLuint *w, GLuint *h)
{
switch (pf) {
@@ -95,7 +95,7 @@ brw_tex_alignment_unit(enum pipe_format pf,
}
-static void
+static void
brw_tex_set_level_info(struct brw_texture *tex,
GLuint level,
GLuint nr_images,
@@ -121,7 +121,7 @@ brw_tex_set_level_info(struct brw_texture *tex,
static void
brw_tex_set_image_offset(struct brw_texture *tex,
GLuint level, GLuint img,
- GLuint x, GLuint y,
+ GLuint x, GLuint y,
GLuint offset)
{
assert((x == 0 && y == 0) || img != 0 || level != 0);
@@ -129,7 +129,7 @@ brw_tex_set_image_offset(struct brw_texture *tex,
if (BRW_DEBUG & DEBUG_TEXTURE)
debug_printf("%s level %d img %d pos %d,%d image_offset %x\n",
- __FUNCTION__, level, img, x, y,
+ __FUNCTION__, level, img, x, y,
tex->image_offset[level][img]);
tex->image_offset[level][img] = (x + y * tex->pitch) * tex->cpp + offset;
@@ -162,10 +162,10 @@ static void brw_layout_2d( struct brw_texture *tex )
GLuint mip1_width;
if (tex->compressed) {
- mip1_width = (align(u_minify(tex->b.b.width0, 1), align_w) +
+ mip1_width = (align(u_minify(tex->b.b.width0, 1), align_w) +
align(u_minify(tex->b.b.width0, 2), align_w));
} else {
- mip1_width = (align(u_minify(tex->b.b.width0, 1), align_w) +
+ mip1_width = (align(u_minify(tex->b.b.width0, 1), align_w) +
u_minify(tex->b.b.width0, 2));
}
@@ -211,7 +211,7 @@ static void brw_layout_2d( struct brw_texture *tex )
}
-static boolean
+static boolean
brw_layout_cubemap_idgng( struct brw_texture *tex )
{
GLuint align_h = 2, align_w = 4;
@@ -250,16 +250,16 @@ brw_layout_cubemap_idgng( struct brw_texture *tex )
tex->pitch = brw_tex_pitch_align(tex, tex->pitch);
if (tex->compressed) {
- qpitch = ((y_pitch +
+ qpitch = ((y_pitch +
align(u_minify(y_pitch, 1), align_h) +
11 * align_h) / 4) * tex->pitch * tex->cpp;
- tex->total_height = ((y_pitch +
- align(u_minify(y_pitch, 1), align_h) +
+ tex->total_height = ((y_pitch +
+ align(u_minify(y_pitch, 1), align_h) +
11 * align_h) / 4) * 6;
} else {
- qpitch = (y_pitch +
- align(u_minify(y_pitch, 1), align_h) +
+ qpitch = (y_pitch +
+ align(u_minify(y_pitch, 1), align_h) +
11 * align_h) * tex->pitch * tex->cpp;
tex->total_height = (y_pitch +
@@ -393,7 +393,7 @@ GLboolean brw_texture_layout(struct brw_screen *brw_screen,
else
brw_layout_3d_cube( tex );
break;
-
+
case PIPE_TEXTURE_3D:
brw_layout_3d_cube( tex );
break;
diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c
index f5b75b1..f51cfed 100644
--- a/src/gallium/drivers/i965/brw_screen.c
+++ b/src/gallium/drivers/i965/brw_screen.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -444,7 +444,7 @@ brw_screen_create(struct brw_winsys_screen *sws)
break;
default:
- debug_printf("%s: unknown pci id 0x%x, cannot create screen\n",
+ debug_printf("%s: unknown pci id 0x%x, cannot create screen\n",
__FUNCTION__, chipset.pci_id);
return NULL;
}
@@ -472,7 +472,7 @@ brw_screen_create(struct brw_winsys_screen *sws)
brw_init_screen_resource_functions(bscreen);
bscreen->no_tiling = debug_get_option("BRW_NO_TILING", FALSE) != NULL;
-
-
+
+
return &bscreen->base;
}
diff --git a/src/gallium/drivers/i965/brw_screen.h b/src/gallium/drivers/i965/brw_screen.h
index 58e293b..0bff364 100644
--- a/src/gallium/drivers/i965/brw_screen.h
+++ b/src/gallium/drivers/i965/brw_screen.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef BRW_SCREEN_H
diff --git a/src/gallium/drivers/i965/brw_sf.c b/src/gallium/drivers/i965/brw_sf.c
index 5abf384..72c49cb 100644
--- a/src/gallium/drivers/i965/brw_sf.c
+++ b/src/gallium/drivers/i965/brw_sf.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "pipe/p_state.h"
#include "brw_batchbuffer.h"
@@ -73,7 +73,7 @@ static enum pipe_error compile_sf_prog( struct brw_context *brw,
brw_emit_null_setup( &c );
}
else {
- /* Which primitive? Or all three?
+ /* Which primitive? Or all three?
*/
switch (key->primitive) {
case SF_TRIANGLES:
@@ -163,7 +163,7 @@ static enum pipe_error upload_sf_prog(struct brw_context *brw)
/* BRW_NEW_REDUCED_PRIMITIVE */
switch (brw->reduced_primitive) {
- case PIPE_PRIM_TRIANGLES:
+ case PIPE_PRIM_TRIANGLES:
/* PIPE_NEW_RAST
*/
if (rast->fill_front != PIPE_POLYGON_MODE_FILL ||
@@ -172,11 +172,11 @@ static enum pipe_error upload_sf_prog(struct brw_context *brw)
else
key.primitive = SF_TRIANGLES;
break;
- case PIPE_PRIM_LINES:
- key.primitive = SF_LINES;
+ case PIPE_PRIM_LINES:
+ key.primitive = SF_LINES;
break;
- case PIPE_PRIM_POINTS:
- key.primitive = SF_POINTS;
+ case PIPE_PRIM_POINTS:
+ key.primitive = SF_POINTS;
break;
}
diff --git a/src/gallium/drivers/i965/brw_sf.h b/src/gallium/drivers/i965/brw_sf.h
index a895c7d..6493777 100644
--- a/src/gallium/drivers/i965/brw_sf.h
+++ b/src/gallium/drivers/i965/brw_sf.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#ifndef BRW_SF_H
#define BRW_SF_H
@@ -67,14 +67,14 @@ struct brw_sf_prog_key {
};
struct brw_sf_point_tex {
- GLboolean CoordReplace;
+ GLboolean CoordReplace;
};
struct brw_sf_compile {
struct brw_compile func;
struct brw_sf_prog_key key;
struct brw_sf_prog_data prog_data;
-
+
struct brw_reg pv;
struct brw_reg det;
struct brw_reg dx0;
@@ -86,7 +86,7 @@ struct brw_sf_compile {
*/
struct brw_reg z[3];
struct brw_reg inv_w[3];
-
+
/* The vertices:
*/
struct brw_reg vert[3];
@@ -111,7 +111,7 @@ struct brw_sf_compile {
GLuint point_coord_replace_mask;
};
-
+
void brw_emit_null_setup( struct brw_sf_compile *c );
void brw_emit_tri_setup( struct brw_sf_compile *c, GLboolean allocate );
void brw_emit_line_setup( struct brw_sf_compile *c, GLboolean allocate );
diff --git a/src/gallium/drivers/i965/brw_sf_emit.c b/src/gallium/drivers/i965/brw_sf_emit.c
index 497634e..f161372 100644
--- a/src/gallium/drivers/i965/brw_sf_emit.c
+++ b/src/gallium/drivers/i965/brw_sf_emit.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_batchbuffer.h"
@@ -49,7 +49,7 @@ static struct brw_reg get_vert_attr(struct brw_sf_compile *c,
}
-/***********************************************************************
+/***********************************************************************
* Twoside lighting
*/
static void copy_bfc( struct brw_sf_compile *c,
@@ -58,13 +58,13 @@ static void copy_bfc( struct brw_sf_compile *c,
struct brw_compile *p = &c->func;
if (c->key.attr_col0 && c->key.attr_bfc0)
- brw_MOV(p,
- get_vert_attr(c, vert, c->key.attr_col0),
+ brw_MOV(p,
+ get_vert_attr(c, vert, c->key.attr_col0),
get_vert_attr(c, vert, c->key.attr_bfc0));
if (c->key.attr_col1 && c->key.attr_bfc1)
- brw_MOV(p,
- get_vert_attr(c, vert, c->key.attr_col1),
+ brw_MOV(p,
+ get_vert_attr(c, vert, c->key.attr_col1),
get_vert_attr(c, vert, c->key.attr_bfc1));
}
@@ -87,7 +87,7 @@ static void do_twoside_color( struct brw_sf_compile *c )
if (!(c->key.attr_col0 && c->key.attr_bfc0) &&
!(c->key.attr_col1 && c->key.attr_bfc1))
return;
-
+
/* Need to use BRW_EXECUTE_4 and also do an 4-wide compare in order
* to get all channels active inside the IF. In the clipping code
* we run with NoMask, so it's not an option and we can use
@@ -95,7 +95,7 @@ static void do_twoside_color( struct brw_sf_compile *c )
*/
brw_push_insn_state(p);
brw_CMP(p, vec4(brw_null_reg()), backface_conditional, c->det, brw_imm_f(0));
- if_insn = brw_IF(p, BRW_EXECUTE_4);
+ if_insn = brw_IF(p, BRW_EXECUTE_4);
{
switch (c->nr_verts) {
case 3: copy_bfc(c, c->vert[2]);
@@ -123,13 +123,13 @@ static void copy_colors( struct brw_sf_compile *c,
struct brw_compile *p = &c->func;
if (c->key.attr_col0)
- brw_MOV(p,
- get_vert_attr(c, dst, c->key.attr_col0),
+ brw_MOV(p,
+ get_vert_attr(c, dst, c->key.attr_col0),
get_vert_attr(c, src, c->key.attr_col0));
if (c->key.attr_col1)
- brw_MOV(p,
- get_vert_attr(c, dst, c->key.attr_col1),
+ brw_MOV(p,
+ get_vert_attr(c, dst, c->key.attr_col1),
get_vert_attr(c, src, c->key.attr_col1));
}
@@ -165,7 +165,7 @@ static void do_flatshade_triangle( struct brw_sf_compile *c )
jmpi = 2;
brw_push_insn_state(p);
-
+
brw_MUL(p, c->pv, c->pv, brw_imm_d(jmpi*(nr*2+1)));
brw_JMPI(p, ip, ip, c->pv);
@@ -182,7 +182,7 @@ static void do_flatshade_triangle( struct brw_sf_compile *c )
brw_pop_insn_state(p);
}
-
+
static void do_flatshade_line( struct brw_sf_compile *c )
{
@@ -200,7 +200,7 @@ static void do_flatshade_line( struct brw_sf_compile *c )
if (nr == 0)
return;
- /* Already done in clip program:
+ /* Already done in clip program:
*/
if (c->key.primitive == SF_UNFILLED_TRIS)
return;
@@ -209,7 +209,7 @@ static void do_flatshade_line( struct brw_sf_compile *c )
jmpi = 2;
brw_push_insn_state(p);
-
+
brw_MUL(p, c->pv, c->pv, brw_imm_d(jmpi*(nr+1)));
brw_JMPI(p, ip, ip, c->pv);
copy_colors(c, c->vert[1], c->vert[0]);
@@ -220,7 +220,7 @@ static void do_flatshade_line( struct brw_sf_compile *c )
brw_pop_insn_state(p);
}
-
+
/***********************************************************************
* Triangle setup.
@@ -248,7 +248,7 @@ static void alloc_regs( struct brw_sf_compile *c )
c->inv_w[1] = brw_vec1_grf(2, 3);
c->z[2] = brw_vec1_grf(2, 4);
c->inv_w[2] = brw_vec1_grf(2, 5);
-
+
/* The vertices:
*/
reg = 3;
@@ -267,7 +267,7 @@ static void alloc_regs( struct brw_sf_compile *c )
/* Note grf allocation:
*/
c->prog_data.total_grf = reg;
-
+
/* Outputs of this program - interpolation coefficients for
* rasterization:
@@ -284,12 +284,12 @@ static void copy_z_inv_w( struct brw_sf_compile *c )
GLuint i;
brw_push_insn_state(p);
-
+
/* Copy both scalars with a single MOV:
*/
for (i = 0; i < c->nr_verts; i++)
brw_MOV(p, vec2(suboffset(c->vert[i], 2)), vec2(c->z[i]));
-
+
brw_pop_insn_state(p);
}
@@ -299,11 +299,11 @@ static void invert_det( struct brw_sf_compile *c)
/* Looks like we invert all 8 elements just to get 1/det in
* position 2 !?!
*/
- brw_math(&c->func,
- c->inv_det,
+ brw_math(&c->func,
+ c->inv_det,
BRW_MATH_FUNCTION_INV,
BRW_MATH_SATURATE_NONE,
- 0,
+ 0,
c->det,
BRW_MATH_DATA_SCALAR,
BRW_MATH_PRECISION_FULL);
@@ -328,11 +328,11 @@ static GLboolean calculate_masks( struct brw_sf_compile *c,
*pc_persp = 0;
*pc_linear = 0;
*pc = 0xf;
-
- if (persp_mask & (1 << (reg*2)))
+
+ if (persp_mask & (1 << (reg*2)))
*pc_persp = 0xf;
- if (linear_mask & (1 << (reg*2)))
+ if (linear_mask & (1 << (reg*2)))
*pc_linear = 0xf;
/* Maybe only processs one attribute on the final round:
@@ -340,10 +340,10 @@ static GLboolean calculate_masks( struct brw_sf_compile *c,
if (reg*2+1 < c->nr_setup_attrs) {
*pc |= 0xf0;
- if (persp_mask & (1 << (reg*2+1)))
+ if (persp_mask & (1 << (reg*2+1)))
*pc_persp |= 0xf0;
- if (linear_mask & (1 << (reg*2+1)))
+ if (linear_mask & (1 << (reg*2+1)))
*pc_linear |= 0xf0;
}
@@ -356,8 +356,8 @@ void brw_emit_null_setup( struct brw_sf_compile *c )
struct brw_compile *p = &c->func;
/* m0 is implicitly copied from r0 in the send instruction:
- */
- brw_urb_WRITE(p,
+ */
+ brw_urb_WRITE(p,
brw_null_reg(),
0,
brw_vec8_grf(0, 0), /* r0, will be copied to m0 */
@@ -368,7 +368,7 @@ void brw_emit_null_setup( struct brw_sf_compile *c )
1, /* eot */
1, /* writes complete */
0, /* offset */
- BRW_URB_SWIZZLE_TRANSPOSE);
+ BRW_URB_SWIZZLE_TRANSPOSE);
}
void brw_emit_tri_setup( struct brw_sf_compile *c, GLboolean allocate)
@@ -384,13 +384,13 @@ void brw_emit_tri_setup( struct brw_sf_compile *c, GLboolean allocate)
invert_det(c);
copy_z_inv_w(c);
- if (c->key.do_twoside_color)
+ if (c->key.do_twoside_color)
do_twoside_color(c);
if (c->key.do_flat_shading)
do_flatshade_triangle(c);
-
-
+
+
for (i = 0; i < c->nr_setup_regs; i++)
{
/* Pair of incoming attributes:
@@ -408,10 +408,10 @@ void brw_emit_tri_setup( struct brw_sf_compile *c, GLboolean allocate)
brw_MUL(p, a1, a1, c->inv_w[1]);
brw_MUL(p, a2, a2, c->inv_w[2]);
}
-
-
+
+
/* Calculate coefficients for interpolated values:
- */
+ */
if (pc_linear)
{
brw_set_predicate_control_flag_value(p, pc_linear);
@@ -424,7 +424,7 @@ void brw_emit_tri_setup( struct brw_sf_compile *c, GLboolean allocate)
brw_MUL(p, brw_null_reg(), c->a1_sub_a0, c->dy2);
brw_MAC(p, c->tmp, c->a2_sub_a0, negate(c->dy0));
brw_MUL(p, c->m1Cx, c->tmp, c->inv_det);
-
+
/* calculate dA/dy
*/
brw_MUL(p, brw_null_reg(), c->a2_sub_a0, c->dx0);
@@ -433,15 +433,15 @@ void brw_emit_tri_setup( struct brw_sf_compile *c, GLboolean allocate)
}
{
- brw_set_predicate_control_flag_value(p, pc);
+ brw_set_predicate_control_flag_value(p, pc);
/* start point for interpolation
*/
brw_MOV(p, c->m3C0, a0);
-
+
/* Copy m0..m3 to URB. m0 is implicitly copied from r0 in
* the send instruction:
- */
- brw_urb_WRITE(p,
+ */
+ brw_urb_WRITE(p,
brw_null_reg(),
0,
brw_vec8_grf(0, 0), /* r0, will be copied to m0 */
@@ -495,27 +495,27 @@ void brw_emit_line_setup( struct brw_sf_compile *c, GLboolean allocate)
/* Calculate coefficients for position, color:
*/
if (pc_linear) {
- brw_set_predicate_control_flag_value(p, pc_linear);
+ brw_set_predicate_control_flag_value(p, pc_linear);
brw_ADD(p, c->a1_sub_a0, a1, negate(a0));
- brw_MUL(p, c->tmp, c->a1_sub_a0, c->dx0);
+ brw_MUL(p, c->tmp, c->a1_sub_a0, c->dx0);
brw_MUL(p, c->m1Cx, c->tmp, c->inv_det);
-
+
brw_MUL(p, c->tmp, c->a1_sub_a0, c->dy0);
brw_MUL(p, c->m2Cy, c->tmp, c->inv_det);
}
{
- brw_set_predicate_control_flag_value(p, pc);
+ brw_set_predicate_control_flag_value(p, pc);
/* start point for interpolation
*/
brw_MOV(p, c->m3C0, a0);
- /* Copy m0..m3 to URB.
+ /* Copy m0..m3 to URB.
*/
- brw_urb_WRITE(p,
+ brw_urb_WRITE(p,
brw_null_reg(),
0,
brw_vec8_grf(0, 0),
@@ -526,9 +526,9 @@ void brw_emit_line_setup( struct brw_sf_compile *c, GLboolean allocate)
last, /* eot */
last, /* writes complete */
i*4, /* urb destination offset */
- BRW_URB_SWIZZLE_TRANSPOSE);
+ BRW_URB_SWIZZLE_TRANSPOSE);
}
- }
+ }
}
void brw_emit_point_sprite_setup( struct brw_sf_compile *c, GLboolean allocate)
@@ -552,9 +552,9 @@ void brw_emit_point_sprite_setup( struct brw_sf_compile *c, GLboolean allocate)
struct brw_reg a0 = offset(c->vert[0], i);
GLushort pc, pc_persp, pc_linear;
GLboolean last = calculate_masks(c, i, &pc, &pc_persp, &pc_linear);
-
+
if (pc_persp)
- {
+ {
if (coord_replace) {
brw_set_predicate_control_flag_value(p, pc_persp);
brw_MUL(p, a0, a0, c->inv_w[0]);
@@ -577,21 +577,21 @@ void brw_emit_point_sprite_setup( struct brw_sf_compile *c, GLboolean allocate)
brw_MOV(p, vec1(suboffset(c->m1Cx, 1)), brw_imm_f(0.0));
brw_MUL(p, c->m2Cy, c->tmp, negate(c->inv_w[0]));
brw_MOV(p, vec1(suboffset(c->m2Cy, 0)), brw_imm_f(0.0));
- }
+ }
else {
brw_MUL(p, c->m1Cx, c->tmp, c->inv_w[0]);
brw_MOV(p, vec1(suboffset(c->m1Cx, 1)), brw_imm_f(0.0));
brw_MUL(p, c->m2Cy, c->tmp, c->inv_w[0]);
brw_MOV(p, vec1(suboffset(c->m2Cy, 0)), brw_imm_f(0.0));
}
- }
+ }
else {
brw_MOV(p, c->m1Cx, brw_imm_ud(0));
brw_MOV(p, c->m2Cy, brw_imm_ud(0));
}
{
- brw_set_predicate_control_flag_value(p, pc);
+ brw_set_predicate_control_flag_value(p, pc);
if (coord_replace) {
if (c->key.sprite_origin_lower_left) {
brw_MUL(p, c->m3C0, c->inv_w[0], brw_imm_f(1.0));
@@ -600,14 +600,14 @@ void brw_emit_point_sprite_setup( struct brw_sf_compile *c, GLboolean allocate)
else {
brw_MOV(p, c->m3C0, brw_imm_f(0.0));
}
- }
+ }
else {
brw_MOV(p, c->m3C0, a0); /* constant value */
}
- /* Copy m0..m3 to URB.
+ /* Copy m0..m3 to URB.
*/
- brw_urb_WRITE(p,
+ brw_urb_WRITE(p,
brw_null_reg(),
0,
brw_vec8_grf(0, 0),
@@ -632,7 +632,7 @@ void brw_emit_point_setup( struct brw_sf_compile *c, GLboolean allocate)
GLuint i;
c->nr_verts = 1;
-
+
if (allocate)
alloc_regs(c);
@@ -646,9 +646,9 @@ void brw_emit_point_setup( struct brw_sf_compile *c, GLboolean allocate)
struct brw_reg a0 = offset(c->vert[0], i);
GLushort pc, pc_persp, pc_linear;
GLboolean last = calculate_masks(c, i, &pc, &pc_persp, &pc_linear);
-
+
if (pc_persp)
- {
+ {
/* This seems odd as the values are all constant, but the
* fragment shader will be expecting it:
*/
@@ -662,13 +662,13 @@ void brw_emit_point_setup( struct brw_sf_compile *c, GLboolean allocate)
* code in the fragment shader.
*/
{
- brw_set_predicate_control_flag_value(p, pc);
+ brw_set_predicate_control_flag_value(p, pc);
brw_MOV(p, c->m3C0, a0); /* constant value */
- /* Copy m0..m3 to URB.
+ /* Copy m0..m3 to URB.
*/
- brw_urb_WRITE(p,
+ brw_urb_WRITE(p,
brw_null_reg(),
0,
brw_vec8_grf(0, 0),
@@ -689,11 +689,11 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c )
struct brw_compile *p = &c->func;
struct brw_reg ip = brw_ip_reg();
struct brw_reg payload_prim = brw_uw1_reg(BRW_GENERAL_REGISTER_FILE, 1, 0);
- struct brw_reg payload_attr = get_element_ud(brw_vec1_reg(BRW_GENERAL_REGISTER_FILE, 1, 0), 0);
+ struct brw_reg payload_attr = get_element_ud(brw_vec1_reg(BRW_GENERAL_REGISTER_FILE, 1, 0), 0);
struct brw_reg primmask;
struct brw_instruction *jmp;
struct brw_reg v1_null_ud = vec1(retype(brw_null_reg(), BRW_REGISTER_TYPE_UD));
-
+
GLuint saveflag;
c->nr_verts = 3;
@@ -715,7 +715,7 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c )
jmp = brw_JMPI(p, ip, ip, brw_imm_d(0));
{
saveflag = p->flag_value;
- brw_push_insn_state(p);
+ brw_push_insn_state(p);
brw_emit_tri_setup( c, GL_FALSE );
brw_pop_insn_state(p);
p->flag_value = saveflag;
@@ -736,25 +736,25 @@ void brw_emit_anyprim_setup( struct brw_sf_compile *c )
jmp = brw_JMPI(p, ip, ip, brw_imm_d(0));
{
saveflag = p->flag_value;
- brw_push_insn_state(p);
+ brw_push_insn_state(p);
brw_emit_line_setup( c, GL_FALSE );
brw_pop_insn_state(p);
p->flag_value = saveflag;
/* note - thread killed in subroutine */
}
- brw_land_fwd_jump(p, jmp);
+ brw_land_fwd_jump(p, jmp);
brw_set_conditionalmod(p, BRW_CONDITIONAL_Z);
brw_AND(p, v1_null_ud, payload_attr, brw_imm_ud(1<flag_value;
- brw_push_insn_state(p);
+ brw_push_insn_state(p);
brw_emit_point_sprite_setup( c, GL_FALSE );
brw_pop_insn_state(p);
p->flag_value = saveflag;
}
- brw_land_fwd_jump(p, jmp);
+ brw_land_fwd_jump(p, jmp);
brw_emit_point_setup( c, GL_FALSE );
}
diff --git a/src/gallium/drivers/i965/brw_sf_state.c b/src/gallium/drivers/i965/brw_sf_state.c
index 6c299a8..cd81390 100644
--- a/src/gallium/drivers/i965/brw_sf_state.c
+++ b/src/gallium/drivers/i965/brw_sf_state.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "util/u_math.h"
#include "pipe/p_state.h"
@@ -72,7 +72,7 @@ static enum pipe_error upload_sf_vp(struct brw_context *brw)
const struct brw_tracked_state brw_sf_vp = {
.dirty = {
- .mesa = (PIPE_NEW_VIEWPORT |
+ .mesa = (PIPE_NEW_VIEWPORT |
PIPE_NEW_SCISSOR),
.brw = 0,
.cache = 0
@@ -84,7 +84,7 @@ struct brw_sf_unit_key {
unsigned int total_grf;
unsigned int urb_entry_read_length;
unsigned int nr_urb_entries, urb_size, sfsize;
-
+
unsigned scissor:1;
unsigned line_smooth:1;
unsigned point_sprite:1;
@@ -158,8 +158,8 @@ sf_unit_create_from_key(struct brw_context *brw,
sf.thread4.nr_urb_entries = key->nr_urb_entries;
sf.thread4.urb_entry_allocation_size = key->sfsize - 1;
- /* Each SF thread produces 1 PUE, and there can be up to 24(Pre-IGDNG) or
- * 48(IGDNG) threads
+ /* Each SF thread produces 1 PUE, and there can be up to 24(Pre-IGDNG) or
+ * 48(IGDNG) threads
*/
if (BRW_IS_IGDNG(brw))
chipset_max_threads = 48;
@@ -265,7 +265,7 @@ sf_unit_create_from_key(struct brw_context *brw,
if (ret)
return ret;
-
+
return PIPE_OK;
}
@@ -279,7 +279,7 @@ static enum pipe_error upload_sf_unit( struct brw_context *brw )
enum pipe_error ret;
sf_unit_populate_key(brw, &key);
-
+
/* XXX: cut this crap and pre calculate the key:
*/
total_grf = (align(key.total_grf, 16) / 16 - 1);
diff --git a/src/gallium/drivers/i965/brw_state.h b/src/gallium/drivers/i965/brw_state.h
index d2bbd01..a94f966 100644
--- a/src/gallium/drivers/i965/brw_state.h
+++ b/src/gallium/drivers/i965/brw_state.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#ifndef BRW_STATE_H
#define BRW_STATE_H
@@ -159,7 +159,7 @@ void brw_destroy_batch_cache( struct brw_context *brw );
void brw_clear_batch_cache( struct brw_context *brw );
/***********************************************************************
- * brw_wm_surface_state.c
+ * brw_wm_surface_state.c
*/
/***********************************************************************
diff --git a/src/gallium/drivers/i965/brw_state_batch.c b/src/gallium/drivers/i965/brw_state_batch.c
index ce5ed0a..a5e265a 100644
--- a/src/gallium/drivers/i965/brw_state_batch.c
+++ b/src/gallium/drivers/i965/brw_state_batch.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_state.h"
diff --git a/src/gallium/drivers/i965/brw_state_cache.c b/src/gallium/drivers/i965/brw_state_cache.c
index c911f39..220b37d 100644
--- a/src/gallium/drivers/i965/brw_state_cache.c
+++ b/src/gallium/drivers/i965/brw_state_cache.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -176,7 +176,7 @@ brw_search_cache(struct brw_cache *cache,
enum brw_cache_id cache_id,
const void *key,
GLuint key_size,
- struct brw_winsys_reloc *relocs,
+ struct brw_winsys_reloc *relocs,
GLuint nr_relocs,
void *aux_return,
struct brw_winsys_buffer **bo_out)
@@ -190,13 +190,13 @@ brw_search_cache(struct brw_cache *cache,
if (item) {
if (aux_return)
*(void **)aux_return = (void *)((char *)item->key + item->key_size);
-
+
update_cache_last(cache, cache_id, item->bo);
bo_reference(bo_out, item->bo);
return TRUE;
}
-
- return FALSE;
+
+ return FALSE;
}
@@ -228,7 +228,7 @@ brw_upload_cache( struct brw_cache *cache,
*/
ret = cache->sws->bo_alloc(cache->sws,
cache->buffer_type,
- data_size, 1 << 6,
+ data_size, 1 << 6,
bo_out);
if (ret)
return ret;
@@ -273,7 +273,7 @@ brw_upload_cache( struct brw_cache *cache,
data_size, cache_id);
/* Copy data to the buffer */
- ret = cache->sws->bo_subdata(item->bo,
+ ret = cache->sws->bo_subdata(item->bo,
cache_id,
0, data_size, data,
relocs, nr_relocs);
@@ -325,7 +325,7 @@ brw_cache_data_sz(struct brw_cache *cache,
* If nr_relocs is nonzero, brw_search_cache()/brw_upload_cache() would be
* better to use, as the potentially changing offsets in the data-used-as-key
* will result in excessive cache misses.
- *
+ *
* XXX: above is no longer true -- can we remove some code?
*/
enum pipe_error
diff --git a/src/gallium/drivers/i965/brw_state_debug.c b/src/gallium/drivers/i965/brw_state_debug.c
index 049c278..19db921 100644
--- a/src/gallium/drivers/i965/brw_state_debug.c
+++ b/src/gallium/drivers/i965/brw_state_debug.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,9 +22,9 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
-
+
#include "brw_context.h"
diff --git a/src/gallium/drivers/i965/brw_state_upload.c b/src/gallium/drivers/i965/brw_state_upload.c
index f8b91ef..5b2ba93 100644
--- a/src/gallium/drivers/i965/brw_state_upload.c
+++ b/src/gallium/drivers/i965/brw_state_upload.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_context.h"
@@ -40,8 +40,8 @@ const struct brw_tracked_state *atoms[] =
{
/* &brw_wm_input_sizes, */
&brw_vs_prog,
- &brw_gs_prog,
- &brw_clip_prog,
+ &brw_gs_prog,
+ &brw_clip_prog,
&brw_sf_prog,
&brw_wm_prog,
@@ -65,7 +65,7 @@ const struct brw_tracked_state *atoms[] =
&brw_sf_unit,
&brw_vs_unit, /* always required, enabled or not */
&brw_clip_unit,
- &brw_gs_unit,
+ &brw_gs_unit,
/* Command packets:
*/
@@ -212,7 +212,7 @@ enum pipe_error brw_upload_state(struct brw_context *brw)
* state flags which are generated and checked to help ensure
* state atoms are ordered correctly in the list.
*/
- struct brw_state_flags examined, prev;
+ struct brw_state_flags examined, prev;
memset(&examined, 0, sizeof(examined));
prev = *state;
@@ -244,7 +244,7 @@ enum pipe_error brw_upload_state(struct brw_context *brw)
}
}
else {
- for (i = 0; i < Elements(atoms); i++) {
+ for (i = 0; i < Elements(atoms); i++) {
const struct brw_tracked_state *atom = atoms[i];
if (check_state(state, &atom->dirty)) {
@@ -258,11 +258,11 @@ enum pipe_error brw_upload_state(struct brw_context *brw)
}
if (BRW_DEBUG & DEBUG_STATE) {
- brw_update_dirty_counts( state->mesa,
+ brw_update_dirty_counts( state->mesa,
state->brw,
state->cache );
}
-
+
/* Clear dirty flags:
*/
memset(state, 0, sizeof(*state));
diff --git a/src/gallium/drivers/i965/brw_structs.h b/src/gallium/drivers/i965/brw_structs.h
index e97ddeb..5d459af 100644
--- a/src/gallium/drivers/i965/brw_structs.h
+++ b/src/gallium/drivers/i965/brw_structs.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -44,10 +44,10 @@
/* Command packets:
*/
-struct header
+struct header
{
- GLuint length:16;
- GLuint opcode:16;
+ GLuint length:16;
+ GLuint opcode:16;
};
@@ -58,27 +58,27 @@ union header_union
};
struct brw_3d_control
-{
- struct
+{
+ struct
{
GLuint length:8;
GLuint notify_enable:1;
GLuint pad:3;
- GLuint wc_flush_enable:1;
- GLuint depth_stall_enable:1;
- GLuint operation:2;
- GLuint opcode:16;
+ GLuint wc_flush_enable:1;
+ GLuint depth_stall_enable:1;
+ GLuint operation:2;
+ GLuint opcode:16;
} header;
-
+
struct
{
GLuint pad:2;
- GLuint dest_addr_type:1;
- GLuint dest_addr:29;
+ GLuint dest_addr_type:1;
+ GLuint dest_addr:29;
} dest;
-
- GLuint dword2;
- GLuint dword3;
+
+ GLuint dword2;
+ GLuint dword3;
};
@@ -86,18 +86,18 @@ struct brw_3d_primitive
{
struct
{
- GLuint length:8;
+ GLuint length:8;
GLuint pad:2;
- GLuint topology:5;
- GLuint indexed:1;
- GLuint opcode:16;
+ GLuint topology:5;
+ GLuint indexed:1;
+ GLuint opcode:16;
} header;
- GLuint verts_per_instance;
- GLuint start_vert_location;
- GLuint instance_count;
- GLuint start_instance_location;
- GLuint base_vert_location;
+ GLuint verts_per_instance;
+ GLuint start_vert_location;
+ GLuint instance_count;
+ GLuint start_instance_location;
+ GLuint base_vert_location;
};
/* These seem to be passed around as function args, so it works out
@@ -127,49 +127,49 @@ struct brw_vf_statistics
struct brw_binding_table_pointers
{
struct header header;
- GLuint vs;
- GLuint gs;
- GLuint clp;
- GLuint sf;
- GLuint wm;
+ GLuint vs;
+ GLuint gs;
+ GLuint clp;
+ GLuint sf;
+ GLuint wm;
};
struct brw_blend_constant_color
{
struct header header;
- GLfloat blend_constant_color[4];
+ GLfloat blend_constant_color[4];
};
struct brw_depthbuffer
{
union header_union header;
-
+
union {
struct {
- GLuint pitch:18;
- GLuint format:3;
+ GLuint pitch:18;
+ GLuint format:3;
GLuint pad:2;
GLuint software_tiled_rendering_mode:2;
- GLuint depth_offset_disable:1;
- GLuint tile_walk:1;
- GLuint tiled_surface:1;
+ GLuint depth_offset_disable:1;
+ GLuint tile_walk:1;
+ GLuint tiled_surface:1;
GLuint pad2:1;
- GLuint surface_type:3;
+ GLuint surface_type:3;
} bits;
GLuint dword;
} dword1;
-
- GLuint dword2_base_addr;
-
+
+ GLuint dword2_base_addr;
+
union {
struct {
GLuint pad:1;
- GLuint mipmap_layout:1;
- GLuint lod:4;
- GLuint width:13;
- GLuint height:13;
+ GLuint mipmap_layout:1;
+ GLuint lod:4;
+ GLuint width:13;
+ GLuint height:13;
} bits;
GLuint dword;
} dword3;
@@ -177,8 +177,8 @@ struct brw_depthbuffer
union {
struct {
GLuint pad:10;
- GLuint min_array_element:11;
- GLuint depth:11;
+ GLuint min_array_element:11;
+ GLuint depth:11;
} bits;
GLuint dword;
} dword4;
@@ -187,31 +187,31 @@ struct brw_depthbuffer
struct brw_depthbuffer_g4x
{
union header_union header;
-
+
union {
struct {
- GLuint pitch:18;
- GLuint format:3;
+ GLuint pitch:18;
+ GLuint format:3;
GLuint pad:2;
GLuint software_tiled_rendering_mode:2;
- GLuint depth_offset_disable:1;
- GLuint tile_walk:1;
- GLuint tiled_surface:1;
+ GLuint depth_offset_disable:1;
+ GLuint tile_walk:1;
+ GLuint tiled_surface:1;
GLuint pad2:1;
- GLuint surface_type:3;
+ GLuint surface_type:3;
} bits;
GLuint dword;
} dword1;
-
- GLuint dword2_base_addr;
-
+
+ GLuint dword2_base_addr;
+
union {
struct {
GLuint pad:1;
- GLuint mipmap_layout:1;
- GLuint lod:4;
- GLuint width:13;
- GLuint height:13;
+ GLuint mipmap_layout:1;
+ GLuint lod:4;
+ GLuint width:13;
+ GLuint height:13;
} bits;
GLuint dword;
} dword3;
@@ -219,8 +219,8 @@ struct brw_depthbuffer_g4x
union {
struct {
GLuint pad:10;
- GLuint min_array_element:11;
- GLuint depth:11;
+ GLuint min_array_element:11;
+ GLuint depth:11;
} bits;
GLuint dword;
} dword4;
@@ -237,12 +237,12 @@ struct brw_depthbuffer_g4x
struct brw_drawrect
{
struct header header;
- GLuint xmin:16;
- GLuint ymin:16;
- GLuint xmax:16;
- GLuint ymax:16;
- GLuint xorg:16;
- GLuint yorg:16;
+ GLuint xmin:16;
+ GLuint ymin:16;
+ GLuint xmax:16;
+ GLuint ymax:16;
+ GLuint xorg:16;
+ GLuint yorg:16;
};
@@ -251,26 +251,26 @@ struct brw_drawrect
struct brw_global_depth_offset_clamp
{
struct header header;
- GLfloat depth_offset_clamp;
+ GLfloat depth_offset_clamp;
};
struct brw_indexbuffer
-{
+{
union {
struct
{
- GLuint length:8;
- GLuint index_format:2;
- GLuint cut_index_enable:1;
- GLuint pad:5;
- GLuint opcode:16;
+ GLuint length:8;
+ GLuint index_format:2;
+ GLuint cut_index_enable:1;
+ GLuint pad:5;
+ GLuint opcode:16;
} bits;
GLuint dword;
} header;
- GLuint buffer_start;
- GLuint buffer_end;
+ GLuint buffer_start;
+ GLuint buffer_end;
};
/* NEW in Integrated Graphics Device */
@@ -294,20 +294,20 @@ struct brw_aa_line_parameters
};
struct brw_line_stipple
-{
+{
struct header header;
-
+
struct
{
- GLuint pattern:16;
+ GLuint pattern:16;
GLuint pad:16;
} bits0;
-
+
struct
{
- GLuint repeat_count:9;
+ GLuint repeat_count:9;
GLuint pad:7;
- GLuint inverse_repeat_count:16;
+ GLuint inverse_repeat_count:16;
} bits1;
};
@@ -315,26 +315,26 @@ struct brw_line_stipple
struct brw_pipelined_state_pointers
{
struct header header;
-
+
struct {
GLuint pad:5;
GLuint offset:27; /* Offset from GENERAL_STATE_BASE */
} vs;
-
+
struct
{
GLuint enable:1;
GLuint pad:4;
GLuint offset:27; /* Offset from GENERAL_STATE_BASE */
} gs;
-
+
struct
{
GLuint enable:1;
GLuint pad:4;
GLuint offset:27; /* Offset from GENERAL_STATE_BASE */
} clp;
-
+
struct
{
GLuint pad:5;
@@ -346,7 +346,7 @@ struct brw_pipelined_state_pointers
GLuint pad:5;
GLuint offset:27; /* Offset from GENERAL_STATE_BASE */
} wm;
-
+
struct
{
GLuint pad:5;
@@ -360,9 +360,9 @@ struct brw_polygon_stipple_offset
struct header header;
struct {
- GLuint y_offset:5;
+ GLuint y_offset:5;
GLuint pad:3;
- GLuint x_offset:5;
+ GLuint x_offset:5;
GLuint pad0:19;
} bits0;
};
@@ -381,9 +381,9 @@ struct brw_pipeline_select
{
struct
{
- GLuint pipeline_select:1;
+ GLuint pipeline_select:1;
GLuint pad:15;
- GLuint opcode:16;
+ GLuint opcode:16;
} header;
};
@@ -420,30 +420,30 @@ struct brw_urb_fence
{
struct
{
- GLuint length:8;
- GLuint vs_realloc:1;
- GLuint gs_realloc:1;
- GLuint clp_realloc:1;
- GLuint sf_realloc:1;
- GLuint vfe_realloc:1;
- GLuint cs_realloc:1;
+ GLuint length:8;
+ GLuint vs_realloc:1;
+ GLuint gs_realloc:1;
+ GLuint clp_realloc:1;
+ GLuint sf_realloc:1;
+ GLuint vfe_realloc:1;
+ GLuint cs_realloc:1;
GLuint pad:2;
- GLuint opcode:16;
+ GLuint opcode:16;
} header;
struct
{
- GLuint vs_fence:10;
- GLuint gs_fence:10;
- GLuint clp_fence:10;
+ GLuint vs_fence:10;
+ GLuint gs_fence:10;
+ GLuint clp_fence:10;
GLuint pad:2;
} bits0;
struct
{
- GLuint sf_fence:10;
- GLuint vf_fence:10;
- GLuint cs_fence:11;
+ GLuint sf_fence:10;
+ GLuint vf_fence:10;
+ GLuint cs_fence:11;
GLuint pad:1;
} bits1;
};
@@ -454,9 +454,9 @@ struct brw_cs_urb_state
struct
{
- GLuint nr_urb_entries:3;
+ GLuint nr_urb_entries:3;
GLuint pad:1;
- GLuint urb_entry_size:5;
+ GLuint urb_entry_size:5;
GLuint pad0:23;
} bits0;
};
@@ -465,16 +465,16 @@ struct brw_constant_buffer
{
struct
{
- GLuint length:8;
- GLuint valid:1;
+ GLuint length:8;
+ GLuint valid:1;
GLuint pad:7;
- GLuint opcode:16;
+ GLuint opcode:16;
} header;
struct
{
- GLuint buffer_length:6;
- GLuint buffer_address:26;
+ GLuint buffer_length:6;
+ GLuint buffer_address:26;
} bits0;
};
@@ -486,35 +486,35 @@ struct brw_state_base_address
{
GLuint modify_enable:1;
GLuint pad:4;
- GLuint general_state_address:27;
+ GLuint general_state_address:27;
} bits0;
struct
{
GLuint modify_enable:1;
GLuint pad:4;
- GLuint surface_state_address:27;
+ GLuint surface_state_address:27;
} bits1;
struct
{
GLuint modify_enable:1;
GLuint pad:4;
- GLuint indirect_object_state_address:27;
+ GLuint indirect_object_state_address:27;
} bits2;
struct
{
GLuint modify_enable:1;
GLuint pad:11;
- GLuint general_state_upper_bound:20;
+ GLuint general_state_upper_bound:20;
} bits3;
struct
{
GLuint modify_enable:1;
GLuint pad:11;
- GLuint indirect_object_state_upper_bound:20;
+ GLuint indirect_object_state_upper_bound:20;
} bits4;
};
@@ -524,9 +524,9 @@ struct brw_state_prefetch
struct
{
- GLuint prefetch_count:3;
+ GLuint prefetch_count:3;
GLuint pad:3;
- GLuint prefetch_pointer:26;
+ GLuint prefetch_pointer:26;
} bits0;
};
@@ -537,7 +537,7 @@ struct brw_system_instruction_pointer
struct
{
GLuint pad:4;
- GLuint system_instruction_pointer:28;
+ GLuint system_instruction_pointer:28;
} bits0;
};
@@ -551,46 +551,46 @@ struct brw_system_instruction_pointer
struct thread0
{
GLuint pad0:1;
- GLuint grf_reg_count:3;
+ GLuint grf_reg_count:3;
GLuint pad1:2;
GLuint kernel_start_pointer:26; /* Offset from GENERAL_STATE_BASE */
};
struct thread1
{
- GLuint ext_halt_exception_enable:1;
- GLuint sw_exception_enable:1;
- GLuint mask_stack_exception_enable:1;
- GLuint timeout_exception_enable:1;
- GLuint illegal_op_exception_enable:1;
+ GLuint ext_halt_exception_enable:1;
+ GLuint sw_exception_enable:1;
+ GLuint mask_stack_exception_enable:1;
+ GLuint timeout_exception_enable:1;
+ GLuint illegal_op_exception_enable:1;
GLuint pad0:3;
GLuint depth_coef_urb_read_offset:6; /* WM only */
GLuint pad1:2;
- GLuint floating_point_mode:1;
- GLuint thread_priority:1;
- GLuint binding_table_entry_count:8;
+ GLuint floating_point_mode:1;
+ GLuint thread_priority:1;
+ GLuint binding_table_entry_count:8;
GLuint pad3:5;
- GLuint single_program_flow:1;
+ GLuint single_program_flow:1;
};
struct thread2
{
- GLuint per_thread_scratch_space:4;
+ GLuint per_thread_scratch_space:4;
GLuint pad0:6;
- GLuint scratch_space_base_pointer:22;
+ GLuint scratch_space_base_pointer:22;
};
-
+
struct thread3
{
- GLuint dispatch_grf_start_reg:4;
- GLuint urb_entry_read_offset:6;
+ GLuint dispatch_grf_start_reg:4;
+ GLuint urb_entry_read_offset:6;
GLuint pad0:1;
- GLuint urb_entry_read_length:6;
+ GLuint urb_entry_read_length:6;
GLuint pad1:1;
- GLuint const_urb_entry_read_offset:6;
+ GLuint const_urb_entry_read_offset:6;
GLuint pad2:1;
- GLuint const_urb_entry_read_length:6;
+ GLuint const_urb_entry_read_length:6;
GLuint pad3:1;
};
@@ -622,41 +622,41 @@ struct brw_clip_unit_state
{
GLuint pad0:9;
GLuint gs_output_stats:1; /* not always */
- GLuint stats_enable:1;
- GLuint nr_urb_entries:7;
+ GLuint stats_enable:1;
+ GLuint nr_urb_entries:7;
GLuint pad1:1;
- GLuint urb_entry_allocation_size:5;
+ GLuint urb_entry_allocation_size:5;
GLuint pad2:1;
GLuint max_threads:5; /* may be less */
GLuint pad3:2;
- } thread4;
-
+ } thread4;
+
struct
{
GLuint pad0:13;
- GLuint clip_mode:3;
- GLuint userclip_enable_flags:8;
- GLuint userclip_must_clip:1;
+ GLuint clip_mode:3;
+ GLuint userclip_enable_flags:8;
+ GLuint userclip_must_clip:1;
GLuint negative_w_clip_test:1;
- GLuint guard_band_enable:1;
- GLuint viewport_z_clip_enable:1;
- GLuint viewport_xy_clip_enable:1;
- GLuint vertex_position_space:1;
- GLuint api_mode:1;
+ GLuint guard_band_enable:1;
+ GLuint viewport_z_clip_enable:1;
+ GLuint viewport_xy_clip_enable:1;
+ GLuint vertex_position_space:1;
+ GLuint api_mode:1;
GLuint pad2:1;
} clip5;
-
+
struct
{
GLuint pad0:5;
- GLuint clipper_viewport_state_ptr:27;
+ GLuint clipper_viewport_state_ptr:27;
} clip6;
-
- GLfloat viewport_xmin;
- GLfloat viewport_xmax;
- GLfloat viewport_ymin;
- GLfloat viewport_ymax;
+
+ GLfloat viewport_xmin;
+ GLfloat viewport_xmax;
+ GLfloat viewport_ymin;
+ GLfloat viewport_ymax;
};
@@ -666,88 +666,88 @@ struct brw_cc_unit_state
struct brw_cc0
{
GLuint pad0:3;
- GLuint bf_stencil_pass_depth_pass_op:3;
- GLuint bf_stencil_pass_depth_fail_op:3;
- GLuint bf_stencil_fail_op:3;
- GLuint bf_stencil_func:3;
- GLuint bf_stencil_enable:1;
+ GLuint bf_stencil_pass_depth_pass_op:3;
+ GLuint bf_stencil_pass_depth_fail_op:3;
+ GLuint bf_stencil_fail_op:3;
+ GLuint bf_stencil_func:3;
+ GLuint bf_stencil_enable:1;
GLuint pad1:2;
- GLuint stencil_write_enable:1;
- GLuint stencil_pass_depth_pass_op:3;
- GLuint stencil_pass_depth_fail_op:3;
- GLuint stencil_fail_op:3;
- GLuint stencil_func:3;
- GLuint stencil_enable:1;
+ GLuint stencil_write_enable:1;
+ GLuint stencil_pass_depth_pass_op:3;
+ GLuint stencil_pass_depth_fail_op:3;
+ GLuint stencil_fail_op:3;
+ GLuint stencil_func:3;
+ GLuint stencil_enable:1;
} cc0;
-
+
struct brw_cc1
{
- GLuint bf_stencil_ref:8;
- GLuint stencil_write_mask:8;
- GLuint stencil_test_mask:8;
- GLuint stencil_ref:8;
+ GLuint bf_stencil_ref:8;
+ GLuint stencil_write_mask:8;
+ GLuint stencil_test_mask:8;
+ GLuint stencil_ref:8;
} cc1;
-
+
struct brw_cc2
{
- GLuint logicop_enable:1;
+ GLuint logicop_enable:1;
GLuint pad0:10;
- GLuint depth_write_enable:1;
- GLuint depth_test_function:3;
- GLuint depth_test:1;
- GLuint bf_stencil_write_mask:8;
- GLuint bf_stencil_test_mask:8;
+ GLuint depth_write_enable:1;
+ GLuint depth_test_function:3;
+ GLuint depth_test:1;
+ GLuint bf_stencil_write_mask:8;
+ GLuint bf_stencil_test_mask:8;
} cc2;
-
+
struct brw_cc3
{
GLuint pad0:8;
- GLuint alpha_test_func:3;
- GLuint alpha_test:1;
- GLuint blend_enable:1;
- GLuint ia_blend_enable:1;
+ GLuint alpha_test_func:3;
+ GLuint alpha_test:1;
+ GLuint blend_enable:1;
+ GLuint ia_blend_enable:1;
GLuint pad1:1;
GLuint alpha_test_format:1;
GLuint pad2:16;
} cc3;
-
+
struct brw_cc4
{
- GLuint pad0:5;
+ GLuint pad0:5;
GLuint cc_viewport_state_offset:27; /* Offset from GENERAL_STATE_BASE */
} cc4;
-
+
struct brw_cc5
{
GLuint pad0:2;
- GLuint ia_dest_blend_factor:5;
- GLuint ia_src_blend_factor:5;
- GLuint ia_blend_function:3;
- GLuint statistics_enable:1;
- GLuint logicop_func:4;
+ GLuint ia_dest_blend_factor:5;
+ GLuint ia_src_blend_factor:5;
+ GLuint ia_blend_function:3;
+ GLuint statistics_enable:1;
+ GLuint logicop_func:4;
GLuint pad1:11;
- GLuint dither_enable:1;
+ GLuint dither_enable:1;
} cc5;
struct brw_cc6
{
- GLuint clamp_post_alpha_blend:1;
- GLuint clamp_pre_alpha_blend:1;
- GLuint clamp_range:2;
+ GLuint clamp_post_alpha_blend:1;
+ GLuint clamp_pre_alpha_blend:1;
+ GLuint clamp_range:2;
GLuint pad0:11;
- GLuint y_dither_offset:2;
- GLuint x_dither_offset:2;
- GLuint dest_blend_factor:5;
- GLuint src_blend_factor:5;
- GLuint blend_function:3;
+ GLuint y_dither_offset:2;
+ GLuint x_dither_offset:2;
+ GLuint dest_blend_factor:5;
+ GLuint src_blend_factor:5;
+ GLuint blend_function:3;
} cc6;
struct brw_cc7 {
union {
- GLfloat f;
+ GLfloat f;
GLubyte ub[4];
} alpha_ref;
} cc7;
@@ -765,51 +765,51 @@ struct brw_sf_unit_state
struct
{
GLuint pad0:10;
- GLuint stats_enable:1;
- GLuint nr_urb_entries:7;
+ GLuint stats_enable:1;
+ GLuint nr_urb_entries:7;
GLuint pad1:1;
- GLuint urb_entry_allocation_size:5;
+ GLuint urb_entry_allocation_size:5;
GLuint pad2:1;
- GLuint max_threads:6;
+ GLuint max_threads:6;
GLuint pad3:1;
- } thread4;
+ } thread4;
struct
{
- GLuint front_winding:1;
- GLuint viewport_transform:1;
+ GLuint front_winding:1;
+ GLuint viewport_transform:1;
GLuint pad0:3;
GLuint sf_viewport_state_offset:27; /* Offset from GENERAL_STATE_BASE */
} sf5;
-
+
struct
{
GLuint pad0:9;
- GLuint dest_org_vbias:4;
- GLuint dest_org_hbias:4;
- GLuint scissor:1;
- GLuint disable_2x2_trifilter:1;
- GLuint disable_zero_pix_trifilter:1;
- GLuint point_rast_rule:2;
- GLuint line_endcap_aa_region_width:2;
- GLuint line_width:4;
- GLuint fast_scissor_disable:1;
- GLuint cull_mode:2;
- GLuint aa_enable:1;
+ GLuint dest_org_vbias:4;
+ GLuint dest_org_hbias:4;
+ GLuint scissor:1;
+ GLuint disable_2x2_trifilter:1;
+ GLuint disable_zero_pix_trifilter:1;
+ GLuint point_rast_rule:2;
+ GLuint line_endcap_aa_region_width:2;
+ GLuint line_width:4;
+ GLuint fast_scissor_disable:1;
+ GLuint cull_mode:2;
+ GLuint aa_enable:1;
} sf6;
struct
{
- GLuint point_size:11;
- GLuint use_point_size_state:1;
- GLuint subpixel_precision:1;
- GLuint sprite_point:1;
+ GLuint point_size:11;
+ GLuint use_point_size_state:1;
+ GLuint subpixel_precision:1;
+ GLuint sprite_point:1;
GLuint pad0:10;
GLuint aa_line_distance_mode:1;
- GLuint trifan_pv:2;
- GLuint linestrip_pv:2;
- GLuint tristrip_pv:2;
- GLuint line_last_pixel_enable:1;
+ GLuint trifan_pv:2;
+ GLuint linestrip_pv:2;
+ GLuint tristrip_pv:2;
+ GLuint line_last_pixel_enable:1;
} sf7;
};
@@ -827,33 +827,33 @@ struct brw_gs_unit_state
GLuint pad0:8;
GLuint rendering_enable:1; /* for IGDNG */
GLuint pad4:1;
- GLuint stats_enable:1;
- GLuint nr_urb_entries:7;
+ GLuint stats_enable:1;
+ GLuint nr_urb_entries:7;
GLuint pad1:1;
- GLuint urb_entry_allocation_size:5;
+ GLuint urb_entry_allocation_size:5;
GLuint pad2:1;
- GLuint max_threads:5;
+ GLuint max_threads:5;
GLuint pad3:2;
- } thread4;
-
+ } thread4;
+
struct
{
- GLuint sampler_count:3;
+ GLuint sampler_count:3;
GLuint pad0:2;
- GLuint sampler_state_pointer:27;
+ GLuint sampler_state_pointer:27;
} gs5;
-
+
struct
{
- GLuint max_vp_index:4;
+ GLuint max_vp_index:4;
GLuint pad0:12;
GLuint svbi_post_inc_value:10;
GLuint pad1:1;
GLuint svbi_post_inc_enable:1;
GLuint svbi_payload:1;
GLuint discard_adjaceny:1;
- GLuint reorder_enable:1;
+ GLuint reorder_enable:1;
GLuint pad2:1;
} gs6;
};
@@ -865,30 +865,30 @@ struct brw_vs_unit_state
struct thread1 thread1;
struct thread2 thread2;
struct thread3 thread3;
-
+
struct
{
GLuint pad0:10;
- GLuint stats_enable:1;
- GLuint nr_urb_entries:7;
+ GLuint stats_enable:1;
+ GLuint nr_urb_entries:7;
GLuint pad1:1;
- GLuint urb_entry_allocation_size:5;
+ GLuint urb_entry_allocation_size:5;
GLuint pad2:1;
- GLuint max_threads:6;
+ GLuint max_threads:6;
GLuint pad3:1;
- } thread4;
+ } thread4;
struct
{
- GLuint sampler_count:3;
+ GLuint sampler_count:3;
GLuint pad0:2;
- GLuint sampler_state_pointer:27;
+ GLuint sampler_state_pointer:27;
} vs5;
struct
{
- GLuint vs_enable:1;
- GLuint vert_cache_disable:1;
+ GLuint vs_enable:1;
+ GLuint vert_cache_disable:1;
GLuint pad0:30;
} vs6;
};
@@ -900,62 +900,62 @@ struct brw_wm_unit_state
struct thread1 thread1;
struct thread2 thread2;
struct thread3 thread3;
-
+
struct {
- GLuint stats_enable:1;
+ GLuint stats_enable:1;
GLuint depth_buffer_clear:1;
- GLuint sampler_count:3;
- GLuint sampler_state_pointer:27;
+ GLuint sampler_count:3;
+ GLuint sampler_state_pointer:27;
} wm4;
-
+
struct
{
- GLuint enable_8_pix:1;
- GLuint enable_16_pix:1;
- GLuint enable_32_pix:1;
+ GLuint enable_8_pix:1;
+ GLuint enable_16_pix:1;
+ GLuint enable_32_pix:1;
GLuint enable_con_32_pix:1;
GLuint enable_con_64_pix:1;
GLuint pad0:5;
- GLuint legacy_global_depth_bias:1;
- GLuint line_stipple:1;
- GLuint depth_offset:1;
- GLuint polygon_stipple:1;
- GLuint line_aa_region_width:2;
- GLuint line_endcap_aa_region_width:2;
- GLuint early_depth_test:1;
- GLuint thread_dispatch_enable:1;
- GLuint program_uses_depth:1;
- GLuint program_computes_depth:1;
- GLuint program_uses_killpixel:1;
- GLuint legacy_line_rast: 1;
- GLuint transposed_urb_read_enable:1;
- GLuint max_threads:7;
+ GLuint legacy_global_depth_bias:1;
+ GLuint line_stipple:1;
+ GLuint depth_offset:1;
+ GLuint polygon_stipple:1;
+ GLuint line_aa_region_width:2;
+ GLuint line_endcap_aa_region_width:2;
+ GLuint early_depth_test:1;
+ GLuint thread_dispatch_enable:1;
+ GLuint program_uses_depth:1;
+ GLuint program_computes_depth:1;
+ GLuint program_uses_killpixel:1;
+ GLuint legacy_line_rast: 1;
+ GLuint transposed_urb_read_enable:1;
+ GLuint max_threads:7;
} wm5;
-
- GLfloat global_depth_offset_constant;
- GLfloat global_depth_offset_scale;
-
+
+ GLfloat global_depth_offset_constant;
+ GLfloat global_depth_offset_scale;
+
/* for IGDNG only */
struct {
GLuint pad0:1;
- GLuint grf_reg_count_1:3;
+ GLuint grf_reg_count_1:3;
GLuint pad1:2;
GLuint kernel_start_pointer_1:26;
- } wm8;
+ } wm8;
struct {
GLuint pad0:1;
- GLuint grf_reg_count_2:3;
+ GLuint grf_reg_count_2:3;
GLuint pad1:2;
GLuint kernel_start_pointer_2:26;
- } wm9;
+ } wm9;
struct {
GLuint pad0:1;
- GLuint grf_reg_count_3:3;
+ GLuint grf_reg_count_3:3;
GLuint pad1:2;
GLuint kernel_start_pointer_3:26;
- } wm10;
+ } wm10;
};
struct brw_sampler_default_color {
@@ -964,75 +964,75 @@ struct brw_sampler_default_color {
struct brw_sampler_state
{
-
+
struct brw_ss0
{
- GLuint shadow_function:3;
- GLuint lod_bias:11;
- GLuint min_filter:3;
- GLuint mag_filter:3;
- GLuint mip_filter:2;
- GLuint base_level:5;
+ GLuint shadow_function:3;
+ GLuint lod_bias:11;
+ GLuint min_filter:3;
+ GLuint mag_filter:3;
+ GLuint mip_filter:2;
+ GLuint base_level:5;
GLuint pad:1;
- GLuint lod_preclamp:1;
- GLuint default_color_mode:1;
+ GLuint lod_preclamp:1;
+ GLuint default_color_mode:1;
GLuint pad0:1;
- GLuint disable:1;
+ GLuint disable:1;
} ss0;
struct brw_ss1
{
- GLuint r_wrap_mode:3;
- GLuint t_wrap_mode:3;
- GLuint s_wrap_mode:3;
+ GLuint r_wrap_mode:3;
+ GLuint t_wrap_mode:3;
+ GLuint s_wrap_mode:3;
GLuint pad:3;
- GLuint max_lod:10;
- GLuint min_lod:10;
+ GLuint max_lod:10;
+ GLuint min_lod:10;
} ss1;
-
+
struct brw_ss2
{
GLuint pad:5;
- GLuint default_color_pointer:27;
+ GLuint default_color_pointer:27;
} ss2;
-
+
struct brw_ss3
{
GLuint pad:19;
- GLuint max_aniso:3;
- GLuint chroma_key_mode:1;
- GLuint chroma_key_index:2;
- GLuint chroma_key_enable:1;
- GLuint monochrome_filter_width:3;
- GLuint monochrome_filter_height:3;
+ GLuint max_aniso:3;
+ GLuint chroma_key_mode:1;
+ GLuint chroma_key_index:2;
+ GLuint chroma_key_enable:1;
+ GLuint monochrome_filter_width:3;
+ GLuint monochrome_filter_height:3;
} ss3;
};
struct brw_clipper_viewport
{
- GLfloat xmin;
- GLfloat xmax;
- GLfloat ymin;
- GLfloat ymax;
+ GLfloat xmin;
+ GLfloat xmax;
+ GLfloat ymin;
+ GLfloat ymax;
};
struct brw_cc_viewport
{
- GLfloat min_depth;
- GLfloat max_depth;
+ GLfloat min_depth;
+ GLfloat max_depth;
};
struct brw_sf_viewport
{
struct {
- GLfloat m00;
- GLfloat m11;
- GLfloat m22;
- GLfloat m30;
- GLfloat m31;
- GLfloat m32;
+ GLfloat m00;
+ GLfloat m11;
+ GLfloat m22;
+ GLfloat m30;
+ GLfloat m31;
+ GLfloat m32;
} viewport;
/* scissor coordinates are inclusive */
@@ -1049,46 +1049,46 @@ struct brw_sf_viewport
struct brw_surface_state
{
struct brw_surf_ss0 {
- GLuint cube_pos_z:1;
- GLuint cube_neg_z:1;
- GLuint cube_pos_y:1;
- GLuint cube_neg_y:1;
- GLuint cube_pos_x:1;
- GLuint cube_neg_x:1;
+ GLuint cube_pos_z:1;
+ GLuint cube_neg_z:1;
+ GLuint cube_pos_y:1;
+ GLuint cube_neg_y:1;
+ GLuint cube_pos_x:1;
+ GLuint cube_neg_x:1;
GLuint pad:4;
- GLuint mipmap_layout_mode:1;
- GLuint vert_line_stride_ofs:1;
- GLuint vert_line_stride:1;
- GLuint color_blend:1;
- GLuint writedisable_blue:1;
- GLuint writedisable_green:1;
- GLuint writedisable_red:1;
- GLuint writedisable_alpha:1;
+ GLuint mipmap_layout_mode:1;
+ GLuint vert_line_stride_ofs:1;
+ GLuint vert_line_stride:1;
+ GLuint color_blend:1;
+ GLuint writedisable_blue:1;
+ GLuint writedisable_green:1;
+ GLuint writedisable_red:1;
+ GLuint writedisable_alpha:1;
GLuint surface_format:9; /**< BRW_SURFACEFORMAT_x */
- GLuint data_return_format:1;
+ GLuint data_return_format:1;
GLuint pad0:1;
GLuint surface_type:3; /**< BRW_SURFACE_1D/2D/3D/CUBE */
} ss0;
-
+
struct brw_surf_ss1 {
- GLuint base_addr;
+ GLuint base_addr;
} ss1;
-
+
struct brw_surf_ss2 {
GLuint pad:2;
- GLuint mip_count:4;
- GLuint width:13;
- GLuint height:13;
+ GLuint mip_count:4;
+ GLuint width:13;
+ GLuint height:13;
} ss2;
struct brw_surf_ss3 {
- GLuint tile_walk:1;
- GLuint tiled_surface:1;
- GLuint pad:1;
- GLuint pitch:18;
- GLuint depth:11;
+ GLuint tile_walk:1;
+ GLuint tiled_surface:1;
+ GLuint pad:1;
+ GLuint pitch:18;
+ GLuint depth:11;
} ss3;
-
+
struct brw_surf_ss4 {
GLuint multisample_position_palette_index:3;
GLuint pad1:1;
@@ -1096,7 +1096,7 @@ struct brw_surface_state
GLuint pad0:1;
GLuint render_target_view_extent:9;
GLuint min_array_elt:11;
- GLuint min_lod:4;
+ GLuint min_lod:4;
} ss4;
struct brw_surf_ss5 {
@@ -1117,14 +1117,14 @@ struct brw_surface_state
struct brw_vertex_buffer_state
{
struct {
- GLuint pitch:11;
+ GLuint pitch:11;
GLuint pad:15;
- GLuint access_type:1;
- GLuint vb_index:5;
+ GLuint access_type:1;
+ GLuint vb_index:5;
} vb0;
-
- GLuint start_addr;
- GLuint max_index;
+
+ GLuint start_addr;
+ GLuint max_index;
#if 1
GLuint instance_data_step_rate; /* not included for sequential/random vertices? */
#endif
@@ -1142,22 +1142,22 @@ struct brw_vertex_element_state
{
struct
{
- GLuint src_offset:11;
+ GLuint src_offset:11;
GLuint pad:5;
- GLuint src_format:9;
+ GLuint src_format:9;
GLuint pad0:1;
- GLuint valid:1;
- GLuint vertex_buffer_index:5;
+ GLuint valid:1;
+ GLuint vertex_buffer_index:5;
} ve0;
struct
{
- GLuint dst_offset:8;
+ GLuint dst_offset:8;
GLuint pad:8;
- GLuint vfcomponent3:4;
- GLuint vfcomponent2:4;
- GLuint vfcomponent1:4;
- GLuint vfcomponent0:4;
+ GLuint vfcomponent3:4;
+ GLuint vfcomponent2:4;
+ GLuint vfcomponent1:4;
+ GLuint vfcomponent0:4;
} ve1;
};
@@ -1172,7 +1172,7 @@ struct brw_vertex_element_packet {
struct brw_urb_immediate {
GLuint opcode:4;
GLuint offset:6;
- GLuint swizzle_control:2;
+ GLuint swizzle_control:2;
GLuint pad:1;
GLuint allocate:1;
GLuint used:1;
@@ -1186,10 +1186,10 @@ struct brw_urb_immediate {
/* Instruction format for the execution units:
*/
-
+
struct brw_instruction
{
- struct
+ struct
{
GLuint opcode:7;
GLuint pad:1;
@@ -1296,7 +1296,7 @@ struct brw_instruction
GLuint src0_width:3;
GLuint src0_vert_stride:4;
GLuint flag_reg_nr:1;
- GLuint pad:6;
+ GLuint pad:6;
} ia1;
struct
@@ -1333,7 +1333,7 @@ struct brw_instruction
GLuint pad1:6;
} ia16;
- struct
+ struct
{
GLuint pad:26;
GLuint end_of_thread:1;
@@ -1385,7 +1385,7 @@ struct brw_instruction
GLuint src1_width:3;
GLuint src1_vert_stride:4;
GLuint flag_reg_nr:1;
- GLuint pad1:6;
+ GLuint pad1:6;
} ia1;
struct
@@ -1445,8 +1445,8 @@ struct brw_instruction
struct {
GLuint binding_table_index:8;
GLuint sampler:4;
- GLuint return_format:2;
- GLuint msg_type:2;
+ GLuint return_format:2;
+ GLuint msg_type:2;
GLuint response_length:4;
GLuint msg_length:4;
GLuint msg_target:4;
@@ -1483,7 +1483,7 @@ struct brw_instruction
struct {
GLuint opcode:4;
GLuint offset:6;
- GLuint swizzle_control:2;
+ GLuint swizzle_control:2;
GLuint pad:1;
GLuint allocate:1;
GLuint used:1;
@@ -1498,9 +1498,9 @@ struct brw_instruction
struct {
GLuint binding_table_index:8;
- GLuint msg_control:4;
- GLuint msg_type:2;
- GLuint target_cache:2;
+ GLuint msg_control:4;
+ GLuint msg_type:2;
+ GLuint target_cache:2;
GLuint response_length:4;
GLuint msg_length:4;
GLuint msg_target:4;
@@ -1510,9 +1510,9 @@ struct brw_instruction
struct {
GLuint binding_table_index:8;
- GLuint msg_control:3;
- GLuint msg_type:3;
- GLuint target_cache:2;
+ GLuint msg_control:3;
+ GLuint msg_type:3;
+ GLuint target_cache:2;
GLuint pad0:3;
GLuint header_present:1;
GLuint response_length:5;
@@ -1525,7 +1525,7 @@ struct brw_instruction
GLuint binding_table_index:8;
GLuint msg_control:3;
GLuint pixel_scoreboard_clear:1;
- GLuint msg_type:3;
+ GLuint msg_type:3;
GLuint send_commit_msg:1;
GLuint response_length:4;
GLuint msg_length:4;
@@ -1538,7 +1538,7 @@ struct brw_instruction
GLuint binding_table_index:8;
GLuint msg_control:3;
GLuint pixel_scoreboard_clear:1;
- GLuint msg_type:3;
+ GLuint msg_type:3;
GLuint send_commit_msg:1;
GLuint pad0:3;
GLuint header_present:1;
diff --git a/src/gallium/drivers/i965/brw_swtnl.c b/src/gallium/drivers/i965/brw_swtnl.c
index f96301e..9bde564 100644
--- a/src/gallium/drivers/i965/brw_swtnl.c
+++ b/src/gallium/drivers/i965/brw_swtnl.c
@@ -9,7 +9,7 @@ static GLboolean need_swtnl( struct brw_context *brw )
{
const struct pipe_rasterizer_state *rast = &brw->curr.rast->templ;
- /* If we don't require strict OpenGL conformance, never
+ /* If we don't require strict OpenGL conformance, never
* use fallbacks. If we're forcing fallbacks, always
* use fallfacks.
*/
@@ -33,7 +33,7 @@ static GLboolean need_swtnl( struct brw_context *brw )
*/
{
int ve0_vb = brw->curr.vertex_element[0].vertex_buffer_index;
-
+
if (brw->curr.vertex_buffer[ve0_vb].stride == 0)
return TRUE;
}
@@ -47,7 +47,7 @@ static GLboolean need_swtnl( struct brw_context *brw )
return TRUE;
}
-
+
if (brw->reduced_primitive == PIPE_PRIM_LINES ||
(brw->reduced_primitive == PIPE_PRIM_TRIANGLES &&
(rast->fill_cw == PIPE_POLYGON_MODE_LINE ||
@@ -65,12 +65,12 @@ static GLboolean need_swtnl( struct brw_context *brw )
*/
if (rast->line_stipple_enable &&
(brw->reduced_primitive == PIPE_PRIM_TRIANGLES ||
- brw->primitive == PIPE_PRIM_LINE_LOOP ||
+ brw->primitive == PIPE_PRIM_LINE_LOOP ||
brw->primitive == PIPE_PRIM_LINE_STRIP))
return TRUE;
}
-
+
if (brw->reduced_primitive == PIPE_PRIM_POINTS ||
(brw->reduced_primitive == PIPE_PRIM_TRIANGLES &&
(rast->fill_cw == PIPE_POLYGON_MODE_POINT ||
@@ -87,7 +87,7 @@ static GLboolean need_swtnl( struct brw_context *brw )
*
* XXX: need a workaround for this.
*/
-
+
/* Nothing stopping us from the fast path now */
return FALSE;
}
diff --git a/src/gallium/drivers/i965/brw_urb.c b/src/gallium/drivers/i965/brw_urb.c
index 907ec56..abd3ce9 100644
--- a/src/gallium/drivers/i965/brw_urb.c
+++ b/src/gallium/drivers/i965/brw_urb.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_batchbuffer.h"
@@ -133,17 +133,17 @@ static int recalculate_urb_fence( struct brw_context *brw )
(brw->urb.constrained && (brw->urb.vsize > vsize ||
brw->urb.sfsize > sfsize ||
brw->urb.csize > csize))) {
-
+
brw->urb.csize = csize;
brw->urb.sfsize = sfsize;
brw->urb.vsize = vsize;
- brw->urb.nr_vs_entries = limits[VS].preferred_nr_entries;
- brw->urb.nr_gs_entries = limits[GS].preferred_nr_entries;
+ brw->urb.nr_vs_entries = limits[VS].preferred_nr_entries;
+ brw->urb.nr_gs_entries = limits[GS].preferred_nr_entries;
brw->urb.nr_clip_entries = limits[CLP].preferred_nr_entries;
- brw->urb.nr_sf_entries = limits[SF].preferred_nr_entries;
- brw->urb.nr_cs_entries = limits[CS].preferred_nr_entries;
+ brw->urb.nr_sf_entries = limits[SF].preferred_nr_entries;
+ brw->urb.nr_cs_entries = limits[CS].preferred_nr_entries;
brw->urb.constrained = 0;
@@ -168,27 +168,27 @@ static int recalculate_urb_fence( struct brw_context *brw )
}
if (BRW_DEBUG & DEBUG_MIN_URB) {
- brw->urb.nr_vs_entries = limits[VS].min_nr_entries;
- brw->urb.nr_gs_entries = limits[GS].min_nr_entries;
+ brw->urb.nr_vs_entries = limits[VS].min_nr_entries;
+ brw->urb.nr_gs_entries = limits[GS].min_nr_entries;
brw->urb.nr_clip_entries = limits[CLP].min_nr_entries;
- brw->urb.nr_sf_entries = limits[SF].min_nr_entries;
- brw->urb.nr_cs_entries = limits[CS].min_nr_entries;
+ brw->urb.nr_sf_entries = limits[SF].min_nr_entries;
+ brw->urb.nr_cs_entries = limits[CS].min_nr_entries;
brw->urb.constrained = 1;
}
if (!check_urb_layout(brw)) {
- brw->urb.nr_vs_entries = limits[VS].min_nr_entries;
- brw->urb.nr_gs_entries = limits[GS].min_nr_entries;
+ brw->urb.nr_vs_entries = limits[VS].min_nr_entries;
+ brw->urb.nr_gs_entries = limits[GS].min_nr_entries;
brw->urb.nr_clip_entries = limits[CLP].min_nr_entries;
- brw->urb.nr_sf_entries = limits[SF].min_nr_entries;
- brw->urb.nr_cs_entries = limits[CS].min_nr_entries;
+ brw->urb.nr_sf_entries = limits[SF].min_nr_entries;
+ brw->urb.nr_cs_entries = limits[CS].min_nr_entries;
/* Mark us as operating with constrained nr_entries, so that next
* time we recalculate we'll resize the fences in the hope of
* escaping constrained mode and getting back to normal performance.
*/
brw->urb.constrained = 1;
-
+
if (!check_urb_layout(brw)) {
/* This is impossible, given the maximal sizes of urb
* entries and the values for minimum nr of entries
@@ -197,7 +197,7 @@ static int recalculate_urb_fence( struct brw_context *brw )
debug_printf("couldn't calculate URB layout!\n");
exit(1);
}
-
+
if (BRW_DEBUG & (DEBUG_URB|DEBUG_FALLBACKS))
debug_printf("URB CONSTRAINED\n");
}
@@ -209,9 +209,9 @@ static int recalculate_urb_fence( struct brw_context *brw )
brw->urb.gs_start,
brw->urb.clip_start,
brw->urb.sf_start,
- brw->urb.cs_start,
+ brw->urb.cs_start,
URB_SIZES(brw));
-
+
brw->state.dirty.brw |= BRW_NEW_URB_FENCE;
}
@@ -253,9 +253,9 @@ int brw_upload_urb_fence(struct brw_context *brw)
* There are 256/384 urb reg pairs in total.
*/
uf.bits0.vs_fence = brw->urb.gs_start;
- uf.bits0.gs_fence = brw->urb.clip_start;
- uf.bits0.clp_fence = brw->urb.sf_start;
- uf.bits1.sf_fence = brw->urb.cs_start;
+ uf.bits0.gs_fence = brw->urb.clip_start;
+ uf.bits0.clp_fence = brw->urb.sf_start;
+ uf.bits1.sf_fence = brw->urb.cs_start;
uf.bits1.cs_fence = URB_SIZES(brw);
BRW_BATCH_STRUCT(brw, &uf);
diff --git a/src/gallium/drivers/i965/brw_util.h b/src/gallium/drivers/i965/brw_util.h
index b5f9a36..6ff2424 100644
--- a/src/gallium/drivers/i965/brw_util.h
+++ b/src/gallium/drivers/i965/brw_util.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#ifndef BRW_UTIL_H
#define BRW_UTIL_H
diff --git a/src/gallium/drivers/i965/brw_vs.c b/src/gallium/drivers/i965/brw_vs.c
index ca8ee79..f5a52ae 100644
--- a/src/gallium/drivers/i965/brw_vs.c
+++ b/src/gallium/drivers/i965/brw_vs.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,14 +22,14 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-#include "tgsi/tgsi_dump.h"
+#include "tgsi/tgsi_dump.h"
#include "brw_context.h"
#include "brw_vs.h"
@@ -37,7 +37,7 @@
-static enum pipe_error do_vs_prog( struct brw_context *brw,
+static enum pipe_error do_vs_prog( struct brw_context *brw,
struct brw_vertex_shader *vp,
struct brw_vs_prog_key *key,
struct brw_winsys_buffer **bo_out)
@@ -119,7 +119,7 @@ static enum pipe_error brw_upload_vs_prog(struct brw_context *brw)
*/
const struct brw_tracked_state brw_vs_prog = {
.dirty = {
- .mesa = (PIPE_NEW_CLIP |
+ .mesa = (PIPE_NEW_CLIP |
PIPE_NEW_RAST |
PIPE_NEW_FRAGMENT_SIGNATURE),
.brw = BRW_NEW_VERTEX_PROGRAM,
diff --git a/src/gallium/drivers/i965/brw_vs.h b/src/gallium/drivers/i965/brw_vs.h
index 944d88c..c714a24 100644
--- a/src/gallium/drivers/i965/brw_vs.h
+++ b/src/gallium/drivers/i965/brw_vs.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#ifndef BRW_VS_H
#define BRW_VS_H
@@ -77,7 +77,7 @@ struct brw_vs_compile {
struct brw_reg tmp;
struct brw_reg stack;
- struct {
+ struct {
GLboolean used_in_src;
struct brw_reg reg;
} output_regs[128];
diff --git a/src/gallium/drivers/i965/brw_vs_emit.c b/src/gallium/drivers/i965/brw_vs_emit.c
index 5dcbd59..ee0edfe 100644
--- a/src/gallium/drivers/i965/brw_vs_emit.c
+++ b/src/gallium/drivers/i965/brw_vs_emit.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -30,7 +30,7 @@
*/
#include "pipe/p_shader_tokens.h"
-
+
#include "util/u_memory.h"
#include "util/u_math.h"
@@ -69,7 +69,7 @@ static void release_tmp( struct brw_vs_compile *c, struct brw_reg tmp )
if (tmp.nr == c->last_tmp-1)
c->last_tmp--;
}
-
+
static void release_tmps( struct brw_vs_compile *c )
{
c->last_tmp = c->first_tmp;
@@ -82,7 +82,7 @@ static boolean is_position_output( struct brw_vs_compile *c,
const struct brw_vertex_shader *vs = c->vp;
unsigned semantic = vs->info.output_semantic_name[vs_output];
unsigned index = vs->info.output_semantic_index[vs_output];
-
+
return (semantic == TGSI_SEMANTIC_POSITION &&
index == 0);
}
@@ -144,7 +144,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
c->r0 = brw_vec8_grf(reg, 0);
reg++;
- /* User clip planes from curbe:
+ /* User clip planes from curbe:
*/
if (c->key.nr_userclip) {
/* Skip over fixed planes: Or never read them into vs unit?
@@ -152,9 +152,9 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
subreg += 6;
for (i = 0; i < c->key.nr_userclip; i++, subreg++) {
- c->userplane[i] =
+ c->userplane[i] =
stride( brw_vec4_grf(reg+subreg/2, (subreg%2) * 4), 0, 4, 1);
- }
+ }
/* Deal with curbe alignment:
*/
@@ -170,7 +170,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
* here.
*/
for (i = 0; i < c->vp->info.immediate_count; i++, subreg++) {
- c->regs[TGSI_FILE_IMMEDIATE][i] =
+ c->regs[TGSI_FILE_IMMEDIATE][i] =
stride( brw_vec4_grf(reg+subreg/2, (subreg%2) * 4), 0, 4, 1);
}
c->prog_data.nr_params = c->vp->info.immediate_count * 4;
@@ -198,7 +198,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
c->prog_data.curb_read_length = reg - 1;
- /* Allocate input regs:
+ /* Allocate input regs:
*/
c->nr_inputs = c->vp->info.num_inputs;
for (i = 0; i < c->nr_inputs; i++) {
@@ -223,7 +223,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
else
mrf = 4;
-
+
if (c->key.fs_signature.nr_inputs > BRW_MAX_MRF) {
c->overflow_grf_start = reg;
c->overflow_count = c->key.fs_signature.nr_inputs - BRW_MAX_MRF;
@@ -243,12 +243,12 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
reg++;
}
else if (find_output_slot(c, i, &slot)) {
-
+
if (0 /* is_psize_output(c, i) */ ) {
/* c->psize_out.grf = reg; */
/* c->psize_out.mrf = i; */
}
-
+
/* The first (16-4) outputs can go straight into the message regs.
*/
if (slot + mrf < BRW_MAX_MRF) {
@@ -262,11 +262,11 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
else {
c->regs[TGSI_FILE_OUTPUT][i] = brw_null_reg();
}
- }
+ }
/* Allocate program temporaries:
*/
-
+
for (i = 0; i < c->vp->info.file_max[TGSI_FILE_TEMPORARY]+1; i++) {
c->regs[TGSI_FILE_TEMPORARY][i] = brw_vec8_grf(reg, 0);
reg++;
@@ -341,7 +341,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
c->prog_data.total_grf = reg;
if (BRW_DEBUG & DEBUG_VS) {
- debug_printf("%s NumAddrRegs %d\n", __FUNCTION__,
+ debug_printf("%s NumAddrRegs %d\n", __FUNCTION__,
c->vp->info.file_max[TGSI_FILE_ADDRESS]+1);
debug_printf("%s NumTemps %d\n", __FUNCTION__,
c->vp->info.file_max[TGSI_FILE_TEMPORARY]+1);
@@ -431,7 +431,7 @@ static void unalias3( struct brw_vs_compile *c,
static void emit_sop( struct brw_compile *p,
struct brw_reg dst,
struct brw_reg arg0,
- struct brw_reg arg1,
+ struct brw_reg arg1,
GLuint cond)
{
brw_MOV(p, dst, brw_imm_f(0.0f));
@@ -455,7 +455,7 @@ static void emit_sne( struct brw_compile *p,
{
emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_NEQ);
}
-static void emit_slt( struct brw_compile *p,
+static void emit_slt( struct brw_compile *p,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
@@ -463,7 +463,7 @@ static void emit_slt( struct brw_compile *p,
emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_L);
}
-static void emit_sle( struct brw_compile *p,
+static void emit_sle( struct brw_compile *p,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
@@ -471,7 +471,7 @@ static void emit_sle( struct brw_compile *p,
emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_LE);
}
-static void emit_sgt( struct brw_compile *p,
+static void emit_sgt( struct brw_compile *p,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
@@ -479,7 +479,7 @@ static void emit_sgt( struct brw_compile *p,
emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_G);
}
-static void emit_sge( struct brw_compile *p,
+static void emit_sge( struct brw_compile *p,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
@@ -487,7 +487,7 @@ static void emit_sge( struct brw_compile *p,
emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_GE);
}
-static void emit_max( struct brw_compile *p,
+static void emit_max( struct brw_compile *p,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
@@ -497,7 +497,7 @@ static void emit_max( struct brw_compile *p,
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
}
-static void emit_min( struct brw_compile *p,
+static void emit_min( struct brw_compile *p,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
@@ -526,10 +526,10 @@ static void emit_math1( struct brw_vs_compile *c,
GLboolean need_tmp = (dst.dw1.bits.writemask != 0xf ||
dst.file != BRW_GENERAL_REGISTER_FILE);
- if (need_tmp)
+ if (need_tmp)
tmp = get_tmp(c);
- brw_math(p,
+ brw_math(p,
tmp,
function,
BRW_MATH_SATURATE_NONE,
@@ -545,7 +545,7 @@ static void emit_math1( struct brw_vs_compile *c,
}
-static void emit_math2( struct brw_vs_compile *c,
+static void emit_math2( struct brw_vs_compile *c,
GLuint function,
struct brw_reg dst,
struct brw_reg arg0,
@@ -557,12 +557,12 @@ static void emit_math2( struct brw_vs_compile *c,
GLboolean need_tmp = (dst.dw1.bits.writemask != 0xf ||
dst.file != BRW_GENERAL_REGISTER_FILE);
- if (need_tmp)
+ if (need_tmp)
tmp = get_tmp(c);
brw_MOV(p, brw_message_reg(3), arg1);
-
- brw_math(p,
+
+ brw_math(p,
tmp,
function,
BRW_MATH_SATURATE_NONE,
@@ -583,7 +583,7 @@ static void emit_exp_noalias( struct brw_vs_compile *c,
struct brw_reg arg0 )
{
struct brw_compile *p = &c->func;
-
+
if (dst.dw1.bits.writemask & BRW_WRITEMASK_X) {
struct brw_reg tmp = get_tmp(c);
@@ -594,15 +594,15 @@ static void emit_exp_noalias( struct brw_vs_compile *c,
/* result[0] = 2.0 ^ tmp */
- /* Adjust exponent for floating point:
- * exp += 127
+ /* Adjust exponent for floating point:
+ * exp += 127
*/
brw_ADD(p, brw_writemask(tmp_d, BRW_WRITEMASK_X), tmp_d, brw_imm_d(127));
- /* Install exponent and sign.
- * Excess drops off the edge:
+ /* Install exponent and sign.
+ * Excess drops off the edge:
*/
- brw_SHL(p, brw_writemask(retype(dst, BRW_REGISTER_TYPE_D), BRW_WRITEMASK_X),
+ brw_SHL(p, brw_writemask(retype(dst, BRW_REGISTER_TYPE_D), BRW_WRITEMASK_X),
tmp_d, brw_imm_d(23));
release_tmp(c, tmp);
@@ -612,7 +612,7 @@ static void emit_exp_noalias( struct brw_vs_compile *c,
/* result[1] = arg0.x - floor(arg0.x) */
brw_FRC(p, brw_writemask(dst, BRW_WRITEMASK_Y), brw_swizzle1(arg0, 0));
}
-
+
if (dst.dw1.bits.writemask & BRW_WRITEMASK_Z) {
/* As with the LOG instruction, we might be better off just
* doing a taylor expansion here, seeing as we have to do all
@@ -621,12 +621,12 @@ static void emit_exp_noalias( struct brw_vs_compile *c,
* If mathbox partial precision is too low, consider also:
* result[3] = result[0] * EXP(result[1])
*/
- emit_math1(c,
- BRW_MATH_FUNCTION_EXP,
+ emit_math1(c,
+ BRW_MATH_FUNCTION_EXP,
brw_writemask(dst, BRW_WRITEMASK_Z),
- brw_swizzle1(arg0, 0),
+ brw_swizzle1(arg0, 0),
BRW_MATH_PRECISION_FULL);
- }
+ }
if (dst.dw1.bits.writemask & BRW_WRITEMASK_W) {
/* result[3] = 1.0; */
@@ -650,7 +650,7 @@ static void emit_log_noalias( struct brw_vs_compile *c,
tmp = get_tmp(c);
tmp_ud = retype(tmp, BRW_REGISTER_TYPE_UD);
}
-
+
/* Perform mant = frexpf(fabsf(x), &exp), adjust exp and mnt
* according to spec:
*
@@ -661,34 +661,34 @@ static void emit_log_noalias( struct brw_vs_compile *c,
* result[1].i = (x.i & ((1<<23)-1) + (127<<23)
*/
if (dst.dw1.bits.writemask & BRW_WRITEMASK_XZ) {
- brw_AND(p,
+ brw_AND(p,
brw_writemask(tmp_ud, BRW_WRITEMASK_X),
brw_swizzle1(arg0_ud, 0),
brw_imm_ud((1U<<31)-1));
- brw_SHR(p,
- brw_writemask(tmp_ud, BRW_WRITEMASK_X),
+ brw_SHR(p,
+ brw_writemask(tmp_ud, BRW_WRITEMASK_X),
tmp_ud,
brw_imm_ud(23));
- brw_ADD(p,
- brw_writemask(tmp, BRW_WRITEMASK_X),
+ brw_ADD(p,
+ brw_writemask(tmp, BRW_WRITEMASK_X),
retype(tmp_ud, BRW_REGISTER_TYPE_D), /* does it matter? */
brw_imm_d(-127));
}
if (dst.dw1.bits.writemask & BRW_WRITEMASK_YZ) {
- brw_AND(p,
+ brw_AND(p,
brw_writemask(tmp_ud, BRW_WRITEMASK_Y),
brw_swizzle1(arg0_ud, 0),
brw_imm_ud((1<<23)-1));
- brw_OR(p,
- brw_writemask(tmp_ud, BRW_WRITEMASK_Y),
+ brw_OR(p,
+ brw_writemask(tmp_ud, BRW_WRITEMASK_Y),
tmp_ud,
brw_imm_ud(127<<23));
}
-
+
if (dst.dw1.bits.writemask & BRW_WRITEMASK_Z) {
/* result[2] = result[0] + LOG2(result[1]); */
@@ -696,23 +696,23 @@ static void emit_log_noalias( struct brw_vs_compile *c,
* taylor series. Maybe we *should* use a taylor series as by
* the time all the above has been done it's almost certainly
* quicker than calling the mathbox, even with low precision.
- *
+ *
* Options are:
* - result[0] + mathbox.LOG2(result[1])
* - mathbox.LOG2(arg0.x)
* - result[0] + inline_taylor_approx(result[1])
*/
- emit_math1(c,
- BRW_MATH_FUNCTION_LOG,
- brw_writemask(tmp, BRW_WRITEMASK_Z),
- brw_swizzle1(tmp, 1),
+ emit_math1(c,
+ BRW_MATH_FUNCTION_LOG,
+ brw_writemask(tmp, BRW_WRITEMASK_Z),
+ brw_swizzle1(tmp, 1),
BRW_MATH_PRECISION_FULL);
-
- brw_ADD(p,
- brw_writemask(tmp, BRW_WRITEMASK_Z),
- brw_swizzle1(tmp, 2),
+
+ brw_ADD(p,
+ brw_writemask(tmp, BRW_WRITEMASK_Z),
+ brw_swizzle1(tmp, 2),
brw_swizzle1(tmp, 0));
- }
+ }
if (dst.dw1.bits.writemask & BRW_WRITEMASK_W) {
/* result[3] = 1.0; */
@@ -728,14 +728,14 @@ static void emit_log_noalias( struct brw_vs_compile *c,
/* Need to unalias - consider swizzles: r0 = DST r0.xxxx r1
*/
-static void emit_dst_noalias( struct brw_vs_compile *c,
+static void emit_dst_noalias( struct brw_vs_compile *c,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1)
{
struct brw_compile *p = &c->func;
- /* There must be a better way to do this:
+ /* There must be a better way to do this:
*/
if (dst.dw1.bits.writemask & BRW_WRITEMASK_X)
brw_MOV(p, brw_writemask(dst, BRW_WRITEMASK_X), brw_imm_f(1.0));
@@ -758,7 +758,7 @@ static void emit_xpd( struct brw_compile *p,
}
-static void emit_lit_noalias( struct brw_vs_compile *c,
+static void emit_lit_noalias( struct brw_vs_compile *c,
struct brw_reg dst,
struct brw_reg arg0 )
{
@@ -767,11 +767,11 @@ static void emit_lit_noalias( struct brw_vs_compile *c,
struct brw_reg tmp = dst;
GLboolean need_tmp = (dst.file != BRW_GENERAL_REGISTER_FILE);
- if (need_tmp)
+ if (need_tmp)
tmp = get_tmp(c);
-
- brw_MOV(p, brw_writemask(dst, BRW_WRITEMASK_YZ), brw_imm_f(0));
- brw_MOV(p, brw_writemask(dst, BRW_WRITEMASK_XW), brw_imm_f(1));
+
+ brw_MOV(p, brw_writemask(dst, BRW_WRITEMASK_YZ), brw_imm_f(0));
+ brw_MOV(p, brw_writemask(dst, BRW_WRITEMASK_XW), brw_imm_f(1));
/* Need to use BRW_EXECUTE_8 and also do an 8-wide compare in order
* to get all channels active inside the IF. In the clipping code
@@ -787,12 +787,12 @@ static void emit_lit_noalias( struct brw_vs_compile *c,
brw_MOV(p, brw_writemask(tmp, BRW_WRITEMASK_Z), brw_swizzle1(arg0,1));
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
- emit_math2(c,
- BRW_MATH_FUNCTION_POW,
+ emit_math2(c,
+ BRW_MATH_FUNCTION_POW,
brw_writemask(dst, BRW_WRITEMASK_Z),
brw_swizzle1(tmp, 2),
brw_swizzle1(arg0, 3),
- BRW_MATH_PRECISION_PARTIAL);
+ BRW_MATH_PRECISION_PARTIAL);
}
brw_ENDIF(p, if_insn);
@@ -814,7 +814,7 @@ static void emit_lrp_noalias(struct brw_vs_compile *c,
}
/** 3 or 4-component vector normalization */
-static void emit_nrm( struct brw_vs_compile *c,
+static void emit_nrm( struct brw_vs_compile *c,
struct brw_reg dst,
struct brw_reg arg0,
int num_comps)
@@ -970,7 +970,7 @@ static struct brw_reg deref( struct brw_vs_compile *c,
brw_pop_insn_state(p);
}
-
+
/* NOTE: tmp not released */
return vec8(tmp);
}
@@ -1036,8 +1036,8 @@ static void emit_arl( struct brw_vs_compile *c,
struct brw_compile *p = &c->func;
struct brw_reg tmp = dst;
GLboolean need_tmp = (dst.file != BRW_GENERAL_REGISTER_FILE);
-
- if (need_tmp)
+
+ if (need_tmp)
tmp = get_tmp(c);
brw_RNDD(p, tmp, arg0); /* tmp = round(arg0) */
@@ -1065,14 +1065,14 @@ static struct brw_reg get_arg( struct brw_vs_compile *c,
src->Register.Index,
src->Register.Indirect);
- /* Convert 3-bit swizzle to 2-bit.
+ /* Convert 3-bit swizzle to 2-bit.
*/
reg.dw1.bits.swizzle = BRW_SWIZZLE4(src->Register.SwizzleX,
src->Register.SwizzleY,
src->Register.SwizzleZ,
src->Register.SwizzleW);
- reg.negate = src->Register.Negate ? 1 : 0;
+ reg.negate = src->Register.Negate ? 1 : 0;
/* XXX: abs, absneg
*/
@@ -1142,7 +1142,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
* workaround.
*/
if (c->prog_data.writes_psiz ||
- c->key.nr_userclip ||
+ c->key.nr_userclip ||
c->chipset.is_965)
{
struct brw_reg header1 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
@@ -1150,7 +1150,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
brw_MOV(p, header1, brw_imm_ud(0));
- brw_set_access_mode(p, BRW_ALIGN_16);
+ brw_set_access_mode(p, BRW_ALIGN_16);
if (c->prog_data.writes_psiz) {
struct brw_reg psiz = c->regs[TGSI_FILE_OUTPUT][VERT_RESULT_PSIZ];
@@ -1165,9 +1165,9 @@ static void emit_vertex_write( struct brw_vs_compile *c)
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
}
- /* i965 clipping workaround:
+ /* i965 clipping workaround:
* 1) Test for -ve rhw
- * 2) If set,
+ * 2) If set,
* set ndc = (0,0,0,0)
* set ucp[6] = 1
*
@@ -1180,7 +1180,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
BRW_CONDITIONAL_L,
brw_swizzle1(ndc, 3),
brw_imm_f(0));
-
+
brw_OR(p, brw_writemask(header1, BRW_WRITEMASK_W), header1, brw_imm_ud(1<<6));
brw_MOV(p, ndc, brw_imm_f(0));
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
@@ -1205,9 +1205,9 @@ static void emit_vertex_write( struct brw_vs_compile *c)
if (c->chipset.is_igdng) {
/* There are 20 DWs (D0-D19) in VUE vertex header on IGDNG */
brw_MOV(p, offset(m0, 3), pos); /* a portion of vertex header */
- /* m4, m5 contain the distances from vertex to the user clip planeXXX.
+ /* m4, m5 contain the distances from vertex to the user clip planeXXX.
* Seems it is useless for us.
- * m6 is used for aligning, so that the remainder of vertex element is
+ * m6 is used for aligning, so that the remainder of vertex element is
* reg-aligned.
*/
brw_MOV(p, offset(m0, 7), pos); /* the remainder of vertex element */
@@ -1219,7 +1219,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
eot = (c->overflow_count == 0);
- brw_urb_WRITE(p,
+ brw_urb_WRITE(p,
brw_null_reg(), /* dest */
0, /* starting mrf reg nr */
c->r0, /* src */
@@ -1246,7 +1246,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
* at mrf[4] atm...
*/
for (j = 0; j < nr; j++) {
- brw_MOV(p, brw_message_reg(4+j),
+ brw_MOV(p, brw_message_reg(4+j),
brw_vec8_grf(c->overflow_grf_start + i + j, 0));
}
@@ -1272,7 +1272,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
* \param end_inst points to brw code for END instruction
* \param last_inst points to last instruction emitted before vertex write
*/
-static void
+static void
post_vs_emit( struct brw_vs_compile *c,
struct brw_instruction *end_inst,
struct brw_instruction *last_inst )
@@ -1356,8 +1356,8 @@ static void emit_insn(struct brw_vs_compile *c,
/* Get dest regs. Note that it is possible for a reg to be both
* dst and arg, given the static allocation of registers. So
* care needs to be taken emitting multi-operation instructions.
- */
- dst = get_dst(c,
+ */
+ dst = get_dst(c,
inst->Dst[0].Register.File,
inst->Dst[0].Register.Index,
inst->Dst[0].Register.WriteMask);
@@ -1394,7 +1394,7 @@ static void emit_insn(struct brw_vs_compile *c,
emit_nrm(c, dst, args[0], 4);
break;
case TGSI_OPCODE_DST:
- unalias2(c, dst, args[0], args[1], emit_dst_noalias);
+ unalias2(c, dst, args[0], args[1], emit_dst_noalias);
break;
case TGSI_OPCODE_EXP:
unalias1(c, dst, args[0], emit_exp_noalias);
@@ -1440,13 +1440,13 @@ static void emit_insn(struct brw_vs_compile *c,
brw_MUL(p, dst, args[0], args[1]);
break;
case TGSI_OPCODE_POW:
- emit_math2(c, BRW_MATH_FUNCTION_POW, dst, args[0], args[1], BRW_MATH_PRECISION_FULL);
+ emit_math2(c, BRW_MATH_FUNCTION_POW, dst, args[0], args[1], BRW_MATH_PRECISION_FULL);
break;
case TGSI_OPCODE_RCP:
emit_math1(c, BRW_MATH_FUNCTION_INV, dst, args[0], BRW_MATH_PRECISION_FULL);
break;
case TGSI_OPCODE_RSQ:
- emit_math1(c, BRW_MATH_FUNCTION_RSQ, dst,
+ emit_math1(c, BRW_MATH_FUNCTION_RSQ, dst,
brw_swizzle(args[0], 0,0,0,0), BRW_MATH_PRECISION_FULL);
break;
case TGSI_OPCODE_SEQ:
@@ -1493,7 +1493,7 @@ static void emit_insn(struct brw_vs_compile *c,
case TGSI_OPCODE_ENDIF:
assert(c->if_depth > 0);
brw_ENDIF(p, c->if_inst[--c->if_depth]);
- break;
+ break;
case TGSI_OPCODE_BGNLOOP:
c->loop_inst[c->loop_depth++] = brw_DO(p, BRW_EXECUTE_8);
break;
@@ -1507,7 +1507,7 @@ static void emit_insn(struct brw_vs_compile *c,
brw_CONT(p);
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
break;
- case TGSI_OPCODE_ENDLOOP:
+ case TGSI_OPCODE_ENDLOOP:
{
struct brw_instruction *inst0, *inst1;
GLuint br = 1;
@@ -1553,7 +1553,7 @@ static void emit_insn(struct brw_vs_compile *c,
brw_MOV(p, brw_ip_reg(), deref_1d(c->stack_index, 0));
brw_set_access_mode(p, BRW_ALIGN_16);
break;
- case TGSI_OPCODE_END:
+ case TGSI_OPCODE_END:
c->end_offset = p->nr_insn;
/* this instruction will get patched later to jump past subroutine
* code, etc.
@@ -1568,7 +1568,7 @@ static void emit_insn(struct brw_vs_compile *c,
break;
default:
debug_printf("Unsupported opcode %i (%s) in vertex shader",
- opcode,
+ opcode,
tgsi_get_opcode_name(opcode));
}
@@ -1604,13 +1604,13 @@ void brw_vs_emit(struct brw_vs_compile *c)
struct tgsi_full_instruction *inst;
if (BRW_DEBUG & DEBUG_VS)
- tgsi_dump(c->vp->tokens, 0);
+ tgsi_dump(c->vp->tokens, 0);
c->stack_index = brw_indirect(0, 0);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_set_access_mode(p, BRW_ALIGN_16);
-
+
/* Static register allocation
*/
diff --git a/src/gallium/drivers/i965/brw_vs_state.c b/src/gallium/drivers/i965/brw_vs_state.c
index dadbb62..a41f7b8 100644
--- a/src/gallium/drivers/i965/brw_vs_state.c
+++ b/src/gallium/drivers/i965/brw_vs_state.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "util/u_math.h"
@@ -79,7 +79,7 @@ vs_unit_populate_key(struct brw_context *brw, struct brw_vs_unit_key *key)
}
static enum pipe_error
-vs_unit_create_from_key(struct brw_context *brw,
+vs_unit_create_from_key(struct brw_context *brw,
struct brw_vs_unit_key *key,
struct brw_winsys_reloc *reloc,
struct brw_winsys_buffer **bo_out)
diff --git a/src/gallium/drivers/i965/brw_vs_surface_state.c b/src/gallium/drivers/i965/brw_vs_surface_state.c
index 424bb0d..399861b 100644
--- a/src/gallium/drivers/i965/brw_vs_surface_state.c
+++ b/src/gallium/drivers/i965/brw_vs_surface_state.c
@@ -59,7 +59,7 @@ brw_vs_update_constant_buffer(struct brw_context *brw)
if (!vp->use_const_buffer)
return NULL;
- const_buffer = brw->sws->bo_alloc(brw->sws,
+ const_buffer = brw->sws->bo_alloc(brw->sws,
BRW_BUFFER_TYPE_SHADER_CONSTANTS,
size, 64);
@@ -131,7 +131,7 @@ brw_update_vs_constant_surface( struct brw_context *brw,
&brw->vs.surf_bo[surf]);
if (ret)
return ret;
-
+
return PIPE_OK;
}
#endif
@@ -157,8 +157,8 @@ brw_vs_get_binding_table(struct brw_context *brw,
i * 4,
brw->vs.surf_bo[i]);
}
-
- ret = brw_cache_data( &brw->surface_cache,
+
+ ret = brw_cache_data( &brw->surface_cache,
BRW_SS_SURF_BIND,
NULL, 0,
reloc, nr_reloc,
diff --git a/src/gallium/drivers/i965/brw_winsys.h b/src/gallium/drivers/i965/brw_winsys.h
index a06f8bb..2e4e954 100644
--- a/src/gallium/drivers/i965/brw_winsys.h
+++ b/src/gallium/drivers/i965/brw_winsys.h
@@ -229,12 +229,12 @@ struct brw_winsys_screen {
void (*bo_unmap)(struct brw_winsys_buffer *buffer);
/*@}*/
-
+
/* Wait for buffer to go idle. Similar to map+unmap, but doesn't
* mark buffer contents as dirty.
*/
void (*bo_wait_idle)(struct brw_winsys_buffer *buffer);
-
+
/**
* Destroy the winsys.
*/
@@ -272,7 +272,7 @@ bo_reference(struct brw_winsys_buffer **ptr, struct brw_winsys_buffer *buf)
extern int BRW_DUMP;
#else
#define BRW_DUMP 0
-#endif
+#endif
#define DUMP_ASM 0x1
#define DUMP_STATE 0x2
diff --git a/src/gallium/drivers/i965/brw_wm.c b/src/gallium/drivers/i965/brw_wm.c
index 5d66e61..f4a3f39 100644
--- a/src/gallium/drivers/i965/brw_wm.c
+++ b/src/gallium/drivers/i965/brw_wm.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -87,7 +87,7 @@ GLuint brw_wm_is_scalar_result( GLuint opcode )
case TGSI_OPCODE_DPH:
case TGSI_OPCODE_DST:
return 1;
-
+
default:
return 0;
}
@@ -147,7 +147,7 @@ brw_wm_linear_shader_emit(struct brw_context *brw, struct brw_wm_compile *c)
* we'll use one of two code generators.
*/
static enum pipe_error do_wm_prog( struct brw_context *brw,
- struct brw_fragment_shader *fp,
+ struct brw_fragment_shader *fp,
struct brw_wm_prog_key *key,
struct brw_winsys_buffer **bo_out)
{
@@ -158,7 +158,7 @@ static enum pipe_error do_wm_prog( struct brw_context *brw,
if (brw->wm.compile_data == NULL) {
brw->wm.compile_data = MALLOC(sizeof(*brw->wm.compile_data));
- if (!brw->wm.compile_data)
+ if (!brw->wm.compile_data)
return PIPE_ERROR_OUT_OF_MEMORY;
}
@@ -227,21 +227,21 @@ static void brw_wm_populate_key( struct brw_context *brw,
/* PIPE_NEW_RAST
- * BRW_NEW_REDUCED_PRIMITIVE
+ * BRW_NEW_REDUCED_PRIMITIVE
*/
switch (brw->reduced_primitive) {
case PIPE_PRIM_POINTS:
line_aa = AA_NEVER;
break;
case PIPE_PRIM_LINES:
- line_aa = (brw->curr.rast->templ.line_smooth ?
+ line_aa = (brw->curr.rast->templ.line_smooth ?
AA_ALWAYS : AA_NEVER);
break;
default:
line_aa = brw->curr.rast->unfilled_aa_line;
break;
}
-
+
brw_wm_lookup_iz(line_aa,
lookup,
brw->curr.fragment_shader->uses_depth,
@@ -254,7 +254,7 @@ static void brw_wm_populate_key( struct brw_context *brw,
/* PIPE_NEW_BOUND_TEXTURES */
for (i = 0; i < brw->curr.num_fragment_sampler_views; i++) {
const struct brw_texture *tex = brw_texture(brw->curr.fragment_sampler_views[i]->texture);
-
+
if (tex->b.b.format == PIPE_FORMAT_UYVY)
key->yuvtex_mask |= 1 << i;
@@ -283,7 +283,7 @@ static enum pipe_error brw_prepare_wm_prog(struct brw_context *brw)
struct brw_wm_prog_key key;
struct brw_fragment_shader *fs = brw->curr.fragment_shader;
enum pipe_error ret;
-
+
brw_wm_populate_key(brw, &key);
/* Make an early check for the key.
diff --git a/src/gallium/drivers/i965/brw_wm.h b/src/gallium/drivers/i965/brw_wm.h
index f1ca9f6..b713b6e 100644
--- a/src/gallium/drivers/i965/brw_wm.h
+++ b/src/gallium/drivers/i965/brw_wm.h
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#ifndef BRW_WM_H
#define BRW_WM_H
@@ -100,7 +100,7 @@ struct brw_wm_prog_key {
* are hard to reason about and which we translate away in pass0. A
* single fragment program register element (eg. temp[0].x) will be
* translated to one or more brw_wm_value structs, one for each time
- * that temp[0].x is written to during the program.
+ * that temp[0].x is written to during the program.
*/
@@ -115,7 +115,7 @@ struct brw_wm_grf {
struct brw_wm_value {
struct brw_reg hw_reg; /* emitted to this reg, may not always be there */
struct brw_wm_ref *lastuse;
- struct brw_wm_grf *resident;
+ struct brw_wm_grf *resident;
GLuint contributes_to_output:1;
GLuint spill_slot:16; /* if non-zero, spill immediately after calculation */
};
@@ -230,7 +230,7 @@ struct brw_wm_compile {
unsigned nr;
} immediate[BRW_WM_MAX_CONST+3];
GLuint nr_immediates;
-
+
struct brw_fp_instruction fp_instructions[BRW_WM_MAX_INSN];
GLuint nr_fp_insns;
GLuint fp_temp;
diff --git a/src/gallium/drivers/i965/brw_wm_constant_buffer.c b/src/gallium/drivers/i965/brw_wm_constant_buffer.c
index df5cd03..5bc0f79 100644
--- a/src/gallium/drivers/i965/brw_wm_constant_buffer.c
+++ b/src/gallium/drivers/i965/brw_wm_constant_buffer.c
@@ -23,7 +23,7 @@ brw_create_constant_surface( struct brw_context *brw,
offsetof(struct brw_surface_state, ss1),
key->bo);
-
+
memset(&surf, 0, sizeof(surf));
surf.ss0.mipmap_layout_mode = BRW_SURFACE_MIPMAPLAYOUT_BELOW;
@@ -37,7 +37,7 @@ brw_create_constant_surface( struct brw_context *brw,
surf.ss3.depth = (w >> 20) & 0x7f; /* bits 26:20 of size or width */
surf.ss3.pitch = (key->pitch * key->cpp) - 1; /* ignored?? */
brw_set_surface_tiling(&surf, key->tiling); /* tiling now allowed */
-
+
ret = brw_upload_cache(&brw->surface_cache, BRW_SS_SURFACE,
key, sizeof(*key),
reloc, Elements(reloc),
diff --git a/src/gallium/drivers/i965/brw_wm_debug.c b/src/gallium/drivers/i965/brw_wm_debug.c
index 1b2aa93..330aad1 100644
--- a/src/gallium/drivers/i965/brw_wm_debug.c
+++ b/src/gallium/drivers/i965/brw_wm_debug.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -37,7 +37,7 @@
static void print_writemask( unsigned writemask )
{
if (writemask != BRW_WRITEMASK_XYZW)
- debug_printf(".%s%s%s%s",
+ debug_printf(".%s%s%s%s",
(writemask & BRW_WRITEMASK_X) ? "x" : "",
(writemask & BRW_WRITEMASK_Y) ? "y" : "",
(writemask & BRW_WRITEMASK_Z) ? "z" : "",
@@ -48,7 +48,7 @@ static void print_swizzle( unsigned swizzle )
{
char *swz = "xyzw";
if (swizzle != BRW_SWIZZLE_XYZW)
- debug_printf(".%c%c%c%c",
+ debug_printf(".%c%c%c%c",
swz[BRW_GET_SWZ(swizzle, X)],
swz[BRW_GET_SWZ(swizzle, Y)],
swz[BRW_GET_SWZ(swizzle, Z)],
@@ -95,7 +95,7 @@ void brw_wm_print_value( struct brw_wm_compile *c,
struct brw_wm_value *value )
{
assert(value);
- if (c->state >= PASS2_DONE)
+ if (c->state >= PASS2_DONE)
brw_print_reg(value->hw_reg);
else if( value == &c->undef_value )
debug_printf("undef");
@@ -111,7 +111,7 @@ void brw_wm_print_value( struct brw_wm_compile *c,
else if (value - c->payload.depth >= 0 &&
value - c->payload.depth < PIPE_MAX_SHADER_INPUTS)
debug_printf("d%ld", (long) (value - c->payload.depth));
- else
+ else
debug_printf("?");
}
@@ -150,15 +150,15 @@ void brw_wm_print_insn( struct brw_wm_compile *c,
}
else
debug_printf("#");
- if (i < 3)
+ if (i < 3)
debug_printf(",");
}
debug_printf("]");
print_writemask(inst->writemask);
-
+
debug_printf(" = ");
print_opcode(inst->opcode);
-
+
if (inst->saturate)
debug_printf("_SAT");
@@ -173,7 +173,7 @@ void brw_wm_print_insn( struct brw_wm_compile *c,
else
debug_printf("%%");
- if (i < 3)
+ if (i < 3)
debug_printf(",");
else
debug_printf("]");
@@ -230,7 +230,7 @@ static void brw_wm_print_fp_insn( struct brw_wm_compile *c,
debug_printf("]");
debug_printf(nr_args ? ", " : "\n");
-
+
for (i = 0; i < nr_args; i++) {
debug_printf("%s%s%s[%d]%s",
inst->src[i].negate ? "-" : "",
diff --git a/src/gallium/drivers/i965/brw_wm_emit.c b/src/gallium/drivers/i965/brw_wm_emit.c
index 8f983a6..cda5d56 100644
--- a/src/gallium/drivers/i965/brw_wm_emit.c
+++ b/src/gallium/drivers/i965/brw_wm_emit.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -162,7 +162,7 @@ static void emit_pixel_w( struct brw_compile *p,
/* Don't need this if all you are doing is interpolating color, for
* instance.
*/
- if (mask & BRW_WRITEMASK_W) {
+ if (mask & BRW_WRITEMASK_W) {
struct brw_reg interp3 = brw_vec1_grf(arg0[0].nr+1, 4);
/* Calc 1/w - just linterp wpos[3] optimized by putting the
@@ -182,7 +182,7 @@ static void emit_pixel_w( struct brw_compile *p,
-static void emit_linterp( struct brw_compile *p,
+static void emit_linterp( struct brw_compile *p,
const struct brw_reg *dst,
GLuint mask,
const struct brw_reg *arg0,
@@ -206,7 +206,7 @@ static void emit_linterp( struct brw_compile *p,
}
-static void emit_pinterp( struct brw_compile *p,
+static void emit_pinterp( struct brw_compile *p,
const struct brw_reg *dst,
GLuint mask,
const struct brw_reg *arg0,
@@ -236,7 +236,7 @@ static void emit_pinterp( struct brw_compile *p,
}
-static void emit_cinterp( struct brw_compile *p,
+static void emit_cinterp( struct brw_compile *p,
const struct brw_reg *dst,
GLuint mask,
const struct brw_reg *arg0 )
@@ -359,9 +359,9 @@ void emit_ddxy(struct brw_compile *p,
brw_set_saturate(p, 0);
}
-static void emit_alu1( struct brw_compile *p,
- struct brw_instruction *(*func)(struct brw_compile *,
- struct brw_reg,
+static void emit_alu1( struct brw_compile *p,
+ struct brw_instruction *(*func)(struct brw_compile *,
+ struct brw_reg,
struct brw_reg),
const struct brw_reg *dst,
GLuint mask,
@@ -383,10 +383,10 @@ static void emit_alu1( struct brw_compile *p,
}
-static void emit_alu2( struct brw_compile *p,
- struct brw_instruction *(*func)(struct brw_compile *,
- struct brw_reg,
- struct brw_reg,
+static void emit_alu2( struct brw_compile *p,
+ struct brw_instruction *(*func)(struct brw_compile *,
+ struct brw_reg,
+ struct brw_reg,
struct brw_reg),
const struct brw_reg *dst,
GLuint mask,
@@ -409,7 +409,7 @@ static void emit_alu2( struct brw_compile *p,
}
-static void emit_mad( struct brw_compile *p,
+static void emit_mad( struct brw_compile *p,
const struct brw_reg *dst,
GLuint mask,
const struct brw_reg *arg0,
@@ -443,7 +443,7 @@ static void emit_trunc( struct brw_compile *p,
}
}
-static void emit_lrp( struct brw_compile *p,
+static void emit_lrp( struct brw_compile *p,
const struct brw_reg *dst,
GLuint mask,
const struct brw_reg *arg0,
@@ -455,8 +455,8 @@ static void emit_lrp( struct brw_compile *p,
/* Uses dst as a temporary:
*/
for (i = 0; i < 4; i++) {
- if (mask & (1<payload.depth[0].hw_reg, BRW_REGISTER_TYPE_UW),
BTI_TEXTURE(inst->tex_unit),
sampler, /* sampler index */
inst->writemask,
- msg_type,
+ msg_type,
responseLength,
msgLength,
- 0,
+ 0,
1,
- BRW_SAMPLER_SIMD_MODE_SIMD16);
+ BRW_SAMPLER_SIMD_MODE_SIMD16);
}
@@ -922,7 +922,7 @@ static void emit_txb( struct brw_wm_compile *c,
else
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
- brw_SAMPLE(p,
+ brw_SAMPLE(p,
retype(vec16(dst[0]), BRW_REGISTER_TYPE_UW),
1,
retype(c->payload.depth[0].hw_reg, BRW_REGISTER_TYPE_UW),
@@ -932,13 +932,13 @@ static void emit_txb( struct brw_wm_compile *c,
msg_type,
8, /* responseLength */
msgLength,
- 0,
+ 0,
1,
- BRW_SAMPLER_SIMD_MODE_SIMD16);
+ BRW_SAMPLER_SIMD_MODE_SIMD16);
}
-static void emit_lit( struct brw_compile *p,
+static void emit_lit( struct brw_compile *p,
const struct brw_reg *dst,
GLuint mask,
const struct brw_reg *arg0 )
@@ -965,11 +965,11 @@ static void emit_lit( struct brw_compile *p,
*/
brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_LE, arg0[0], brw_imm_f(0));
{
- if (mask & BRW_WRITEMASK_Y)
+ if (mask & BRW_WRITEMASK_Y)
brw_MOV(p, dst[1], brw_imm_f(0));
- if (mask & BRW_WRITEMASK_Z)
- brw_MOV(p, dst[2], brw_imm_f(0));
+ if (mask & BRW_WRITEMASK_Z)
+ brw_MOV(p, dst[2], brw_imm_f(0));
}
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
}
@@ -984,12 +984,12 @@ static void emit_kil( struct brw_wm_compile *c,
struct brw_compile *p = &c->func;
struct brw_reg r0uw = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW);
GLuint i;
-
+
/* XXX - usually won't need 4 compares!
*/
for (i = 0; i < 4; i++) {
brw_push_insn_state(p);
- brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_GE, arg0[i], brw_imm_f(0));
+ brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_GE, arg0[i], brw_imm_f(0));
brw_set_predicate_control_flag_value(p, 0xff);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_AND(p, r0uw, brw_flag_reg(), r0uw);
@@ -1019,7 +1019,7 @@ static void fire_fb_write( struct brw_wm_compile *c,
GLuint eot )
{
struct brw_compile *p = &c->func;
-
+
/* Pass through control information:
*/
/* mov (8) m1.0<1>:ud r1.0<8;8,1>:ud { Align1 NoMask } */
@@ -1027,7 +1027,7 @@ static void fire_fb_write( struct brw_wm_compile *c,
brw_push_insn_state(p);
brw_set_mask_control(p, BRW_MASK_DISABLE); /* ? */
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
- brw_MOV(p,
+ brw_MOV(p,
brw_message_reg(base_reg + 1),
brw_vec8_grf(1, 0));
brw_pop_insn_state(p);
@@ -1039,9 +1039,9 @@ static void fire_fb_write( struct brw_wm_compile *c,
retype(vec16(brw_null_reg()), BRW_REGISTER_TYPE_UW),
base_reg,
retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW),
- target,
+ target,
nr,
- 0,
+ 0,
eot);
}
@@ -1089,7 +1089,7 @@ static void emit_fb_write( struct brw_wm_compile *c,
*/
{
brw_push_insn_state(p);
-
+
for (channel = 0; channel < 4; channel++) {
/* mov (8) m2.0<1>:ud r28.0<8;8,1>:ud { Align1 } */
/* mov (8) m6.0<1>:ud r29.0<8;8,1>:ud { Align1 SecHalf } */
@@ -1098,7 +1098,7 @@ static void emit_fb_write( struct brw_wm_compile *c,
brw_MOV(p,
brw_message_reg(nr + channel),
arg0[channel]);
-
+
brw_set_compression_control(p, BRW_COMPRESSION_2NDHALF);
brw_MOV(p,
brw_message_reg(nr + channel + 4),
@@ -1108,15 +1108,15 @@ static void emit_fb_write( struct brw_wm_compile *c,
/* skip over the regs populated above:
*/
nr += 8;
-
+
brw_pop_insn_state(p);
}
if (c->key.source_depth_to_render_target)
{
- if (c->key.computes_depth)
+ if (c->key.computes_depth)
brw_MOV(p, brw_message_reg(nr), arg2[2]);
- else
+ else
brw_MOV(p, brw_message_reg(nr), arg1[1]); /* ? */
nr += 2;
@@ -1152,13 +1152,13 @@ static void emit_fb_write( struct brw_wm_compile *c,
struct brw_reg v1_null_ud = vec1(retype(brw_null_reg(), BRW_REGISTER_TYPE_UD));
struct brw_reg ip = brw_ip_reg();
struct brw_instruction *jmp;
-
+
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_set_conditionalmod(p, BRW_CONDITIONAL_Z);
- brw_AND(p,
- v1_null_ud,
- get_element_ud(brw_vec8_grf(1,0), 6),
- brw_imm_ud(1<<26));
+ brw_AND(p,
+ v1_null_ud,
+ get_element_ud(brw_vec8_grf(1,0), 6),
+ brw_imm_ud(1<<26));
jmp = brw_JMPI(p, ip, ip, brw_imm_d(0));
{
@@ -1176,7 +1176,7 @@ static void emit_fb_write( struct brw_wm_compile *c,
/**
- * Move a GPR to scratch memory.
+ * Move a GPR to scratch memory.
*/
static void emit_spill( struct brw_wm_compile *c,
struct brw_reg reg,
@@ -1193,14 +1193,14 @@ static void emit_spill( struct brw_wm_compile *c,
mov (1) r0.2<1>:d 0x00000080:d { Align1 NoMask }
send (16) null.0<1>:uw m1 r0.0<8;8,1>:uw 0x053003ff:ud { Align1 }
*/
- brw_dp_WRITE_16(p,
+ brw_dp_WRITE_16(p,
retype(vec16(brw_vec8_grf(0, 0)), BRW_REGISTER_TYPE_UW),
slot);
}
/**
- * Load a GPR from scratch memory.
+ * Load a GPR from scratch memory.
*/
static void emit_unspill( struct brw_wm_compile *c,
struct brw_reg reg,
@@ -1262,7 +1262,7 @@ static void spill_values( struct brw_wm_compile *c,
GLuint i;
for (i = 0; i < nr; i++)
- if (values[i].spill_slot)
+ if (values[i].spill_slot)
emit_spill(c, values[i].hw_reg, values[i].spill_slot);
}
@@ -1281,17 +1281,17 @@ void brw_wm_emit( struct brw_wm_compile *c )
spill_values(c, c->payload.depth, 4);
spill_values(c, c->creg, c->nr_creg);
spill_values(c, c->payload.input_interp, PIPE_MAX_SHADER_INPUTS);
-
+
for (insn = 0; insn < c->nr_insns; insn++) {
struct brw_wm_instruction *inst = &c->instruction[insn];
struct brw_reg args[3][4], dst[4];
GLuint i, dst_flags;
-
+
/* Get argument regs:
*/
- for (i = 0; i < 3; i++)
+ for (i = 0; i < 3; i++)
get_argument_regs(c, inst->src[i], args[i]);
/* Get dest regs:
@@ -1301,11 +1301,11 @@ void brw_wm_emit( struct brw_wm_compile *c )
dst[i] = inst->dst[i]->hw_reg;
else
dst[i] = brw_null_reg();
-
+
/* Flags
*/
dst_flags = inst->writemask;
- if (inst->saturate)
+ if (inst->saturate)
dst_flags |= SATURATE;
switch (inst->opcode) {
@@ -1389,7 +1389,7 @@ void brw_wm_emit( struct brw_wm_compile *c )
emit_lrp(p, dst, dst_flags, args[0], args[1], args[2]);
break;
- case TGSI_OPCODE_MAD:
+ case TGSI_OPCODE_MAD:
emit_mad(p, dst, dst_flags, args[0], args[1], args[2]);
break;
@@ -1503,14 +1503,14 @@ void brw_wm_emit( struct brw_wm_compile *c )
default:
debug_printf("Unsupported opcode %i (%s) in fragment shader\n",
- inst->opcode,
+ inst->opcode,
tgsi_get_opcode_info(inst->opcode)->mnemonic);
}
-
+
for (i = 0; i < 4; i++)
- if (inst->dst[i] && inst->dst[i]->spill_slot)
- emit_spill(c,
- inst->dst[i]->hw_reg,
+ if (inst->dst[i] && inst->dst[i]->spill_slot)
+ emit_spill(c,
+ inst->dst[i]->hw_reg,
inst->dst[i]->spill_slot);
}
diff --git a/src/gallium/drivers/i965/brw_wm_fp.c b/src/gallium/drivers/i965/brw_wm_fp.c
index f7ee55c..94508ec 100644
--- a/src/gallium/drivers/i965/brw_wm_fp.c
+++ b/src/gallium/drivers/i965/brw_wm_fp.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "pipe/p_shader_tokens.h"
@@ -114,7 +114,7 @@ static int match_or_expand_immediate( const float *v,
unsigned *swizzle )
{
unsigned i, j;
-
+
*swizzle = 0;
for (i = 0; i < nr; i++) {
@@ -128,7 +128,7 @@ static int match_or_expand_immediate( const float *v,
}
if (!found) {
- if (*nr2 >= 4)
+ if (*nr2 >= 4)
return FALSE;
v2[*nr2] = v[i];
@@ -144,8 +144,8 @@ static int match_or_expand_immediate( const float *v,
/* Internally generated immediates: overkill...
*/
-static struct brw_fp_src src_imm( struct brw_wm_compile *c,
- const GLfloat *v,
+static struct brw_fp_src src_imm( struct brw_wm_compile *c,
+ const GLfloat *v,
unsigned nr)
{
unsigned i, j;
@@ -156,10 +156,10 @@ static struct brw_fp_src src_imm( struct brw_wm_compile *c,
*/
for (i = 0; i < c->nr_immediates; i++) {
- if (match_or_expand_immediate( v,
+ if (match_or_expand_immediate( v,
nr,
c->immediate[i].v,
- &c->immediate[i].nr,
+ &c->immediate[i].nr,
&swizzle ))
goto out;
}
@@ -169,7 +169,7 @@ static struct brw_fp_src src_imm( struct brw_wm_compile *c,
if (match_or_expand_immediate( v,
nr,
c->immediate[i].v,
- &c->immediate[i].nr,
+ &c->immediate[i].nr,
&swizzle ))
goto out;
}
@@ -268,7 +268,7 @@ static void release_temp( struct brw_wm_compile *c, struct brw_fp_dst temp )
/***********************************************************************
- * Instructions
+ * Instructions
*/
static struct brw_fp_instruction *get_fp_inst(struct brw_wm_compile *c)
@@ -305,7 +305,7 @@ static struct brw_fp_instruction * emit_tex_op(struct brw_wm_compile *c,
return inst;
}
-
+
static INLINE void emit_op3(struct brw_wm_compile *c,
GLuint op,
@@ -384,11 +384,11 @@ static struct brw_fp_src get_pixel_xy( struct brw_wm_compile *c )
if (src_is_undef(c->fp_pixel_xy)) {
struct brw_fp_dst pixel_xy = get_temp(c);
struct brw_fp_src payload_r0_depth = src_reg(BRW_FILE_PAYLOAD, PAYLOAD_DEPTH);
-
-
+
+
/* Emit the out calculations, and hold onto the results. Use
* two instructions as a temporary is required.
- */
+ */
/* pixel_xy.xy = PIXELXY payload[0];
*/
emit_op1(c,
@@ -408,16 +408,16 @@ static struct brw_fp_src get_delta_xy( struct brw_wm_compile *c )
struct brw_fp_dst delta_xy = get_temp(c);
struct brw_fp_src pixel_xy = get_pixel_xy(c);
struct brw_fp_src payload_r0_depth = src_reg(BRW_FILE_PAYLOAD, PAYLOAD_DEPTH);
-
+
/* deltas.xy = DELTAXY pixel_xy, payload[0]
*/
emit_op3(c,
WM_DELTAXY,
dst_mask(delta_xy, BRW_WRITEMASK_XY),
- pixel_xy,
+ pixel_xy,
payload_r0_depth,
src_undef());
-
+
c->fp_delta_xy = src_reg_from_dst(delta_xy);
}
@@ -430,7 +430,7 @@ static struct brw_fp_src get_pixel_w( struct brw_wm_compile *c )
struct brw_fp_dst pixel_w = get_temp(c);
struct brw_fp_src deltas = get_delta_xy(c);
- /* XXX: assuming position is always first -- valid?
+ /* XXX: assuming position is always first -- valid?
*/
struct brw_fp_src interp_wpos = src_reg(BRW_FILE_PAYLOAD, 0);
@@ -440,9 +440,9 @@ static struct brw_fp_src get_pixel_w( struct brw_wm_compile *c )
WM_PIXELW,
dst_mask(pixel_w, BRW_WRITEMASK_W),
interp_wpos,
- deltas,
+ deltas,
src_undef());
-
+
c->fp_pixel_w = src_reg_from_dst(pixel_w);
}
@@ -476,7 +476,7 @@ static void emit_interp( struct brw_wm_compile *c,
WM_WPOSXY,
dst_mask(dst, BRW_WRITEMASK_XY),
get_pixel_xy(c));
-
+
/* TGSI_FILE_INPUT.attr.xyzw = INTERP payload.interp[attr].x, deltas.xyw
*/
emit_op2(c,
@@ -536,7 +536,7 @@ static void emit_interp( struct brw_wm_compile *c,
emit_op0(c,
WM_FRONTFACING,
dst_mask(dst, BRW_WRITEMASK_X));
-
+
emit_op1(c,
TGSI_OPCODE_MOV,
dst_mask(dst, BRW_WRITEMASK_YZ),
@@ -568,7 +568,7 @@ static void emit_interp( struct brw_wm_compile *c,
src_imm1f(c, 1.0f));
break;
- default:
+ default:
switch (interp_mode) {
case TGSI_INTERPOLATE_CONSTANT:
emit_op1(c,
@@ -600,14 +600,14 @@ static void emit_interp( struct brw_wm_compile *c,
/***********************************************************************
- * Expand various instructions here to simpler forms.
+ * Expand various instructions here to simpler forms.
*/
static void precalc_dst( struct brw_wm_compile *c,
struct brw_fp_dst dst,
struct brw_fp_src src0,
struct brw_fp_src src1 )
{
- if (dst.writemask & BRW_WRITEMASK_Y) {
+ if (dst.writemask & BRW_WRITEMASK_Y) {
/* dst.y = mul src0.y, src1.y
*/
emit_op2(c,
@@ -693,7 +693,7 @@ static void precalc_tex( struct brw_wm_compile *c,
tmpsrc = src_reg_from_dst(tmp);
/* tmp = abs(src0) */
- emit_op1(c,
+ emit_op1(c,
TGSI_OPCODE_MOV,
tmp,
src_abs(src0));
@@ -745,10 +745,10 @@ static void precalc_tex( struct brw_wm_compile *c,
struct brw_fp_src tmpsrc = src_reg_from_dst(tmp);
struct brw_fp_src C0 = src_imm4f( c, -.5, -.0625, -.5, 1.164 );
struct brw_fp_src C1 = src_imm4f( c, 1.596, -0.813, 2.018, -.391 );
-
+
/* tmp = TEX ...
*/
- emit_tex_op(c,
+ emit_tex_op(c,
TGSI_OPCODE_TEX,
dst_saturate(tmp, dst.saturate),
unit,
@@ -772,7 +772,7 @@ static void precalc_tex( struct brw_wm_compile *c,
tmpsrc,
src_scalar(C0, W));
- /*
+ /*
* if (UV swaped)
* RGB.xyz = MAD YUV.zzx, C1, YUV.y
* else
@@ -781,8 +781,8 @@ static void precalc_tex( struct brw_wm_compile *c,
emit_op3(c, TGSI_OPCODE_MAD,
dst_mask(dst, BRW_WRITEMASK_XYZ),
- ( swap_uv ?
- src_swizzle(tmpsrc, Z,Z,X,X) :
+ ( swap_uv ?
+ src_swizzle(tmpsrc, Z,Z,X,X) :
src_swizzle(tmpsrc, X,X,Z,Z)),
C1,
src_scalar(tmpsrc, Y));
@@ -800,7 +800,7 @@ static void precalc_tex( struct brw_wm_compile *c,
}
else {
/* ordinary RGBA tex instruction */
- emit_tex_op(c,
+ emit_tex_op(c,
TGSI_OPCODE_TEX,
dst,
unit,
@@ -826,7 +826,7 @@ static void precalc_tex( struct brw_wm_compile *c,
* Check if the given TXP instruction really needs the divide-by-W step.
*/
static GLboolean projtex( struct brw_wm_compile *c,
- unsigned target,
+ unsigned target,
struct brw_fp_src src )
{
/* Only try to detect the simplest cases. Could detect (later)
@@ -838,8 +838,8 @@ static GLboolean projtex( struct brw_wm_compile *c,
*/
if (target == TGSI_TEXTURE_CUBE)
return GL_FALSE; /* ut2004 gun rendering !?! */
-
- if (src.file == TGSI_FILE_INPUT &&
+
+ if (src.file == TGSI_FILE_INPUT &&
BRW_GET_SWZ(src.swizzle, W) == W &&
c->fp->info.input_interpolate[src.index] != TGSI_INTERPOLATE_PERSPECTIVE)
return GL_FALSE;
@@ -878,7 +878,7 @@ static void precalc_txp( struct brw_wm_compile *c,
/* dst = TEX tmp0
*/
- precalc_tex(c,
+ precalc_tex(c,
dst,
target,
unit,
@@ -931,7 +931,7 @@ static void emit_fb_write( struct brw_wm_compile *c )
for (i = 0 ; i < c->key.nr_cbufs; i++) {
struct brw_fp_src outcolor;
-
+
outcolor = find_output_by_semantic(c, TGSI_SEMANTIC_COLOR, i);
/* Use emit_tex_op so that we can specify the inst->target
@@ -961,12 +961,12 @@ static struct brw_fp_dst translate_dst( struct brw_wm_compile *c,
out.writemask = dst->Register.WriteMask;
out.indirect = dst->Register.Indirect;
out.saturate = (saturate == TGSI_SAT_ZERO_ONE);
-
+
if (out.indirect) {
assert(dst->Indirect.File == TGSI_FILE_ADDRESS);
assert(dst->Indirect.Index == 0);
}
-
+
return out;
}
@@ -984,7 +984,7 @@ static struct brw_fp_src translate_src( struct brw_wm_compile *c,
(src->Register.SwizzleY << 2) |
(src->Register.SwizzleZ << 4) |
(src->Register.SwizzleW << 6));
-
+
switch (tgsi_util_get_full_src_register_sign_mode( src, 0 )) {
case TGSI_UTIL_SIGN_CLEAR:
out.abs = 1;
@@ -1012,7 +1012,7 @@ static struct brw_fp_src translate_src( struct brw_wm_compile *c,
assert(src->Indirect.File == TGSI_FILE_ADDRESS);
assert(src->Indirect.Index == 0);
}
-
+
return out;
}
@@ -1031,27 +1031,27 @@ static void emit_insn( struct brw_wm_compile *c,
for (i = 0; i < inst->Instruction.NumSrcRegs; i++)
src[i] = translate_src( c, &inst->Src[i] );
-
+
switch (opcode) {
case TGSI_OPCODE_ABS:
emit_op1(c, TGSI_OPCODE_MOV,
- dst,
+ dst,
src_abs(src[0]));
break;
- case TGSI_OPCODE_SUB:
+ case TGSI_OPCODE_SUB:
emit_op2(c, TGSI_OPCODE_ADD,
dst,
src[0],
src_negate(src[1]));
break;
- case TGSI_OPCODE_SCS:
+ case TGSI_OPCODE_SCS:
emit_op1(c, TGSI_OPCODE_SCS,
dst_mask(dst, BRW_WRITEMASK_XY),
src[0]);
break;
-
+
case TGSI_OPCODE_DST:
precalc_dst(c, dst, src[0], src[1]);
break;
@@ -1086,14 +1086,14 @@ static void emit_insn( struct brw_wm_compile *c,
src[1]);
break;
- case TGSI_OPCODE_XPD:
+ case TGSI_OPCODE_XPD:
emit_op2(c, TGSI_OPCODE_XPD,
dst_mask(dst, BRW_WRITEMASK_XYZ),
- src[0],
+ src[0],
src[1]);
break;
- case TGSI_OPCODE_KIL:
+ case TGSI_OPCODE_KIL:
emit_op1(c, TGSI_OPCODE_KIL,
dst_mask(dst_undef(), 0),
src[0]);
@@ -1128,7 +1128,7 @@ int brw_wm_pass_fp( struct brw_wm_compile *c )
if (BRW_DEBUG & DEBUG_WM) {
debug_printf("pre-fp:\n");
- tgsi_dump(fs->tokens, 0);
+ tgsi_dump(fs->tokens, 0);
}
c->fp_pixel_xy = src_undef();
@@ -1173,13 +1173,13 @@ int brw_wm_pass_fp( struct brw_wm_compile *c )
mask = decl->Declaration.UsageMask;
for (attrib = first; attrib <= last; attrib++) {
- emit_interp(c,
- attrib,
+ emit_interp(c,
+ attrib,
decl->Semantic.Name,
decl->Declaration.Interpolate );
}
}
-
+
break;
case TGSI_TOKEN_TYPE_IMMEDIATE:
diff --git a/src/gallium/drivers/i965/brw_wm_glsl.c b/src/gallium/drivers/i965/brw_wm_glsl.c
index 3b3afc3..2a37b82 100644
--- a/src/gallium/drivers/i965/brw_wm_glsl.c
+++ b/src/gallium/drivers/i965/brw_wm_glsl.c
@@ -90,7 +90,7 @@ num_grf_used(const struct brw_wm_compile *c)
/**
* Record the mapping of a Mesa register to a hardware register.
*/
-static void set_reg(struct brw_wm_compile *c, int file, int index,
+static void set_reg(struct brw_wm_compile *c, int file, int index,
int component, struct brw_reg reg)
{
c->wm_regs[file][index][component].reg = reg;
@@ -151,14 +151,14 @@ static void release_tmps(struct brw_wm_compile *c, int mark)
* \param neg negate value?
* \param abs take absolute value?
*/
-static struct brw_reg
+static struct brw_reg
get_reg(struct brw_wm_compile *c, int file, int index, int component,
int nr, GLuint neg, GLuint abs)
{
struct brw_reg reg;
switch (file) {
case TGSI_FILE_NULL:
- return brw_null_reg();
+ return brw_null_reg();
case TGSI_FILE_CONSTANT:
case TGSI_FILE_TEMPORARY:
@@ -331,7 +331,7 @@ static void prealloc_reg(struct brw_wm_compile *c)
c->first_free_grf = 0;
for (i = 0; i < 4; i++) {
- if (i < c->key.nr_depth_regs)
+ if (i < c->key.nr_depth_regs)
reg = brw_vec8_grf(i * 2, 0);
else
reg = brw_vec8_grf(0, 0);
@@ -361,7 +361,7 @@ static void prealloc_reg(struct brw_wm_compile *c)
c->prog_data.nr_params = 0;
}
else {
- const struct gl_program_parameter_list *plist =
+ const struct gl_program_parameter_list *plist =
c->fp->program.Base.Parameters;
int index = 0;
@@ -500,7 +500,7 @@ static void fetch_constants(struct brw_wm_compile *c,
/**
* Convert Mesa dst register to brw register.
*/
-static struct brw_reg get_dst_reg(struct brw_wm_compile *c,
+static struct brw_reg get_dst_reg(struct brw_wm_compile *c,
const struct brw_fp_instruction *inst,
GLuint component)
{
@@ -552,7 +552,7 @@ get_src_reg_const(struct brw_wm_compile *c,
/**
* Convert Mesa src register to brw register.
*/
-static struct brw_reg get_src_reg(struct brw_wm_compile *c,
+static struct brw_reg get_src_reg(struct brw_wm_compile *c,
const struct brw_fp_instruction *inst,
GLuint srcRegIndex, GLuint channel)
{
@@ -576,7 +576,7 @@ static struct brw_reg get_src_reg(struct brw_wm_compile *c,
}
else {
/* other type of source register */
- return get_reg(c, src->File, src->Index, component, nr,
+ return get_reg(c, src->File, src->Index, component, nr,
src->Negate, src->Abs);
}
}
@@ -589,9 +589,9 @@ static struct brw_reg get_src_reg(struct brw_wm_compile *c,
* For instructions with more than one operand, only the second can be a
* immediate. This means that we treat some immediates as constants
* (which why TGSI_FILE_IMMEDIATE is checked in fetch_constants()).
- *
+ *
*/
-static struct brw_reg get_src_reg_imm(struct brw_wm_compile *c,
+static struct brw_reg get_src_reg_imm(struct brw_wm_compile *c,
const struct brw_fp_instruction *inst,
GLuint srcRegIndex, GLuint channel)
{
@@ -633,7 +633,7 @@ static void invoke_subroutine( struct brw_wm_compile *c,
struct brw_compile *p = &c->func;
assert( subroutine < BRW_WM_MAX_SUBROUTINE );
-
+
if( c->subroutines[ subroutine ] ) {
/* subroutine previously emitted: reuse existing instructions */
@@ -641,7 +641,7 @@ static void invoke_subroutine( struct brw_wm_compile *c,
struct brw_reg return_address = retype( alloc_tmp( c ),
BRW_REGISTER_TYPE_UD );
int here = p->nr_insn;
-
+
brw_push_insn_state(p);
brw_set_mask_control(p, BRW_MASK_DISABLE);
brw_ADD( p, return_address, brw_ip_reg(), brw_imm_ud( 2 << 4 ) );
@@ -654,29 +654,29 @@ static void invoke_subroutine( struct brw_wm_compile *c,
release_tmps( c, mark );
} else {
/* previously unused subroutine: emit, and mark for later reuse */
-
+
int mark = mark_tmps( c );
struct brw_reg return_address = retype( alloc_tmp( c ),
BRW_REGISTER_TYPE_UD );
struct brw_instruction *calc;
int base = p->nr_insn;
-
+
brw_push_insn_state(p);
brw_set_mask_control(p, BRW_MASK_DISABLE);
calc = brw_ADD( p, return_address, brw_ip_reg(), brw_imm_ud( 0 ) );
brw_pop_insn_state(p);
-
+
c->subroutines[ subroutine ] = p->nr_insn;
emit( c );
-
+
brw_push_insn_state(p);
brw_set_mask_control(p, BRW_MASK_DISABLE);
brw_MOV( p, brw_ip_reg(), return_address );
brw_pop_insn_state(p);
brw_set_src1( calc, brw_imm_ud( ( p->nr_insn - base ) << 4 ) );
-
+
release_tmps( c, mark );
}
}
@@ -803,7 +803,7 @@ static void fire_fb_write( struct brw_wm_compile *c,
retype(vec8(brw_null_reg()), BRW_REGISTER_TYPE_UW),
base_reg,
retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW),
- target,
+ target,
nr,
0,
eot);
@@ -988,7 +988,7 @@ static void emit_pinterp(struct brw_wm_compile *c,
if (mask & (1<func;
struct brw_reg src0, addr_reg;
brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- addr_reg = brw_uw8_reg(BRW_ARCHITECTURE_REGISTER_FILE,
+ addr_reg = brw_uw8_reg(BRW_ARCHITECTURE_REGISTER_FILE,
BRW_ARF_ADDRESS, 0);
src0 = get_src_reg(c, inst, 0, 0); /* channel 0 */
brw_MOV(p, addr_reg, src0);
@@ -1527,7 +1527,7 @@ static INLINE struct brw_reg odd_bytes( struct brw_reg reg )
}
-
+
static void emit_wpos_xy(struct brw_wm_compile *c,
const struct brw_fp_instruction *inst)
{
@@ -1562,7 +1562,7 @@ static void emit_wpos_xy(struct brw_wm_compile *c,
/* TODO
BIAS on SIMD8 not working yet...
- */
+ */
static void emit_txb(struct brw_wm_compile *c,
const struct brw_fp_instruction *inst)
{
@@ -1577,7 +1577,7 @@ static void emit_txb(struct brw_wm_compile *c,
payload_reg = get_reg(c, TGSI_FILE_PAYLOAD, PAYLOAD_DEPTH, 0, 1, 0, 0);
- for (i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
dst[i] = get_dst_reg(c, inst, i);
for (i = 0; i < 4; i++)
src[i] = get_src_reg(c, inst, 0, i);
@@ -1626,7 +1626,7 @@ static void emit_txb(struct brw_wm_compile *c,
4, /* msg_length */
0, /* eot */
1,
- BRW_SAMPLER_SIMD_MODE_SIMD8);
+ BRW_SAMPLER_SIMD_MODE_SIMD8);
}
@@ -1647,7 +1647,7 @@ static void emit_tex(struct brw_wm_compile *c,
payload_reg = get_reg(c, TGSI_FILE_PAYLOAD, PAYLOAD_DEPTH, 0, 1, 0, 0);
- for (i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
dst[i] = get_dst_reg(c, inst, i);
for (i = 0; i < 4; i++)
src[i] = get_src_reg(c, inst, 0, i);
@@ -1697,7 +1697,7 @@ static void emit_tex(struct brw_wm_compile *c,
/* Does it work for shadow on SIMD8 ? */
msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE;
}
-
+
brw_SAMPLE(p,
retype(vec8(dst[0]), BRW_REGISTER_TYPE_UW), /* dest */
1, /* msg_reg_nr */
@@ -1710,7 +1710,7 @@ static void emit_tex(struct brw_wm_compile *c,
shadow ? 6 : 4, /* msg_length */
0, /* eot */
1,
- BRW_SAMPLER_SIMD_MODE_SIMD8);
+ BRW_SAMPLER_SIMD_MODE_SIMD8);
if (shadow)
brw_MOV(p, dst[3], brw_imm_f(1.0));
@@ -1785,12 +1785,12 @@ static void brw_wm_emit_branching_shader(struct brw_context *brw, struct brw_wm_
case WM_PIXELXY:
emit_pixel_xy(c, inst);
break;
- case WM_DELTAXY:
+ case WM_DELTAXY:
emit_delta_xy(c, inst);
break;
case WM_PIXELW:
emit_pixel_w(c, inst);
- break;
+ break;
case WM_LINTERP:
emit_linterp(c, inst);
break;
@@ -1860,8 +1860,8 @@ static void brw_wm_emit_branching_shader(struct brw_context *brw, struct brw_wm_
case OPCODE_LG2:
emit_lg2(c, inst);
break;
- case OPCODE_MIN:
- case OPCODE_MAX:
+ case OPCODE_MIN:
+ case OPCODE_MAX:
emit_min_max(c, inst);
break;
case OPCODE_DDX:
@@ -1929,7 +1929,7 @@ static void brw_wm_emit_branching_shader(struct brw_context *brw, struct brw_wm_
case OPCODE_ENDSUB:
/* no-op */
break;
- case OPCODE_CAL:
+ case OPCODE_CAL:
brw_push_insn_state(p);
brw_set_mask_control(p, BRW_MASK_DISABLE);
brw_set_access_mode(p, BRW_ALIGN_1);
@@ -1965,14 +1965,14 @@ static void brw_wm_emit_branching_shader(struct brw_context *brw, struct brw_wm_
brw_CONT(p);
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
break;
- case OPCODE_ENDLOOP:
+ case OPCODE_ENDLOOP:
{
struct brw_instruction *inst0, *inst1;
GLuint br = 1;
if (BRW_IS_IGDNG(brw))
br = 2;
-
+
loop_depth--;
inst0 = inst1 = brw_WHILE(p, loop_inst[loop_depth]);
/* patch all the BREAK/CONT instructions from last BGNLOOP */
@@ -2009,7 +2009,7 @@ static void brw_wm_emit_branching_shader(struct brw_context *brw, struct brw_wm_
/**
* Do GPU code generation for shaders that use GLSL features such as
- * flow control. Other shaders will be compiled with the
+ * flow control. Other shaders will be compiled with the
*/
void brw_wm_branching_shader_emit(struct brw_context *brw, struct brw_wm_compile *c)
{
diff --git a/src/gallium/drivers/i965/brw_wm_iz.c b/src/gallium/drivers/i965/brw_wm_iz.c
index 6f1e9fc..d834f64 100644
--- a/src/gallium/drivers/i965/brw_wm_iz.c
+++ b/src/gallium/drivers/i965/brw_wm_iz.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_wm.h"
@@ -49,70 +49,70 @@ const struct {
GLuint ds_present:1;
} wm_iz_table[IZ_BIT_MAX] =
{
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { N, 1, 1, 0, 0 },
- { N, 0, 1, 0, 0 },
- { N, 0, 1, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { C, 0, 1, 1, 0 },
- { C, 0, 1, 1, 0 },
- { P, 0, 0, 0, 0 },
- { N, 1, 1, 0, 0 },
- { C, 0, 1, 1, 0 },
- { C, 0, 1, 1, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { N, 1, 1, 0, 0 },
- { N, 0, 1, 0, 0 },
- { N, 0, 1, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { C, 0, 1, 1, 0 },
- { C, 0, 1, 1, 0 },
- { P, 0, 0, 0, 0 },
- { N, 1, 1, 0, 0 },
- { C, 0, 1, 1, 0 },
- { C, 0, 1, 1, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { N, 1, 1, 0, 1 },
- { N, 0, 1, 0, 1 },
- { N, 0, 1, 0, 1 },
- { P, 0, 0, 0, 0 },
- { P, 0, 0, 0, 0 },
- { C, 0, 1, 1, 1 },
- { C, 0, 1, 1, 1 },
- { P, 0, 0, 0, 0 },
- { N, 1, 1, 0, 1 },
- { C, 0, 1, 1, 1 },
- { C, 0, 1, 1, 1 },
- { P, 0, 0, 0, 0 },
- { C, 0, 0, 0, 1 },
- { P, 0, 0, 0, 0 },
- { C, 0, 1, 0, 1 },
- { P, 0, 0, 0, 0 },
- { C, 1, 1, 0, 1 },
- { C, 0, 1, 0, 1 },
- { C, 0, 1, 0, 1 },
- { P, 0, 0, 0, 0 },
- { C, 1, 1, 1, 1 },
- { C, 0, 1, 1, 1 },
- { C, 0, 1, 1, 1 },
- { P, 0, 0, 0, 0 },
- { C, 1, 1, 1, 1 },
- { C, 0, 1, 1, 1 },
- { C, 0, 1, 1, 1 }
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { N, 1, 1, 0, 0 },
+ { N, 0, 1, 0, 0 },
+ { N, 0, 1, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { C, 0, 1, 1, 0 },
+ { C, 0, 1, 1, 0 },
+ { P, 0, 0, 0, 0 },
+ { N, 1, 1, 0, 0 },
+ { C, 0, 1, 1, 0 },
+ { C, 0, 1, 1, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { N, 1, 1, 0, 0 },
+ { N, 0, 1, 0, 0 },
+ { N, 0, 1, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { C, 0, 1, 1, 0 },
+ { C, 0, 1, 1, 0 },
+ { P, 0, 0, 0, 0 },
+ { N, 1, 1, 0, 0 },
+ { C, 0, 1, 1, 0 },
+ { C, 0, 1, 1, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { N, 1, 1, 0, 1 },
+ { N, 0, 1, 0, 1 },
+ { N, 0, 1, 0, 1 },
+ { P, 0, 0, 0, 0 },
+ { P, 0, 0, 0, 0 },
+ { C, 0, 1, 1, 1 },
+ { C, 0, 1, 1, 1 },
+ { P, 0, 0, 0, 0 },
+ { N, 1, 1, 0, 1 },
+ { C, 0, 1, 1, 1 },
+ { C, 0, 1, 1, 1 },
+ { P, 0, 0, 0, 0 },
+ { C, 0, 0, 0, 1 },
+ { P, 0, 0, 0, 0 },
+ { C, 0, 1, 0, 1 },
+ { P, 0, 0, 0, 0 },
+ { C, 1, 1, 0, 1 },
+ { C, 0, 1, 0, 1 },
+ { C, 0, 1, 0, 1 },
+ { P, 0, 0, 0, 0 },
+ { C, 1, 1, 1, 1 },
+ { C, 0, 1, 1, 1 },
+ { C, 0, 1, 1, 1 },
+ { P, 0, 0, 0, 0 },
+ { C, 1, 1, 1, 1 },
+ { C, 0, 1, 1, 1 },
+ { C, 0, 1, 1, 1 }
};
/**
@@ -127,7 +127,7 @@ void brw_wm_lookup_iz( GLuint line_aa,
GLuint reg = 2;
assert (lookup < IZ_BIT_MAX);
-
+
if (lookup & IZ_PS_COMPUTES_DEPTH_BIT)
key->computes_depth = 1;
diff --git a/src/gallium/drivers/i965/brw_wm_pass0.c b/src/gallium/drivers/i965/brw_wm_pass0.c
index 0bacad2..a797e1c 100644
--- a/src/gallium/drivers/i965/brw_wm_pass0.c
+++ b/src/gallium/drivers/i965/brw_wm_pass0.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,7 +22,7 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
@@ -97,12 +97,12 @@ static void pass0_set_fpreg_ref( struct brw_wm_compile *c,
c->pass0_fp_reg[file][idx][component] = src_ref;
}
-static const struct brw_wm_ref *get_param_ref( struct brw_wm_compile *c,
+static const struct brw_wm_ref *get_param_ref( struct brw_wm_compile *c,
unsigned idx,
unsigned component)
{
GLuint i = idx * 4 + component;
-
+
if (i >= BRW_WM_MAX_PARAM) {
debug_printf("%s: out of params\n", __FUNCTION__);
c->prog_data.error = 1;
@@ -147,13 +147,13 @@ static const struct brw_wm_ref *pass0_get_reg( struct brw_wm_compile *c,
break;
case TGSI_FILE_CONSTANT:
- ref = get_param_ref(c,
+ ref = get_param_ref(c,
c->fp->info.immediate_count + idx,
component);
break;
case TGSI_FILE_IMMEDIATE:
- ref = get_param_ref(c,
+ ref = get_param_ref(c,
idx,
component);
break;
@@ -273,7 +273,7 @@ translate_insn(struct brw_wm_compile *c,
/***********************************************************************
* Optimize moves and swizzles away:
- */
+ */
static void pass0_precalc_mov( struct brw_wm_compile *c,
const struct brw_fp_instruction *inst )
{
@@ -293,7 +293,7 @@ static void pass0_precalc_mov( struct brw_wm_compile *c,
refs[i] = get_new_ref(c, inst->src[0], i, NULL);
}
for (i = 0; i < 4; i++) {
- if (writemask & (1 << i)) {
+ if (writemask & (1 << i)) {
pass0_set_fpreg_ref( c, dst.file, dst.index, i, refs[i]);
}
}
@@ -308,13 +308,13 @@ static void pass0_init_payload( struct brw_wm_compile *c )
for (i = 0; i < 4; i++) {
GLuint j = i >= c->key.nr_depth_regs ? 0 : i;
- pass0_set_fpreg_value( c, BRW_FILE_PAYLOAD, PAYLOAD_DEPTH, i,
+ pass0_set_fpreg_value( c, BRW_FILE_PAYLOAD, PAYLOAD_DEPTH, i,
&c->payload.depth[j] );
}
for (i = 0; i < c->key.nr_inputs; i++)
- pass0_set_fpreg_value( c, BRW_FILE_PAYLOAD, i, 0,
- &c->payload.input_interp[i] );
+ pass0_set_fpreg_value( c, BRW_FILE_PAYLOAD, i, 0,
+ &c->payload.input_interp[i] );
}
@@ -344,9 +344,9 @@ void brw_wm_pass0( struct brw_wm_compile *c )
const struct brw_fp_instruction *inst = &c->fp_instructions[insn];
/* Optimize away moves, otherwise emit translated instruction:
- */
+ */
switch (inst->opcode) {
- case TGSI_OPCODE_MOV:
+ case TGSI_OPCODE_MOV:
if (!inst->dst.saturate) {
pass0_precalc_mov(c, inst);
}
@@ -359,7 +359,7 @@ void brw_wm_pass0( struct brw_wm_compile *c )
break;
}
}
-
+
if (BRW_DEBUG & DEBUG_WM) {
brw_wm_print_program(c, "pass0");
}
diff --git a/src/gallium/drivers/i965/brw_wm_pass1.c b/src/gallium/drivers/i965/brw_wm_pass1.c
index 005747f..952b2b5 100644
--- a/src/gallium/drivers/i965/brw_wm_pass1.c
+++ b/src/gallium/drivers/i965/brw_wm_pass1.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_wm.h"
#include "brw_debug.h"
@@ -105,14 +105,14 @@ static GLuint get_texcoord_mask( GLuint tex_idx )
case TGSI_TEXTURE_SHADOW2D:
case TGSI_TEXTURE_SHADOWRECT:
return BRW_WRITEMASK_XYZ;
- default:
+ default:
assert(0);
return 0;
}
}
-/* Step two: Basically this is dead code elimination.
+/* Step two: Basically this is dead code elimination.
*
* Iterate backwards over instructions, noting which values
* contribute to the final result. Adjust writemasks to only
@@ -133,13 +133,13 @@ void brw_wm_pass1( struct brw_wm_compile *c )
}
if (inst->opcode == WM_FB_WRITE) {
- track_arg(c, inst, 0, BRW_WRITEMASK_XYZW);
- track_arg(c, inst, 1, BRW_WRITEMASK_XYZW);
+ track_arg(c, inst, 0, BRW_WRITEMASK_XYZW);
+ track_arg(c, inst, 1, BRW_WRITEMASK_XYZW);
if (c->key.source_depth_to_render_target &&
c->key.computes_depth)
- track_arg(c, inst, 2, BRW_WRITEMASK_Z);
+ track_arg(c, inst, 2, BRW_WRITEMASK_Z);
else
- track_arg(c, inst, 2, 0);
+ track_arg(c, inst, 2, 0);
continue;
}
@@ -189,17 +189,17 @@ void brw_wm_pass1( struct brw_wm_compile *c )
read0 = writemask;
break;
- case TGSI_OPCODE_MAD:
+ case TGSI_OPCODE_MAD:
case TGSI_OPCODE_CMP:
case TGSI_OPCODE_LRP:
read0 = writemask;
- read1 = writemask;
- read2 = writemask;
+ read1 = writemask;
+ read2 = writemask;
break;
- case TGSI_OPCODE_XPD:
- if (writemask & BRW_WRITEMASK_X) read0 |= BRW_WRITEMASK_YZ;
- if (writemask & BRW_WRITEMASK_Y) read0 |= BRW_WRITEMASK_XZ;
+ case TGSI_OPCODE_XPD:
+ if (writemask & BRW_WRITEMASK_X) read0 |= BRW_WRITEMASK_YZ;
+ if (writemask & BRW_WRITEMASK_Y) read0 |= BRW_WRITEMASK_XZ;
if (writemask & BRW_WRITEMASK_Z) read0 |= BRW_WRITEMASK_XY;
read1 = read0;
break;
@@ -255,7 +255,7 @@ void brw_wm_pass1( struct brw_wm_compile *c )
read2 = BRW_WRITEMASK_W; /* pixel w */
break;
- case TGSI_OPCODE_DP3:
+ case TGSI_OPCODE_DP3:
read0 = BRW_WRITEMASK_XYZ;
read1 = BRW_WRITEMASK_XYZ;
break;
@@ -270,7 +270,7 @@ void brw_wm_pass1( struct brw_wm_compile *c )
read1 = BRW_WRITEMASK_XYZW;
break;
- case TGSI_OPCODE_LIT:
+ case TGSI_OPCODE_LIT:
read0 = BRW_WRITEMASK_XYW;
break;
diff --git a/src/gallium/drivers/i965/brw_wm_pass2.c b/src/gallium/drivers/i965/brw_wm_pass2.c
index 19248b4..ab4eae7 100644
--- a/src/gallium/drivers/i965/brw_wm_pass2.c
+++ b/src/gallium/drivers/i965/brw_wm_pass2.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "brw_debug.h"
#include "brw_wm.h"
@@ -72,15 +72,15 @@ static void init_registers( struct brw_wm_compile *c )
GLuint reg = 0;
GLuint j;
- for (j = 0; j < c->grf_limit; j++)
+ for (j = 0; j < c->grf_limit; j++)
c->pass2_grf[j].nextuse = BRW_WM_MAX_INSN;
/* Pre-allocate incoming payload regs:
*/
- for (j = 0; j < c->key.nr_depth_regs; j++)
+ for (j = 0; j < c->key.nr_depth_regs; j++)
prealloc_reg(c, &c->payload.depth[j], reg++);
- for (j = 0; j < c->nr_creg; j++)
+ for (j = 0; j < c->nr_creg; j++)
prealloc_reg(c, &c->creg[j], reg++);
reg++; /* XXX: skip over position output */
@@ -137,12 +137,12 @@ static void update_register_usage(struct brw_wm_compile *c,
static void spill_value(struct brw_wm_compile *c,
struct brw_wm_value *value)
-{
+{
/* Allocate a spill slot. Note that allocations start from 0x40 -
* the first slot is reserved to mean "undef" in brw_wm_emit.c
*/
if (!value->spill_slot) {
- c->last_scratch += 0x40;
+ c->last_scratch += 0x40;
value->spill_slot = c->last_scratch;
}
@@ -193,7 +193,7 @@ static GLuint search_contiguous_regs(struct brw_wm_compile *c,
/* Any non-empty regs will need to be spilled:
*/
- for (j = 0; j < nr; j++)
+ for (j = 0; j < nr; j++)
if (grf[reg+j].value)
spill_value(c, grf[reg+j].value);
@@ -201,7 +201,7 @@ static GLuint search_contiguous_regs(struct brw_wm_compile *c,
}
-static void alloc_contiguous_dest(struct brw_wm_compile *c,
+static void alloc_contiguous_dest(struct brw_wm_compile *c,
struct brw_wm_value *dst[],
GLuint nr,
GLuint thisinsn)
@@ -234,7 +234,7 @@ static void alloc_contiguous_dest(struct brw_wm_compile *c,
}
-static void load_args(struct brw_wm_compile *c,
+static void load_args(struct brw_wm_compile *c,
struct brw_wm_instruction *inst)
{
GLuint thisinsn = inst - c->instruction;
@@ -316,7 +316,7 @@ void brw_wm_pass2( struct brw_wm_compile *c )
}
if (TEST_DST_SPILLS && inst->opcode != WM_PIXELXY) {
- for (i = 0; i < 4; i++)
+ for (i = 0; i < 4; i++)
if (inst->dst[i])
spill_value(c, inst->dst[i]);
}
diff --git a/src/gallium/drivers/i965/brw_wm_sampler_state.c b/src/gallium/drivers/i965/brw_wm_sampler_state.c
index 8406a1a..4c29301 100644
--- a/src/gallium/drivers/i965/brw_wm_sampler_state.c
+++ b/src/gallium/drivers/i965/brw_wm_sampler_state.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "util/u_math.h"
#include "util/u_format.h"
@@ -52,8 +52,8 @@ upload_default_color( struct brw_context *brw,
struct brw_sampler_default_color sdc;
enum pipe_error ret;
- COPY_4V(sdc.color, color);
-
+ COPY_4V(sdc.color, color);
+
ret = brw_cache_data( &brw->cache, BRW_SAMPLER_DEFAULT_COLOR, &sdc,
NULL, 0, bo_out );
if (ret)
@@ -96,7 +96,7 @@ brw_wm_sampler_populate_key(struct brw_context *brw,
*/
if (tex->b.b.target == PIPE_TEXTURE_CUBE) {
if (FALSE &&
- (sampler->ss0.min_filter != BRW_MAPFILTER_NEAREST ||
+ (sampler->ss0.min_filter != BRW_MAPFILTER_NEAREST ||
sampler->ss0.mag_filter != BRW_MAPFILTER_NEAREST)) {
entry->ss1.r_wrap_mode = BRW_TEXCOORDMODE_CUBE;
entry->ss1.s_wrap_mode = BRW_TEXCOORDMODE_CUBE;
@@ -136,7 +136,7 @@ brw_wm_sampler_update_default_colors(struct brw_context *brw)
sampler->border_color[0],
sampler->border_color[0]
};
-
+
if (util_format_is_depth_or_stencil(tex->b.b.format)) {
bc = bordercolor;
}
@@ -148,10 +148,10 @@ brw_wm_sampler_update_default_colors(struct brw_context *brw)
* R channel, while the hardware uses A. Spam R into all the
* channels for safety.
*/
- ret = upload_default_color(brw,
+ ret = upload_default_color(brw,
bc,
&brw->wm.sdc_bo[i]);
- if (ret)
+ if (ret)
return ret;
}
@@ -160,7 +160,7 @@ brw_wm_sampler_update_default_colors(struct brw_context *brw)
-/* All samplers must be uploaded in a single contiguous array.
+/* All samplers must be uploaded in a single contiguous array.
*/
static int upload_wm_samplers( struct brw_context *brw )
{
diff --git a/src/gallium/drivers/i965/brw_wm_state.c b/src/gallium/drivers/i965/brw_wm_state.c
index efc2d96..7853531 100644
--- a/src/gallium/drivers/i965/brw_wm_state.c
+++ b/src/gallium/drivers/i965/brw_wm_state.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "util/u_math.h"
#include "brw_context.h"
@@ -113,7 +113,7 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
key->computes_depth = 0;
/* PIPE_NEW_DEPTH_STENCIL_ALPHA */
- key->uses_kill = (fp->info.uses_kill ||
+ key->uses_kill = (fp->info.uses_kill ||
brw->curr.zstencil->cc3.alpha_test);
key->has_flow_control = fp->has_flow_control;
@@ -174,7 +174,7 @@ wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
wm.thread3.const_urb_entry_read_length = key->curb_entry_read_length;
wm.thread3.const_urb_entry_read_offset = key->curbe_offset * 2;
- if (BRW_IS_IGDNG(brw))
+ if (BRW_IS_IGDNG(brw))
wm.wm4.sampler_count = 0; /* hardware requirement */
else
wm.wm4.sampler_count = (key->sampler_count + 1) / 4;
@@ -257,7 +257,7 @@ static enum pipe_error upload_wm_unit( struct brw_context *brw )
/* Do we need a new buffer:
*/
- if (brw->wm.scratch_bo && total > brw->wm.scratch_bo->size)
+ if (brw->wm.scratch_bo && total > brw->wm.scratch_bo->size)
bo_reference(&brw->wm.scratch_bo, NULL);
if (brw->wm.scratch_bo == NULL) {
@@ -312,7 +312,7 @@ static enum pipe_error upload_wm_unit( struct brw_context *brw )
&brw->wm.state_bo))
return PIPE_OK;
- ret = wm_unit_create_from_key(brw, &key,
+ ret = wm_unit_create_from_key(brw, &key,
reloc, nr_reloc,
&brw->wm.state_bo);
if (ret)
@@ -325,7 +325,7 @@ const struct brw_tracked_state brw_wm_unit = {
.dirty = {
.mesa = (PIPE_NEW_FRAGMENT_SHADER |
PIPE_NEW_DEPTH_BUFFER |
- PIPE_NEW_RAST |
+ PIPE_NEW_RAST |
PIPE_NEW_DEPTH_STENCIL_ALPHA |
PIPE_NEW_QUERY),
diff --git a/src/gallium/drivers/i965/brw_wm_surface_state.c b/src/gallium/drivers/i965/brw_wm_surface_state.c
index 0d80a01..7bed3d6 100644
--- a/src/gallium/drivers/i965/brw_wm_surface_state.c
+++ b/src/gallium/drivers/i965/brw_wm_surface_state.c
@@ -2,7 +2,7 @@
Copyright (C) Intel Corp. 2006. All Rights Reserved.
Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
develop this 3D driver.
-
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
-
+
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial
portions of the Software.
-
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
@@ -22,13 +22,13 @@
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+
**********************************************************************/
/*
* Authors:
* Keith Whitwell
*/
-
+
#include "pipe/p_format.h"
#include "brw_batchbuffer.h"
@@ -122,7 +122,7 @@ brw_update_render_surface(struct brw_context *brw,
NULL,
bo_out))
return PIPE_OK;
-
+
ret = brw_upload_cache(&brw->surface_cache,
BRW_SS_SURFACE,
&ss, sizeof ss,
@@ -155,7 +155,7 @@ brw_wm_get_binding_table(struct brw_context *brw,
assert(brw->wm.nr_surfaces <= BRW_WM_MAX_SURF);
assert(brw->wm.nr_surfaces > 0);
- /* Emit binding table relocations to surface state
+ /* Emit binding table relocations to surface state
*/
for (i = 0; i < brw->wm.nr_surfaces; i++) {
if (brw->wm.surf_bo[i]) {
@@ -209,12 +209,12 @@ static enum pipe_error prepare_wm_surfaces(struct brw_context *brw )
* XXX: no color buffer case
*/
for (i = 0; i < brw->curr.fb.nr_cbufs; i++) {
- ret = brw_update_render_surface(brw,
- brw_surface(brw->curr.fb.cbufs[i]),
+ ret = brw_update_render_surface(brw,
+ brw_surface(brw->curr.fb.cbufs[i]),
&brw->wm.surf_bo[BTI_COLOR_BUF(i)]);
if (ret)
return ret;
-
+
nr_surfaces = BTI_COLOR_BUF(i) + 1;
}
@@ -225,8 +225,8 @@ static enum pipe_error prepare_wm_surfaces(struct brw_context *brw )
#if 0
if (brw->curr.fragment_constants) {
ret = brw_update_fragment_constant_surface(
- brw,
- brw->curr.fragment_constants,
+ brw,
+ brw->curr.fragment_constants,
&brw->wm.surf_bo[BTI_FRAGMENT_CONSTANTS]);
if (ret)
@@ -235,15 +235,15 @@ static enum pipe_error prepare_wm_surfaces(struct brw_context *brw )
nr_surfaces = BTI_FRAGMENT_CONSTANTS + 1;
}
else {
- bo_reference(&brw->wm.surf_bo[SURF_FRAG_CONSTANTS], NULL);
+ bo_reference(&brw->wm.surf_bo[SURF_FRAG_CONSTANTS], NULL);
}
#endif
- /* PIPE_NEW_TEXTURE
+ /* PIPE_NEW_TEXTURE
*/
for (i = 0; i < brw->curr.num_fragment_sampler_views; i++) {
- ret = brw_update_texture_surface(brw,
+ ret = brw_update_texture_surface(brw,
brw_texture(brw->curr.fragment_sampler_views[i]->texture),
&brw->wm.surf_bo[BTI_TEXTURE(i)]);
if (ret)
@@ -254,11 +254,11 @@ static enum pipe_error prepare_wm_surfaces(struct brw_context *brw )
/* Clear any inactive entries:
*/
- for (i = brw->curr.fb.nr_cbufs; i < BRW_MAX_DRAW_BUFFERS; i++)
+ for (i = brw->curr.fb.nr_cbufs; i < BRW_MAX_DRAW_BUFFERS; i++)
bo_reference(&brw->wm.surf_bo[BTI_COLOR_BUF(i)], NULL);
if (!brw->curr.fragment_constants)
- bo_reference(&brw->wm.surf_bo[BTI_FRAGMENT_CONSTANTS], NULL);
+ bo_reference(&brw->wm.surf_bo[BTI_FRAGMENT_CONSTANTS], NULL);
/* XXX: no pipe_max_textures define?? */
for (i = brw->curr.num_fragment_sampler_views; i < PIPE_MAX_SAMPLERS; i++)
diff --git a/src/gallium/drivers/i965/intel_structs.h b/src/gallium/drivers/i965/intel_structs.h
index 522e3bd..f194a57 100644
--- a/src/gallium/drivers/i965/intel_structs.h
+++ b/src/gallium/drivers/i965/intel_structs.h
@@ -12,7 +12,7 @@ struct br0 {
GLuint client:3;
};
-
+
struct br13 {
GLint dest_pitch:16;
GLuint rop:8;
@@ -42,7 +42,7 @@ struct xy_color_blit {
GLuint dest_x2:16;
GLuint dest_y2:16;
} dw3;
-
+
GLuint dest_base_addr;
GLuint color;
};
@@ -60,7 +60,7 @@ struct xy_src_copy_blit {
GLuint dest_x2:16;
GLuint dest_y2:16;
} dw3;
-
+
GLuint dest_base_addr;
struct {
@@ -72,7 +72,7 @@ struct xy_src_copy_blit {
GLint src_pitch:16;
GLuint pad:16;
} dw6;
-
+
GLuint src_base_addr;
};
@@ -89,7 +89,7 @@ struct xy_setup_blit {
GLuint clip_x2:16;
GLuint clip_y2:16;
} dw3;
-
+
GLuint dest_base_addr;
GLuint background_color;
GLuint foreground_color;
@@ -117,7 +117,7 @@ struct xy_text_immediate_blit {
struct {
GLuint dest_x2:16;
GLuint dest_y2:16;
- } dw2;
+ } dw2;
/* Src bitmap data follows as inline dwords.
*/
diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c
index 3efbd6a..b5e38b9 100644
--- a/src/gallium/drivers/identity/id_context.c
+++ b/src/gallium/drivers/identity/id_context.c
@@ -829,7 +829,7 @@ identity_context_transfer_unmap(struct pipe_context *_context,
}
-static void
+static void
identity_context_transfer_inline_write(struct pipe_context *_context,
struct pipe_resource *_resource,
unsigned level,
diff --git a/src/gallium/drivers/llvmpipe/SConscript b/src/gallium/drivers/llvmpipe/SConscript
index 26b258b..907821d 100644
--- a/src/gallium/drivers/llvmpipe/SConscript
+++ b/src/gallium/drivers/llvmpipe/SConscript
@@ -20,8 +20,8 @@ env.CodeGenerate(
# XXX: Our dependency scanner only finds depended modules in relative dirs.
env.Depends('lp_tile_soa.c', [
- '#src/gallium/auxiliary/util/u_format_parse.py',
- '#src/gallium/auxiliary/util/u_format_pack.py',
+ '#src/gallium/auxiliary/util/u_format_parse.py',
+ '#src/gallium/auxiliary/util/u_format_pack.py',
])
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend.h b/src/gallium/drivers/llvmpipe/lp_bld_blend.h
index f82ae30..b2db298 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_blend.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld_blend.h
@@ -31,7 +31,7 @@
#include "gallivm/lp_bld.h"
#include "gallivm/lp_bld_init.h"
-
+
#include "pipe/p_format.h"
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
index c342346..60af138 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
@@ -64,7 +64,7 @@
struct lp_build_blend_aos_context
{
struct lp_build_context base;
-
+
LLVMValueRef src;
LLVMValueRef dst;
LLVMValueRef const_;
@@ -185,8 +185,8 @@ lp_build_blend_factor_swizzle(unsigned factor)
static LLVMValueRef
lp_build_blend_swizzle(struct lp_build_blend_aos_context *bld,
- LLVMValueRef rgb,
- LLVMValueRef alpha,
+ LLVMValueRef rgb,
+ LLVMValueRef alpha,
enum lp_build_blend_swizzle rgb_swizzle,
unsigned alpha_swizzle)
{
@@ -279,7 +279,7 @@ lp_build_blend_func_reverse(unsigned rgb_func, unsigned alpha_func)
LLVMValueRef
lp_build_blend_func(struct lp_build_context *bld,
unsigned func,
- LLVMValueRef term1,
+ LLVMValueRef term1,
LLVMValueRef term2)
{
switch (func) {
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/src/gallium/drivers/llvmpipe/lp_bld_depth.c
index 1bf7411..6d75ab9 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_depth.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.c
@@ -38,7 +38,7 @@
*
* We are free to use a different pixel layout though. Since our basic
* processing unit is a quad (2x2 pixel block) we store the depth/stencil
- * values tiled, a quad at time. That is, a depth buffer containing
+ * values tiled, a quad at time. That is, a depth buffer containing
*
* Z11 Z12 Z13 Z14 ...
* Z21 Z22 Z23 Z24 ...
@@ -342,7 +342,7 @@ get_z_shift_and_mask(const struct util_format_description *format_desc,
unsigned z_swizzle;
unsigned chan;
unsigned padding_left, padding_right;
-
+
assert(format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS);
assert(format_desc->block.width == 1);
assert(format_desc->block.height == 1);
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.h b/src/gallium/drivers/llvmpipe/lp_bld_depth.h
index 038b136..ff191af 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_depth.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.h
@@ -38,7 +38,7 @@
#include "gallivm/lp_bld.h"
-
+
struct pipe_depth_state;
struct util_format_description;
struct lp_type;
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.c b/src/gallium/drivers/llvmpipe/lp_bld_interp.c
index 45ddf54..7db72df 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_interp.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
diff --git a/src/gallium/drivers/llvmpipe/lp_clear.c b/src/gallium/drivers/llvmpipe/lp_clear.c
index b486b24..bc0bc59 100644
--- a/src/gallium/drivers/llvmpipe/lp_clear.c
+++ b/src/gallium/drivers/llvmpipe/lp_clear.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2009 VMware, Inc. All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
@@ -44,7 +44,7 @@
* No masking, no scissor (clear entire buffer).
*/
void
-llvmpipe_clear(struct pipe_context *pipe,
+llvmpipe_clear(struct pipe_context *pipe,
unsigned buffers,
const float *rgba,
double depth,
diff --git a/src/gallium/drivers/llvmpipe/lp_clear.h b/src/gallium/drivers/llvmpipe/lp_clear.h
index 6d4ffcc..24cc872 100644
--- a/src/gallium/drivers/llvmpipe/lp_clear.h
+++ b/src/gallium/drivers/llvmpipe/lp_clear.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index 2de20d6..bc02fc8 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2008 VMware, Inc. All rights reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
@@ -205,7 +205,7 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
draw_install_aapoint_stage(llvmpipe->draw, &llvmpipe->pipe);
draw_install_pstipple_stage(llvmpipe->draw, &llvmpipe->pipe);
- /* convert points and lines into triangles:
+ /* convert points and lines into triangles:
* (otherwise, draw points and lines natively)
*/
draw_wide_point_sprites(llvmpipe->draw, FALSE);
diff --git a/src/gallium/drivers/llvmpipe/lp_context.h b/src/gallium/drivers/llvmpipe/lp_context.h
index 503f09d..14d2a77 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.h
+++ b/src/gallium/drivers/llvmpipe/lp_context.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -100,10 +100,10 @@ struct llvmpipe_context {
/** Mapped vertex buffers */
ubyte *mapped_vbuffer[PIPE_MAX_ATTRIBS];
-
+
/** Vertex format */
struct vertex_info vertex_info;
-
+
/** Which vertex shader output slot contains color */
int color_slot[2];
@@ -113,9 +113,9 @@ struct llvmpipe_context {
/** Which vertex shader output slot contains point size */
int psize_slot;
- /**< minimum resolvable depth value, for polygon offset */
+ /**< minimum resolvable depth value, for polygon offset */
double mrd;
-
+
/** The tiling engine */
struct lp_setup_context *setup;
struct lp_setup_variant setup_variant;
diff --git a/src/gallium/drivers/llvmpipe/lp_debug.h b/src/gallium/drivers/llvmpipe/lp_debug.h
index 15dca52..af0a902 100644
--- a/src/gallium/drivers/llvmpipe/lp_debug.h
+++ b/src/gallium/drivers/llvmpipe/lp_debug.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
index 3af5c8d..5ad8f85 100644
--- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
+++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
diff --git a/src/gallium/drivers/llvmpipe/lp_fence.h b/src/gallium/drivers/llvmpipe/lp_fence.h
index 3c59118..7f3a9c9 100644
--- a/src/gallium/drivers/llvmpipe/lp_fence.h
+++ b/src/gallium/drivers/llvmpipe/lp_fence.h
@@ -81,7 +81,7 @@ lp_fence_reference(struct lp_fence **ptr,
if (pipe_reference(&old->reference, &f->reference)) {
lp_fence_destroy(old);
}
-
+
*ptr = f;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c
index 85e3cde..b4c0642 100644
--- a/src/gallium/drivers/llvmpipe/lp_flush.c
+++ b/src/gallium/drivers/llvmpipe/lp_flush.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
diff --git a/src/gallium/drivers/llvmpipe/lp_flush.h b/src/gallium/drivers/llvmpipe/lp_flush.h
index 579d24c..2cd94b7 100644
--- a/src/gallium/drivers/llvmpipe/lp_flush.h
+++ b/src/gallium/drivers/llvmpipe/lp_flush.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef LP_FLUSH_H
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
index a775990..4a47145 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -66,7 +66,7 @@ lp_jit_create_types(struct llvmpipe_context *lp)
elem_types[LP_JIT_TEXTURE_MIN_LOD] =
elem_types[LP_JIT_TEXTURE_MAX_LOD] =
elem_types[LP_JIT_TEXTURE_LOD_BIAS] = LLVMFloatTypeInContext(lc);
- elem_types[LP_JIT_TEXTURE_BORDER_COLOR] =
+ elem_types[LP_JIT_TEXTURE_BORDER_COLOR] =
LLVMArrayType(LLVMFloatTypeInContext(lc), 4);
texture_type = LLVMStructTypeInContext(lc, elem_types,
diff --git a/src/gallium/drivers/llvmpipe/lp_limits.h b/src/gallium/drivers/llvmpipe/lp_limits.h
index 2538164..bd5f2bf 100644
--- a/src/gallium/drivers/llvmpipe/lp_limits.h
+++ b/src/gallium/drivers/llvmpipe/lp_limits.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2010 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
diff --git a/src/gallium/drivers/llvmpipe/lp_memory.c b/src/gallium/drivers/llvmpipe/lp_memory.c
index 0f55d4a..7946497 100644
--- a/src/gallium/drivers/llvmpipe/lp_memory.c
+++ b/src/gallium/drivers/llvmpipe/lp_memory.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2010 VMware, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -9,11 +9,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -21,7 +21,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -39,7 +39,7 @@
PIPE_ALIGN_VAR(16) uint8_t lp_swizzled_cbuf[LP_MAX_THREADS][PIPE_MAX_COLOR_BUFS][TILE_SIZE * TILE_SIZE * 4];
-/* A single dummy tile used in a couple of out-of-memory situations.
+/* A single dummy tile used in a couple of out-of-memory situations.
*/
PIPE_ALIGN_VAR(16) uint8_t lp_dummy_tile[TILE_SIZE * TILE_SIZE * 4];
diff --git a/src/gallium/drivers/llvmpipe/lp_memory.h b/src/gallium/drivers/llvmpipe/lp_memory.h
index f7418f5..b84c90e 100644
--- a/src/gallium/drivers/llvmpipe/lp_memory.h
+++ b/src/gallium/drivers/llvmpipe/lp_memory.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2010 VMware, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -9,11 +9,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -21,7 +21,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/llvmpipe/lp_perf.c b/src/gallium/drivers/llvmpipe/lp_perf.c
index e22532f..2f9573b 100644
--- a/src/gallium/drivers/llvmpipe/lp_perf.c
+++ b/src/gallium/drivers/llvmpipe/lp_perf.c
@@ -51,7 +51,7 @@ lp_print_counters(void)
debug_printf("llvmpipe: nr_triangles: %9u\n", lp_count.nr_tris);
debug_printf("llvmpipe: nr_culled_triangles: %9u\n", lp_count.nr_culled_tris);
- total_64 = (lp_count.nr_empty_64 +
+ total_64 = (lp_count.nr_empty_64 +
lp_count.nr_fully_covered_64 +
lp_count.nr_partially_covered_64);
@@ -70,7 +70,7 @@ lp_print_counters(void)
debug_printf("llvmpipe: nr_partially_covered_64x64: %9u (%3.0f%% of %u)\n", lp_count.nr_partially_covered_64, p3, total_64);
debug_printf("llvmpipe: nr_empty_64x64: %9u (%3.0f%% of %u)\n", lp_count.nr_empty_64, p1, total_64);
- total_16 = (lp_count.nr_empty_16 +
+ total_16 = (lp_count.nr_empty_16 +
lp_count.nr_fully_covered_16 +
lp_count.nr_partially_covered_16);
diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c
index 84c66dd..8152596 100644
--- a/src/gallium/drivers/llvmpipe/lp_query.c
+++ b/src/gallium/drivers/llvmpipe/lp_query.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* Copyright 2010 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors:
@@ -46,7 +46,7 @@ static struct llvmpipe_query *llvmpipe_query( struct pipe_query *p )
}
static struct pipe_query *
-llvmpipe_create_query(struct pipe_context *pipe,
+llvmpipe_create_query(struct pipe_context *pipe,
unsigned type)
{
struct llvmpipe_query *pq;
@@ -82,7 +82,7 @@ llvmpipe_destroy_query(struct pipe_context *pipe, struct pipe_query *q)
static boolean
-llvmpipe_get_query_result(struct pipe_context *pipe,
+llvmpipe_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
boolean wait,
void *vresult)
@@ -100,7 +100,7 @@ llvmpipe_get_query_result(struct pipe_context *pipe,
if (!lp_fence_signalled(pq->fence)) {
if (!lp_fence_issued(pq->fence))
llvmpipe_flush(pipe, 0, NULL, __FUNCTION__);
-
+
if (!wait)
return FALSE;
diff --git a/src/gallium/drivers/llvmpipe/lp_query.h b/src/gallium/drivers/llvmpipe/lp_query.h
index e93842a..c02a6e3 100644
--- a/src/gallium/drivers/llvmpipe/lp_query.h
+++ b/src/gallium/drivers/llvmpipe/lp_query.h
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* Copyright 2010 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors:
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index dafadc1..ef401d2 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -154,7 +154,7 @@ lp_rast_clear_color(struct lp_rasterizer_task *task,
unsigned i;
- LP_DBG(DEBUG_RAST, "%s 0x%x,0x%x,0x%x,0x%x\n", __FUNCTION__,
+ LP_DBG(DEBUG_RAST, "%s 0x%x,0x%x,0x%x,0x%x\n", __FUNCTION__,
clear_color[0],
clear_color[1],
clear_color[2],
@@ -668,7 +668,7 @@ rasterize_bin(struct lp_rasterizer_task *task,
* stores them again unchanged. This typically happens when bins have
* been flushed for some reason in the middle of a frame, or when
* incremental updates are being made to a render target.
- *
+ *
* Try to avoid doing pointless work in this case.
*/
static boolean
@@ -798,7 +798,7 @@ static PIPE_THREAD_ROUTINE( thread_func, init_data )
* - get next scene to rasterize
* - map the framebuffer surfaces
*/
- lp_rast_begin( rast,
+ lp_rast_begin( rast,
lp_scene_dequeue( rast->full_scenes, TRUE ) );
}
@@ -813,7 +813,7 @@ static PIPE_THREAD_ROUTINE( thread_func, init_data )
rasterize_scene(task,
rast->curr_scene);
-
+
/* wait for all threads to finish with this scene */
pipe_barrier_wait( &rast->barrier );
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index a64c152..5fbe06b 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -64,7 +64,7 @@ struct lp_rast_state {
* the fragment shader, such as blend color and alpha ref value.
*/
struct lp_jit_context jit_context;
-
+
/* The shader itself. Probably we also need to pass a pointer to
* the tile color/z/stencil data somehow
*/
@@ -137,7 +137,7 @@ lp_rast_destroy( struct lp_rasterizer * );
unsigned
lp_rast_get_num_threads( struct lp_rasterizer * );
-void
+void
lp_rast_queue_scene( struct lp_rasterizer *rast,
struct lp_scene *scene );
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_debug.c b/src/gallium/drivers/llvmpipe/lp_rast_debug.c
index 64ac616..332cf3d 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_debug.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast_debug.c
@@ -29,7 +29,7 @@ static char get_label( int i )
-static const char *cmd_names[LP_RAST_OP_MAX] =
+static const char *cmd_names[LP_RAST_OP_MAX] =
{
"clear_color",
"clear_zstencil",
@@ -100,7 +100,7 @@ debug_bin( const struct cmd_bin *bin )
int i, j = 0;
debug_printf("bin %d,%d:\n", bin->x, bin->y);
-
+
while (head) {
for (i = 0; i < head->count; i++, j++) {
if (head->cmd[i] == LP_RAST_OP_SET_STATE)
@@ -205,7 +205,7 @@ debug_triangle(int tilex, int tiley,
for (i = 0; i < nr_planes; i++)
if (plane[i].c <= 0)
goto out;
-
+
plot(tile, x, y, val, blend);
count++;
@@ -247,13 +247,13 @@ do_debug_bin( struct tile *tile,
boolean blend = is_blend(tile->state, block, k);
char val = get_label(j);
int count = 0;
-
+
if (print_cmds)
debug_printf("%c: %15s", val, cmd_name(block->cmd[k]));
if (block->cmd[k] == LP_RAST_OP_SET_STATE)
tile->state = block->arg[k].state;
-
+
if (block->cmd[k] == LP_RAST_OP_CLEAR_COLOR ||
block->cmd[k] == LP_RAST_OP_CLEAR_ZSTENCIL)
count = debug_clear_tile(tx, ty, block->arg[k], tile, val);
@@ -276,7 +276,7 @@ do_debug_bin( struct tile *tile,
if (blend)
debug_printf(" blended");
-
+
debug_printf("\n");
}
}
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
index cd686bc..28a408c 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h
@@ -275,36 +275,36 @@ lp_rast_shade_quads_all( struct lp_rasterizer_task *task,
END_JIT_CALL();
}
-void lp_rast_triangle_1( struct lp_rasterizer_task *,
+void lp_rast_triangle_1( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
-void lp_rast_triangle_2( struct lp_rasterizer_task *,
+void lp_rast_triangle_2( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
-void lp_rast_triangle_3( struct lp_rasterizer_task *,
+void lp_rast_triangle_3( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
-void lp_rast_triangle_4( struct lp_rasterizer_task *,
+void lp_rast_triangle_4( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
-void lp_rast_triangle_5( struct lp_rasterizer_task *,
+void lp_rast_triangle_5( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
-void lp_rast_triangle_6( struct lp_rasterizer_task *,
+void lp_rast_triangle_6( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
-void lp_rast_triangle_7( struct lp_rasterizer_task *,
+void lp_rast_triangle_7( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
-void lp_rast_triangle_8( struct lp_rasterizer_task *,
+void lp_rast_triangle_8( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
void lp_rast_triangle_3_4(struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
-void lp_rast_triangle_3_16( struct lp_rasterizer_task *,
+void lp_rast_triangle_3_16( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
-void lp_rast_triangle_4_16( struct lp_rasterizer_task *,
+void lp_rast_triangle_4_16( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
void
lp_rast_set_state(struct lp_rasterizer_task *task,
const union lp_rast_cmd_arg arg);
-
+
void
lp_debug_bin( const struct cmd_bin *bin );
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri.c b/src/gallium/drivers/llvmpipe/lp_rast_tri.c
index 042c315..a608bad 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast_tri.c
@@ -86,7 +86,7 @@ build_mask_linear(int c, int dcdx, int dcdy)
mask |= ((c1 + 0 * dcdx) >> 31) & (1 << 4);
mask |= ((c1 + 1 * dcdx) >> 31) & (1 << 5);
mask |= ((c1 + 2 * dcdx) >> 31) & (1 << 6);
- mask |= ((c1 + 3 * dcdx) >> 31) & (1 << 7);
+ mask |= ((c1 + 3 * dcdx) >> 31) & (1 << 7);
mask |= ((c2 + 0 * dcdx) >> 31) & (1 << 8);
mask |= ((c2 + 1 * dcdx) >> 31) & (1 << 9);
mask |= ((c2 + 2 * dcdx) >> 31) & (1 << 10);
@@ -95,13 +95,13 @@ build_mask_linear(int c, int dcdx, int dcdy)
mask |= ((c3 + 1 * dcdx) >> 31) & (1 << 13);
mask |= ((c3 + 2 * dcdx) >> 31) & (1 << 14);
mask |= ((c3 + 3 * dcdx) >> 31) & (1 << 15);
-
+
return mask;
}
static INLINE void
-build_masks(int c,
+build_masks(int c,
int cdiff,
int dcdx,
int dcdy,
@@ -145,7 +145,7 @@ lp_rast_triangle_3_4(struct lp_rasterizer_task *task,
static INLINE void
-build_masks(int c,
+build_masks(int c,
int cdiff,
int dcdx,
int dcdy,
@@ -273,12 +273,12 @@ lp_rast_triangle_3_16(struct lp_rasterizer_task *task,
__m128i dcdx2;
__m128i dcdx3;
-
+
__m128i span_0; /* 0,dcdx,2dcdx,3dcdx for plane 0 */
__m128i span_1; /* 0,dcdx,2dcdx,3dcdx for plane 1 */
__m128i span_2; /* 0,dcdx,2dcdx,3dcdx for plane 2 */
__m128i unused;
-
+
transpose4_epi32(&p0, &p1, &p2, &zero,
&c, &dcdx, &dcdy, &rej4);
@@ -378,12 +378,12 @@ lp_rast_triangle_3_4(struct lp_rasterizer_task *task,
__m128i dcdx2;
__m128i dcdx3;
-
+
__m128i span_0; /* 0,dcdx,2dcdx,3dcdx for plane 0 */
__m128i span_1; /* 0,dcdx,2dcdx,3dcdx for plane 1 */
__m128i span_2; /* 0,dcdx,2dcdx,3dcdx for plane 2 */
__m128i unused;
-
+
transpose4_epi32(&p0, &p1, &p2, &zero,
&c, &dcdx, &dcdy, &unused);
@@ -405,7 +405,7 @@ lp_rast_triangle_3_4(struct lp_rasterizer_task *task,
__m128i c0_0 = _mm_add_epi32(SCALAR_EPI32(c, 0), span_0);
__m128i c1_0 = _mm_add_epi32(SCALAR_EPI32(c, 1), span_1);
__m128i c2_0 = _mm_add_epi32(SCALAR_EPI32(c, 2), span_2);
-
+
__m128i c_0 = _mm_or_si128(_mm_or_si128(c0_0, c1_0), c2_0);
__m128i c0_1 = _mm_add_epi32(c0_0, SCALAR_EPI32(dcdy, 0));
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h b/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
index 4825d65..10515b9 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast_tri_tmp.h
@@ -50,7 +50,7 @@ TAG(do_block_4)(struct lp_rasterizer_task *task,
int j;
for (j = 0; j < NR_PLANES; j++) {
- mask &= ~build_mask_linear(c[j] - 1,
+ mask &= ~build_mask_linear(c[j] - 1,
-plane[j].dcdx,
plane[j].dcdy);
}
@@ -87,7 +87,7 @@ TAG(do_block_16)(struct lp_rasterizer_task *task,
build_masks(c[j] + cox,
cio - cox,
- dcdx, dcdy,
+ dcdx, dcdy,
&outmask, /* sign bits from c[i][0..15] + cox */
&partmask); /* sign bits from c[i][0..15] + cio */
}
@@ -115,7 +115,7 @@ TAG(do_block_16)(struct lp_rasterizer_task *task,
int ix = (i & 3) * 4;
int iy = (i >> 2) * 4;
int px = x + ix;
- int py = y + iy;
+ int py = y + iy;
int cx[NR_PLANES];
partial_mask &= ~(1 << i);
@@ -123,21 +123,21 @@ TAG(do_block_16)(struct lp_rasterizer_task *task,
LP_COUNT(nr_partially_covered_4);
for (j = 0; j < NR_PLANES; j++)
- cx[j] = (c[j]
+ cx[j] = (c[j]
- plane[j].dcdx * ix
+ plane[j].dcdy * iy);
TAG(do_block_4)(task, tri, plane, px, py, cx);
}
- /* Iterate over fulls:
+ /* Iterate over fulls:
*/
while (inmask) {
int i = ffs(inmask) - 1;
int ix = (i & 3) * 4;
int iy = (i >> 2) * 4;
int px = x + ix;
- int py = y + iy;
+ int py = y + iy;
inmask &= ~(1 << i);
@@ -187,7 +187,7 @@ TAG(lp_rast_triangle)(struct lp_rasterizer_task *task,
build_masks(c[j] + cox,
cio - cox,
- dcdx, dcdy,
+ dcdx, dcdy,
&outmask, /* sign bits from c[i][0..15] + cox */
&partmask); /* sign bits from c[i][0..15] + cio */
}
@@ -232,7 +232,7 @@ TAG(lp_rast_triangle)(struct lp_rasterizer_task *task,
TAG(do_block_16)(task, tri, plane, px, py, cx);
}
- /* Iterate over fulls:
+ /* Iterate over fulls:
*/
while (inmask) {
int i = ffs(inmask) - 1;
@@ -268,7 +268,7 @@ TRI_16(struct lp_rasterizer_task *task,
int y = (mask >> 8);
outmask = 0; /* outside one or more trivial reject planes */
-
+
x += task->x;
y += task->y;
@@ -306,7 +306,7 @@ TRI_16(struct lp_rasterizer_task *task,
int ix = (i & 3) * 4;
int iy = (i >> 2) * 4;
int px = x + ix;
- int py = y + iy;
+ int py = y + iy;
unsigned mask = 0xffff;
partial_mask &= ~(1 << i);
@@ -343,7 +343,7 @@ TRI_4(struct lp_rasterizer_task *task,
unsigned mask = 0xffff;
for (j = 0; j < NR_PLANES; j++) {
- const int cx = (plane[j].c
+ const int cx = (plane[j].c
- plane[j].dcdx * x
+ plane[j].dcdy * y);
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
index 5d0f5f8..001c62a 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -155,7 +155,7 @@ lp_scene_begin_rasterization(struct lp_scene *scene)
struct pipe_surface *zsbuf = scene->fb.zsbuf;
assert(zsbuf->u.tex.first_layer == zsbuf->u.tex.last_layer);
scene->zsbuf.stride = llvmpipe_resource_stride(zsbuf->texture, zsbuf->u.tex.level);
- scene->zsbuf.blocksize =
+ scene->zsbuf.blocksize =
util_format_get_blocksize(zsbuf->texture->format);
scene->zsbuf.map = llvmpipe_resource_map(zsbuf->texture,
@@ -304,7 +304,7 @@ lp_scene_new_data_block( struct lp_scene *scene )
struct data_block *block = MALLOC_STRUCT(data_block);
if (block == NULL)
return NULL;
-
+
scene->scene_size += sizeof *block;
block->used = 0;
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h
index 622c522..571abd4 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.h
+++ b/src/gallium/drivers/llvmpipe/lp_scene.h
@@ -68,7 +68,7 @@ struct lp_rast_state;
typedef void (*lp_rast_cmd_func)( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
-
+
struct cmd_block {
uint8_t cmd[CMD_BLOCK_MAX];
union lp_rast_cmd_arg arg[CMD_BLOCK_MAX];
@@ -99,7 +99,7 @@ struct cmd_bin {
struct cmd_block *head;
struct cmd_block *tail;
};
-
+
/**
* This stores bulk data which is used for all memory allocations
@@ -138,7 +138,7 @@ struct lp_scene {
unsigned stride;
unsigned blocksize;
} zsbuf, cbufs[PIPE_MAX_COLOR_BUFS];
-
+
/** the framebuffer to render the scene into */
struct pipe_framebuffer_state fb;
@@ -246,7 +246,7 @@ lp_scene_alloc_aligned( struct lp_scene *scene, unsigned size,
size + alignment - 1,
block->used, DATA_BLOCK_SIZE,
scene->scene_size, LP_SCENE_MAX_SIZE);
-
+
if (block->used + size + alignment - 1 > DATA_BLOCK_SIZE) {
block = lp_scene_new_data_block( scene );
if (!block)
@@ -315,7 +315,7 @@ lp_scene_bin_command( struct lp_scene *scene,
tail->arg[i] = arg;
tail->count++;
}
-
+
return TRUE;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_scene_queue.c b/src/gallium/drivers/llvmpipe/lp_scene_queue.c
index 975db43..e51f2a8 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene_queue.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene_queue.c
@@ -63,7 +63,7 @@ lp_scene_queue_create(void)
if (queue == NULL)
return NULL;
- queue->ring = util_ringbuffer_create( MAX_SCENE_QUEUE *
+ queue->ring = util_ringbuffer_create( MAX_SCENE_QUEUE *
sizeof( struct scene_packet ) / 4);
if (queue->ring == NULL)
goto fail;
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 9459a3c..7e0bbfe 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.h b/src/gallium/drivers/llvmpipe/lp_screen.h
index 7f69a11..8b65f7a 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.h
+++ b/src/gallium/drivers/llvmpipe/lp_screen.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index 7b7b272..e8e4750 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -80,7 +80,7 @@ lp_setup_get_empty_scene(struct lp_setup_context *setup)
}
lp_scene_begin_binning(setup->scene, &setup->fb);
-
+
}
@@ -208,8 +208,8 @@ begin_binning( struct lp_setup_context *setup )
if (setup->fb.nr_cbufs) {
if (setup->clear.flags & PIPE_CLEAR_COLOR) {
- ok = lp_scene_bin_everywhere( scene,
- LP_RAST_OP_CLEAR_COLOR,
+ ok = lp_scene_bin_everywhere( scene,
+ LP_RAST_OP_CLEAR_COLOR,
setup->clear.color );
if (!ok)
return FALSE;
@@ -249,7 +249,7 @@ begin_binning( struct lp_setup_context *setup )
/* This basically bins and then flushes any outstanding full-screen
- * clears.
+ * clears.
*
* TODO: fast path for fullscreen clears and no triangles.
*/
@@ -277,7 +277,7 @@ set_scene_state( struct lp_setup_context *setup,
if (old_state == new_state)
return TRUE;
-
+
if (LP_DEBUG & DEBUG_SCENE) {
debug_printf("%s old %s new %s%s%s\n",
__FUNCTION__,
@@ -292,7 +292,7 @@ set_scene_state( struct lp_setup_context *setup,
/* wait for a free/empty scene
*/
- if (old_state == SETUP_FLUSHED)
+ if (old_state == SETUP_FLUSHED)
lp_setup_get_empty_scene(setup);
switch (new_state) {
@@ -422,7 +422,7 @@ lp_setup_try_clear( struct lp_setup_context *setup,
* a common usage.
*/
if (flags & PIPE_CLEAR_COLOR) {
- if (!lp_scene_bin_everywhere( scene,
+ if (!lp_scene_bin_everywhere( scene,
LP_RAST_OP_CLEAR_COLOR,
color_arg ))
return FALSE;
@@ -457,7 +457,7 @@ lp_setup_try_clear( struct lp_setup_context *setup,
sizeof setup->clear.color.clear_color);
}
}
-
+
return TRUE;
}
@@ -480,7 +480,7 @@ lp_setup_clear( struct lp_setup_context *setup,
-void
+void
lp_setup_set_triangle_state( struct lp_setup_context *setup,
unsigned cull_mode,
boolean ccw_is_frontface,
@@ -500,7 +500,7 @@ lp_setup_set_triangle_state( struct lp_setup_context *setup,
}
}
-void
+void
lp_setup_set_line_state( struct lp_setup_context *setup,
float line_width)
{
@@ -509,9 +509,9 @@ lp_setup_set_line_state( struct lp_setup_context *setup,
setup->line_width = line_width;
}
-void
+void
lp_setup_set_point_state( struct lp_setup_context *setup,
- float point_size,
+ float point_size,
boolean point_size_per_vertex,
uint sprite_coord_enable,
uint sprite_coord_origin)
@@ -529,7 +529,7 @@ lp_setup_set_setup_variant( struct lp_setup_context *setup,
const struct lp_setup_variant *variant)
{
LP_DBG(DEBUG_SETUP, "%s\n", __FUNCTION__);
-
+
setup->setup.variant = variant;
}
@@ -614,7 +614,7 @@ lp_setup_set_scissor( struct lp_setup_context *setup,
}
-void
+void
lp_setup_set_flatshade_first( struct lp_setup_context *setup,
boolean flatshade_first )
{
@@ -622,7 +622,7 @@ lp_setup_set_flatshade_first( struct lp_setup_context *setup,
}
-void
+void
lp_setup_set_vertex_info( struct lp_setup_context *setup,
struct vertex_info *vertex_info )
{
@@ -850,7 +850,7 @@ try_update_scene_state( struct lp_setup_context *setup )
{
struct lp_rast_state *stored;
uint i;
-
+
/* The fs state that's been stored in the scene is different from
* the new, current state. So allocate a new lp_rast_state object
* and append it to the bin's setup data buffer.
@@ -865,7 +865,7 @@ try_update_scene_state( struct lp_setup_context *setup )
&setup->fs.current,
sizeof setup->fs.current);
setup->fs.stored = stored;
-
+
/* The scene now references the textures in the rasterization
* state record. Note that now.
*/
@@ -889,7 +889,7 @@ try_update_scene_state( struct lp_setup_context *setup )
&setup->draw_region);
}
}
-
+
setup->dirty = 0;
assert(setup->fs.stored);
@@ -918,14 +918,14 @@ lp_setup_update_state( struct lp_setup_context *setup,
assert(setup->setup.variant);
- /* Will probably need to move this somewhere else, just need
+ /* Will probably need to move this somewhere else, just need
* to know about vertex shader point size attribute.
*/
setup->psize = lp->psize_slot;
assert(lp->dirty == 0);
- assert(lp->setup_variant.key.size ==
+ assert(lp->setup_variant.key.size ==
setup->setup.variant->key.size);
assert(memcmp(&lp->setup_variant.key,
@@ -971,7 +971,7 @@ lp_setup_update_state( struct lp_setup_context *setup,
/* Only caller is lp_setup_vbuf_destroy()
*/
-void
+void
lp_setup_destroy( struct lp_setup_context *setup )
{
uint i;
@@ -1019,7 +1019,7 @@ lp_setup_create( struct pipe_context *pipe,
return NULL;
lp_setup_init_vbuf(setup);
-
+
/* Used only in update_state():
*/
setup->pipe = pipe;
@@ -1041,7 +1041,7 @@ lp_setup_create( struct pipe_context *pipe,
setup->triangle = first_triangle;
setup->line = first_line;
setup->point = first_point;
-
+
setup->dirty = ~0;
return setup;
@@ -1066,7 +1066,7 @@ lp_setup_begin_query(struct lp_setup_context *setup,
assert(setup->active_query == NULL);
set_scene_state(setup, SETUP_ACTIVE, "begin_query");
-
+
if (setup->scene) {
if (!lp_scene_bin_everywhere(setup->scene,
LP_RAST_OP_BEGIN_QUERY,
@@ -1132,7 +1132,7 @@ lp_setup_flush_and_restart(struct lp_setup_context *setup)
if (!set_scene_state(setup, SETUP_FLUSHED, __FUNCTION__))
return FALSE;
-
+
if (!lp_setup_update_state(setup, TRUE))
return FALSE;
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.h b/src/gallium/drivers/llvmpipe/lp_setup.h
index 0d6e161..543ee0b 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.h
+++ b/src/gallium/drivers/llvmpipe/lp_setup.h
@@ -73,20 +73,20 @@ void
lp_setup_bind_framebuffer( struct lp_setup_context *setup,
const struct pipe_framebuffer_state *fb );
-void
+void
lp_setup_set_triangle_state( struct lp_setup_context *setup,
unsigned cullmode,
boolean front_is_ccw,
boolean scissor,
boolean gl_rasterization_rules );
-void
+void
lp_setup_set_line_state( struct lp_setup_context *setup,
float line_width);
-void
+void
lp_setup_set_point_state( struct lp_setup_context *setup,
- float point_size,
+ float point_size,
boolean point_size_per_vertex,
uint sprite_coord_enable,
uint sprite_coord_origin);
@@ -135,11 +135,11 @@ lp_setup_is_resource_referenced( const struct lp_setup_context *setup,
const struct pipe_resource *texture );
void
-lp_setup_set_flatshade_first( struct lp_setup_context *setup,
+lp_setup_set_flatshade_first( struct lp_setup_context *setup,
boolean flatshade_first );
void
-lp_setup_set_vertex_info( struct lp_setup_context *setup,
+lp_setup_set_vertex_info( struct lp_setup_context *setup,
struct vertex_info *info );
void
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h
index dc2533b..422e2f1 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_context.h
+++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h
@@ -119,7 +119,7 @@ struct lp_setup_context
SETUP_CLEARED, /**< scene exists but has only clears */
SETUP_ACTIVE /**< scene exists and has at least one draw/query */
} state;
-
+
struct {
const struct lp_rast_state *stored; /**< what's in the scene */
struct lp_rast_state current; /**< currently set state */
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c
index 29c2317..feacf58 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_line.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c
@@ -79,16 +79,16 @@ static void linear_coef( struct lp_setup_context *setup,
unsigned vert_attr,
unsigned i)
{
- float a1 = info->v1[vert_attr][i];
+ float a1 = info->v1[vert_attr][i];
float a2 = info->v2[vert_attr][i];
-
- float da21 = a1 - a2;
+
+ float da21 = a1 - a2;
float dadx = da21 * info->dx * info->oneoverarea;
float dady = da21 * info->dy * info->oneoverarea;
info->dadx[slot][i] = dadx;
- info->dady[slot][i] = dady;
-
+ info->dady[slot][i] = dady;
+
info->a0[slot][i] = (a1 -
(dadx * (info->v1[0][0] - setup->pixel_offset) +
dady * (info->v1[0][1] - setup->pixel_offset)));
@@ -114,13 +114,13 @@ static void perspective_coef( struct lp_setup_context *setup,
float a1 = info->v1[vert_attr][i] * info->v1[0][3];
float a2 = info->v2[vert_attr][i] * info->v2[0][3];
- float da21 = a1 - a2;
+ float da21 = a1 - a2;
float dadx = da21 * info->dx * info->oneoverarea;
float dady = da21 * info->dy * info->oneoverarea;
info->dadx[slot][i] = dadx;
info->dady[slot][i] = dady;
-
+
info->a0[slot][i] = (a1 -
(dadx * (info->v1[0][0] - setup->pixel_offset) +
dady * (info->v1[0][1] - setup->pixel_offset)));
@@ -173,7 +173,7 @@ static void setup_line_coefficients( struct lp_setup_context *setup,
unsigned vert_attr = key->inputs[slot].src_index;
unsigned usage_mask = key->inputs[slot].usage_mask;
unsigned i;
-
+
switch (key->inputs[slot].interp) {
case LP_INTERP_CONSTANT:
if (key->flatshade_first) {
@@ -259,8 +259,8 @@ print_line(struct lp_setup_context *setup,
static INLINE boolean sign(float x){
- return x >= 0;
-}
+ return x >= 0;
+}
/* Used on positive floats only:
@@ -285,11 +285,11 @@ try_setup_line( struct lp_setup_context *setup,
float width = MAX2(1.0, setup->line_width);
struct u_rect bbox;
unsigned tri_bytes;
- int x[4];
+ int x[4];
int y[4];
int i;
int nr_planes = 4;
-
+
/* linewidth should be interpreted as integer */
int fixed_width = util_iround(width) * FIXED_ONE;
@@ -297,7 +297,7 @@ try_setup_line( struct lp_setup_context *setup,
float y_offset=0;
float x_offset_end=0;
float y_offset_end=0;
-
+
float x1diff;
float y1diff;
float x2diff;
@@ -335,7 +335,7 @@ try_setup_line( struct lp_setup_context *setup,
info.v1 = v1;
info.v2 = v2;
-
+
/* X-MAJOR LINE */
if (fabsf(dx) >= fabsf(dy)) {
float dydx = dy / dx;
@@ -348,10 +348,10 @@ try_setup_line( struct lp_setup_context *setup,
if (y2diff==-0.5 && dy<0){
y2diff = 0.5;
}
-
- /*
- * Diamond exit rule test for starting point
- */
+
+ /*
+ * Diamond exit rule test for starting point
+ */
if (fabsf(x1diff) + fabsf(y1diff) < 0.5) {
draw_start = TRUE;
}
@@ -368,9 +368,9 @@ try_setup_line( struct lp_setup_context *setup,
}
- /*
- * Diamond exit rule test for ending point
- */
+ /*
+ * Diamond exit rule test for ending point
+ */
if (fabsf(x2diff) + fabsf(y2diff) < 0.5) {
draw_end = FALSE;
}
@@ -421,23 +421,23 @@ try_setup_line( struct lp_setup_context *setup,
y_offset_end = x_offset_end * dydx;
}
}
-
+
/* x/y positions in fixed point */
x[0] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset);
x[1] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset);
x[2] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset);
x[3] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset);
-
+
y[0] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset) - fixed_width/2;
y[1] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset) - fixed_width/2;
y[2] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset) + fixed_width/2;
y[3] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset) + fixed_width/2;
-
+
}
else {
const float dxdy = dx / dy;
- /* Y-MAJOR LINE */
+ /* Y-MAJOR LINE */
x1diff = v1[0][0] - (float) floor(v1[0][0]) - 0.5;
y1diff = v1[0][1] - (float) floor(v1[0][1]) - 0.5;
x2diff = v2[0][0] - (float) floor(v2[0][0]) - 0.5;
@@ -447,9 +447,9 @@ try_setup_line( struct lp_setup_context *setup,
x2diff = 0.5;
}
- /*
- * Diamond exit rule test for starting point
- */
+ /*
+ * Diamond exit rule test for starting point
+ */
if (fabsf(x1diff) + fabsf(y1diff) < 0.5) {
draw_start = TRUE;
}
@@ -465,9 +465,9 @@ try_setup_line( struct lp_setup_context *setup,
draw_start = (xintersect < 1.0 && xintersect > 0.0);
}
- /*
- * Diamond exit rule test for ending point
- */
+ /*
+ * Diamond exit rule test for ending point
+ */
if (fabsf(x2diff) + fabsf(y2diff) < 0.5) {
draw_end = FALSE;
}
@@ -492,7 +492,7 @@ try_setup_line( struct lp_setup_context *setup,
/* if v2 is on top of v1, swap pointers */
const float (*temp)[4] = v1;
v1 = v2;
- v2 = temp;
+ v2 = temp;
dx = -dx;
dy = -dy;
@@ -511,7 +511,7 @@ try_setup_line( struct lp_setup_context *setup,
if (will_draw_start != draw_start) {
y_offset = - y1diff - 0.5;
x_offset = y_offset * dxdy;
-
+
}
if (will_draw_end != draw_end) {
y_offset_end = - y2diff - 0.5;
@@ -524,8 +524,8 @@ try_setup_line( struct lp_setup_context *setup,
x[1] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset) - fixed_width/2;
x[2] = subpixel_snap(v2[0][0] + x_offset_end - setup->pixel_offset) + fixed_width/2;
x[3] = subpixel_snap(v1[0][0] + x_offset - setup->pixel_offset) + fixed_width/2;
-
- y[0] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset);
+
+ y[0] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset);
y[1] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset);
y[2] = subpixel_snap(v2[0][1] + y_offset_end - setup->pixel_offset);
y[3] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset);
@@ -535,7 +535,7 @@ try_setup_line( struct lp_setup_context *setup,
LP_COUNT(nr_tris);
-
+
/* Bounding rectangle (in pixels) */
{
/* Yes this is necessary to accurately calculate bounding boxes
@@ -583,7 +583,7 @@ try_setup_line( struct lp_setup_context *setup,
#ifdef DEBUG
line->v[0][0] = v1[0][0];
- line->v[1][0] = v2[0][0];
+ line->v[1][0] = v2[0][0];
line->v[0][1] = v1[0][1];
line->v[1][1] = v2[0][1];
#endif
@@ -606,7 +606,7 @@ try_setup_line( struct lp_setup_context *setup,
info.a0 = GET_A0(&line->inputs);
info.dadx = GET_DADX(&line->inputs);
info.dady = GET_DADY(&line->inputs);
- setup_line_coefficients(setup, &info);
+ setup_line_coefficients(setup, &info);
line->inputs.frontfacing = TRUE;
line->inputs.disable = FALSE;
@@ -619,8 +619,8 @@ try_setup_line( struct lp_setup_context *setup,
*/
plane[i].c = plane[i].dcdx * x[i] - plane[i].dcdy * y[i];
-
- /* correct for top-left vs. bottom-left fill convention.
+
+ /* correct for top-left vs. bottom-left fill convention.
*
* note that we're overloading gl_rasterization_rules to mean
* both (0.5,0.5) pixel centers *and* bottom-left filling
@@ -632,10 +632,10 @@ try_setup_line( struct lp_setup_context *setup,
* Also, sometimes (in FBO cases) GL will render upside down
* to its usual method, in which case it will probably want
* to use the opposite, top-left convention.
- */
+ */
if (plane[i].dcdx < 0) {
/* both fill conventions want this - adjust for left edges */
- plane[i].c++;
+ plane[i].c++;
}
else if (plane[i].dcdx == 0) {
if (setup->pixel_offset == 0) {
@@ -664,7 +664,7 @@ try_setup_line( struct lp_setup_context *setup,
}
- /*
+ /*
* When rasterizing scissored tris, use the intersection of the
* triangle bounding box and the scissor rect to generate the
* scissor planes.
@@ -677,7 +677,7 @@ try_setup_line( struct lp_setup_context *setup,
* It's not really clear if it's worth worrying about these tails,
* but since we generate the planes for each scissored tri, it's
* free to trim them in this case.
- *
+ *
* Note that otherwise, the scissor planes only vary in 'C' value,
* and even then only on state-changes. Could alternatively store
* these planes elsewhere.
@@ -725,8 +725,8 @@ static void lp_setup_line( struct lp_setup_context *setup,
}
-void lp_setup_choose_line( struct lp_setup_context *setup )
-{
+void lp_setup_choose_line( struct lp_setup_context *setup )
+{
setup->line = lp_setup_line;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c
index 146f1bd..9f0f080 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_point.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c
@@ -50,7 +50,7 @@ struct point_info {
float (*a0)[4];
float (*dadx)[4];
float (*dady)[4];
-};
+};
/**
@@ -202,7 +202,7 @@ setup_point_fragcoord_coef(struct lp_setup_context *setup,
/**
* Compute the point->coef[] array dadx, dady, a0 values.
*/
-static void
+static void
setup_point_coefficients( struct lp_setup_context *setup,
struct point_info *info)
{
@@ -223,7 +223,7 @@ setup_point_coefficients( struct lp_setup_context *setup,
if (perspective & usage_mask) {
fragcoord_usage_mask |= TGSI_WRITEMASK_W;
}
-
+
switch (interp) {
case LP_INTERP_POSITION:
/*
@@ -308,8 +308,8 @@ try_setup_point( struct lp_setup_context *setup,
const float size
= (setup->point_size_per_vertex && sizeAttr > 0) ? v0[sizeAttr][0]
: setup->point_size;
-
- /* Point size as fixed point integer, remove rounding errors
+
+ /* Point size as fixed point integer, remove rounding errors
* and gives minimum width for very small points
*/
int fixed_width = MAX2(FIXED_ONE,
@@ -317,7 +317,7 @@ try_setup_point( struct lp_setup_context *setup,
const int x0 = subpixel_snap(v0[0][0] - setup->pixel_offset) - fixed_width/2;
const int y0 = subpixel_snap(v0[0][1] - setup->pixel_offset) - fixed_width/2;
-
+
struct lp_scene *scene = setup->scene;
struct lp_rast_triangle *point;
unsigned bytes;
@@ -345,7 +345,7 @@ try_setup_point( struct lp_setup_context *setup,
bbox.x1--;
bbox.y1--;
}
-
+
if (!u_rect_test_intersection(&setup->draw_region, &bbox)) {
if (0) debug_printf("offscreen\n");
LP_COUNT(nr_culled_tris);
@@ -374,7 +374,7 @@ try_setup_point( struct lp_setup_context *setup,
info.a0 = GET_A0(&point->inputs);
info.dadx = GET_DADX(&point->inputs);
info.dady = GET_DADY(&point->inputs);
-
+
/* Setup parameter interpolants:
*/
setup_point_coefficients(setup, &info);
@@ -411,7 +411,7 @@ try_setup_point( struct lp_setup_context *setup,
}
-static void
+static void
lp_setup_point(struct lp_setup_context *setup,
const float (*v0)[4])
{
@@ -426,7 +426,7 @@ lp_setup_point(struct lp_setup_context *setup,
}
-void
+void
lp_setup_choose_point( struct lp_setup_context *setup )
{
setup->point = lp_setup_point;
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index bfb6bf2..6d387c6 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -44,7 +44,7 @@
#if defined(PIPE_ARCH_SSE)
#include
#endif
-
+
static INLINE int
subpixel_snap(float a)
{
@@ -116,7 +116,7 @@ lp_setup_print_vertex(struct lp_setup_context *setup,
const float *in = v[key->inputs[i].src_index];
debug_printf(" in[%d] (%s[%d]) %s%s%s%s ",
- i,
+ i,
name, key->inputs[i].src_index,
(key->inputs[i].usage_mask & 0x1) ? "x" : " ",
(key->inputs[i].usage_mask & 0x2) ? "y" : " ",
@@ -151,7 +151,7 @@ lp_setup_print_triangle(struct lp_setup_context *setup,
/* det = cross(e,f).z */
const float det = ex * fy - ey * fx;
- if (det < 0.0f)
+ if (det < 0.0f)
debug_printf(" - ccw\n");
else if (det > 0.0f)
debug_printf(" - cw\n");
@@ -212,7 +212,7 @@ lp_setup_whole_tile(struct lp_setup_context *setup,
} else {
LP_COUNT(nr_shade_64);
return lp_scene_bin_cmd_with_state( scene, tx, ty,
- setup->fs.stored,
+ setup->fs.stored,
LP_RAST_OP_SHADE_TILE,
lp_rast_arg_inputs(inputs) );
}
@@ -260,7 +260,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
y[1] = subpixel_snap(v1[0][1] - setup->pixel_offset);
y[2] = subpixel_snap(v2[0][1] - setup->pixel_offset);
y[3] = 0;
-
+
/* Bounding rectangle (in pixels) */
{
@@ -414,14 +414,14 @@ do_triangle_ccw(struct lp_setup_context *setup,
plane[0].dcdx = y[0] - y[1];
plane[1].dcdx = y[1] - y[2];
plane[2].dcdx = y[2] - y[0];
-
+
for (i = 0; i < 3; i++) {
/* half-edge constants, will be interated over the whole render
* target.
*/
plane[i].c = plane[i].dcdx * x[i] - plane[i].dcdy * y[i];
- /* correct for top-left vs. bottom-left fill convention.
+ /* correct for top-left vs. bottom-left fill convention.
*
* note that we're overloading gl_rasterization_rules to mean
* both (0.5,0.5) pixel centers *and* bottom-left filling
@@ -433,10 +433,10 @@ do_triangle_ccw(struct lp_setup_context *setup,
* Also, sometimes (in FBO cases) GL will render upside down
* to its usual method, in which case it will probably want
* to use the opposite, top-left convention.
- */
+ */
if (plane[i].dcdx < 0) {
/* both fill conventions want this - adjust for left edges */
- plane[i].c++;
+ plane[i].c++;
}
else if (plane[i].dcdx == 0) {
if (setup->pixel_offset == 0) {
@@ -472,13 +472,13 @@ do_triangle_ccw(struct lp_setup_context *setup,
plane[0].dcdx,
plane[0].dcdy,
plane[0].eo);
-
+
debug_printf("p1: %08x/%08x/%08x/%08x\n",
plane[1].c,
plane[1].dcdx,
plane[1].dcdy,
plane[1].eo);
-
+
debug_printf("p0: %08x/%08x/%08x/%08x\n",
plane[2].c,
plane[2].dcdx,
@@ -487,7 +487,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
}
- /*
+ /*
* When rasterizing scissored tris, use the intersection of the
* triangle bounding box and the scissor rect to generate the
* scissor planes.
@@ -500,7 +500,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
* It's not really clear if it's worth worrying about these tails,
* but since we generate the planes for each scissored tri, it's
* free to trim them in this case.
- *
+ *
* Note that otherwise, the scissor planes only vary in 'C' value,
* and even then only on state-changes. Could alternatively store
* these planes elsewhere.
@@ -537,7 +537,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
*
* Undefined if no bit set exists, so code should check against 0 first.
*/
-static INLINE uint32_t
+static INLINE uint32_t
floor_pot(uint32_t n)
{
#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
@@ -566,7 +566,7 @@ lp_setup_bin_triangle( struct lp_setup_context *setup,
int nr_planes )
{
struct lp_scene *scene = setup->scene;
- struct u_rect trimmed_box = *bbox;
+ struct u_rect trimmed_box = *bbox;
int i;
/* What is the largest power-of-two boundary this triangle crosses:
@@ -621,7 +621,7 @@ lp_setup_bin_triangle( struct lp_setup_context *setup,
lp_rast_arg_triangle(tri, mask) );
}
}
- else if (nr_planes == 4 && sz < 16)
+ else if (nr_planes == 4 && sz < 16)
{
return lp_scene_bin_cmd_with_state(scene, ix0, iy0,
setup->fs.stored,
@@ -633,7 +633,7 @@ lp_setup_bin_triangle( struct lp_setup_context *setup,
/* Triangle is contained in a single tile:
*/
return lp_scene_bin_cmd_with_state( scene, ix0, iy0, setup->fs.stored,
- lp_rast_tri_tab[nr_planes],
+ lp_rast_tri_tab[nr_planes],
lp_rast_arg_triangle(tri, (1<fs.stored,
- lp_rast_tri_tab[count],
+ lp_rast_tri_tab[count],
lp_rast_arg_triangle(tri, partial) ))
goto fail;
@@ -727,7 +727,7 @@ lp_setup_bin_triangle( struct lp_setup_context *setup,
for (i = 0; i < nr_planes; i++)
cx[i] += xstep[i];
}
-
+
/* Iterate c values down the region:
*/
for (i = 0; i < nr_planes; i++)
@@ -789,7 +789,7 @@ static void triangle_cw( struct lp_setup_context *setup,
{
float area = calc_area(v0, v1, v2);
- if (area < 0.0f)
+ if (area < 0.0f)
retry_triangle_ccw(setup, v0, v2, v1, !setup->ccw_is_frontface);
}
@@ -801,7 +801,7 @@ static void triangle_ccw( struct lp_setup_context *setup,
{
float area = calc_area(v0, v1, v2);
- if (area > 0.0f)
+ if (area > 0.0f)
retry_triangle_ccw(setup, v0, v1, v2, setup->ccw_is_frontface);
}
@@ -825,7 +825,7 @@ static void triangle_both( struct lp_setup_context *setup,
assert(!util_is_inf_or_nan(area));
}
- if (area > 0.0f)
+ if (area > 0.0f)
retry_triangle_ccw( setup, v0, v1, v2, setup->ccw_is_frontface );
else if (area < 0.0f)
retry_triangle_ccw( setup, v0, v2, v1, !setup->ccw_is_frontface );
@@ -840,7 +840,7 @@ static void triangle_nop( struct lp_setup_context *setup,
}
-void
+void
lp_setup_choose_triangle( struct lp_setup_context *setup )
{
switch (setup->cullmode) {
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c
index 384242f..c76f179 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c
@@ -45,7 +45,7 @@
#define LP_MAX_VBUF_INDEXES 1024
#define LP_MAX_VBUF_SIZE 4096
-
+
/** cast wrapper */
static struct lp_setup_context *
@@ -85,7 +85,7 @@ lp_setup_allocate_vertices(struct vbuf_render *vbr,
setup->vertex_size = vertex_size;
setup->nr_vertices = nr_vertices;
-
+
return setup->vertex_buffer != NULL;
}
@@ -102,8 +102,8 @@ lp_setup_map_vertices(struct vbuf_render *vbr)
return setup->vertex_buffer;
}
-static void
-lp_setup_unmap_vertices(struct vbuf_render *vbr,
+static void
+lp_setup_unmap_vertices(struct vbuf_render *vbr,
ushort min_index,
ushort max_index )
{
@@ -237,7 +237,7 @@ lp_setup_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr)
case PIPE_PRIM_QUADS:
/* GL quads don't follow provoking vertex convention */
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit last quad vertex as first triangle vertex */
for (i = 3; i < nr; i += 4) {
setup->triangle( setup,
@@ -269,7 +269,7 @@ lp_setup_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr)
case PIPE_PRIM_QUAD_STRIP:
/* GL quad strips don't follow provoking vertex convention */
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit last quad vertex as first triangle vertex */
for (i = 3; i < nr; i += 2) {
setup->triangle( setup,
@@ -301,7 +301,7 @@ lp_setup_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr)
/* Almost same as tri fan but the _first_ vertex specifies the flat
* shading color.
*/
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit first polygon vertex as first triangle vertex */
for (i = 2; i < nr; i += 1) {
setup->triangle( setup,
@@ -434,7 +434,7 @@ lp_setup_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
case PIPE_PRIM_QUADS:
/* GL quads don't follow provoking vertex convention */
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit last quad vertex as first triangle vertex */
for (i = 3; i < nr; i += 4) {
setup->triangle( setup,
@@ -464,7 +464,7 @@ lp_setup_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
case PIPE_PRIM_QUAD_STRIP:
/* GL quad strips don't follow provoking vertex convention */
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit last quad vertex as first triangle vertex */
for (i = 3; i < nr; i += 2) {
setup->triangle( setup,
@@ -496,7 +496,7 @@ lp_setup_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
/* Almost same as tri fan but the _first_ vertex specifies the flat
* shading color.
*/
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit first polygon vertex as first triangle vertex */
for (i = 2; i < nr; i += 1) {
setup->triangle( setup,
diff --git a/src/gallium/drivers/llvmpipe/lp_state.h b/src/gallium/drivers/llvmpipe/lp_state.h
index 7893e9c..a624c91 100644
--- a/src/gallium/drivers/llvmpipe/lp_state.h
+++ b/src/gallium/drivers/llvmpipe/lp_state.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -97,7 +97,7 @@ llvmpipe_set_framebuffer_state(struct pipe_context *,
void
llvmpipe_update_fs(struct llvmpipe_context *lp);
-void
+void
llvmpipe_update_setup(struct llvmpipe_context *lp);
void
diff --git a/src/gallium/drivers/llvmpipe/lp_state_blend.c b/src/gallium/drivers/llvmpipe/lp_state_blend.c
index 6bba907..23615ca 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_blend.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_blend.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
diff --git a/src/gallium/drivers/llvmpipe/lp_state_clip.c b/src/gallium/drivers/llvmpipe/lp_state_clip.c
index 32ae079..9325572 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_clip.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_clip.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c
index 8725ea3..d9ef154 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_derived.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_math.h"
@@ -138,7 +138,7 @@ void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe )
llvmpipe->tex_timestamp = lp_screen->timestamp;
llvmpipe->dirty |= LP_NEW_SAMPLER_VIEW;
}
-
+
if (llvmpipe->dirty & (LP_NEW_RASTERIZER |
LP_NEW_FS |
LP_NEW_VS))
@@ -166,14 +166,14 @@ void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe )
lp_setup_set_scissor(llvmpipe->setup, &llvmpipe->scissor);
if (llvmpipe->dirty & LP_NEW_DEPTH_STENCIL_ALPHA) {
- lp_setup_set_alpha_ref_value(llvmpipe->setup,
+ lp_setup_set_alpha_ref_value(llvmpipe->setup,
llvmpipe->depth_stencil->alpha.ref_value);
lp_setup_set_stencil_ref_values(llvmpipe->setup,
llvmpipe->stencil_ref.ref_value);
}
if (llvmpipe->dirty & LP_NEW_CONSTANTS)
- lp_setup_set_fs_constants(llvmpipe->setup,
+ lp_setup_set_fs_constants(llvmpipe->setup,
llvmpipe->constants[PIPE_SHADER_FRAGMENT][0]);
if (llvmpipe->dirty & (LP_NEW_SAMPLER_VIEW))
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 2c4943a..3ce119a 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -107,7 +107,7 @@ static unsigned fs_no = 0;
/**
- * Expand the relevent bits of mask_input to a 4-dword mask for the
+ * Expand the relevent bits of mask_input to a 4-dword mask for the
* four pixels in a 2x2 quad. This will set the four elements of the
* quad mask vector to 0 or ~0.
*
@@ -171,7 +171,7 @@ generate_quad_mask(struct gallivm_state *gallivm,
bits[1] = LLVMConstInt(i32t, 1 << 1, 0);
bits[2] = LLVMConstInt(i32t, 1 << 4, 0);
bits[3] = LLVMConstInt(i32t, 1 << 5, 0);
-
+
mask = LLVMBuildAnd(builder, mask, LLVMConstVector(bits, 4), "");
/*
@@ -332,7 +332,7 @@ generate_fs(struct gallivm_state *gallivm,
}
lp_build_interp_soa_update_inputs(interp, gallivm, i);
-
+
/* Build the actual shader */
lp_build_tgsi_soa(gallivm, tokens, type, &mask,
consts_ptr, interp->pos, interp->inputs,
@@ -358,11 +358,11 @@ generate_fs(struct gallivm_state *gallivm,
}
/* Late Z test */
- if (depth_mode & LATE_DEPTH_TEST) {
+ if (depth_mode & LATE_DEPTH_TEST) {
int pos0 = find_output_by_semantic(&shader->info.base,
TGSI_SEMANTIC_POSITION,
0);
-
+
if (pos0 != -1 && outputs[pos0][2]) {
z = LLVMBuildLoad(builder, outputs[pos0][2], "output.z");
}
@@ -578,7 +578,7 @@ generate_fragment(struct llvmpipe_context *lp,
blend_type.width = 8; /* 8-bit ubyte values */
blend_type.length = 16; /* 16 elements per vector */
- /*
+ /*
* Generate the function prototype. Any change here must be reflected in
* lp_jit.h's lp_jit_frag_func function pointer type, and vice-versa.
*/
@@ -588,7 +588,7 @@ generate_fragment(struct llvmpipe_context *lp,
blend_vec_type = lp_build_vec_type(gallivm, blend_type);
- util_snprintf(func_name, sizeof(func_name), "fs%u_variant%u_%s",
+ util_snprintf(func_name, sizeof(func_name), "fs%u_variant%u_%s",
shader->no, variant->no, partial_mask ? "partial" : "whole");
arg_types[0] = lp_jit_get_context_type(lp); /* context */
@@ -658,7 +658,7 @@ generate_fragment(struct llvmpipe_context *lp,
* shader key, but everything it derives from (TGSI, and flatshade) is
* already included in the shader key.
*/
- lp_build_interp_soa_init(&interp,
+ lp_build_interp_soa_init(&interp,
gallivm,
shader->info.base.num_inputs,
inputs,
@@ -712,12 +712,12 @@ generate_fragment(struct llvmpipe_context *lp,
LLVMValueRef blend_in_color[NUM_CHANNELS];
unsigned rt;
- /*
- * Convert the fs's output color and mask to fit to the blending type.
+ /*
+ * Convert the fs's output color and mask to fit to the blending type.
*/
for(chan = 0; chan < NUM_CHANNELS; ++chan) {
LLVMValueRef fs_color_vals[LP_MAX_VECTOR_LENGTH];
-
+
for (i = 0; i < num_fs; i++) {
fs_color_vals[i] =
LLVMBuildLoad(builder, fs_out_color[cbuf][chan][i], "fs_color_vals");
@@ -739,7 +739,7 @@ generate_fragment(struct llvmpipe_context *lp,
blend_mask = lp_build_const_int_vec(lp->gallivm, blend_type, ~0);
}
- color_ptr = LLVMBuildLoad(builder,
+ color_ptr = LLVMBuildLoad(builder,
LLVMBuildGEP(builder, color_ptr_ptr, &index, 1, ""),
"");
lp_build_name(color_ptr, "color_ptr%d", cbuf);
@@ -895,7 +895,7 @@ dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key)
void
lp_debug_fs_variant(const struct lp_fragment_shader_variant *variant)
{
- debug_printf("llvmpipe: Fragment shader #%u variant #%u:\n",
+ debug_printf("llvmpipe: Fragment shader #%u variant #%u:\n",
variant->shader->no, variant->no);
tgsi_dump(variant->shader->base.tokens, 0);
dump_fs_variant_key(&variant->key);
@@ -1311,7 +1311,7 @@ make_variant_key(struct llvmpipe_context *lp,
* Update fragment shader state. This is called just prior to drawing
* something when some fragment-related state has changed.
*/
-void
+void
llvmpipe_update_fs(struct llvmpipe_context *lp)
{
struct lp_fragment_shader *shader = lp->fs;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_gs.c b/src/gallium/drivers/llvmpipe/lp_state_gs.c
index 1ba6f10..9bc765a 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_gs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_gs.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "lp_context.h"
diff --git a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
index 574f9e9..6bc08a0 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "pipe/p_defines.h"
@@ -68,7 +68,7 @@ llvmpipe_create_rasterizer_state(struct pipe_context *pipe,
/* We rely on draw module to do unfilled polyons, AA lines and
* points and stipple.
- *
+ *
* Over time, reduce this list of conditions, and expand the list
* of flags which get cleared in clear_flags().
*/
@@ -124,7 +124,7 @@ llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle)
}
else {
llvmpipe->rasterizer = NULL;
- draw_set_rasterizer_state(llvmpipe->draw, NULL, handle);
+ draw_set_rasterizer_state(llvmpipe->draw, NULL, handle);
}
llvmpipe->dirty |= LP_NEW_RASTERIZER;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
index 1dd8661..8c98686 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors:
diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c
index ad751b9..5e57cde 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c
@@ -145,23 +145,23 @@ store_coef(struct gallivm_state *gallivm,
{
LLVMBuilderRef builder = gallivm->builder;
LLVMValueRef idx = lp_build_const_int32(gallivm, slot);
-
+
LLVMBuildStore(builder,
- a0,
+ a0,
LLVMBuildGEP(builder, args->a0, &idx, 1, ""));
LLVMBuildStore(builder,
- dadx,
+ dadx,
LLVMBuildGEP(builder, args->dadx, &idx, 1, ""));
LLVMBuildStore(builder,
- dady,
+ dady,
LLVMBuildGEP(builder, args->dady, &idx, 1, ""));
}
-static void
+static void
emit_constant_coef4(struct gallivm_state *gallivm,
struct lp_setup_args *args,
unsigned slot,
@@ -178,7 +178,7 @@ emit_constant_coef4(struct gallivm_state *gallivm,
* Setup the fragment input attribute with the front-facing value.
* \param frontface is the triangle front facing?
*/
-static void
+static void
emit_facing_coef(struct gallivm_state *gallivm,
struct lp_setup_args *args,
unsigned slot )
@@ -237,7 +237,7 @@ lp_twoside(struct gallivm_state *gallivm,
LLVMValueRef facing = args->facing;
LLVMValueRef front_facing = LLVMBuildICmp(b, LLVMIntEQ, facing, lp_build_const_int32(gallivm, 0), ""); /** need i1 for if condition */
-
+
a0_back = LLVMBuildLoad(b, LLVMBuildGEP(b, args->v0, &idx2, 1, ""), "v0a_back");
a1_back = LLVMBuildLoad(b, LLVMBuildGEP(b, args->v1, &idx2, 1, ""), "v1a_back");
a2_back = LLVMBuildLoad(b, LLVMBuildGEP(b, args->v2, &idx2, 1, ""), "v2a_back");
@@ -264,7 +264,7 @@ lp_do_offset_tri(struct gallivm_state *gallivm,
LLVMValueRef z0_new, z1_new, z2_new;
LLVMValueRef dzdx0, dzdx, dzdy0, dzdy;
LLVMValueRef max, max_value;
-
+
LLVMValueRef one = lp_build_const_float(gallivm, 1.0);
LLVMValueRef zero = lp_build_const_float(gallivm, 0.0);
LLVMValueRef two = lp_build_const_int32(gallivm, 2);
@@ -279,21 +279,21 @@ lp_do_offset_tri(struct gallivm_state *gallivm,
LLVMValueRef v0_z = vert_attrib(gallivm, args->v0, 0, 2, "v0_z");
LLVMValueRef v1_z = vert_attrib(gallivm, args->v1, 0, 2, "v1_z");
LLVMValueRef v2_z = vert_attrib(gallivm, args->v2, 0, 2, "v2_z");
-
+
/* edge vectors: e = v0 - v2, f = v1 - v2 */
LLVMValueRef dx02 = LLVMBuildFSub(b, v0_x, v2_x, "dx02");
LLVMValueRef dy02 = LLVMBuildFSub(b, v0_y, v2_y, "dy02");
LLVMValueRef dz02 = LLVMBuildFSub(b, v0_z, v2_z, "dz02");
- LLVMValueRef dx12 = LLVMBuildFSub(b, v1_x, v2_x, "dx12");
+ LLVMValueRef dx12 = LLVMBuildFSub(b, v1_x, v2_x, "dx12");
LLVMValueRef dy12 = LLVMBuildFSub(b, v1_y, v2_y, "dy12");
LLVMValueRef dz12 = LLVMBuildFSub(b, v1_z, v2_z, "dz12");
-
+
/* det = cross(e,f).z */
LLVMValueRef dx02_dy12 = LLVMBuildFMul(b, dx02, dy12, "dx02_dy12");
LLVMValueRef dy02_dx12 = LLVMBuildFMul(b, dy02, dx12, "dy02_dx12");
LLVMValueRef det = LLVMBuildFSub(b, dx02_dy12, dy02_dx12, "det");
- LLVMValueRef inv_det = LLVMBuildFDiv(b, one, det, "inv_det");
-
+ LLVMValueRef inv_det = LLVMBuildFDiv(b, one, det, "inv_det");
+
/* (res1,res2) = cross(e,f).xy */
LLVMValueRef dy02_dz12 = LLVMBuildFMul(b, dy02, dz12, "dy02_dz12");
LLVMValueRef dz02_dy12 = LLVMBuildFMul(b, dz02, dy12, "dz02_dy12");
@@ -311,7 +311,7 @@ lp_do_offset_tri(struct gallivm_state *gallivm,
/* zoffset = offset->units + MAX2(dzdx, dzdy) * offset->scale */
max = LLVMBuildFCmp(b, LLVMRealUGT, dzdx, dzdy, "");
- max_value = LLVMBuildSelect(b, max, dzdx, dzdy, "max");
+ max_value = LLVMBuildSelect(b, max, dzdx, dzdy, "max");
mult = LLVMBuildFMul(b, max_value, lp_build_const_float(gallivm, key->scale), "");
zoffset = LLVMBuildFAdd(b, lp_build_const_float(gallivm, key->units), mult, "zoffset");
@@ -322,7 +322,7 @@ lp_do_offset_tri(struct gallivm_state *gallivm,
z2_new = vert_clamp(b, LLVMBuildFAdd(b, v2_z, zoffset, ""), zero, one);
/* insert into args->a0.z, a1.z, a2.z:
- */
+ */
args->v0a = LLVMBuildInsertElement(b, args->v0a, z0_new, two, "");
args->v1a = LLVMBuildInsertElement(b, args->v1a, z1_new, two, "");
args->v2a = LLVMBuildInsertElement(b, args->v2a, z2_new, two, "");
@@ -358,7 +358,7 @@ load_attribute(struct gallivm_state *gallivm,
}
}
-static void
+static void
emit_coef4( struct gallivm_state *gallivm,
struct lp_setup_args *args,
unsigned slot,
@@ -393,23 +393,23 @@ emit_coef4( struct gallivm_state *gallivm,
/* Calculate a0 - the attribute value at the origin
*/
- LLVMValueRef dadx_x0 = LLVMBuildFMul(b, dadx, x0_center, "dadx_x0");
- LLVMValueRef dady_y0 = LLVMBuildFMul(b, dady, y0_center, "dady_y0");
- LLVMValueRef attr_v0 = LLVMBuildFAdd(b, dadx_x0, dady_y0, "attr_v0");
- LLVMValueRef attr_0 = LLVMBuildFSub(b, a0, attr_v0, "attr_0");
+ LLVMValueRef dadx_x0 = LLVMBuildFMul(b, dadx, x0_center, "dadx_x0");
+ LLVMValueRef dady_y0 = LLVMBuildFMul(b, dady, y0_center, "dady_y0");
+ LLVMValueRef attr_v0 = LLVMBuildFAdd(b, dadx_x0, dady_y0, "attr_v0");
+ LLVMValueRef attr_0 = LLVMBuildFSub(b, a0, attr_v0, "attr_0");
store_coef(gallivm, args, slot, attr_0, dadx, dady);
}
-static void
+static void
emit_linear_coef( struct gallivm_state *gallivm,
struct lp_setup_args *args,
unsigned slot)
{
/* nothing to do anymore */
emit_coef4(gallivm,
- args, slot,
+ args, slot,
args->v0a,
args->v1a,
args->v2a);
@@ -424,7 +424,7 @@ emit_linear_coef( struct gallivm_state *gallivm,
* Later, when we compute the value at a particular fragment position we'll
* divide the interpolated value by the interpolated W at that fragment.
*/
-static void
+static void
emit_perspective_coef( struct gallivm_state *gallivm,
struct lp_setup_args *args,
unsigned slot)
@@ -459,7 +459,7 @@ emit_position_coef( struct gallivm_state *gallivm,
/**
* Compute the inputs-> dadx, dady, a0 values.
*/
-static void
+static void
emit_tri_coef( struct gallivm_state *gallivm,
const struct lp_setup_variant_key *key,
struct lp_setup_args *args )
@@ -608,7 +608,7 @@ init_args(struct gallivm_state *gallivm,
LLVMValueRef x0_center = LLVMBuildFSub(b, v0_x, pixel_center, "x0_center" );
LLVMValueRef y0_center = LLVMBuildFSub(b, v0_y, pixel_center, "y0_center" );
-
+
LLVMValueRef dx01 = LLVMBuildFSub(b, v0_x, v1_x, "dx01");
LLVMValueRef dy01 = LLVMBuildFSub(b, v0_y, v1_y, "dy01");
LLVMValueRef dx20 = LLVMBuildFSub(b, v2_x, v0_x, "dx20");
@@ -737,7 +737,7 @@ generate_setup_variant(struct gallivm_state *gallivm,
LP_COUNT_ADD(llvm_compile_time, t1 - t0);
LP_COUNT_ADD(nr_llvm_compiles, 1);
}
-
+
return variant;
fail:
@@ -750,7 +750,7 @@ generate_setup_variant(struct gallivm_state *gallivm,
}
FREE(variant);
}
-
+
return NULL;
}
@@ -764,7 +764,7 @@ lp_make_setup_variant_key(struct llvmpipe_context *lp,
unsigned i;
assert(sizeof key->inputs[0] == sizeof(ushort));
-
+
key->num_inputs = fs->info.base.num_inputs;
key->flatshade_first = lp->rasterizer->flatshade_first;
key->pixel_center_half = lp->rasterizer->gl_rasterization_rules;
@@ -842,7 +842,7 @@ cull_setup_variants(struct llvmpipe_context *lp)
* prior to drawing something when some fragment-related state has
* changed.
*/
-void
+void
llvmpipe_update_setup(struct llvmpipe_context *lp)
{
struct lp_setup_variant_key *key = &lp->setup_variant.key;
diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.h b/src/gallium/drivers/llvmpipe/lp_state_setup.h
index 90c55ca..61232c0 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_setup.h
+++ b/src/gallium/drivers/llvmpipe/lp_state_setup.h
@@ -14,7 +14,7 @@ struct lp_setup_variant_list_item
};
-struct lp_setup_variant_key {
+struct lp_setup_variant_key {
unsigned size:16;
unsigned num_inputs:8;
unsigned color_slot:8;
@@ -28,7 +28,7 @@ struct lp_setup_variant_key {
unsigned pad:5;
float units;
- float scale;
+ float scale;
struct lp_shader_input inputs[PIPE_MAX_SHADER_INPUTS];
};
@@ -52,7 +52,7 @@ typedef void (*lp_jit_setup_triangle)( const float (*v0)[4],
*/
struct lp_setup_variant {
struct lp_setup_variant_key key;
-
+
struct lp_setup_variant_list_item list_item_global;
/* XXX: this is a pointer to the LLVM IR. Once jit_function is
diff --git a/src/gallium/drivers/llvmpipe/lp_state_surface.c b/src/gallium/drivers/llvmpipe/lp_state_surface.c
index 375ceb2..c4bd229 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_surface.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_surface.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/llvmpipe/lp_state_vertex.c b/src/gallium/drivers/llvmpipe/lp_state_vertex.c
index fb29423..ad22989 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_vertex.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_vertex.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/llvmpipe/lp_state_vs.c b/src/gallium/drivers/llvmpipe/lp_state_vs.c
index f2d8808..b1b563f 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_vs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_vs.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -46,7 +46,7 @@ llvmpipe_create_vs_state(struct pipe_context *pipe,
struct lp_vertex_shader *state;
state = CALLOC_STRUCT(lp_vertex_shader);
- if (state == NULL )
+ if (state == NULL )
goto fail;
/* copy shader tokens, the ones passed in will go away.
@@ -56,7 +56,7 @@ llvmpipe_create_vs_state(struct pipe_context *pipe,
goto fail;
state->draw_data = draw_create_vertex_shader(llvmpipe->draw, templ);
- if (state->draw_data == NULL)
+ if (state->draw_data == NULL)
goto fail;
if (LP_DEBUG & DEBUG_TGSI) {
@@ -85,7 +85,7 @@ llvmpipe_bind_vs_state(struct pipe_context *pipe, void *_vs)
if (llvmpipe->vs == vs)
return;
- draw_bind_vertex_shader(llvmpipe->draw,
+ draw_bind_vertex_shader(llvmpipe->draw,
vs ? vs->draw_data : NULL);
llvmpipe->vs = vs;
diff --git a/src/gallium/drivers/llvmpipe/lp_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c
index e7e46a6..33a2a11 100644
--- a/src/gallium/drivers/llvmpipe/lp_surface.c
+++ b/src/gallium/drivers/llvmpipe/lp_surface.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_rect.h"
@@ -85,7 +85,7 @@ lp_resource_copy(struct pipe_context *pipe,
/*
printf("surface copy from %u lvl %u to %u lvl %u: %u,%u,%u to %u,%u,%u %u x %u x %u\n",
- src_tex->id, src_level, dst_tex->id, dst_level,
+ src_tex->id, src_level, dst_tex->id, dst_level,
src_box->x, src_box->y, src_box->z, dstx, dsty, dstz,
src_box->width, src_box->height, src_box->depth);
*/
diff --git a/src/gallium/drivers/llvmpipe/lp_surface.h b/src/gallium/drivers/llvmpipe/lp_surface.h
index b1b896e..c428c96 100644
--- a/src/gallium/drivers/llvmpipe/lp_surface.h
+++ b/src/gallium/drivers/llvmpipe/lp_surface.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c
index b3ca134..0417f30 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_blend.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c
@@ -824,7 +824,7 @@ test_some(struct gallivm_state *gallivm, unsigned verbose, FILE *fp,
alpha_func = &blend_funcs[rand() % num_funcs];
rgb_src_factor = &blend_factors[rand() % num_factors];
alpha_src_factor = &blend_factors[rand() % num_factors];
-
+
do {
rgb_dst_factor = &blend_factors[rand() % num_factors];
} while(*rgb_dst_factor == PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE);
diff --git a/src/gallium/drivers/llvmpipe/lp_test_conv.c b/src/gallium/drivers/llvmpipe/lp_test_conv.c
index f4a2f36..834c1e9 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_conv.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_conv.c
@@ -407,7 +407,7 @@ test_some(struct gallivm_state *gallivm, unsigned verbose, FILE *fp,
for(i = 0; i < n; ++i) {
src_type = &conv_types[rand() % num_types];
-
+
do {
dst_type = &conv_types[rand() % num_types];
} while (src_type == dst_type || src_type->norm != dst_type->norm);
diff --git a/src/gallium/drivers/llvmpipe/lp_test_main.c b/src/gallium/drivers/llvmpipe/lp_test_main.c
index 149ee6f..e0de60b 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_main.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_main.c
@@ -405,7 +405,7 @@ int main(int argc, char **argv)
write_tsv_header(fp);
}
-
+
if (single)
success = test_single(gallivm, verbose, fp);
else if (n)
diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample.c b/src/gallium/drivers/llvmpipe/lp_tex_sample.c
index ed42829..c622d42 100644
--- a/src/gallium/drivers/llvmpipe/lp_tex_sample.c
+++ b/src/gallium/drivers/llvmpipe/lp_tex_sample.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* All rights reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -186,7 +186,7 @@ lp_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base,
struct lp_llvm_sampler_soa *sampler = (struct lp_llvm_sampler_soa *)base;
assert(unit < PIPE_MAX_SAMPLERS);
-
+
if (LP_PERF & PERF_NO_TEX) {
lp_build_sample_nop(gallivm, type, texel);
return;
diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample.h b/src/gallium/drivers/llvmpipe/lp_tex_sample.h
index 1228a83..e2217cb 100644
--- a/src/gallium/drivers/llvmpipe/lp_tex_sample.h
+++ b/src/gallium/drivers/llvmpipe/lp_tex_sample.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef LP_TEX_SAMPLE_H
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c
index 9753da5..b446886 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
* Authors:
@@ -537,7 +537,7 @@ llvmpipe_create_surface(struct pipe_context *pipe,
}
-static void
+static void
llvmpipe_surface_destroy(struct pipe_context *pipe,
struct pipe_surface *surf)
{
@@ -607,7 +607,7 @@ llvmpipe_get_transfer(struct pipe_context *pipe,
}
-static void
+static void
llvmpipe_transfer_destroy(struct pipe_context *pipe,
struct pipe_transfer *transfer)
{
@@ -1269,7 +1269,7 @@ llvmpipe_unswizzle_cbuf_tile(struct llvmpipe_resource *lpr,
uint ii = x, jj = y;
uint tile_offset = jj / TILE_SIZE + ii / TILE_SIZE;
uint byte_offset = tile_offset * TILE_SIZE * TILE_SIZE * 4;
-
+
/* Note that lp_tiled_to_linear expects the tile parameter to
* point at the first tile in a whole-image sized array. In
* this code, we have only a single tile and have to do some
@@ -1402,7 +1402,7 @@ llvmpipe_init_context_resource_funcs(struct pipe_context *pipe)
pipe->transfer_map = llvmpipe_transfer_map;
pipe->transfer_unmap = llvmpipe_transfer_unmap;
pipe->is_resource_referenced = llvmpipe_is_resource_referenced;
-
+
pipe->transfer_flush_region = u_default_transfer_flush_region;
pipe->transfer_inline_write = u_default_transfer_inline_write;
diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h
index b789c0f..d914661 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.h
+++ b/src/gallium/drivers/llvmpipe/lp_texture.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef LP_TEXTURE_H
diff --git a/src/gallium/drivers/llvmpipe/lp_tile_image.c b/src/gallium/drivers/llvmpipe/lp_tile_image.c
index 0938f7a..777b0fb 100644
--- a/src/gallium/drivers/llvmpipe/lp_tile_image.c
+++ b/src/gallium/drivers/llvmpipe/lp_tile_image.c
@@ -1,7 +1,7 @@
/**************************************************************************
- *
+ *
* Copyright 2010 VMware, Inc. All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -9,11 +9,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -21,7 +21,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/llvmpipe/lp_tile_image.h b/src/gallium/drivers/llvmpipe/lp_tile_image.h
index 8de8efc..987b0ce 100644
--- a/src/gallium/drivers/llvmpipe/lp_tile_image.h
+++ b/src/gallium/drivers/llvmpipe/lp_tile_image.h
@@ -1,7 +1,7 @@
/**************************************************************************
- *
+ *
* Copyright 2010 VMware, Inc. All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -9,11 +9,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -21,7 +21,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/llvmpipe/lp_tile_soa.h b/src/gallium/drivers/llvmpipe/lp_tile_soa.h
index 12dac1d..f6c1fce 100644
--- a/src/gallium/drivers/llvmpipe/lp_tile_soa.h
+++ b/src/gallium/drivers/llvmpipe/lp_tile_soa.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef LP_TILE_SOA_H
diff --git a/src/gallium/drivers/llvmpipe/sse_mathfun.h b/src/gallium/drivers/llvmpipe/sse_mathfun.h
index 0077f34..e8c5faf 100644
--- a/src/gallium/drivers/llvmpipe/sse_mathfun.h
+++ b/src/gallium/drivers/llvmpipe/sse_mathfun.h
@@ -35,7 +35,7 @@
#ifdef _MSC_VER /* visual c++ */
# define ALIGN16_BEG __declspec(align(16))
-# define ALIGN16_END
+# define ALIGN16_END
#else /* gcc or icc */
# define ALIGN16_BEG
# define ALIGN16_END __attribute__((aligned(16)))
@@ -112,7 +112,7 @@ typedef union xmm_mm_union {
#endif // USE_SSE2
-/* natural logarithm computed for 4 simultaneous float
+/* natural logarithm computed for 4 simultaneous float
return NaN for x <= 0
*/
v4sf log_ps(v4sf x) {
@@ -153,7 +153,7 @@ v4sf log_ps(v4sf x) {
e = _mm_add_ps(e, one);
- /* part2:
+ /* part2:
if( x < SQRTHF ) {
e -= 1;
x = x + x - 1.0;
@@ -189,7 +189,7 @@ v4sf log_ps(v4sf x) {
y = _mm_mul_ps(y, x);
y = _mm_mul_ps(y, z);
-
+
tmp = _mm_mul_ps(e, *(v4sf*)_ps_cephes_log_q1);
y = _mm_add_ps(y, tmp);
@@ -227,7 +227,7 @@ v4sf exp_ps(v4sf x) {
v2si mm0, mm1;
#endif
v4sf one = *(v4sf*)_ps_1;
- v4sf mask, z, y, pow2n;
+ v4sf mask, z, y, pow2n;
x = _mm_min_ps(x, *(v4sf*)_ps_exp_hi);
x = _mm_max_ps(x, *(v4sf*)_ps_exp_lo);
@@ -249,7 +249,7 @@ v4sf exp_ps(v4sf x) {
tmp = _mm_cvtepi32_ps(emm0);
#endif
/* if greater, substract 1 */
- mask = _mm_cmpgt_ps(tmp, fx);
+ mask = _mm_cmpgt_ps(tmp, fx);
mask = _mm_and_ps(mask, one);
fx = _mm_sub_ps(tmp, mask);
@@ -259,7 +259,7 @@ v4sf exp_ps(v4sf x) {
x = _mm_sub_ps(x, z);
z = _mm_mul_ps(x,x);
-
+
y = *(v4sf*)_ps_cephes_exp_p0;
y = _mm_mul_ps(y, x);
y = _mm_add_ps(y, *(v4sf*)_ps_cephes_exp_p1);
@@ -282,9 +282,9 @@ v4sf exp_ps(v4sf x) {
mm1 = _mm_cvttps_pi32(z);
mm0 = _mm_add_pi32(mm0, *(v2si*)_pi32_0x7f);
mm1 = _mm_add_pi32(mm1, *(v2si*)_pi32_0x7f);
- mm0 = _mm_slli_pi32(mm0, 23);
+ mm0 = _mm_slli_pi32(mm0, 23);
mm1 = _mm_slli_pi32(mm1, 23);
-
+
COPY_MM_TO_XMM(mm0, mm1, pow2n);
_mm_empty();
#else
@@ -352,11 +352,11 @@ v4sf sin_ps(v4sf x) { // any x
x = _mm_and_ps(x, *(v4sf*)_ps_inv_sign_mask);
/* extract the sign bit (upper one) */
sign_bit = _mm_and_ps(sign_bit, *(v4sf*)_ps_sign_mask);
-
+
/* scale by 4/Pi */
y = _mm_mul_ps(x, *(v4sf*)_ps_cephes_FOPI);
- //printf("plop:"); print4(y);
+ //printf("plop:"); print4(y);
#ifdef USE_SSE2
/* store the integer part of y in mm0 */
emm2 = _mm_cvttps_epi32(y);
@@ -367,7 +367,7 @@ v4sf sin_ps(v4sf x) { // any x
/* get the swap sign flag */
emm0 = _mm_and_si128(emm2, *(v4si*)_pi32_4);
emm0 = _mm_slli_epi32(emm0, 29);
- /* get the polynom selection mask
+ /* get the polynom selection mask
there is one polynom for 0 <= x <= Pi/4
and another one for Pi/4dt = winsys->displaytarget_create(winsys, nresource->base.bind,
nresource->base.format,
- nresource->base.width0,
+ nresource->base.width0,
nresource->base.height0,
16, &stride);
}
diff --git a/src/gallium/drivers/nouveau/Makefile b/src/gallium/drivers/nouveau/Makefile
index db591b7..c9608b4 100644
--- a/src/gallium/drivers/nouveau/Makefile
+++ b/src/gallium/drivers/nouveau/Makefile
@@ -6,6 +6,6 @@ LIBNAME = nouveau
LIBRARY_INCLUDES = \
-I$(TOP)/src/gallium/drivers/nouveau/include
-C_SOURCES = nouveau_screen.c
+C_SOURCES = nouveau_screen.c
include ../../Makefile.template
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index a9426df..a395cc5 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -178,7 +178,7 @@ nouveau_screen_bo_from_handle(struct pipe_screen *pscreen,
struct nouveau_device *dev = nouveau_screen(pscreen)->device;
struct nouveau_bo *bo = 0;
int ret;
-
+
ret = nouveau_bo_handle_ref(dev, whandle->handle, &bo);
if (ret) {
debug_printf("%s: ref name 0x%08x failed with %d\n",
@@ -199,7 +199,7 @@ nouveau_screen_bo_get_handle(struct pipe_screen *pscreen,
{
whandle->stride = stride;
- if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
+ if (whandle->type == DRM_API_HANDLE_TYPE_SHARED) {
return nouveau_bo_handle_get(bo, &whandle->handle) == 0;
} else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
whandle->handle = bo->handle;
diff --git a/src/gallium/drivers/nv50/nv50_buffer.c b/src/gallium/drivers/nv50/nv50_buffer.c
index 45356f9..8896bd6 100644
--- a/src/gallium/drivers/nv50/nv50_buffer.c
+++ b/src/gallium/drivers/nv50/nv50_buffer.c
@@ -38,7 +38,7 @@ nv50_buffer_transfer_map( struct pipe_context *pipe,
nouveau_screen_transfer_flags(transfer->usage) );
if (map == NULL)
return NULL;
-
+
return map + transfer->box.x;
}
@@ -141,7 +141,7 @@ nv50_user_buffer_create(struct pipe_screen *pscreen,
buffer->bo = nouveau_screen_bo_user(pscreen, ptr, bytes);
if (!buffer->bo)
goto fail;
-
+
return &buffer->base;
fail:
diff --git a/src/gallium/drivers/nv50/nv50_pc.h b/src/gallium/drivers/nv50/nv50_pc.h
index 2ead804..cb20a99 100644
--- a/src/gallium/drivers/nv50/nv50_pc.h
+++ b/src/gallium/drivers/nv50/nv50_pc.h
@@ -208,7 +208,7 @@ struct nv_range {
};
struct nv_value {
- struct nv_reg reg;
+ struct nv_reg reg;
struct nv_instruction *insn;
struct nv_value *join;
int n;
diff --git a/src/gallium/drivers/nv50/nv50_pc_emit.c b/src/gallium/drivers/nv50/nv50_pc_emit.c
index f37dc51..461dd28 100644
--- a/src/gallium/drivers/nv50/nv50_pc_emit.c
+++ b/src/gallium/drivers/nv50/nv50_pc_emit.c
@@ -676,7 +676,7 @@ emit_minmax(struct nv_pc *pc, struct nv_instruction *i)
pc->emit[1] |= 0x84000000;
break;
}
-
+
emit_form_MAD(pc, i);
if (i->src[0]->mod & NV_MOD_ABS) pc->emit[1] |= 0x00100000;
diff --git a/src/gallium/drivers/nv50/nv50_pc_regalloc.c b/src/gallium/drivers/nv50/nv50_pc_regalloc.c
index 39ae366..132a53f 100644
--- a/src/gallium/drivers/nv50/nv50_pc_regalloc.c
+++ b/src/gallium/drivers/nv50/nv50_pc_regalloc.c
@@ -327,9 +327,9 @@ do_join_values(struct nv_pc_pass *ctx, struct nv_value *a, struct nv_value *b)
#ifdef NV50_RA_DEBUG_JOIN
debug_printf("joining %i to %i\n", b->n, a->n);
#endif
-
+
/* make a->join the new representative */
- for (j = 0; j < ctx->pc->num_values; ++j)
+ for (j = 0; j < ctx->pc->num_values; ++j)
if (ctx->pc->values[j].join == bjoin)
ctx->pc->values[j].join = a->join;
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index db68176..8ebd239 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -455,7 +455,7 @@ nv50_fragprog_prepare(struct nv50_translation_info *ti)
if (sn[i] == TGSI_SEMANTIC_COLOR)
p->vp.bfc[si[i]] = j;
-
+
p->in[j].linear = (ti->interp_mode[i] & NV50_INTERP_LINEAR) ? 1 : 0;
p->in[j].id = i;
p->in[j].sn = sn[i];
diff --git a/src/gallium/drivers/nv50/nv50_resource.h b/src/gallium/drivers/nv50/nv50_resource.h
index 4b2a75e..e937a61 100644
--- a/src/gallium/drivers/nv50/nv50_resource.h
+++ b/src/gallium/drivers/nv50/nv50_resource.h
@@ -45,7 +45,7 @@ nv50_miptree(struct pipe_resource *pt)
}
-static INLINE
+static INLINE
struct nv50_resource *nv50_resource(struct pipe_resource *resource)
{
return (struct nv50_resource *)resource;
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
index ce48022..4dde927 100644
--- a/src/gallium/drivers/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nv50/nv50_surface.c
@@ -115,7 +115,7 @@ nv50_surface_set(struct nv50_screen *screen, struct pipe_surface *ps, int dst)
OUT_RELOCh(chan, bo, ((struct nv50_surface *)ps)->offset, flags);
OUT_RELOCl(chan, bo, ((struct nv50_surface *)ps)->offset, flags);
}
-
+
#if 0
if (dst) {
BEGIN_RING(chan, eng2d, NV50_2D_CLIP_X, 4);
@@ -125,7 +125,7 @@ nv50_surface_set(struct nv50_screen *screen, struct pipe_surface *ps, int dst)
OUT_RING (chan, surf->height);
}
#endif
-
+
return 0;
}
diff --git a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
index ce9300a..d18e7d3 100644
--- a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
+++ b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
@@ -527,7 +527,7 @@ bld_insn_1(struct bld_context *bld, uint opcode, struct nv_value *src0)
struct nv_instruction *insn = new_instruction(bld->pc, opcode);
nv_reference(bld->pc, &insn->src[0], src0);
-
+
return bld_def(insn, 0, new_value(bld->pc, NV_FILE_GPR, src0->reg.as_type));
}
@@ -1159,7 +1159,7 @@ emit_fetch(struct bld_context *bld, const struct tgsi_full_instruction *insn,
default:
NOUVEAU_ERR("illegal/unhandled src reg file: %d\n", src->Register.File);
abort();
- break;
+ break;
}
if (!res)
return bld_undef(bld, NV_FILE_GPR);
@@ -1549,7 +1549,7 @@ bld_instruction(struct bld_context *bld,
#ifdef NV50_TGSI2NC_DEBUG
debug_printf("bld_instruction:"); tgsi_dump_instruction(insn, 1);
#endif
-
+
switch (insn->Instruction.Opcode) {
case TGSI_OPCODE_ADD:
case TGSI_OPCODE_MAX:
@@ -1804,7 +1804,7 @@ bld_instruction(struct bld_context *bld,
FOR_EACH_DST0_ENABLED_CHANNEL(c, insn) {
src0 = emit_fetch(bld, insn, 0, c);
dst0[c] = bld_insn_1(bld, opcode, src0);
- }
+ }
break;
case TGSI_OPCODE_LIT:
bld_lit(bld, dst0, insn);
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
index d41a59d..4c1b253 100644
--- a/src/gallium/drivers/nv50/nv50_vbo.c
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
@@ -340,7 +340,7 @@ nv50_draw_elements_instanced(struct pipe_context *pipe,
if (indexSize == 4) {
BEGIN_RING(chan, tesla, NV50TCL_VB_ELEMENT_U32 | 0x30000, 0);
OUT_RING (chan, count);
- nouveau_pushbuf_submit(chan,
+ nouveau_pushbuf_submit(chan,
nv50_resource(indexBuffer)->bo,
start << 2, count << 2);
} else
diff --git a/src/gallium/drivers/r300/SConscript b/src/gallium/drivers/r300/SConscript
index b49db93..a45293e 100644
--- a/src/gallium/drivers/r300/SConscript
+++ b/src/gallium/drivers/r300/SConscript
@@ -5,9 +5,9 @@ r300compiler = SConscript('#/src/mesa/drivers/dri/r300/compiler/SConscript')
env = env.Clone()
# add the paths for r300compiler
env.Append(CPPPATH = [
- '#/src/mesa/drivers/dri/r300/compiler',
+ '#/src/mesa/drivers/dri/r300/compiler',
'#/src/gallium/winsys/drm/radeon/core',
- '#/include',
+ '#/include',
'#/src/mesa',
])
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 972f58f..16d4de2 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -665,7 +665,7 @@ void r300_emit_query_end(struct r300_context* r300)
rv530_emit_query_end_double_z(r300, query);
else
rv530_emit_query_end_single_z(r300, query);
- } else
+ } else
r300_emit_query_end_frag_pipes(r300, query);
query->begin_emitted = FALSE;
@@ -1128,7 +1128,7 @@ void r300_emit_hiz_clear(struct r300_context *r300, unsigned size, void *state)
/* convert from pixels to 4x4 blocks */
stride = ALIGN_DIVUP(stride, 4);
- stride = ALIGN_DIVUP(stride, r300screen->caps.num_frag_pipes);
+ stride = ALIGN_DIVUP(stride, r300screen->caps.num_frag_pipes);
/* there are 4 blocks per dwords */
stride = ALIGN_DIVUP(stride, 4);
diff --git a/src/gallium/drivers/r300/r300_hyperz.c b/src/gallium/drivers/r300/r300_hyperz.c
index c22e307..c088fb6 100644
--- a/src/gallium/drivers/r300/r300_hyperz.c
+++ b/src/gallium/drivers/r300/r300_hyperz.c
@@ -31,7 +31,7 @@
#include "util/u_mm.h"
/*
- HiZ rules - taken from various docs
+ HiZ rules - taken from various docs
1. HiZ only works on depth values
2. Cannot HiZ if stencil fail or zfail is !KEEP
3. on R300/400, HiZ is disabled if depth test is EQUAL
@@ -127,7 +127,7 @@ static boolean r300_can_hiz(struct r300_context *r300)
z->current_func, dsa_state->z_stencil_control);
return FALSE;
}
- }
+ }
return TRUE;
}
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
index 0d52da9..655ec2a 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.c
+++ b/src/gallium/drivers/r300/r300_screen_buffer.c
@@ -298,7 +298,7 @@ static void r300_buffer_transfer_inline_write(struct pipe_context *pipe,
r300_buffer_transfer_destroy(pipe, transfer);
}
-struct u_resource_vtbl r300_buffer_vtbl =
+struct u_resource_vtbl r300_buffer_vtbl =
{
u_default_resource_get_handle, /* get_handle */
r300_buffer_destroy, /* resource_destroy */
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index f902db5..e348049 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -754,7 +754,7 @@ static void
r300->validate_buffers = TRUE;
r300->z_compression = false;
-
+
if (state->zsbuf) {
blocksize = util_format_get_blocksize(state->zsbuf->texture->format);
switch (blocksize) {
@@ -775,7 +775,7 @@ static void
/* work out whether we can support hiz on this buffer */
r300_hiz_alloc_block(r300, zs_surf);
-
+
/* work out whether we can support zmask features on this buffer */
r300_zmask_alloc_block(r300, zs_surf, compress);
@@ -997,7 +997,7 @@ static void* r300_create_rs_state(struct pipe_context* pipe,
}
/* Front face */
- if (state->front_ccw)
+ if (state->front_ccw)
cull_mode = R300_FRONT_FACE_CCW;
else
cull_mode = R300_FRONT_FACE_CW;
diff --git a/src/gallium/drivers/r300/r300_vs_draw.c b/src/gallium/drivers/r300/r300_vs_draw.c
index 2939963..bb94fed 100644
--- a/src/gallium/drivers/r300/r300_vs_draw.c
+++ b/src/gallium/drivers/r300/r300_vs_draw.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2009 Marek Olšák
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -9,11 +9,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -21,7 +21,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* This file contains the vertex shader tranformations for SW TCL needed
diff --git a/src/gallium/drivers/r600/SConscript b/src/gallium/drivers/r600/SConscript
index 6498014..e51f50c 100644
--- a/src/gallium/drivers/r600/SConscript
+++ b/src/gallium/drivers/r600/SConscript
@@ -9,7 +9,7 @@ except OSError:
Return()
env.Append(CPPPATH = [
- '#/include',
+ '#/include',
'#/src/mesa',
])
diff --git a/src/gallium/drivers/r600/eg_states_inc.h b/src/gallium/drivers/r600/eg_states_inc.h
index 1379c11..1738ba5 100644
--- a/src/gallium/drivers/r600/eg_states_inc.h
+++ b/src/gallium/drivers/r600/eg_states_inc.h
@@ -49,7 +49,7 @@
#define EG_CONFIG__VGT_STRMOUT_CONFIG 44
#define EG_CONFIG__VGT_STRMOUT_BUFFER_CONFIG 45
#define EG_CONFIG_SIZE 46
-#define EG_CONFIG_PM4 128
+#define EG_CONFIG_PM4 128
/* EG_CB_CNTL */
#define EG_CB_CNTL__CB_TARGET_MASK 0
@@ -59,7 +59,7 @@
#define EG_CB_CNTL__PA_SC_AA_SAMPLE_LOCS_MCTX 4
#define EG_CB_CNTL__PA_SC_AA_MASK 5
#define EG_CB_CNTL_SIZE 6
-#define EG_CB_CNTL_PM4 128
+#define EG_CB_CNTL_PM4 128
/* EG_RASTERIZER */
#define EG_RASTERIZER__SPI_INTERP_CONTROL_0 0
@@ -84,7 +84,7 @@
#define EG_RASTERIZER__PA_SU_POLY_OFFSET_BACK_SCALE 19
#define EG_RASTERIZER__PA_SU_POLY_OFFSET_BACK_OFFSET 20
#define EG_RASTERIZER_SIZE 21
-#define EG_RASTERIZER_PM4 128
+#define EG_RASTERIZER_PM4 128
/* EG_VIEWPORT */
#define EG_VIEWPORT__PA_SC_VPORT_ZMIN_0 0
@@ -97,7 +97,7 @@
#define EG_VIEWPORT__PA_CL_VPORT_ZOFFSET_0 7
#define EG_VIEWPORT__PA_CL_VTE_CNTL 8
#define EG_VIEWPORT_SIZE 9
-#define EG_VIEWPORT_PM4 128
+#define EG_VIEWPORT_PM4 128
/* EG_SCISSOR */
#define EG_SCISSOR__PA_SC_SCREEN_SCISSOR_TL 0
@@ -121,7 +121,7 @@
#define EG_SCISSOR__PA_SC_VPORT_SCISSOR_0_BR 18
#define EG_SCISSOR__PA_SU_HARDWARE_SCREEN_OFFSET 19
#define EG_SCISSOR_SIZE 20
-#define EG_SCISSOR_PM4 128
+#define EG_SCISSOR_PM4 128
/* EG_BLEND */
#define EG_BLEND__CB_BLEND_RED 0
@@ -137,7 +137,7 @@
#define EG_BLEND__CB_BLEND6_CONTROL 10
#define EG_BLEND__CB_BLEND7_CONTROL 11
#define EG_BLEND_SIZE 12
-#define EG_BLEND_PM4 128
+#define EG_BLEND_PM4 128
/* EG_DSA */
#define EG_DSA__DB_STENCIL_CLEAR 0
@@ -158,7 +158,7 @@
#define EG_DSA__DB_PRELOAD_CONTROL 15
#define EG_DSA__DB_ALPHA_TO_MASK 16
#define EG_DSA_SIZE 17
-#define EG_DSA_PM4 128
+#define EG_DSA_PM4 128
/* EG_VS_SHADER */
#define EG_VS_SHADER__SQ_VTX_SEMANTIC_0 0
@@ -210,7 +210,7 @@
#define EG_VS_SHADER__SQ_PGM_START_FS 46
#define EG_VS_SHADER__SQ_PGM_RESOURCES_FS 47
#define EG_VS_SHADER_SIZE 48
-#define EG_VS_SHADER_PM4 128
+#define EG_VS_SHADER_PM4 128
/* EG_PS_SHADER */
#define EG_PS_SHADER__SPI_PS_INPUT_CNTL_0 0
@@ -257,7 +257,7 @@
#define EG_PS_SHADER__SQ_PGM_RESOURCES_2_PS 41
#define EG_PS_SHADER__SQ_PGM_EXPORTS_PS 42
#define EG_PS_SHADER_SIZE 43
-#define EG_PS_SHADER_PM4 128
+#define EG_PS_SHADER_PM4 128
/* EG_UCP */
#define EG_UCP__PA_CL_UCP0_X 0
@@ -285,19 +285,19 @@
#define EG_UCP__PA_CL_UCP5_Z 22
#define EG_UCP__PA_CL_UCP5_W 23
#define EG_UCP_SIZE 24
-#define EG_UCP_PM4 128
+#define EG_UCP_PM4 128
/* EG_VS_CBUF */
#define EG_VS_CBUF__ALU_CONST_BUFFER_SIZE_VS_0 0
#define EG_VS_CBUF__ALU_CONST_CACHE_VS_0 1
#define EG_VS_CBUF_SIZE 2
-#define EG_VS_CBUF_PM4 128
+#define EG_VS_CBUF_PM4 128
/* EG_PS_CBUF */
#define EG_PS_CBUF__ALU_CONST_BUFFER_SIZE_PS_0 0
#define EG_PS_CBUF__ALU_CONST_CACHE_PS_0 1
#define EG_PS_CBUF_SIZE 2
-#define EG_PS_CBUF_PM4 128
+#define EG_PS_CBUF_PM4 128
/* EG_PS_RESOURCE */
#define EG_PS_RESOURCE__RESOURCE0_WORD0 0
@@ -309,7 +309,7 @@
#define EG_PS_RESOURCE__RESOURCE0_WORD6 6
#define EG_PS_RESOURCE__RESOURCE0_WORD7 7
#define EG_PS_RESOURCE_SIZE 8
-#define EG_PS_RESOURCE_PM4 128
+#define EG_PS_RESOURCE_PM4 128
/* EG_VS_RESOURCE */
#define EG_VS_RESOURCE__RESOURCE160_WORD0 0
@@ -321,7 +321,7 @@
#define EG_VS_RESOURCE__RESOURCE160_WORD6 6
#define EG_VS_RESOURCE__RESOURCE160_WORD7 7
#define EG_VS_RESOURCE_SIZE 8
-#define EG_VS_RESOURCE_PM4 128
+#define EG_VS_RESOURCE_PM4 128
/* EG_FS_RESOURCE */
#define EG_FS_RESOURCE__RESOURCE320_WORD0 0
@@ -333,7 +333,7 @@
#define EG_FS_RESOURCE__RESOURCE320_WORD6 6
#define EG_FS_RESOURCE__RESOURCE320_WORD7 7
#define EG_FS_RESOURCE_SIZE 8
-#define EG_FS_RESOURCE_PM4 128
+#define EG_FS_RESOURCE_PM4 128
/* EG_GS_RESOURCE */
#define EG_GS_RESOURCE__RESOURCE336_WORD0 0
@@ -345,28 +345,28 @@
#define EG_GS_RESOURCE__RESOURCE336_WORD6 6
#define EG_GS_RESOURCE__RESOURCE336_WORD7 7
#define EG_GS_RESOURCE_SIZE 8
-#define EG_GS_RESOURCE_PM4 128
+#define EG_GS_RESOURCE_PM4 128
/* EG_PS_SAMPLER */
#define EG_PS_SAMPLER__SQ_TEX_SAMPLER_WORD0_0 0
#define EG_PS_SAMPLER__SQ_TEX_SAMPLER_WORD1_0 1
#define EG_PS_SAMPLER__SQ_TEX_SAMPLER_WORD2_0 2
#define EG_PS_SAMPLER_SIZE 3
-#define EG_PS_SAMPLER_PM4 128
+#define EG_PS_SAMPLER_PM4 128
/* EG_VS_SAMPLER */
#define EG_VS_SAMPLER__SQ_TEX_SAMPLER_WORD0_18 0
#define EG_VS_SAMPLER__SQ_TEX_SAMPLER_WORD1_18 1
#define EG_VS_SAMPLER__SQ_TEX_SAMPLER_WORD2_18 2
#define EG_VS_SAMPLER_SIZE 3
-#define EG_VS_SAMPLER_PM4 128
+#define EG_VS_SAMPLER_PM4 128
/* EG_GS_SAMPLER */
#define EG_GS_SAMPLER__SQ_TEX_SAMPLER_WORD0_36 0
#define EG_GS_SAMPLER__SQ_TEX_SAMPLER_WORD1_36 1
#define EG_GS_SAMPLER__SQ_TEX_SAMPLER_WORD2_36 2
#define EG_GS_SAMPLER_SIZE 3
-#define EG_GS_SAMPLER_PM4 128
+#define EG_GS_SAMPLER_PM4 128
/* EG_PS_SAMPLER_BORDER */
#define EG_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_INDEX 0
@@ -375,7 +375,7 @@
#define EG_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_BLUE 3
#define EG_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_ALPHA 4
#define EG_PS_SAMPLER_BORDER_SIZE 5
-#define EG_PS_SAMPLER_BORDER_PM4 128
+#define EG_PS_SAMPLER_BORDER_PM4 128
/* EG_VS_SAMPLER_BORDER */
#define EG_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_INDEX 0
@@ -384,7 +384,7 @@
#define EG_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_BLUE 3
#define EG_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_ALPHA 4
#define EG_VS_SAMPLER_BORDER_SIZE 5
-#define EG_VS_SAMPLER_BORDER_PM4 128
+#define EG_VS_SAMPLER_BORDER_PM4 128
/* EG_GS_SAMPLER_BORDER */
#define EG_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_INDEX 0
@@ -393,7 +393,7 @@
#define EG_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_BLUE 3
#define EG_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_ALPHA 4
#define EG_GS_SAMPLER_BORDER_SIZE 5
-#define EG_GS_SAMPLER_BORDER_PM4 128
+#define EG_GS_SAMPLER_BORDER_PM4 128
/* EG_CB */
#define EG_CB__CB_COLOR0_BASE 0
@@ -404,7 +404,7 @@
#define EG_CB__CB_COLOR0_ATTRIB 5
#define EG_CB__CB_COLOR0_DIM 6
#define EG_CB_SIZE 7
-#define EG_CB_PM4 128
+#define EG_CB_PM4 128
/* EG_DB */
#define EG_DB__DB_HTILE_DATA_BASE 0
@@ -419,7 +419,7 @@
#define EG_DB__DB_Z_WRITE_BASE 9
#define EG_DB__DB_STENCIL_WRITE_BASE 10
#define EG_DB_SIZE 11
-#define EG_DB_PM4 128
+#define EG_DB_PM4 128
/* EG_VGT */
#define EG_VGT__VGT_PRIMITIVE_TYPE 0
@@ -433,7 +433,7 @@
#define EG_VGT__VGT_INSTANCE_STEP_RATE_0 8
#define EG_VGT__VGT_INSTANCE_STEP_RATE_1 9
#define EG_VGT_SIZE 10
-#define EG_VGT_PM4 128
+#define EG_VGT_PM4 128
/* EG_DRAW */
#define EG_DRAW__VGT_NUM_INDICES 0
@@ -441,18 +441,18 @@
#define EG_DRAW__VGT_DMA_BASE 2
#define EG_DRAW__VGT_DRAW_INITIATOR 3
#define EG_DRAW_SIZE 4
-#define EG_DRAW_PM4 128
+#define EG_DRAW_PM4 128
/* EG_VGT_EVENT */
#define EG_VGT_EVENT__VGT_EVENT_INITIATOR 0
#define EG_VGT_EVENT_SIZE 1
-#define EG_VGT_EVENT_PM4 128
+#define EG_VGT_EVENT_PM4 128
/* EG_CB_FLUSH */
#define EG_CB_FLUSH_SIZE 0
-#define EG_CB_FLUSH_PM4 128
+#define EG_CB_FLUSH_PM4 128
/* EG_DB_FLUSH */
#define EG_DB_FLUSH_SIZE 0
-#define EG_DB_FLUSH_PM4 128
+#define EG_DB_FLUSH_PM4 128
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 9b9f033..1fbed2d 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -45,10 +45,10 @@ static inline unsigned int r600_bc_get_num_operands(struct r600_bc_alu *alu)
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN:
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE:
@@ -61,7 +61,7 @@ static inline unsigned int r600_bc_get_num_operands(struct r600_bc_alu *alu)
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE:
return 2;
- case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV:
+ case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_FLOOR:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT:
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR:
@@ -76,7 +76,7 @@ static inline unsigned int r600_bc_get_num_operands(struct r600_bc_alu *alu)
case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS:
return 1;
default: R600_ERR(
- "Need instruction operand number for 0x%x.\n", alu->inst);
+ "Need instruction operand number for 0x%x.\n", alu->inst);
};
return 3;
@@ -365,8 +365,8 @@ static int check_scalar(struct r600_bc *bc, struct r600_bc_alu *alu)
alu->bank_swizzle = alu->bank_swizzle_force;
return 0;
}
- swizzle_key = (is_const(alu->src[0].sel) ? 4 : 0 ) +
- (is_const(alu->src[1].sel) ? 2 : 0 ) +
+ swizzle_key = (is_const(alu->src[0].sel) ? 4 : 0 ) +
+ (is_const(alu->src[1].sel) ? 2 : 0 ) +
(is_const(alu->src[2].sel) ? 1 : 0 );
alu->bank_swizzle = bank_swizzle_scl[swizzle_key];
@@ -381,8 +381,8 @@ static int check_vector(struct r600_bc *bc, struct r600_bc_alu *alu)
alu->bank_swizzle = alu->bank_swizzle_force;
return 0;
}
- swizzle_key = (is_const(alu->src[0].sel) ? 4 : 0 ) +
- (is_const(alu->src[1].sel) ? 2 : 0 ) +
+ swizzle_key = (is_const(alu->src[0].sel) ? 4 : 0 ) +
+ (is_const(alu->src[1].sel) ? 2 : 0 ) +
(is_const(alu->src[2].sel) ? 1 : 0 );
alu->bank_swizzle = bank_swizzle_vec[swizzle_key];
@@ -402,7 +402,7 @@ static int check_and_set_bank_swizzle(struct r600_bc *bc, struct r600_bc_alu *al
if (num_instr == 1) {
check_scalar(bc, alu_first);
-
+
} else {
/* check_read_slots(bc, bc->cf_last->curr_bs_head);*/
check_vector(bc, alu_first);
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 43dbee9..88e38ac 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -241,7 +241,7 @@ int r600_conv_pipe_prim(unsigned pprim, unsigned *prim);
void r600_init_screen_texture_functions(struct pipe_screen *screen);
void r600_init_surface_functions(struct r600_pipe_context *r600);
uint32_t r600_translate_texformat(enum pipe_format format,
- const unsigned char *swizzle_view,
+ const unsigned char *swizzle_view,
uint32_t *word4_p, uint32_t *yuv_format_p);
unsigned r600_texture_get_offset(struct r600_resource_texture *rtex,
unsigned level, unsigned layer);
diff --git a/src/gallium/drivers/r600/r600_state_inlines.h b/src/gallium/drivers/r600/r600_state_inlines.h
index d994196..cac060e 100644
--- a/src/gallium/drivers/r600/r600_state_inlines.h
+++ b/src/gallium/drivers/r600/r600_state_inlines.h
@@ -618,7 +618,7 @@ static INLINE uint32_t r600_translate_vertex_data_type(enum pipe_format format)
default:
goto out_unknown;
}
-
+
result = S_038008_DATA_FORMAT(result);
if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) {
diff --git a/src/gallium/drivers/r600/r600_states_inc.h b/src/gallium/drivers/r600/r600_states_inc.h
index 1c8075e..68afd37 100644
--- a/src/gallium/drivers/r600/r600_states_inc.h
+++ b/src/gallium/drivers/r600/r600_states_inc.h
@@ -43,7 +43,7 @@
#define R600_CONFIG__VGT_VTX_CNT_EN 38
#define R600_CONFIG__VGT_STRMOUT_BUFFER_EN 39
#define R600_CONFIG_SIZE 40
-#define R600_CONFIG_PM4 128
+#define R600_CONFIG_PM4 128
/* R600_CB_CNTL */
#define R600_CB_CNTL__CB_CLEAR_RED 0
@@ -66,7 +66,7 @@
#define R600_CB_CNTL__PA_SC_AA_MASK 17
#define R600_CB_CNTL__CB_SHADER_CONTROL 18
#define R600_CB_CNTL_SIZE 19
-#define R600_CB_CNTL_PM4 128
+#define R600_CB_CNTL_PM4 128
/* R600_RASTERIZER */
#define R600_RASTERIZER__SPI_INTERP_CONTROL_0 0
@@ -91,7 +91,7 @@
#define R600_RASTERIZER__PA_SU_POLY_OFFSET_BACK_SCALE 19
#define R600_RASTERIZER__PA_SU_POLY_OFFSET_BACK_OFFSET 20
#define R600_RASTERIZER_SIZE 21
-#define R600_RASTERIZER_PM4 128
+#define R600_RASTERIZER_PM4 128
/* R600_VIEWPORT */
#define R600_VIEWPORT__PA_SC_VPORT_ZMIN_0 0
@@ -104,7 +104,7 @@
#define R600_VIEWPORT__PA_CL_VPORT_ZOFFSET_0 7
#define R600_VIEWPORT__PA_CL_VTE_CNTL 8
#define R600_VIEWPORT_SIZE 9
-#define R600_VIEWPORT_PM4 128
+#define R600_VIEWPORT_PM4 128
/* R600_SCISSOR */
#define R600_SCISSOR__PA_SC_SCREEN_SCISSOR_TL 0
@@ -127,7 +127,7 @@
#define R600_SCISSOR__PA_SC_VPORT_SCISSOR_0_TL 17
#define R600_SCISSOR__PA_SC_VPORT_SCISSOR_0_BR 18
#define R600_SCISSOR_SIZE 19
-#define R600_SCISSOR_PM4 128
+#define R600_SCISSOR_PM4 128
/* R600_BLEND */
#define R600_BLEND__CB_BLEND_RED 0
@@ -144,7 +144,7 @@
#define R600_BLEND__CB_BLEND7_CONTROL 11
#define R600_BLEND__CB_BLEND_CONTROL 12
#define R600_BLEND_SIZE 13
-#define R600_BLEND_PM4 128
+#define R600_BLEND_PM4 128
/* R600_DSA */
#define R600_DSA__DB_STENCIL_CLEAR 0
@@ -164,7 +164,7 @@
#define R600_DSA__DB_PRELOAD_CONTROL 14
#define R600_DSA__DB_ALPHA_TO_MASK 15
#define R600_DSA_SIZE 16
-#define R600_DSA_PM4 128
+#define R600_DSA_PM4 128
/* R600_VS_SHADER */
#define R600_VS_SHADER__SQ_VTX_SEMANTIC_0 0
@@ -217,7 +217,7 @@
#define R600_VS_SHADER__SQ_PGM_CF_OFFSET_VS 47
#define R600_VS_SHADER__SQ_PGM_CF_OFFSET_FS 48
#define R600_VS_SHADER_SIZE 49
-#define R600_VS_SHADER_PM4 128
+#define R600_VS_SHADER_PM4 128
/* R600_PS_SHADER */
#define R600_PS_SHADER__SPI_PS_INPUT_CNTL_0 0
@@ -260,19 +260,19 @@
#define R600_PS_SHADER__SQ_PGM_EXPORTS_PS 37
#define R600_PS_SHADER__SQ_PGM_CF_OFFSET_PS 38
#define R600_PS_SHADER_SIZE 39
-#define R600_PS_SHADER_PM4 128
+#define R600_PS_SHADER_PM4 128
/* R600_VS_CBUF */
#define R600_VS_CBUF__ALU_CONST_BUFFER_SIZE_VS_0 0
#define R600_VS_CBUF__ALU_CONST_CACHE_VS_0 1
#define R600_VS_CBUF_SIZE 2
-#define R600_VS_CBUF_PM4 128
+#define R600_VS_CBUF_PM4 128
/* R600_PS_CBUF */
#define R600_PS_CBUF__ALU_CONST_BUFFER_SIZE_PS_0 0
#define R600_PS_CBUF__ALU_CONST_CACHE_PS_0 1
#define R600_PS_CBUF_SIZE 2
-#define R600_PS_CBUF_PM4 128
+#define R600_PS_CBUF_PM4 128
/* R600_PS_CONSTANT */
#define R600_PS_CONSTANT__SQ_ALU_CONSTANT0_0 0
@@ -280,7 +280,7 @@
#define R600_PS_CONSTANT__SQ_ALU_CONSTANT2_0 2
#define R600_PS_CONSTANT__SQ_ALU_CONSTANT3_0 3
#define R600_PS_CONSTANT_SIZE 4
-#define R600_PS_CONSTANT_PM4 128
+#define R600_PS_CONSTANT_PM4 128
/* R600_VS_CONSTANT */
#define R600_VS_CONSTANT__SQ_ALU_CONSTANT0_256 0
@@ -288,7 +288,7 @@
#define R600_VS_CONSTANT__SQ_ALU_CONSTANT2_256 2
#define R600_VS_CONSTANT__SQ_ALU_CONSTANT3_256 3
#define R600_VS_CONSTANT_SIZE 4
-#define R600_VS_CONSTANT_PM4 128
+#define R600_VS_CONSTANT_PM4 128
/* R600_UCP */
#define R600_UCP__PA_CL_UCP0_X 0
@@ -316,7 +316,7 @@
#define R600_UCP__PA_CL_UCP5_Z 22
#define R600_UCP__PA_CL_UCP5_W 23
#define R600_UCP_SIZE 24
-#define R600_UCP_PM4 128
+#define R600_UCP_PM4 128
/* R600_PS_RESOURCE */
#define R600_PS_RESOURCE__RESOURCE0_WORD0 0
@@ -327,7 +327,7 @@
#define R600_PS_RESOURCE__RESOURCE0_WORD5 5
#define R600_PS_RESOURCE__RESOURCE0_WORD6 6
#define R600_PS_RESOURCE_SIZE 7
-#define R600_PS_RESOURCE_PM4 128
+#define R600_PS_RESOURCE_PM4 128
/* R600_VS_RESOURCE */
#define R600_VS_RESOURCE__RESOURCE160_WORD0 0
@@ -338,7 +338,7 @@
#define R600_VS_RESOURCE__RESOURCE160_WORD5 5
#define R600_VS_RESOURCE__RESOURCE160_WORD6 6
#define R600_VS_RESOURCE_SIZE 7
-#define R600_VS_RESOURCE_PM4 128
+#define R600_VS_RESOURCE_PM4 128
/* R600_FS_RESOURCE */
#define R600_FS_RESOURCE__RESOURCE320_WORD0 0
@@ -349,7 +349,7 @@
#define R600_FS_RESOURCE__RESOURCE320_WORD5 5
#define R600_FS_RESOURCE__RESOURCE320_WORD6 6
#define R600_FS_RESOURCE_SIZE 7
-#define R600_FS_RESOURCE_PM4 128
+#define R600_FS_RESOURCE_PM4 128
/* R600_GS_RESOURCE */
#define R600_GS_RESOURCE__RESOURCE336_WORD0 0
@@ -360,28 +360,28 @@
#define R600_GS_RESOURCE__RESOURCE336_WORD5 5
#define R600_GS_RESOURCE__RESOURCE336_WORD6 6
#define R600_GS_RESOURCE_SIZE 7
-#define R600_GS_RESOURCE_PM4 128
+#define R600_GS_RESOURCE_PM4 128
/* R600_PS_SAMPLER */
#define R600_PS_SAMPLER__SQ_TEX_SAMPLER_WORD0_0 0
#define R600_PS_SAMPLER__SQ_TEX_SAMPLER_WORD1_0 1
#define R600_PS_SAMPLER__SQ_TEX_SAMPLER_WORD2_0 2
#define R600_PS_SAMPLER_SIZE 3
-#define R600_PS_SAMPLER_PM4 128
+#define R600_PS_SAMPLER_PM4 128
/* R600_VS_SAMPLER */
#define R600_VS_SAMPLER__SQ_TEX_SAMPLER_WORD0_18 0
#define R600_VS_SAMPLER__SQ_TEX_SAMPLER_WORD1_18 1
#define R600_VS_SAMPLER__SQ_TEX_SAMPLER_WORD2_18 2
#define R600_VS_SAMPLER_SIZE 3
-#define R600_VS_SAMPLER_PM4 128
+#define R600_VS_SAMPLER_PM4 128
/* R600_GS_SAMPLER */
#define R600_GS_SAMPLER__SQ_TEX_SAMPLER_WORD0_36 0
#define R600_GS_SAMPLER__SQ_TEX_SAMPLER_WORD1_36 1
#define R600_GS_SAMPLER__SQ_TEX_SAMPLER_WORD2_36 2
#define R600_GS_SAMPLER_SIZE 3
-#define R600_GS_SAMPLER_PM4 128
+#define R600_GS_SAMPLER_PM4 128
/* R600_PS_SAMPLER_BORDER */
#define R600_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_RED 0
@@ -389,7 +389,7 @@
#define R600_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_BLUE 2
#define R600_PS_SAMPLER_BORDER__TD_PS_SAMPLER0_BORDER_ALPHA 3
#define R600_PS_SAMPLER_BORDER_SIZE 4
-#define R600_PS_SAMPLER_BORDER_PM4 128
+#define R600_PS_SAMPLER_BORDER_PM4 128
/* R600_VS_SAMPLER_BORDER */
#define R600_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_RED 0
@@ -397,7 +397,7 @@
#define R600_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_BLUE 2
#define R600_VS_SAMPLER_BORDER__TD_VS_SAMPLER0_BORDER_ALPHA 3
#define R600_VS_SAMPLER_BORDER_SIZE 4
-#define R600_VS_SAMPLER_BORDER_PM4 128
+#define R600_VS_SAMPLER_BORDER_PM4 128
/* R600_GS_SAMPLER_BORDER */
#define R600_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_RED 0
@@ -405,7 +405,7 @@
#define R600_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_BLUE 2
#define R600_GS_SAMPLER_BORDER__TD_GS_SAMPLER0_BORDER_ALPHA 3
#define R600_GS_SAMPLER_BORDER_SIZE 4
-#define R600_GS_SAMPLER_BORDER_PM4 128
+#define R600_GS_SAMPLER_BORDER_PM4 128
/* R600_CB0 */
#define R600_CB0__CB_COLOR0_BASE 0
@@ -416,7 +416,7 @@
#define R600_CB0__CB_COLOR0_TILE 5
#define R600_CB0__CB_COLOR0_MASK 6
#define R600_CB0_SIZE 7
-#define R600_CB0_PM4 128
+#define R600_CB0_PM4 128
/* R600_CB1 */
#define R600_CB1__CB_COLOR1_BASE 0
@@ -427,7 +427,7 @@
#define R600_CB1__CB_COLOR1_TILE 5
#define R600_CB1__CB_COLOR1_MASK 6
#define R600_CB1_SIZE 7
-#define R600_CB1_PM4 128
+#define R600_CB1_PM4 128
/* R600_CB2 */
#define R600_CB2__CB_COLOR2_BASE 0
@@ -438,7 +438,7 @@
#define R600_CB2__CB_COLOR2_TILE 5
#define R600_CB2__CB_COLOR2_MASK 6
#define R600_CB2_SIZE 7
-#define R600_CB2_PM4 128
+#define R600_CB2_PM4 128
/* R600_CB3 */
#define R600_CB3__CB_COLOR3_BASE 0
@@ -449,7 +449,7 @@
#define R600_CB3__CB_COLOR3_TILE 5
#define R600_CB3__CB_COLOR3_MASK 6
#define R600_CB3_SIZE 7
-#define R600_CB3_PM4 128
+#define R600_CB3_PM4 128
/* R600_CB4 */
#define R600_CB4__CB_COLOR4_BASE 0
@@ -460,7 +460,7 @@
#define R600_CB4__CB_COLOR4_TILE 5
#define R600_CB4__CB_COLOR4_MASK 6
#define R600_CB4_SIZE 7
-#define R600_CB4_PM4 128
+#define R600_CB4_PM4 128
/* R600_CB5 */
#define R600_CB5__CB_COLOR5_BASE 0
@@ -471,7 +471,7 @@
#define R600_CB5__CB_COLOR5_TILE 5
#define R600_CB5__CB_COLOR5_MASK 6
#define R600_CB5_SIZE 7
-#define R600_CB5_PM4 128
+#define R600_CB5_PM4 128
/* R600_CB6 */
#define R600_CB6__CB_COLOR6_BASE 0
@@ -482,7 +482,7 @@
#define R600_CB6__CB_COLOR6_TILE 5
#define R600_CB6__CB_COLOR6_MASK 6
#define R600_CB6_SIZE 7
-#define R600_CB6_PM4 128
+#define R600_CB6_PM4 128
/* R600_CB7 */
#define R600_CB7__CB_COLOR7_BASE 0
@@ -493,7 +493,7 @@
#define R600_CB7__CB_COLOR7_TILE 5
#define R600_CB7__CB_COLOR7_MASK 6
#define R600_CB7_SIZE 7
-#define R600_CB7_PM4 128
+#define R600_CB7_PM4 128
/* R600_DB */
#define R600_DB__DB_DEPTH_BASE 0
@@ -503,7 +503,7 @@
#define R600_DB__DB_HTILE_SURFACE 4
#define R600_DB__DB_PREFETCH_LIMIT 5
#define R600_DB_SIZE 6
-#define R600_DB_PM4 128
+#define R600_DB_PM4 128
/* R600_VGT */
#define R600_VGT__VGT_PRIMITIVE_TYPE 0
@@ -518,7 +518,7 @@
#define R600_VGT__VGT_INSTANCE_STEP_RATE_0 9
#define R600_VGT__VGT_INSTANCE_STEP_RATE_1 10
#define R600_VGT_SIZE 11
-#define R600_VGT_PM4 128
+#define R600_VGT_PM4 128
/* R600_DRAW */
#define R600_DRAW__VGT_NUM_INDICES 0
@@ -526,18 +526,18 @@
#define R600_DRAW__VGT_DMA_BASE 2
#define R600_DRAW__VGT_DRAW_INITIATOR 3
#define R600_DRAW_SIZE 4
-#define R600_DRAW_PM4 128
+#define R600_DRAW_PM4 128
/* R600_VGT_EVENT */
#define R600_VGT_EVENT__VGT_EVENT_INITIATOR 0
#define R600_VGT_EVENT_SIZE 1
-#define R600_VGT_EVENT_PM4 128
+#define R600_VGT_EVENT_PM4 128
/* R600_CB_FLUSH */
#define R600_CB_FLUSH_SIZE 0
-#define R600_CB_FLUSH_PM4 128
+#define R600_CB_FLUSH_PM4 128
/* R600_DB_FLUSH */
#define R600_DB_FLUSH_SIZE 0
-#define R600_DB_FLUSH_PM4 128
+#define R600_DB_FLUSH_PM4 128
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index d4d9b07..d76e6b3 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -796,7 +796,7 @@ static unsigned r600_get_swizzle_combined(const unsigned char *swizzle_format,
/* texture format translate */
uint32_t r600_translate_texformat(enum pipe_format format,
- const unsigned char *swizzle_view,
+ const unsigned char *swizzle_view,
uint32_t *word4_p, uint32_t *yuv_format_p)
{
uint32_t result = 0, word4 = 0, yuv_format = 0;
@@ -850,7 +850,7 @@ uint32_t r600_translate_texformat(enum pipe_format format,
break;
}
goto out_unknown; /* TODO */
-
+
case UTIL_FORMAT_COLORSPACE_SRGB:
word4 |= S_038010_FORCE_DEGAMMA(1);
if (format == PIPE_FORMAT_L8A8_SRGB || format == PIPE_FORMAT_L8_SRGB)
@@ -866,7 +866,7 @@ uint32_t r600_translate_texformat(enum pipe_format format,
static int r600_enable_s3tc = -1;
if (r600_enable_s3tc == -1)
- r600_enable_s3tc =
+ r600_enable_s3tc =
debug_get_bool_option("R600_ENABLE_S3TC", FALSE);
if (!r600_enable_s3tc)
@@ -889,7 +889,7 @@ uint32_t r600_translate_texformat(enum pipe_format format,
}
- for (i = 0; i < desc->nr_channels; i++) {
+ for (i = 0; i < desc->nr_channels; i++) {
if (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED) {
word4 |= sign_bit[i];
}
@@ -903,7 +903,7 @@ uint32_t r600_translate_texformat(enum pipe_format format,
for (i = 1; i < desc->nr_channels; i++) {
uniform = uniform && desc->channel[0].size == desc->channel[i].size;
}
-
+
/* Non-uniform formats. */
if (!uniform) {
switch(desc->nr_channels) {
@@ -1021,7 +1021,7 @@ uint32_t r600_translate_texformat(enum pipe_format format,
goto out_word4;
}
}
-
+
}
out_word4:
if (word4_p)
diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c
index ae3f00f..1678194 100644
--- a/src/gallium/drivers/softpipe/sp_clear.c
+++ b/src/gallium/drivers/softpipe/sp_clear.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2009 VMware, Inc. All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
diff --git a/src/gallium/drivers/softpipe/sp_clear.h b/src/gallium/drivers/softpipe/sp_clear.h
index 9be3b86..fa7436c 100644
--- a/src/gallium/drivers/softpipe/sp_clear.h
+++ b/src/gallium/drivers/softpipe/sp_clear.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index e935ce6..3040c77 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2008 VMware, Inc. All rights reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
@@ -157,17 +157,17 @@ softpipe_is_resource_referenced( struct pipe_context *pipe,
/* check if any of the bound drawing surfaces are this texture */
if (softpipe->dirty_render_cache) {
for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++) {
- if (softpipe->framebuffer.cbufs[i] &&
+ if (softpipe->framebuffer.cbufs[i] &&
softpipe->framebuffer.cbufs[i]->texture == texture) {
return PIPE_REFERENCED_FOR_WRITE;
}
}
- if (softpipe->framebuffer.zsbuf &&
+ if (softpipe->framebuffer.zsbuf &&
softpipe->framebuffer.zsbuf->texture == texture) {
return PIPE_REFERENCED_FOR_WRITE;
}
}
-
+
/* check if any of the tex_cache textures are this texture */
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
if (softpipe->tex_cache[i] &&
@@ -280,7 +280,7 @@ softpipe_create_context( struct pipe_screen *screen,
* Create drawing context and plug our rendering stage into it.
*/
softpipe->draw = draw_create(&softpipe->pipe);
- if (!softpipe->draw)
+ if (!softpipe->draw)
goto fail;
draw_texture_samplers(softpipe->draw,
diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h
index 9361a3d..d3d9649 100644
--- a/src/gallium/drivers/softpipe/sp_context.h
+++ b/src/gallium/drivers/softpipe/sp_context.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c
index 01b4ca9..e906f49 100644
--- a/src/gallium/drivers/softpipe/sp_draw_arrays.c
+++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c
index 4258395..f9ff0bd 100644
--- a/src/gallium/drivers/softpipe/sp_flush.c
+++ b/src/gallium/drivers/softpipe/sp_flush.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
@@ -87,7 +87,7 @@ softpipe_flush( struct pipe_context *pipe,
if (softpipe->zsbuf_cache)
sp_flush_tile_cache(softpipe->zsbuf_cache);
-
+
softpipe->dirty_render_cache = FALSE;
}
@@ -103,7 +103,7 @@ softpipe_flush( struct pipe_context *pipe,
++frame_no;
}
#endif
-
+
if (fence)
*fence = NULL;
}
diff --git a/src/gallium/drivers/softpipe/sp_flush.h b/src/gallium/drivers/softpipe/sp_flush.h
index 22a5cee..1cfd628 100644
--- a/src/gallium/drivers/softpipe/sp_flush.h
+++ b/src/gallium/drivers/softpipe/sp_flush.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SP_FLUSH_H
diff --git a/src/gallium/drivers/softpipe/sp_fs.h b/src/gallium/drivers/softpipe/sp_fs.h
index 4792ace..f2cd9b7 100644
--- a/src/gallium/drivers/softpipe/sp_fs.h
+++ b/src/gallium/drivers/softpipe/sp_fs.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/softpipe/sp_fs_exec.c b/src/gallium/drivers/softpipe/sp_fs_exec.c
index 346e1b4..f78edbb 100644
--- a/src/gallium/drivers/softpipe/sp_fs_exec.c
+++ b/src/gallium/drivers/softpipe/sp_fs_exec.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -117,14 +117,14 @@ setup_pos_vector(const struct tgsi_interp_coef *coef,
/* TODO: hide the machine struct in here somewhere, remove from this
* interface:
*/
-static unsigned
+static unsigned
exec_run( const struct sp_fragment_shader *base,
struct tgsi_exec_machine *machine,
struct quad_header *quad )
{
/* Compute X, Y, Z, W vals for this quad */
- setup_pos_vector(quad->posCoef,
- (float)quad->input.x0, (float)quad->input.y0,
+ setup_pos_vector(quad->posCoef,
+ (float)quad->input.x0, (float)quad->input.y0,
&machine->QuadPos);
/* convert 0 to 1.0 and 1 to -1.0 */
@@ -179,7 +179,7 @@ exec_run( const struct sp_fragment_shader *base,
}
-static void
+static void
exec_delete( struct sp_fragment_shader *base )
{
FREE((void *) base->shader.tokens);
diff --git a/src/gallium/drivers/softpipe/sp_fs_sse.c b/src/gallium/drivers/softpipe/sp_fs_sse.c
index 5b18cd0..041d634 100644
--- a/src/gallium/drivers/softpipe/sp_fs_sse.c
+++ b/src/gallium/drivers/softpipe/sp_fs_sse.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -118,7 +118,7 @@ setup_pos_vector(const struct tgsi_interp_coef *coef,
* TODO: push Position calculation into the generated shader
* TODO: process >1 quad at a time
*/
-static unsigned
+static unsigned
fs_sse_run( const struct sp_fragment_shader *base,
struct tgsi_exec_machine *machine,
struct quad_header *quad )
@@ -126,8 +126,8 @@ fs_sse_run( const struct sp_fragment_shader *base,
struct sp_sse_fragment_shader *shader = sp_sse_fragment_shader(base);
/* Compute X, Y, Z, W vals for this quad -- place in temp[0] for now */
- setup_pos_vector(quad->posCoef,
- (float)quad->input.x0, (float)quad->input.y0,
+ setup_pos_vector(quad->posCoef,
+ (float)quad->input.x0, (float)quad->input.y0,
machine->Temps);
/* init kill mask */
@@ -188,7 +188,7 @@ fs_sse_run( const struct sp_fragment_shader *base,
}
-static void
+static void
fs_sse_delete( struct sp_fragment_shader *base )
{
struct sp_sse_fragment_shader *shader = sp_sse_fragment_shader(base);
@@ -212,7 +212,7 @@ softpipe_create_fs_sse(struct softpipe_context *softpipe,
return NULL;
x86_init_func( &shader->sse2_program );
-
+
if (!tgsi_emit_sse2( templ->tokens, &shader->sse2_program,
shader->immediates, FALSE )) {
FREE(shader);
diff --git a/src/gallium/drivers/softpipe/sp_limits.h b/src/gallium/drivers/softpipe/sp_limits.h
index a7a24c9..1c3b697 100644
--- a/src/gallium/drivers/softpipe/sp_limits.h
+++ b/src/gallium/drivers/softpipe/sp_limits.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2010 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SP_LIMITS_H
diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
index c60249d..4c40cc2 100644
--- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c
+++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
@@ -100,7 +100,7 @@ sp_vbuf_allocate_vertices(struct vbuf_render *vbr,
cvbr->vertex_size = vertex_size;
cvbr->nr_vertices = nr_vertices;
-
+
return cvbr->vertex_buffer != NULL;
}
@@ -120,8 +120,8 @@ sp_vbuf_map_vertices(struct vbuf_render *vbr)
}
-static void
-sp_vbuf_unmap_vertices(struct vbuf_render *vbr,
+static void
+sp_vbuf_unmap_vertices(struct vbuf_render *vbr,
ushort min_index,
ushort max_index )
{
@@ -137,7 +137,7 @@ sp_vbuf_set_primitive(struct vbuf_render *vbr, unsigned prim)
{
struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr);
struct setup_context *setup_ctx = cvbr->setup;
-
+
sp_setup_prepare( setup_ctx );
cvbr->softpipe->reduced_prim = u_reduced_prim(prim);
@@ -259,7 +259,7 @@ sp_vbuf_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr)
case PIPE_PRIM_QUADS:
/* GL quads don't follow provoking vertex convention */
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit last quad vertex as first triangle vertex */
for (i = 3; i < nr; i += 4) {
sp_setup_tri( setup,
@@ -291,7 +291,7 @@ sp_vbuf_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr)
case PIPE_PRIM_QUAD_STRIP:
/* GL quad strips don't follow provoking vertex convention */
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit last quad vertex as first triangle vertex */
for (i = 3; i < nr; i += 2) {
sp_setup_tri( setup,
@@ -323,7 +323,7 @@ sp_vbuf_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr)
/* Almost same as tri fan but the _first_ vertex specifies the flat
* shading color.
*/
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit first polygon vertex as first triangle vertex */
for (i = 2; i < nr; i += 1) {
sp_setup_tri( setup,
@@ -455,7 +455,7 @@ sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
case PIPE_PRIM_QUADS:
/* GL quads don't follow provoking vertex convention */
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit last quad vertex as first triangle vertex */
for (i = 3; i < nr; i += 4) {
sp_setup_tri( setup,
@@ -485,7 +485,7 @@ sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
case PIPE_PRIM_QUAD_STRIP:
/* GL quad strips don't follow provoking vertex convention */
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit last quad vertex as first triangle vertex */
for (i = 3; i < nr; i += 2) {
sp_setup_tri( setup,
@@ -517,7 +517,7 @@ sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
/* Almost same as tri fan but the _first_ vertex specifies the flat
* shading color.
*/
- if (flatshade_first) {
+ if (flatshade_first) {
/* emit first polygon vertex as first triangle vertex */
for (i = 2; i < nr; i += 1) {
sp_setup_tri( setup,
diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.h b/src/gallium/drivers/softpipe/sp_prim_vbuf.h
index ad01cc2..74fe876 100644
--- a/src/gallium/drivers/softpipe/sp_prim_vbuf.h
+++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SP_VBUF_H
diff --git a/src/gallium/drivers/softpipe/sp_quad.h b/src/gallium/drivers/softpipe/sp_quad.h
index e745aa8..a43a4b5 100644
--- a/src/gallium/drivers/softpipe/sp_quad.h
+++ b/src/gallium/drivers/softpipe/sp_quad.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -91,7 +91,7 @@ struct quad_header_output
/**
* Encodes everything we need to know about a 2x2 pixel block. Uses
- * "Channel-Serial" or "SoA" layout.
+ * "Channel-Serial" or "SoA" layout.
*/
struct quad_header {
struct quad_header_input input;
diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c
index 6af1b2d..dd659cc 100644
--- a/src/gallium/drivers/softpipe/sp_quad_blend.c
+++ b/src/gallium/drivers/softpipe/sp_quad_blend.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -117,7 +117,7 @@ do { \
static void
-logicop_quad(struct quad_stage *qs,
+logicop_quad(struct quad_stage *qs,
float (*quadColor)[4],
float (*dest)[4])
{
@@ -229,7 +229,7 @@ logicop_quad(struct quad_stage *qs,
* \param has_dst_alpha does the dest color buffer have an alpha channel?
*/
static void
-blend_quad(struct quad_stage *qs,
+blend_quad(struct quad_stage *qs,
float (*quadColor)[4],
float (*dest)[4],
unsigned blend_index,
@@ -273,7 +273,7 @@ blend_quad(struct quad_stage *qs,
VEC4_MUL(source[0], quadColor[0], alpha); /* R */
VEC4_MUL(source[1], quadColor[1], alpha); /* G */
VEC4_MUL(source[2], quadColor[2], alpha); /* B */
- }
+ }
else {
VEC4_COPY(source[0], quadColor[0]); /* R */
VEC4_COPY(source[1], quadColor[1]); /* G */
@@ -787,7 +787,7 @@ colormask_quad(unsigned colormask,
static void
-blend_fallback(struct quad_stage *qs,
+blend_fallback(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -795,14 +795,14 @@ blend_fallback(struct quad_stage *qs,
const struct pipe_blend_state *blend = softpipe->blend;
unsigned cbuf;
- for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++)
+ for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++)
{
/* which blend/mask state index to use: */
const uint blend_buf = blend->independent_blend_enable ? cbuf : 0;
float dest[4][QUAD_SIZE];
struct softpipe_cached_tile *tile
= sp_get_cached_tile(softpipe->cbuf_cache[cbuf],
- quads[0]->input.x0,
+ quads[0]->input.x0,
quads[0]->input.y0);
boolean has_dst_alpha
= util_format_has_alpha(softpipe->framebuffer.cbufs[cbuf]->format);
@@ -814,7 +814,7 @@ blend_fallback(struct quad_stage *qs,
const int itx = (quad->input.x0 & (TILE_SIZE-1));
const int ity = (quad->input.y0 & (TILE_SIZE-1));
- /* get/swizzle dest colors
+ /* get/swizzle dest colors
*/
for (j = 0; j < QUAD_SIZE; j++) {
int x = itx + (j & 1);
@@ -834,7 +834,7 @@ blend_fallback(struct quad_stage *qs,
if (blend->rt[blend_buf].colormask != 0xf)
colormask_quad( blend->rt[cbuf].colormask, quadColor, dest);
-
+
/* Output color values
*/
for (j = 0; j < QUAD_SIZE; j++) {
@@ -852,7 +852,7 @@ blend_fallback(struct quad_stage *qs,
static void
-blend_single_add_src_alpha_inv_src_alpha(struct quad_stage *qs,
+blend_single_add_src_alpha_inv_src_alpha(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -864,7 +864,7 @@ blend_single_add_src_alpha_inv_src_alpha(struct quad_stage *qs,
struct softpipe_cached_tile *tile
= sp_get_cached_tile(qs->softpipe->cbuf_cache[0],
- quads[0]->input.x0,
+ quads[0]->input.x0,
quads[0]->input.y0);
for (q = 0; q < nr; q++) {
@@ -873,7 +873,7 @@ blend_single_add_src_alpha_inv_src_alpha(struct quad_stage *qs,
const float *alpha = quadColor[3];
const int itx = (quad->input.x0 & (TILE_SIZE-1));
const int ity = (quad->input.y0 & (TILE_SIZE-1));
-
+
/* get/swizzle dest colors */
for (j = 0; j < QUAD_SIZE; j++) {
int x = itx + (j & 1);
@@ -912,7 +912,7 @@ blend_single_add_src_alpha_inv_src_alpha(struct quad_stage *qs,
}
static void
-blend_single_add_one_one(struct quad_stage *qs,
+blend_single_add_one_one(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -921,7 +921,7 @@ blend_single_add_one_one(struct quad_stage *qs,
struct softpipe_cached_tile *tile
= sp_get_cached_tile(qs->softpipe->cbuf_cache[0],
- quads[0]->input.x0,
+ quads[0]->input.x0,
quads[0]->input.y0);
for (q = 0; q < nr; q++) {
@@ -929,7 +929,7 @@ blend_single_add_one_one(struct quad_stage *qs,
float (*quadColor)[4] = quad->output.color[0];
const int itx = (quad->input.x0 & (TILE_SIZE-1));
const int ity = (quad->input.y0 & (TILE_SIZE-1));
-
+
/* get/swizzle dest colors */
for (j = 0; j < QUAD_SIZE; j++) {
int x = itx + (j & 1);
@@ -938,7 +938,7 @@ blend_single_add_one_one(struct quad_stage *qs,
dest[i][j] = tile->data.color[y][x][i];
}
}
-
+
VEC4_ADD_SAT(quadColor[0], quadColor[0], dest[0]); /* R */
VEC4_ADD_SAT(quadColor[1], quadColor[1], dest[1]); /* G */
VEC4_ADD_SAT(quadColor[2], quadColor[2], dest[2]); /* B */
@@ -958,7 +958,7 @@ blend_single_add_one_one(struct quad_stage *qs,
static void
-single_output_color(struct quad_stage *qs,
+single_output_color(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -966,7 +966,7 @@ single_output_color(struct quad_stage *qs,
struct softpipe_cached_tile *tile
= sp_get_cached_tile(qs->softpipe->cbuf_cache[0],
- quads[0]->input.x0,
+ quads[0]->input.x0,
quads[0]->input.y0);
for (q = 0; q < nr; q++) {
@@ -974,7 +974,7 @@ single_output_color(struct quad_stage *qs,
float (*quadColor)[4] = quad->output.color[0];
const int itx = (quad->input.x0 & (TILE_SIZE-1));
const int ity = (quad->input.y0 & (TILE_SIZE-1));
-
+
for (j = 0; j < QUAD_SIZE; j++) {
if (quad->inout.mask & (1 << j)) {
int x = itx + (j & 1);
@@ -988,7 +988,7 @@ single_output_color(struct quad_stage *qs,
}
static void
-blend_noop(struct quad_stage *qs,
+blend_noop(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -996,7 +996,7 @@ blend_noop(struct quad_stage *qs,
static void
-choose_blend_quad(struct quad_stage *qs,
+choose_blend_quad(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -1004,7 +1004,7 @@ choose_blend_quad(struct quad_stage *qs,
const struct pipe_blend_state *blend = softpipe->blend;
qs->run = blend_fallback;
-
+
if (softpipe->framebuffer.nr_cbufs == 0) {
qs->run = blend_noop;
}
diff --git a/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/src/gallium/drivers/softpipe/sp_quad_depth_test.c
index 89b2a91..861f7e1 100644
--- a/src/gallium/drivers/softpipe/sp_quad_depth_test.c
+++ b/src/gallium/drivers/softpipe/sp_quad_depth_test.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* Copyright 2010 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -132,7 +132,7 @@ interpolate_quad_depth( struct quad_header *quad )
* Compute the depth_data::qzzzz[] values from the float fragment Z values.
*/
static void
-convert_quad_depth( struct depth_data *data,
+convert_quad_depth( struct depth_data *data,
const struct quad_header *quad )
{
unsigned j;
@@ -192,7 +192,7 @@ convert_quad_depth( struct depth_data *data,
* Compute the depth_data::shader_stencil_refs[] values from the float fragment stencil values.
*/
static void
-convert_quad_stencil( struct depth_data *data,
+convert_quad_stencil( struct depth_data *data,
const struct quad_header *quad )
{
unsigned j;
@@ -306,7 +306,7 @@ do_stencil_test(struct depth_data *data,
for (j = 0; j < QUAD_SIZE; j++) {
if (data->use_shader_stencil_refs)
refs[j] = data->shader_stencil_refs[j] & valMask;
- else
+ else
refs[j] = ref & valMask;
}
@@ -470,7 +470,7 @@ apply_stencil_op(struct depth_data *data,
}
}
-
+
/**
* To increase efficiency, we should probably have multiple versions
@@ -478,7 +478,7 @@ apply_stencil_op(struct depth_data *data,
* Try to effectively do that with codegen...
*/
static boolean
-depth_test_quad(struct quad_stage *qs,
+depth_test_quad(struct quad_stage *qs,
struct depth_data *data,
struct quad_header *quad)
{
@@ -491,41 +491,41 @@ depth_test_quad(struct quad_stage *qs,
/* zmask = 0 */
break;
case PIPE_FUNC_LESS:
- /* Note this is pretty much a single sse or cell instruction.
+ /* Note this is pretty much a single sse or cell instruction.
* Like this: quad->mask &= (quad->outputs.depth < zzzz);
*/
for (j = 0; j < QUAD_SIZE; j++) {
- if (data->qzzzz[j] < data->bzzzz[j])
+ if (data->qzzzz[j] < data->bzzzz[j])
zmask |= 1 << j;
}
break;
case PIPE_FUNC_EQUAL:
for (j = 0; j < QUAD_SIZE; j++) {
- if (data->qzzzz[j] == data->bzzzz[j])
+ if (data->qzzzz[j] == data->bzzzz[j])
zmask |= 1 << j;
}
break;
case PIPE_FUNC_LEQUAL:
for (j = 0; j < QUAD_SIZE; j++) {
- if (data->qzzzz[j] <= data->bzzzz[j])
+ if (data->qzzzz[j] <= data->bzzzz[j])
zmask |= (1 << j);
}
break;
case PIPE_FUNC_GREATER:
for (j = 0; j < QUAD_SIZE; j++) {
- if (data->qzzzz[j] > data->bzzzz[j])
+ if (data->qzzzz[j] > data->bzzzz[j])
zmask |= (1 << j);
}
break;
case PIPE_FUNC_NOTEQUAL:
for (j = 0; j < QUAD_SIZE; j++) {
- if (data->qzzzz[j] != data->bzzzz[j])
+ if (data->qzzzz[j] != data->bzzzz[j])
zmask |= (1 << j);
}
break;
case PIPE_FUNC_GEQUAL:
for (j = 0; j < QUAD_SIZE; j++) {
- if (data->qzzzz[j] >= data->bzzzz[j])
+ if (data->qzzzz[j] >= data->bzzzz[j])
zmask |= (1 << j);
}
break;
@@ -562,7 +562,7 @@ depth_test_quad(struct quad_stage *qs,
* depth testing.
*/
static void
-depth_stencil_test_quad(struct quad_stage *qs,
+depth_stencil_test_quad(struct quad_stage *qs,
struct depth_data *data,
struct quad_header *quad)
{
@@ -668,8 +668,8 @@ ALPHATEST( GEQUAL, >= )
/* XXX: Incorporate into shader using KILP.
*/
static int
-alpha_test_quads(struct quad_stage *qs,
- struct quad_header *quads[],
+alpha_test_quads(struct quad_stage *qs,
+ struct quad_header *quads[],
unsigned nr)
{
switch (qs->softpipe->depth_stencil->alpha.func) {
@@ -695,7 +695,7 @@ alpha_test_quads(struct quad_stage *qs,
}
-static unsigned mask_count[16] =
+static unsigned mask_count[16] =
{
0, /* 0x0 */
1, /* 0x1 */
@@ -721,7 +721,7 @@ static unsigned mask_count[16] =
* General depth/stencil test function. Used when there's no fast-path.
*/
static void
-depth_test_quads_fallback(struct quad_stage *qs,
+depth_test_quads_fallback(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -743,8 +743,8 @@ depth_test_quads_fallback(struct quad_stage *qs,
data.ps = qs->softpipe->framebuffer.zsbuf;
data.format = data.ps->format;
- data.tile = sp_get_cached_tile(qs->softpipe->zsbuf_cache,
- quads[0]->input.x0,
+ data.tile = sp_get_cached_tile(qs->softpipe->zsbuf_cache,
+ quads[0]->input.x0,
quads[0]->input.y0);
for (i = 0; i < nr; i++) {
@@ -760,7 +760,7 @@ depth_test_quads_fallback(struct quad_stage *qs,
if (qs->softpipe->depth_stencil->stencil[0].enabled) {
if (shader_stencil_ref)
convert_quad_stencil(&data, quads[i]);
-
+
depth_stencil_test_quad(qs, &data, quads[i]);
write_depth_stencil_values(&data, quads[i]);
}
@@ -779,7 +779,7 @@ depth_test_quads_fallback(struct quad_stage *qs,
}
if (qs->softpipe->active_query_count) {
- for (i = 0; i < nr; i++)
+ for (i = 0; i < nr; i++)
qs->softpipe->occlusion_count += mask_count[quads[i]->inout.mask];
}
@@ -823,7 +823,7 @@ depth_test_quads_fallback(struct quad_stage *qs,
static void
-depth_noop(struct quad_stage *qs,
+depth_noop(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -833,7 +833,7 @@ depth_noop(struct quad_stage *qs,
static void
-choose_depth_test(struct quad_stage *qs,
+choose_depth_test(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -864,12 +864,12 @@ choose_depth_test(struct quad_stage *qs,
!stencil) {
qs->run = depth_noop;
}
- else if (!alpha &&
- interp_depth &&
- depth &&
- depthwrite &&
+ else if (!alpha &&
+ interp_depth &&
+ depth &&
+ depthwrite &&
!occlusion &&
- !stencil)
+ !stencil)
{
if (qs->softpipe->framebuffer.zsbuf->format == PIPE_FORMAT_Z16_UNORM) {
switch (depthfunc) {
diff --git a/src/gallium/drivers/softpipe/sp_quad_depth_test_tmp.h b/src/gallium/drivers/softpipe/sp_quad_depth_test_tmp.h
index 25af415..41916d8 100644
--- a/src/gallium/drivers/softpipe/sp_quad_depth_test_tmp.h
+++ b/src/gallium/drivers/softpipe/sp_quad_depth_test_tmp.h
@@ -1,7 +1,7 @@
/**************************************************************************
- *
+ *
* Copyright 2010 VMware, Inc. All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -9,11 +9,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -21,7 +21,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -46,7 +46,7 @@
* triangles may generate non-sequential quads.
*/
static void
-NAME(struct quad_stage *qs,
+NAME(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -77,7 +77,7 @@ NAME(struct quad_stage *qs,
const unsigned outmask = quads[i]->inout.mask;
const int dx = quads[i]->input.x0 - ix;
unsigned mask = 0;
-
+
/* compute depth for this quad */
idepth[0] = init_idepth[0] + dx * depth_step;
idepth[1] = init_idepth[1] + dx * depth_step;
diff --git a/src/gallium/drivers/softpipe/sp_quad_fs.c b/src/gallium/drivers/softpipe/sp_quad_fs.c
index 90f4787..75439c3 100644
--- a/src/gallium/drivers/softpipe/sp_quad_fs.c
+++ b/src/gallium/drivers/softpipe/sp_quad_fs.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2008 VMware, Inc. All rights reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Vertices are just an array of floats, with all the attributes
@@ -103,7 +103,7 @@ coverage_quad(struct quad_stage *qs, struct quad_header *quad)
* Called via quad_stage::run()
*/
static void
-shade_quads(struct quad_stage *qs,
+shade_quads(struct quad_stage *qs,
struct quad_header *quads[],
unsigned nr)
{
@@ -126,11 +126,11 @@ shade_quads(struct quad_stage *qs,
quads[nr_quads++] = quads[i];
}
-
+
if (nr_quads)
qs->next->run(qs->next, quads, nr_quads);
}
-
+
/**
* Per-primitive (or per-begin?) setup
@@ -140,7 +140,7 @@ shade_begin(struct quad_stage *qs)
{
struct softpipe_context *softpipe = qs->softpipe;
- softpipe->fs->prepare( softpipe->fs,
+ softpipe->fs->prepare( softpipe->fs,
softpipe->fs_machine,
(struct tgsi_sampler **)
softpipe->tgsi.frag_samplers_list );
diff --git a/src/gallium/drivers/softpipe/sp_quad_pipe.c b/src/gallium/drivers/softpipe/sp_quad_pipe.c
index 2cfd02a..bede2eb 100644
--- a/src/gallium/drivers/softpipe/sp_quad_pipe.c
+++ b/src/gallium/drivers/softpipe/sp_quad_pipe.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/softpipe/sp_quad_pipe.h b/src/gallium/drivers/softpipe/sp_quad_pipe.h
index c0aa134..f21dc01 100644
--- a/src/gallium/drivers/softpipe/sp_quad_pipe.h
+++ b/src/gallium/drivers/softpipe/sp_quad_pipe.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/softpipe/sp_query.c b/src/gallium/drivers/softpipe/sp_query.c
index 4ae69c1..ec0abb1 100644
--- a/src/gallium/drivers/softpipe/sp_query.c
+++ b/src/gallium/drivers/softpipe/sp_query.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
@@ -51,7 +51,7 @@ static struct softpipe_query *softpipe_query( struct pipe_query *p )
}
static struct pipe_query *
-softpipe_create_query(struct pipe_context *pipe,
+softpipe_create_query(struct pipe_context *pipe,
unsigned type)
{
struct softpipe_query* sq;
@@ -136,7 +136,7 @@ softpipe_end_query(struct pipe_context *pipe, struct pipe_query *q)
static boolean
-softpipe_get_query_result(struct pipe_context *pipe,
+softpipe_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
boolean wait,
void *vresult)
diff --git a/src/gallium/drivers/softpipe/sp_query.h b/src/gallium/drivers/softpipe/sp_query.h
index 736c033..9c2d9cb 100644
--- a/src/gallium/drivers/softpipe/sp_query.h
+++ b/src/gallium/drivers/softpipe/sp_query.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Author:
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index cbdea19..017f49c 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/drivers/softpipe/sp_screen.h b/src/gallium/drivers/softpipe/sp_screen.h
index f741454..1ac1382 100644
--- a/src/gallium/drivers/softpipe/sp_screen.h
+++ b/src/gallium/drivers/softpipe/sp_screen.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
@@ -45,7 +45,7 @@ struct softpipe_screen {
/* Increments whenever textures are modified. Contexts can track
* this.
*/
- unsigned timestamp;
+ unsigned timestamp;
};
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c
index 0ce28f4..583ca82 100644
--- a/src/gallium/drivers/softpipe/sp_setup.c
+++ b/src/gallium/drivers/softpipe/sp_setup.c
@@ -371,8 +371,8 @@ setup_sort_vertices(struct setup_context *setup,
* - two-sided stencil test
* 0 = front-facing, 1 = back-facing
*/
- setup->facing =
- ((det < 0.0) ^
+ setup->facing =
+ ((det < 0.0) ^
(setup->softpipe->rasterizer->front_ccw));
{
@@ -808,7 +808,7 @@ sp_setup_tri(struct setup_context *setup,
if (setup->softpipe->no_rast)
return;
-
+
det = calc_det(v0, v1, v2);
/*
debug_printf("%s\n", __FUNCTION__ );
diff --git a/src/gallium/drivers/softpipe/sp_setup.h b/src/gallium/drivers/softpipe/sp_setup.h
index 9c8844d..7f4af3c 100644
--- a/src/gallium/drivers/softpipe/sp_setup.h
+++ b/src/gallium/drivers/softpipe/sp_setup.h
@@ -30,7 +30,7 @@
struct setup_context;
struct softpipe_context;
-void
+void
sp_setup_tri( struct setup_context *setup,
const float (*v0)[4],
const float (*v1)[4],
diff --git a/src/gallium/drivers/softpipe/sp_state.h b/src/gallium/drivers/softpipe/sp_state.h
index 525bf23..54dc766 100644
--- a/src/gallium/drivers/softpipe/sp_state.h
+++ b/src/gallium/drivers/softpipe/sp_state.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/softpipe/sp_state_blend.c b/src/gallium/drivers/softpipe/sp_state_blend.c
index 1286382..1f7e938 100644
--- a/src/gallium/drivers/softpipe/sp_state_blend.c
+++ b/src/gallium/drivers/softpipe/sp_state_blend.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/softpipe/sp_state_clip.c b/src/gallium/drivers/softpipe/sp_state_clip.c
index f3a4c23..8f1d636 100644
--- a/src/gallium/drivers/softpipe/sp_state_clip.c
+++ b/src/gallium/drivers/softpipe/sp_state_clip.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c
index 3ba4d93..8269545 100644
--- a/src/gallium/drivers/softpipe/sp_state_derived.c
+++ b/src/gallium/drivers/softpipe/sp_state_derived.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_math.h"
@@ -254,10 +254,10 @@ void softpipe_update_derived( struct softpipe_context *softpipe )
softpipe->tex_timestamp = sp_screen->timestamp;
softpipe->dirty |= SP_NEW_TEXTURE;
}
-
+
if (softpipe->dirty & (SP_NEW_SAMPLER |
SP_NEW_TEXTURE |
- SP_NEW_FS |
+ SP_NEW_FS |
SP_NEW_VS))
update_tgsi_samplers( softpipe );
diff --git a/src/gallium/drivers/softpipe/sp_state_rasterizer.c b/src/gallium/drivers/softpipe/sp_state_rasterizer.c
index 3cd4acd..3179a53 100644
--- a/src/gallium/drivers/softpipe/sp_state_rasterizer.c
+++ b/src/gallium/drivers/softpipe/sp_state_rasterizer.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "pipe/p_defines.h"
diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c
index b59fbc3..edf180f 100644
--- a/src/gallium/drivers/softpipe/sp_state_sampler.c
+++ b/src/gallium/drivers/softpipe/sp_state_sampler.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors:
@@ -305,7 +305,7 @@ get_sampler_varient( unsigned unit,
key.bits.unit = unit;
key.bits.pad = 0;
- if (sampler->current &&
+ if (sampler->current &&
key.value == sampler->current->key.value) {
v = sampler->current;
}
@@ -321,7 +321,7 @@ get_sampler_varient( unsigned unit,
sampler->varients = v;
}
}
-
+
sampler->current = v;
return v;
}
@@ -344,13 +344,13 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
texture = softpipe->vertex_sampler_views[i]->texture;
}
- softpipe->tgsi.vert_samplers_list[i] =
+ softpipe->tgsi.vert_samplers_list[i] =
get_sampler_varient( i,
sp_sampler(softpipe->vertex_samplers[i]),
texture,
TGSI_PROCESSOR_VERTEX );
- sp_sampler_varient_bind_texture( softpipe->tgsi.vert_samplers_list[i],
+ sp_sampler_varient_bind_texture( softpipe->tgsi.vert_samplers_list[i],
softpipe->vertex_tex_cache[i],
texture );
}
@@ -394,7 +394,7 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
texture,
TGSI_PROCESSOR_FRAGMENT );
- sp_sampler_varient_bind_texture( softpipe->tgsi.frag_samplers_list[i],
+ sp_sampler_varient_bind_texture( softpipe->tgsi.frag_samplers_list[i],
softpipe->tex_cache[i],
texture );
}
diff --git a/src/gallium/drivers/softpipe/sp_state_shader.c b/src/gallium/drivers/softpipe/sp_state_shader.c
index 7fff338..ec65999 100644
--- a/src/gallium/drivers/softpipe/sp_state_shader.c
+++ b/src/gallium/drivers/softpipe/sp_state_shader.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "sp_context.h"
@@ -51,7 +51,7 @@ softpipe_create_fs_state(struct pipe_context *pipe,
unsigned i;
/* debug */
- if (softpipe->dump_fs)
+ if (softpipe->dump_fs)
tgsi_dump(templ->tokens, 0);
/* codegen */
@@ -134,7 +134,7 @@ softpipe_create_vs_state(struct pipe_context *pipe,
struct sp_vertex_shader *state;
state = CALLOC_STRUCT(sp_vertex_shader);
- if (state == NULL )
+ if (state == NULL )
goto fail;
/* copy shader tokens, the ones passed in will go away.
@@ -144,7 +144,7 @@ softpipe_create_vs_state(struct pipe_context *pipe,
goto fail;
state->draw_data = draw_create_vertex_shader(softpipe->draw, templ);
- if (state->draw_data == NULL)
+ if (state->draw_data == NULL)
goto fail;
state->max_sampler = state->draw_data->info.file_max[TGSI_FILE_SAMPLER];
diff --git a/src/gallium/drivers/softpipe/sp_state_surface.c b/src/gallium/drivers/softpipe/sp_state_surface.c
index 2db6fae..3ab0ada 100644
--- a/src/gallium/drivers/softpipe/sp_state_surface.c
+++ b/src/gallium/drivers/softpipe/sp_state_surface.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/softpipe/sp_state_vertex.c b/src/gallium/drivers/softpipe/sp_state_vertex.c
index 7d8055f..03a0806 100644
--- a/src/gallium/drivers/softpipe/sp_state_vertex.c
+++ b/src/gallium/drivers/softpipe/sp_state_vertex.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/softpipe/sp_surface.c b/src/gallium/drivers/softpipe/sp_surface.c
index 55b27e6..f85c23d 100644
--- a/src/gallium/drivers/softpipe/sp_surface.c
+++ b/src/gallium/drivers/softpipe/sp_surface.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "util/u_surface.h"
diff --git a/src/gallium/drivers/softpipe/sp_surface.h b/src/gallium/drivers/softpipe/sp_surface.h
index 22de3ba..e3b04c7 100644
--- a/src/gallium/drivers/softpipe/sp_surface.h
+++ b/src/gallium/drivers/softpipe/sp_surface.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
*
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/* Authors: Keith Whitwell
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 2eac4c7..5fccdd4 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2008-2010 VMware, Inc. All rights reserved.
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -672,8 +672,8 @@ get_texel_2d(const struct sp_sampler_varient *samp,
*/
static INLINE void
get_texel_quad_2d_no_border_single_tile(const struct sp_sampler_varient *samp,
- union tex_tile_address addr,
- unsigned x, unsigned y,
+ union tex_tile_address addr,
+ unsigned x, unsigned y,
const float *out[4])
{
const struct softpipe_tex_cached_tile *tile;
@@ -684,7 +684,7 @@ get_texel_quad_2d_no_border_single_tile(const struct sp_sampler_varient *samp,
x %= TILE_SIZE;
tile = sp_get_cached_tile_tex(samp->cache, addr);
-
+
out[0] = &tile->data.color[y ][x ][0];
out[1] = &tile->data.color[y ][x+1][0];
out[2] = &tile->data.color[y+1][x ][0];
@@ -697,7 +697,7 @@ get_texel_quad_2d_no_border_single_tile(const struct sp_sampler_varient *samp,
static INLINE void
get_texel_quad_2d_no_border(const struct sp_sampler_varient *samp,
union tex_tile_address addr,
- int x0, int y0,
+ int x0, int y0,
int x1, int y1,
const float *out[4])
{
@@ -712,7 +712,7 @@ get_texel_quad_2d_no_border(const struct sp_sampler_varient *samp,
static INLINE void
get_texel_quad_2d(const struct sp_sampler_varient *samp,
union tex_tile_address addr,
- int x0, int y0,
+ int x0, int y0,
int x1, int y1,
const float *out[4])
{
@@ -827,8 +827,8 @@ img_filter_2d_linear_repeat_POT(struct tgsi_sampler *tgsi_sampler,
int x0 = uflr & (xpot - 1);
int y0 = vflr & (ypot - 1);
- const float *tx[4];
-
+ const float *tx[4];
+
/* Can we fetch all four at once:
*/
if (x0 < xmax && y0 < ymax) {
@@ -842,8 +842,8 @@ img_filter_2d_linear_repeat_POT(struct tgsi_sampler *tgsi_sampler,
/* interpolate R, G, B, A */
for (c = 0; c < 4; c++) {
- rgba[c][j] = lerp_2d(xw, yw,
- tx[0][c], tx[1][c],
+ rgba[c][j] = lerp_2d(xw, yw,
+ tx[0][c], tx[1][c],
tx[2][c], tx[3][c]);
}
}
@@ -927,17 +927,17 @@ img_filter_2d_nearest_clamp_POT(struct tgsi_sampler *tgsi_sampler,
const float *out;
x0 = util_ifloor(u);
- if (x0 < 0)
+ if (x0 < 0)
x0 = 0;
else if (x0 > xpot - 1)
x0 = xpot - 1;
y0 = util_ifloor(v);
- if (y0 < 0)
+ if (y0 < 0)
y0 = 0;
else if (y0 > ypot - 1)
y0 = ypot - 1;
-
+
out = get_texel_2d_no_border(samp, addr, x0, y0);
for (c = 0; c < 4; c++) {
@@ -1014,7 +1014,7 @@ img_filter_2d_nearest(struct tgsi_sampler *tgsi_sampler,
assert(width > 0);
assert(height > 0);
-
+
addr.value = 0;
addr.bits.level = samp->level;
@@ -1066,7 +1066,7 @@ img_filter_cube_nearest(struct tgsi_sampler *tgsi_sampler,
assert(width > 0);
assert(height > 0);
-
+
addr.value = 0;
addr.bits.level = samp->level;
@@ -1124,7 +1124,7 @@ img_filter_3d_nearest(struct tgsi_sampler *tgsi_sampler,
int c;
for (c = 0; c < 4; c++) {
rgba[c][j] = out[c];
- }
+ }
}
}
@@ -1305,12 +1305,12 @@ img_filter_3d_linear(struct tgsi_sampler *tgsi_sampler,
const float *tx01 = get_texel_3d(samp, addr, x1[j], y0[j], z0[j]);
const float *tx02 = get_texel_3d(samp, addr, x0[j], y1[j], z0[j]);
const float *tx03 = get_texel_3d(samp, addr, x1[j], y1[j], z0[j]);
-
+
const float *tx10 = get_texel_3d(samp, addr, x0[j], y0[j], z1[j]);
const float *tx11 = get_texel_3d(samp, addr, x1[j], y0[j], z1[j]);
const float *tx12 = get_texel_3d(samp, addr, x0[j], y1[j], z1[j]);
const float *tx13 = get_texel_3d(samp, addr, x1[j], y1[j], z1[j]);
-
+
/* interpolate R, G, B, A */
for (c = 0; c < 4; c++) {
rgba[c][j] = lerp_3d(xw[j], yw[j], zw[j],
@@ -1370,7 +1370,7 @@ mip_filter_linear(struct tgsi_sampler *tgsi_sampler,
lambda = lod[0];
level0 = (int)lambda;
- if (lambda < 0.0) {
+ if (lambda < 0.0) {
samp->level = 0;
samp->mag_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba);
}
@@ -1435,7 +1435,7 @@ mip_filter_nearest(struct tgsi_sampler *tgsi_sampler,
*/
lambda = lod[0];
- if (lambda < 0.0) {
+ if (lambda < 0.0) {
samp->level = 0;
samp->mag_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba);
}
@@ -1477,7 +1477,7 @@ mip_filter_none(struct tgsi_sampler *tgsi_sampler,
*/
lambda = lod[0];
- if (lambda < 0.0) {
+ if (lambda < 0.0) {
samp->mag_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba);
}
else {
@@ -1523,7 +1523,7 @@ mip_filter_linear_2d_linear_repeat_POT(
/* Catches both negative and large values of level0:
*/
- if ((unsigned)level0 >= texture->last_level) {
+ if ((unsigned)level0 >= texture->last_level) {
if (level0 < 0)
samp->level = 0;
else
@@ -1825,7 +1825,7 @@ get_lambda_func(const union sp_sampler_key key)
{
if (key.bits.processor == TGSI_PROCESSOR_VERTEX)
return compute_lambda_vert;
-
+
switch (key.bits.target) {
case PIPE_TEXTURE_1D:
return compute_lambda_1d;
@@ -1849,7 +1849,7 @@ get_img_filter(const union sp_sampler_key key,
{
switch (key.bits.target) {
case PIPE_TEXTURE_1D:
- if (filter == PIPE_TEX_FILTER_NEAREST)
+ if (filter == PIPE_TEX_FILTER_NEAREST)
return img_filter_1d_nearest;
else
return img_filter_1d_linear;
@@ -1860,7 +1860,7 @@ get_img_filter(const union sp_sampler_key key,
*/
if (key.bits.is_pot &&
sampler->wrap_s == sampler->wrap_t &&
- sampler->normalized_coords)
+ sampler->normalized_coords)
{
switch (sampler->wrap_s) {
case PIPE_TEX_WRAP_REPEAT:
@@ -1884,19 +1884,19 @@ get_img_filter(const union sp_sampler_key key,
}
/* Otherwise use default versions:
*/
- if (filter == PIPE_TEX_FILTER_NEAREST)
+ if (filter == PIPE_TEX_FILTER_NEAREST)
return img_filter_2d_nearest;
else
return img_filter_2d_linear;
break;
case PIPE_TEXTURE_CUBE:
- if (filter == PIPE_TEX_FILTER_NEAREST)
+ if (filter == PIPE_TEX_FILTER_NEAREST)
return img_filter_cube_nearest;
else
return img_filter_cube_linear;
break;
case PIPE_TEXTURE_3D:
- if (filter == PIPE_TEX_FILTER_NEAREST)
+ if (filter == PIPE_TEX_FILTER_NEAREST)
return img_filter_3d_nearest;
else
return img_filter_3d_linear;
@@ -1955,7 +1955,7 @@ sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
samp->linear_texcoord_s = get_linear_wrap( sampler->wrap_s );
samp->linear_texcoord_t = get_linear_wrap( sampler->wrap_t );
samp->linear_texcoord_p = get_linear_wrap( sampler->wrap_r );
-
+
samp->nearest_texcoord_s = get_nearest_wrap( sampler->wrap_s );
samp->nearest_texcoord_t = get_nearest_wrap( sampler->wrap_t );
samp->nearest_texcoord_p = get_nearest_wrap( sampler->wrap_r );
@@ -1964,12 +1964,12 @@ sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
samp->linear_texcoord_s = get_linear_unorm_wrap( sampler->wrap_s );
samp->linear_texcoord_t = get_linear_unorm_wrap( sampler->wrap_t );
samp->linear_texcoord_p = get_linear_unorm_wrap( sampler->wrap_r );
-
+
samp->nearest_texcoord_s = get_nearest_unorm_wrap( sampler->wrap_s );
samp->nearest_texcoord_t = get_nearest_unorm_wrap( sampler->wrap_t );
samp->nearest_texcoord_p = get_nearest_unorm_wrap( sampler->wrap_r );
}
-
+
samp->compute_lambda = get_lambda_func( key );
samp->min_img_filter = get_img_filter(key, sampler->min_img_filter, sampler);
@@ -1977,8 +1977,8 @@ sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
switch (sampler->min_mip_filter) {
case PIPE_TEX_MIPFILTER_NONE:
- if (sampler->min_img_filter == sampler->mag_img_filter)
- samp->mip_filter = samp->min_img_filter;
+ if (sampler->min_img_filter == sampler->mag_img_filter)
+ samp->mip_filter = samp->min_img_filter;
else
samp->mip_filter = mip_filter_none;
break;
@@ -1997,7 +1997,7 @@ sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
{
samp->mip_filter = mip_filter_linear_2d_linear_repeat_POT;
}
- else
+ else
{
samp->mip_filter = mip_filter_linear;
}
@@ -2013,7 +2013,7 @@ sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
*/
samp->compare = samp->mip_filter;
}
-
+
if (key.bits.target == PIPE_TEXTURE_CUBE) {
samp->base.get_samples = sample_cube;
}
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.h b/src/gallium/drivers/softpipe/sp_tex_sample.h
index 6114acf..6d2cfc1 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.h
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.h
@@ -1,5 +1,5 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
* Copyright 2010 VMware, Inc. All rights reserved.
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SP_TEX_SAMPLE_H
@@ -38,7 +38,7 @@ typedef void (*wrap_nearest_func)(const float s[4],
unsigned size,
int icoord[4]);
-typedef void (*wrap_linear_func)(const float s[4],
+typedef void (*wrap_linear_func)(const float s[4],
unsigned size,
int icoord0[4],
int icoord1[4],
@@ -97,7 +97,7 @@ struct sp_sampler_varient
unsigned level;
unsigned faces[4];
-
+
wrap_nearest_func nearest_texcoord_s;
wrap_nearest_func nearest_texcoord_t;
wrap_nearest_func nearest_texcoord_p;
@@ -113,7 +113,7 @@ struct sp_sampler_varient
filter_func mip_filter;
filter_func compare;
-
+
/* Linked list:
*/
struct sp_sampler_varient *next;
@@ -121,7 +121,7 @@ struct sp_sampler_varient
struct sp_sampler;
-/* Create a sampler varient for a given set of non-orthogonal state. Currently the
+/* Create a sampler varient for a given set of non-orthogonal state. Currently the
*/
struct sp_sampler_varient *
sp_create_sampler_varient( const struct pipe_sampler_state *sampler,
diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
index 1393164..aa208bd 100644
--- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -40,7 +40,7 @@
#include "sp_texture.h"
#include "sp_tex_tile_cache.h"
-
+
struct softpipe_tex_tile_cache *
sp_create_tex_tile_cache( struct pipe_context *pipe )
@@ -210,10 +210,10 @@ sp_flush_tex_tile_cache(struct softpipe_tex_tile_cache *tc)
static INLINE uint
tex_cache_pos( union tex_tile_address addr )
{
- uint entry = (addr.bits.x +
- addr.bits.y * 9 +
- addr.bits.z * 3 +
- addr.bits.face +
+ uint entry = (addr.bits.x +
+ addr.bits.y * 9 +
+ addr.bits.z * 3 +
+ addr.bits.face +
addr.bits.level * 7);
return entry % NUM_ENTRIES;
@@ -224,11 +224,11 @@ tex_cache_pos( union tex_tile_address addr )
* Tiles are read-only and indexed with more params.
*/
const struct softpipe_tex_cached_tile *
-sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
+sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
union tex_tile_address addr )
{
struct softpipe_tex_cached_tile *tile;
-
+
tile = tc->entries + tex_cache_pos( addr );
if (addr.value != tile->addr.value) {
@@ -262,7 +262,7 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
tc->tex_trans = NULL;
}
- tc->tex_trans =
+ tc->tex_trans =
pipe_get_transfer(tc->pipe, tc->texture,
addr.bits.level,
addr.bits.face + addr.bits.z,
@@ -281,7 +281,7 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
/* get tile from the transfer (view into texture) */
pipe_get_tile_swizzle(tc->pipe,
tc->tex_trans,
- addr.bits.x * TILE_SIZE,
+ addr.bits.x * TILE_SIZE,
addr.bits.y * TILE_SIZE,
TILE_SIZE,
TILE_SIZE,
diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.h b/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
index e0b66bf..4055ddb 100644
--- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
+++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SP_TEX_TILE_CACHE_H
@@ -126,7 +126,7 @@ sp_flush_tex_tile_cache(struct softpipe_tex_tile_cache *tc);
extern const struct softpipe_tex_cached_tile *
-sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
+sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
union tex_tile_address addr );
static INLINE union tex_tile_address
@@ -151,7 +151,7 @@ tex_tile_address( unsigned x,
/* Quickly retrieve tile if it matches last lookup.
*/
static INLINE const struct softpipe_tex_cached_tile *
-sp_get_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
+sp_get_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
union tex_tile_address addr )
{
if (tc->last_tile->addr.value == addr.value)
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c
index 509d998..9109900 100644
--- a/src/gallium/drivers/softpipe/sp_texture.c
+++ b/src/gallium/drivers/softpipe/sp_texture.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/*
* Authors:
@@ -95,7 +95,7 @@ softpipe_displaytarget_layout(struct pipe_screen *screen,
spr->dt = winsys->displaytarget_create(winsys,
spr->base.bind,
spr->base.format,
- spr->base.width0,
+ spr->base.width0,
spr->base.height0,
16,
&spr->stride[0] );
@@ -135,7 +135,7 @@ softpipe_resource_create(struct pipe_screen *screen,
if (!softpipe_resource_layout(screen, spr))
goto fail;
}
-
+
return &spr->base;
fail:
@@ -273,7 +273,7 @@ softpipe_create_surface(struct pipe_context *pipe,
/**
* Free a pipe_surface which was created with softpipe_create_surface().
*/
-static void
+static void
softpipe_surface_destroy(struct pipe_context *pipe,
struct pipe_surface *surf)
{
@@ -350,8 +350,8 @@ softpipe_get_transfer(struct pipe_context *pipe,
pt->layer_stride = pt->stride * nblocksy;
spt->offset = sp_get_tex_image_offset(spr, level, box->z);
-
- spt->offset +=
+
+ spt->offset +=
box->y / util_format_get_blockheight(format) * spt->base.stride +
box->x / util_format_get_blockwidth(format) * util_format_get_blocksize(format);
@@ -365,7 +365,7 @@ softpipe_get_transfer(struct pipe_context *pipe,
* Free a pipe_transfer object which was created with
* softpipe_get_transfer().
*/
-static void
+static void
softpipe_transfer_destroy(struct pipe_context *pipe,
struct pipe_transfer *transfer)
{
@@ -385,7 +385,7 @@ softpipe_transfer_map(struct pipe_context *pipe,
struct softpipe_resource *spr = softpipe_resource(transfer->resource);
struct sw_winsys *winsys = softpipe_screen(pipe->screen)->winsys;
uint8_t *map;
-
+
/* resources backed by display target treated specially:
*/
if (spr->dt) {
diff --git a/src/gallium/drivers/softpipe/sp_texture.h b/src/gallium/drivers/softpipe/sp_texture.h
index 5603110..f914084 100644
--- a/src/gallium/drivers/softpipe/sp_texture.h
+++ b/src/gallium/drivers/softpipe/sp_texture.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SP_TEXTURE_H
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c
index 480860a..ab899e8 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -65,7 +65,7 @@ is_clear_flag_set(const uint *bitvec, union tile_address addr)
bit = bitvec[pos / 32] & (1 << (pos & 31));
return bit;
}
-
+
/**
* Mark the tile at (x,y) as not cleared.
@@ -78,7 +78,7 @@ clear_clear_flag(uint *bitvec, union tile_address addr)
assert(pos / 32 < (MAX_WIDTH / TILE_SIZE) * (MAX_HEIGHT / TILE_SIZE) / 32);
bitvec[pos / 32] &= ~(1 << (pos & 31));
}
-
+
struct softpipe_tile_cache *
sp_create_tile_cache( struct pipe_context *pipe )
@@ -440,11 +440,11 @@ sp_alloc_tile(struct softpipe_tile_cache *tc)
* \param x, y position of tile, in pixels
*/
struct softpipe_cached_tile *
-sp_find_cached_tile(struct softpipe_tile_cache *tc,
+sp_find_cached_tile(struct softpipe_tile_cache *tc,
union tile_address addr )
{
struct pipe_transfer *pt = tc->transfer;
-
+
/* cache pos/entry: */
const int pos = CACHE_POS(addr.bits.x,
addr.bits.y);
diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.h b/src/gallium/drivers/softpipe/sp_tile_cache.h
index 68140b1..58c1338 100644
--- a/src/gallium/drivers/softpipe/sp_tile_cache.h
+++ b/src/gallium/drivers/softpipe/sp_tile_cache.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SP_TILE_CACHE_H
@@ -123,7 +123,7 @@ sp_tile_cache_clear(struct softpipe_tile_cache *tc, const float *rgba,
uint clearValue);
extern struct softpipe_cached_tile *
-sp_find_cached_tile(struct softpipe_tile_cache *tc,
+sp_find_cached_tile(struct softpipe_tile_cache *tc,
union tile_address addr );
@@ -136,14 +136,14 @@ tile_address( unsigned x,
addr.value = 0;
addr.bits.x = x / TILE_SIZE;
addr.bits.y = y / TILE_SIZE;
-
+
return addr;
}
/* Quickly retrieve tile if it matches last lookup.
*/
static INLINE struct softpipe_cached_tile *
-sp_get_cached_tile(struct softpipe_tile_cache *tc,
+sp_get_cached_tile(struct softpipe_tile_cache *tc,
int x, int y )
{
union tile_address addr = tile_address( x, y );
diff --git a/src/gallium/drivers/svga/Makefile b/src/gallium/drivers/svga/Makefile
index 2728779..47161f8 100644
--- a/src/gallium/drivers/svga/Makefile
+++ b/src/gallium/drivers/svga/Makefile
@@ -49,7 +49,7 @@ C_SOURCES = \
svga_resource.c \
svga_resource_texture.c \
svga_resource_buffer.c \
- svga_resource_buffer_upload.c
+ svga_resource_buffer_upload.c
LIBRARY_INCLUDES = \
diff --git a/src/gallium/drivers/svga/SConscript b/src/gallium/drivers/svga/SConscript
index 5455ed0..75e7303 100644
--- a/src/gallium/drivers/svga/SConscript
+++ b/src/gallium/drivers/svga/SConscript
@@ -7,10 +7,10 @@ if env['platform'] in ['linux']:
if env['gcc']:
env.Append(CPPDEFINES = [
- 'HAVE_STDINT_H',
+ 'HAVE_STDINT_H',
'HAVE_SYS_TYPES_H',
])
-
+
env.Prepend(CPPPATH = [
'include',
])
@@ -62,7 +62,7 @@ sources = [
'svga_tgsi_decl_sm20.c',
'svga_tgsi_decl_sm30.c',
'svga_tgsi_insn.c',
-
+
'svgadump/svga_dump.c',
'svgadump/svga_shader_dump.c',
'svgadump/svga_shader_op.c',
diff --git a/src/gallium/drivers/svga/svga_cmd.c b/src/gallium/drivers/svga/svga_cmd.c
index 05eab8a..9d39339 100644
--- a/src/gallium/drivers/svga/svga_cmd.c
+++ b/src/gallium/drivers/svga/svga_cmd.c
@@ -168,7 +168,7 @@ SVGA3D_DefineContext(struct svga_winsys_context *swc) // IN
cmd->cid = swc->cid;
swc->commit(swc);
-
+
return PIPE_OK;
}
@@ -193,16 +193,16 @@ enum pipe_error
SVGA3D_DestroyContext(struct svga_winsys_context *swc) // IN
{
SVGA3dCmdDestroyContext *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_CONTEXT_DESTROY, sizeof *cmd, 0);
if(!cmd)
return PIPE_ERROR_OUT_OF_MEMORY;
-
+
cmd->cid = swc->cid;
-
+
swc->commit(swc);
-
+
return PIPE_OK;
}
@@ -289,7 +289,7 @@ SVGA3D_BeginDefineSurface(struct svga_winsys_context *swc,
memset(*faces, 0, sizeof **faces * SVGA3D_MAX_SURFACE_FACES);
memset(*mipSizes, 0, sizeof **mipSizes * numMipSizes);
-
+
return PIPE_OK;
}
@@ -332,9 +332,9 @@ SVGA3D_DefineSurface2D(struct svga_winsys_context *swc, // IN
mipSizes[0].width = width;
mipSizes[0].height = height;
mipSizes[0].depth = 1;
-
+
swc->commit(swc);;
-
+
return PIPE_OK;
}
@@ -360,15 +360,15 @@ SVGA3D_DestroySurface(struct svga_winsys_context *swc,
struct svga_winsys_surface *sid) // IN
{
SVGA3dCmdDestroySurface *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SURFACE_DESTROY, sizeof *cmd, 1);
if(!cmd)
return PIPE_ERROR_OUT_OF_MEMORY;
-
+
swc->surface_relocation(swc, &cmd->sid, sid, SVGA_RELOC_READ);
swc->commit(swc);;
-
+
return PIPE_OK;
}
@@ -424,13 +424,13 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
const SVGA3dCopyBox *boxes, // IN
uint32 numBoxes) // IN
{
- struct svga_texture *texture = svga_texture(st->base.resource);
+ struct svga_texture *texture = svga_texture(st->base.resource);
SVGA3dCmdSurfaceDMA *cmd;
SVGA3dCmdSurfaceDMASuffix *pSuffix;
uint32 boxesSize = sizeof *boxes * numBoxes;
unsigned region_flags;
unsigned surface_flags;
-
+
if(transfer == SVGA3D_WRITE_HOST_VRAM) {
region_flags = SVGA_RELOC_READ;
surface_flags = SVGA_RELOC_WRITE;
@@ -443,7 +443,7 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
assert(0);
return PIPE_ERROR_BAD_INPUT;
}
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SURFACE_DMA,
sizeof *cmd + boxesSize + sizeof *pSuffix,
@@ -461,7 +461,7 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
cmd->transfer = transfer;
memcpy(&cmd[1], boxes, boxesSize);
-
+
pSuffix = (SVGA3dCmdSurfaceDMASuffix *)((uint8_t*)cmd + sizeof *cmd + boxesSize);
pSuffix->suffixSize = sizeof *pSuffix;
pSuffix->maximumOffset = st->hw_nblocksy*st->base.stride;
@@ -488,7 +488,7 @@ SVGA3D_BufferDMA(struct svga_winsys_context *swc,
SVGA3dCmdSurfaceDMASuffix *pSuffix;
unsigned region_flags;
unsigned surface_flags;
-
+
if(transfer == SVGA3D_WRITE_HOST_VRAM) {
region_flags = SVGA_RELOC_READ;
surface_flags = SVGA_RELOC_WRITE;
@@ -501,7 +501,7 @@ SVGA3D_BufferDMA(struct svga_winsys_context *swc,
assert(0);
return PIPE_ERROR_BAD_INPUT;
}
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SURFACE_DMA,
sizeof *cmd + sizeof *box + sizeof *pSuffix,
@@ -528,7 +528,7 @@ SVGA3D_BufferDMA(struct svga_winsys_context *swc,
box->srcx = guest_offset;
box->srcy = 0;
box->srcz = 0;
-
+
pSuffix = (SVGA3dCmdSurfaceDMASuffix *)((uint8_t*)cmd + sizeof *cmd + sizeof *box);
pSuffix->suffixSize = sizeof *pSuffix;
pSuffix->maximumOffset = guest_offset + size;
@@ -574,7 +574,7 @@ SVGA3D_SetRenderTarget(struct svga_winsys_context *swc,
struct pipe_surface *surface) // IN
{
SVGA3dCmdSetRenderTarget *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SETRENDERTARGET, sizeof *cmd, 1);
if(!cmd)
@@ -677,7 +677,7 @@ SVGA3D_DestroyShader(struct svga_winsys_context *swc,
SVGA3dShaderType type) // IN
{
SVGA3dCmdDestroyShader *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SHADER_DESTROY, sizeof *cmd,
0);
@@ -724,7 +724,7 @@ SVGA3D_SetShaderConst(struct svga_winsys_context *swc,
const void *value) // IN
{
SVGA3dCmdSetShaderConst *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SET_SHADER_CONST, sizeof *cmd,
0);
@@ -788,13 +788,13 @@ SVGA3D_SetShader(struct svga_winsys_context *swc,
uint32 shid) // IN
{
SVGA3dCmdSetShader *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SET_SHADER, sizeof *cmd,
0);
if(!cmd)
return PIPE_ERROR_OUT_OF_MEMORY;
-
+
cmd->cid = swc->cid;
cmd->type = type;
cmd->shid = shid;
@@ -839,9 +839,9 @@ SVGA3D_BeginClear(struct svga_winsys_context *swc,
uint32 numRects) // IN
{
SVGA3dCmdClear *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
- SVGA_3D_CMD_CLEAR,
+ SVGA_3D_CMD_CLEAR,
sizeof *cmd + sizeof **rects * numRects,
0);
if(!cmd)
@@ -942,7 +942,7 @@ SVGA3D_BeginDrawPrimitives(struct svga_winsys_context *swc,
uint32 rangeSize = sizeof **ranges * numRanges;
cmd = SVGA3D_FIFOReserve(swc,
- SVGA_3D_CMD_DRAW_PRIMITIVES,
+ SVGA_3D_CMD_DRAW_PRIMITIVES,
sizeof *cmd + declSize + rangeSize,
numVertexDecls + numRanges);
if(!cmd)
@@ -1037,7 +1037,7 @@ SVGA3D_SurfaceStretchBlt(struct svga_winsys_context *swc,
SVGA3dStretchBltMode mode) // IN
{
SVGA3dCmdSurfaceStretchBlt *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SURFACE_STRETCHBLT, sizeof *cmd,
2);
@@ -1078,7 +1078,7 @@ SVGA3D_SetViewport(struct svga_winsys_context *swc,
SVGA3dRect *rect) // IN
{
SVGA3dCmdSetViewport *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SETVIEWPORT, sizeof *cmd,
0);
@@ -1117,7 +1117,7 @@ SVGA3D_SetScissorRect(struct svga_winsys_context *swc,
SVGA3dRect *rect) // IN
{
SVGA3dCmdSetScissorRect *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SETSCISSORRECT, sizeof *cmd,
0);
@@ -1153,7 +1153,7 @@ enum pipe_error SVGA3D_SetClipPlane(struct svga_winsys_context *swc,
uint32 index, const float *plane)
{
SVGA3dCmdSetClipPlane *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SETCLIPPLANE, sizeof *cmd,
0);
@@ -1194,7 +1194,7 @@ SVGA3D_SetZRange(struct svga_winsys_context *swc,
float zMax) // IN
{
SVGA3dCmdSetZRange *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
SVGA_3D_CMD_SETZRANGE, sizeof *cmd,
0);
@@ -1241,9 +1241,9 @@ SVGA3D_BeginSetTextureState(struct svga_winsys_context *swc,
uint32 numStates) // IN
{
SVGA3dCmdSetTextureState *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
- SVGA_3D_CMD_SETTEXTURESTATE,
+ SVGA_3D_CMD_SETTEXTURESTATE,
sizeof *cmd + sizeof **states * numStates,
numStates);
if(!cmd)
@@ -1287,9 +1287,9 @@ SVGA3D_BeginSetRenderState(struct svga_winsys_context *swc,
uint32 numStates) // IN
{
SVGA3dCmdSetRenderState *cmd;
-
+
cmd = SVGA3D_FIFOReserve(swc,
- SVGA_3D_CMD_SETRENDERSTATE,
+ SVGA_3D_CMD_SETRENDERSTATE,
sizeof *cmd + sizeof **states * numStates,
0);
if(!cmd)
@@ -1335,7 +1335,7 @@ SVGA3D_BeginQuery(struct svga_winsys_context *swc,
cmd->type = type;
swc->commit(swc);
-
+
return PIPE_OK;
}
@@ -1364,7 +1364,7 @@ SVGA3D_EndQuery(struct svga_winsys_context *swc,
SVGA3dCmdEndQuery *cmd;
cmd = SVGA3D_FIFOReserve(swc,
- SVGA_3D_CMD_END_QUERY,
+ SVGA_3D_CMD_END_QUERY,
sizeof *cmd,
1);
if(!cmd)
@@ -1377,7 +1377,7 @@ SVGA3D_EndQuery(struct svga_winsys_context *swc,
SVGA_RELOC_WRITE);
swc->commit(swc);
-
+
return PIPE_OK;
}
@@ -1411,7 +1411,7 @@ SVGA3D_WaitForQuery(struct svga_winsys_context *swc,
SVGA3dCmdWaitForQuery *cmd;
cmd = SVGA3D_FIFOReserve(swc,
- SVGA_3D_CMD_WAIT_FOR_QUERY,
+ SVGA_3D_CMD_WAIT_FOR_QUERY,
sizeof *cmd,
1);
if(!cmd)
@@ -1419,11 +1419,11 @@ SVGA3D_WaitForQuery(struct svga_winsys_context *swc,
cmd->cid = swc->cid;
cmd->type = type;
-
+
swc->region_relocation(swc, &cmd->guestResult, buffer, 0,
SVGA_RELOC_WRITE);
swc->commit(swc);
-
+
return PIPE_OK;
}
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c
index 1e513f1..c2c23c8 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -55,9 +55,9 @@ static void svga_destroy( struct pipe_context *pipe )
svga_hwtnl_destroy( svga->hwtnl );
svga_cleanup_vertex_state(svga);
-
+
svga->swc->destroy(svga->swc);
-
+
svga_destroy_swtnl( svga );
u_upload_destroy( svga->upload_vb );
@@ -153,11 +153,11 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
ret = svga_emit_initial_state( svga );
if (ret)
goto no_state;
-
+
/* Avoid shortcircuiting state with initial value of zero.
*/
memset(&svga->state.hw_clear, 0xcd, sizeof(svga->state.hw_clear));
- memset(&svga->state.hw_clear.framebuffer, 0x0,
+ memset(&svga->state.hw_clear.framebuffer, 0x0,
sizeof(svga->state.hw_clear.framebuffer));
memset(&svga->state.hw_draw, 0xcd, sizeof(svga->state.hw_draw));
@@ -191,7 +191,7 @@ struct pipe_context *svga_context_create( struct pipe_screen *screen,
}
-void svga_context_flush( struct svga_context *svga,
+void svga_context_flush( struct svga_context *svga,
struct pipe_fence_handle **pfence )
{
struct svga_screen *svgascreen = svga_screen(svga->pipe.screen);
@@ -199,7 +199,7 @@ void svga_context_flush( struct svga_context *svga,
svga->curr.nr_fbs = 0;
- /* Unmap upload manager buffers:
+ /* Unmap upload manager buffers:
*/
u_upload_flush(svga->upload_vb);
u_upload_flush(svga->upload_ib);
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h
index 04e281a..c96b0b2 100644
--- a/src/gallium/drivers/svga/svga_context.h
+++ b/src/gallium/drivers/svga/svga_context.h
@@ -88,7 +88,7 @@ struct svga_blend_state {
uint8_t srcblend;
uint8_t dstblend;
uint8_t blendeq;
-
+
boolean separate_alpha_blend_enable;
uint8_t srcblend_alpha;
uint8_t dstblend_alpha;
@@ -104,7 +104,7 @@ struct svga_depth_stencil_state {
unsigned alphatestenable:1;
unsigned alphafunc:8;
-
+
struct {
unsigned enabled:1;
unsigned func:8;
@@ -112,7 +112,7 @@ struct svga_depth_stencil_state {
unsigned zfail:8;
unsigned pass:8;
} stencil[2];
-
+
/* SVGA3D has one ref/mask/writemask triple shared between front &
* back face stencil. We really need two:
*/
@@ -145,7 +145,7 @@ struct svga_rasterizer_state {
float slopescaledepthbias;
float depthbias;
float pointsize;
-
+
unsigned hw_unfilled:16; /* PIPE_POLYGON_MODE_x */
unsigned need_pipeline:16; /* which prims do we need help for? */
};
@@ -175,9 +175,9 @@ struct svga_velems_state {
};
/* Use to calculate differences between state emitted to hardware and
- * current driver-calculated state.
+ * current driver-calculated state.
*/
-struct svga_state
+struct svga_state
{
const struct svga_blend_state *blend;
const struct svga_depth_stencil_state *depth;
@@ -248,7 +248,7 @@ struct svga_hw_clear_state
struct {
float zmin, zmax;
} depthrange;
-
+
struct pipe_framebuffer_state framebuffer;
struct svga_prescale prescale;
};
@@ -331,7 +331,7 @@ struct svga_context
unsigned texture_timestamp;
- /*
+ /*
*/
struct svga_sw_state sw;
struct svga_hw_draw_state hw_draw;
@@ -389,9 +389,9 @@ struct svga_context
/***********************************************************************
- * svga_clear.c:
+ * svga_clear.c:
*/
-void svga_clear(struct pipe_context *pipe,
+void svga_clear(struct pipe_context *pipe,
unsigned buffers,
const float *rgba,
double depth,
@@ -399,7 +399,7 @@ void svga_clear(struct pipe_context *pipe,
/***********************************************************************
- * svga_screen_texture.c:
+ * svga_screen_texture.c:
*/
void svga_mark_surfaces_dirty(struct svga_context *svga);
diff --git a/src/gallium/drivers/svga/svga_debug.h b/src/gallium/drivers/svga/svga_debug.h
index 3a3fcd8..e210b15 100644
--- a/src/gallium/drivers/svga/svga_debug.h
+++ b/src/gallium/drivers/svga/svga_debug.h
@@ -56,7 +56,7 @@ extern int SVGA_DEBUG;
static INLINE void
SVGA_DBG( unsigned flag, const char *fmt, ... )
{
-#ifdef DEBUG
+#ifdef DEBUG
if (SVGA_DEBUG & flag)
{
va_list args;
diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c
index 81dd477..b9fc1bb 100644
--- a/src/gallium/drivers/svga/svga_draw.c
+++ b/src/gallium/drivers/svga/svga_draw.c
@@ -51,7 +51,7 @@ struct svga_hwtnl *svga_hwtnl_create( struct svga_context *svga,
hwtnl->svga = svga;
hwtnl->upload_ib = upload_ib;
-
+
hwtnl->cmd.swc = swc;
return hwtnl;
@@ -76,7 +76,7 @@ void svga_hwtnl_destroy( struct svga_hwtnl *hwtnl )
for (i = 0; i < hwtnl->cmd.prim_count; i++)
pipe_resource_reference(&hwtnl->cmd.prim_ib[i], NULL);
-
+
FREE(hwtnl);
}
@@ -88,13 +88,13 @@ void svga_hwtnl_set_flatshade( struct svga_hwtnl *hwtnl,
{
hwtnl->hw_pv = PV_FIRST;
hwtnl->api_pv = (flatshade && !flatshade_first) ? PV_LAST : PV_FIRST;
-}
+}
void svga_hwtnl_set_unfilled( struct svga_hwtnl *hwtnl,
unsigned mode )
{
hwtnl->api_fillmode = mode;
-}
+}
void svga_hwtnl_reset_vdecl( struct svga_hwtnl *hwtnl,
unsigned count )
@@ -123,7 +123,7 @@ void svga_hwtnl_vdecl( struct svga_hwtnl *hwtnl,
hwtnl->cmd.vdecl[i] = *decl;
- pipe_resource_reference(&hwtnl->cmd.vdecl_vb[i], vb);
+ pipe_resource_reference(&hwtnl->cmd.vdecl_vb[i], vb);
}
@@ -168,22 +168,22 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl )
svga_surface(svga->curr.framebuffer.cbufs[0])->handle : NULL,
hwtnl->cmd.prim_count);
- ret = SVGA3D_BeginDrawPrimitives(swc,
- &vdecl,
- hwtnl->cmd.vdecl_count,
- &prim,
+ ret = SVGA3D_BeginDrawPrimitives(swc,
+ &vdecl,
+ hwtnl->cmd.vdecl_count,
+ &prim,
hwtnl->cmd.prim_count);
- if (ret != PIPE_OK)
+ if (ret != PIPE_OK)
return ret;
-
+
memcpy( vdecl,
hwtnl->cmd.vdecl,
hwtnl->cmd.vdecl_count * sizeof hwtnl->cmd.vdecl[0]);
for (i = 0; i < hwtnl->cmd.vdecl_count; i++) {
- /* Given rangeHint is considered to be relative to indexBias, and
- * indexBias varies per primitive, we cannot accurately supply an
+ /* Given rangeHint is considered to be relative to indexBias, and
+ * indexBias varies per primitive, we cannot accurately supply an
* rangeHint when emitting more than one primitive per draw command.
*/
if (hwtnl->cmd.prim_count == 1) {
@@ -212,7 +212,7 @@ svga_hwtnl_flush( struct svga_hwtnl *hwtnl )
SVGA_RELOC_READ);
pipe_resource_reference(&hwtnl->cmd.prim_ib[i], NULL);
}
-
+
SVGA_FIFOCommitAll( swc );
hwtnl->cmd.prim_count = 0;
}
@@ -368,7 +368,7 @@ enum pipe_error svga_hwtnl_prim( struct svga_hwtnl *hwtnl,
if (ret != PIPE_OK)
return ret;
}
-
+
/* min/max indices are relative to bias */
hwtnl->cmd.min_index[hwtnl->cmd.prim_count] = min_index;
hwtnl->cmd.max_index[hwtnl->cmd.prim_count] = max_index;
diff --git a/src/gallium/drivers/svga/svga_draw.h b/src/gallium/drivers/svga/svga_draw.h
index a2403d8..d734c02 100644
--- a/src/gallium/drivers/svga/svga_draw.h
+++ b/src/gallium/drivers/svga/svga_draw.h
@@ -59,10 +59,10 @@ void svga_hwtnl_reset_vdecl( struct svga_hwtnl *hwtnl,
unsigned count );
-enum pipe_error
+enum pipe_error
svga_hwtnl_draw_arrays( struct svga_hwtnl *hwtnl,
- unsigned prim,
- unsigned start,
+ unsigned prim,
+ unsigned start,
unsigned count);
enum pipe_error
@@ -72,8 +72,8 @@ svga_hwtnl_draw_range_elements( struct svga_hwtnl *hwtnl,
int index_bias,
unsigned min_index,
unsigned max_index,
- unsigned prim,
- unsigned start,
+ unsigned prim,
+ unsigned start,
unsigned count );
enum pipe_error
diff --git a/src/gallium/drivers/svga/svga_draw_arrays.c b/src/gallium/drivers/svga/svga_draw_arrays.c
index da33fae..4b954f3 100644
--- a/src/gallium/drivers/svga/svga_draw_arrays.c
+++ b/src/gallium/drivers/svga/svga_draw_arrays.c
@@ -51,8 +51,8 @@ static enum pipe_error generate_indices( struct svga_hwtnl *hwtnl,
struct pipe_resource *dst = NULL;
void *dst_map = NULL;
- dst = pipe_buffer_create( pipe->screen,
- PIPE_BIND_INDEX_BUFFER,
+ dst = pipe_buffer_create( pipe->screen,
+ PIPE_BIND_INDEX_BUFFER,
size );
if (dst == NULL)
goto fail;
@@ -76,7 +76,7 @@ static enum pipe_error generate_indices( struct svga_hwtnl *hwtnl,
if (dst)
pipe->screen->resource_destroy( pipe->screen, dst );
-
+
return PIPE_ERROR_OUT_OF_MEMORY;
}
@@ -110,18 +110,18 @@ static enum pipe_error retrieve_or_generate_indices( struct svga_hwtnl *hwtnl,
pipe_resource_reference( out_buf,
hwtnl->index_cache[prim][i].buffer );
- if (DBG)
+ if (DBG)
debug_printf("%s retrieve %d/%d\n", __FUNCTION__, i, gen_nr);
return PIPE_OK;
}
- else if (gen_type == U_GENERATE_REUSABLE)
+ else if (gen_type == U_GENERATE_REUSABLE)
{
pipe_resource_reference( &hwtnl->index_cache[prim][i].buffer,
NULL );
- if (DBG)
- debug_printf("%s discard %d/%d\n", __FUNCTION__,
+ if (DBG)
+ debug_printf("%s discard %d/%d\n", __FUNCTION__,
i, hwtnl->index_cache[prim][i].gen_nr);
break;
@@ -133,7 +133,7 @@ static enum pipe_error retrieve_or_generate_indices( struct svga_hwtnl *hwtnl,
{
unsigned smallest = 0;
unsigned smallest_size = ~0;
-
+
for (i = 0; i < IDX_CACHE_MAX && smallest_size; i++) {
if (hwtnl->index_cache[prim][i].buffer == NULL)
{
@@ -153,14 +153,14 @@ static enum pipe_error retrieve_or_generate_indices( struct svga_hwtnl *hwtnl,
NULL );
if (DBG)
- debug_printf("%s discard smallest %d/%d\n", __FUNCTION__,
+ debug_printf("%s discard smallest %d/%d\n", __FUNCTION__,
smallest, smallest_size);
-
+
i = smallest;
}
-
-
- ret = generate_indices( hwtnl,
+
+
+ ret = generate_indices( hwtnl,
gen_nr,
gen_size,
generate,
@@ -175,7 +175,7 @@ static enum pipe_error retrieve_or_generate_indices( struct svga_hwtnl *hwtnl,
*out_buf );
if (DBG)
- debug_printf("%s cache %d/%d\n", __FUNCTION__,
+ debug_printf("%s cache %d/%d\n", __FUNCTION__,
i, hwtnl->index_cache[prim][i].gen_nr);
return PIPE_OK;
@@ -194,7 +194,7 @@ simple_draw_arrays( struct svga_hwtnl *hwtnl,
hw_prim = svga_translate_prim(prim, count, &hw_count);
if (hw_count == 0)
return PIPE_ERROR_BAD_INPUT;
-
+
range.primType = hw_prim;
range.primitiveCount = hw_count;
range.indexArray.surfaceId = SVGA3D_INVALID_ID;
@@ -220,18 +220,18 @@ simple_draw_arrays( struct svga_hwtnl *hwtnl,
-enum pipe_error
+enum pipe_error
svga_hwtnl_draw_arrays( struct svga_hwtnl *hwtnl,
- unsigned prim,
- unsigned start,
+ unsigned prim,
+ unsigned start,
unsigned count)
{
unsigned gen_prim, gen_size, gen_nr, gen_type;
u_generate_func gen_func;
enum pipe_error ret = PIPE_OK;
- if (hwtnl->api_fillmode != PIPE_POLYGON_MODE_FILL &&
- prim >= PIPE_PRIM_TRIANGLES)
+ if (hwtnl->api_fillmode != PIPE_POLYGON_MODE_FILL &&
+ prim >= PIPE_PRIM_TRIANGLES)
{
gen_type = u_unfilled_generator( prim,
start,
@@ -261,7 +261,7 @@ svga_hwtnl_draw_arrays( struct svga_hwtnl *hwtnl,
else {
struct pipe_resource *gen_buf = NULL;
- /* Need to draw as indexed primitive.
+ /* Need to draw as indexed primitive.
* Potentially need to run the gen func to build an index buffer.
*/
ret = retrieve_or_generate_indices( hwtnl,
diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c
index c457917..d2cc984 100644
--- a/src/gallium/drivers/svga/svga_draw_elements.c
+++ b/src/gallium/drivers/svga/svga_draw_elements.c
@@ -54,8 +54,8 @@ translate_indices( struct svga_hwtnl *hwtnl,
struct pipe_resource *dst = NULL;
void *dst_map = NULL;
- dst = pipe_buffer_create( pipe->screen,
- PIPE_BIND_INDEX_BUFFER,
+ dst = pipe_buffer_create( pipe->screen,
+ PIPE_BIND_INDEX_BUFFER,
size );
if (dst == NULL)
goto fail;
@@ -102,7 +102,7 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
int index_bias,
unsigned min_index,
unsigned max_index,
- unsigned prim,
+ unsigned prim,
unsigned start,
unsigned count )
{
@@ -117,8 +117,8 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
if (hw_count == 0)
goto done;
- if (index_buffer &&
- svga_buffer_is_user_buffer(index_buffer))
+ if (index_buffer &&
+ svga_buffer_is_user_buffer(index_buffer))
{
assert( index_buffer->width0 >= index_offset + count * index_size );
@@ -144,7 +144,7 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
range.indexArray.stride = index_size;
range.indexWidth = index_size;
range.indexBias = index_bias;
-
+
ret = svga_hwtnl_prim( hwtnl, &range, min_index, max_index, index_buffer );
if (ret)
goto done;
@@ -172,8 +172,8 @@ svga_hwtnl_draw_range_elements( struct svga_hwtnl *hwtnl,
u_translate_func gen_func;
enum pipe_error ret = PIPE_OK;
- if (hwtnl->api_fillmode != PIPE_POLYGON_MODE_FILL &&
- prim >= PIPE_PRIM_TRIANGLES)
+ if (hwtnl->api_fillmode != PIPE_POLYGON_MODE_FILL &&
+ prim >= PIPE_PRIM_TRIANGLES)
{
gen_type = u_unfilled_translator( prim,
index_size,
@@ -198,9 +198,9 @@ svga_hwtnl_draw_range_elements( struct svga_hwtnl *hwtnl,
&gen_func );
}
-
+
if (gen_type == U_TRANSLATE_MEMCPY) {
- /* No need for translation, just pass through to hardware:
+ /* No need for translation, just pass through to hardware:
*/
return svga_hwtnl_simple_draw_range_elements( hwtnl, index_buffer,
index_size,
diff --git a/src/gallium/drivers/svga/svga_draw_private.h b/src/gallium/drivers/svga/svga_draw_private.h
index 11afb59..2697fe4 100644
--- a/src/gallium/drivers/svga/svga_draw_private.h
+++ b/src/gallium/drivers/svga/svga_draw_private.h
@@ -37,7 +37,7 @@ struct u_upload_mgr;
/* Should include polygon?
*/
-static const unsigned svga_hw_prims =
+static const unsigned svga_hw_prims =
((1 << PIPE_PRIM_POINTS) |
(1 << PIPE_PRIM_LINES) |
(1 << PIPE_PRIM_LINE_STRIP) |
@@ -46,7 +46,7 @@ static const unsigned svga_hw_prims =
(1 << PIPE_PRIM_TRIANGLE_FAN));
-static INLINE unsigned svga_translate_prim(unsigned mode,
+static INLINE unsigned svga_translate_prim(unsigned mode,
unsigned count,
unsigned *out_count)
{
@@ -57,23 +57,23 @@ static INLINE unsigned svga_translate_prim(unsigned mode,
case PIPE_PRIM_LINES:
*out_count = count / 2;
- return SVGA3D_PRIMITIVE_LINELIST;
+ return SVGA3D_PRIMITIVE_LINELIST;
case PIPE_PRIM_LINE_STRIP:
*out_count = count - 1;
- return SVGA3D_PRIMITIVE_LINESTRIP;
+ return SVGA3D_PRIMITIVE_LINESTRIP;
case PIPE_PRIM_TRIANGLES:
*out_count = count / 3;
- return SVGA3D_PRIMITIVE_TRIANGLELIST;
+ return SVGA3D_PRIMITIVE_TRIANGLELIST;
case PIPE_PRIM_TRIANGLE_STRIP:
*out_count = count - 2;
- return SVGA3D_PRIMITIVE_TRIANGLESTRIP;
+ return SVGA3D_PRIMITIVE_TRIANGLESTRIP;
case PIPE_PRIM_TRIANGLE_FAN:
*out_count = count - 2;
- return SVGA3D_PRIMITIVE_TRIANGLEFAN;
+ return SVGA3D_PRIMITIVE_TRIANGLEFAN;
default:
assert(0);
@@ -87,7 +87,7 @@ struct index_cache {
u_generate_func generate;
unsigned gen_nr;
- /* If non-null, this buffer is filled by calling
+ /* If non-null, this buffer is filled by calling
* generate(nr, map(buffer))
*/
struct pipe_resource *buffer;
@@ -114,7 +114,7 @@ struct draw_cmd {
struct svga_hwtnl {
struct svga_context *svga;
struct u_upload_mgr *upload_ib;
-
+
/* Flatshade information:
*/
unsigned api_pv;
@@ -136,7 +136,7 @@ struct svga_hwtnl {
/***********************************************************************
* Internal functions
*/
-enum pipe_error
+enum pipe_error
svga_hwtnl_prim( struct svga_hwtnl *hwtnl,
const SVGA3dPrimitiveRange *range,
unsigned min_index,
@@ -150,7 +150,7 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
int index_bias,
unsigned min_index,
unsigned max_index,
- unsigned prim,
+ unsigned prim,
unsigned start,
unsigned count );
diff --git a/src/gallium/drivers/svga/svga_pipe_blend.c b/src/gallium/drivers/svga/svga_pipe_blend.c
index 594eec7..ea07f69 100644
--- a/src/gallium/drivers/svga/svga_pipe_blend.c
+++ b/src/gallium/drivers/svga/svga_pipe_blend.c
@@ -81,7 +81,7 @@ svga_create_blend_state(struct pipe_context *pipe,
struct svga_blend_state *blend = CALLOC_STRUCT( svga_blend_state );
unsigned i;
-
+
/* Fill in the per-rendertarget blend state. We currently only
* have one rendertarget.
*/
diff --git a/src/gallium/drivers/svga/svga_pipe_clear.c b/src/gallium/drivers/svga/svga_pipe_clear.c
index 41f239c..1850427 100644
--- a/src/gallium/drivers/svga/svga_pipe_clear.c
+++ b/src/gallium/drivers/svga/svga_pipe_clear.c
@@ -35,7 +35,7 @@
static enum pipe_error
-try_clear(struct svga_context *svga,
+try_clear(struct svga_context *svga,
unsigned buffers,
const float *rgba,
double depth,
@@ -88,7 +88,7 @@ try_clear(struct svga_context *svga,
memcpy(&rect, &svga->state.hw_clear.viewport, sizeof rect);
ret = SVGA3D_SetViewport(svga->swc, &rect);
}
-
+
return ret;
}
diff --git a/src/gallium/drivers/svga/svga_pipe_constants.c b/src/gallium/drivers/svga/svga_pipe_constants.c
index 2fa2142..090a8b2 100644
--- a/src/gallium/drivers/svga/svga_pipe_constants.c
+++ b/src/gallium/drivers/svga/svga_pipe_constants.c
@@ -31,10 +31,10 @@
#include "svga_context.h"
/***********************************************************************
- * Constant buffers
+ * Constant buffers
*/
-struct svga_constbuf
+struct svga_constbuf
{
unsigned type;
float (*data)[4];
diff --git a/src/gallium/drivers/svga/svga_pipe_depthstencil.c b/src/gallium/drivers/svga/svga_pipe_depthstencil.c
index c84615a..6db6b74 100644
--- a/src/gallium/drivers/svga/svga_pipe_depthstencil.c
+++ b/src/gallium/drivers/svga/svga_pipe_depthstencil.c
@@ -85,7 +85,7 @@ svga_create_depth_stencil_state(struct pipe_context *pipe,
ds->stencil[0].fail = svga_translate_stencil_op(templ->stencil[0].fail_op);
ds->stencil[0].zfail = svga_translate_stencil_op(templ->stencil[0].zfail_op);
ds->stencil[0].pass = svga_translate_stencil_op(templ->stencil[0].zpass_op);
-
+
/* SVGA3D has one ref/mask/writemask triple shared between front &
* back face stencil. We really need two:
*/
diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c
index 001ec36..efad4e7 100644
--- a/src/gallium/drivers/svga/svga_pipe_draw.c
+++ b/src/gallium/drivers/svga/svga_pipe_draw.c
@@ -47,8 +47,8 @@ retry_draw_range_elements( struct svga_context *svga,
int index_bias,
unsigned min_index,
unsigned max_index,
- unsigned prim,
- unsigned start,
+ unsigned prim,
+ unsigned start,
unsigned count,
boolean do_retry )
{
@@ -99,8 +99,8 @@ retry_draw_range_elements( struct svga_context *svga,
static enum pipe_error
retry_draw_arrays( struct svga_context *svga,
- unsigned prim,
- unsigned start,
+ unsigned prim,
+ unsigned start,
unsigned count,
boolean do_retry )
{
@@ -131,7 +131,7 @@ retry_draw_arrays( struct svga_context *svga,
return 0;
retry:
- if (ret == PIPE_ERROR_OUT_OF_MEMORY && do_retry)
+ if (ret == PIPE_ERROR_OUT_OF_MEMORY && do_retry)
{
svga_context_flush( svga, NULL );
@@ -170,7 +170,7 @@ svga_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
svga->curr.reduced_prim = reduced_prim;
svga->dirty |= SVGA_NEW_REDUCED_PRIMITIVE;
}
-
+
svga_update_state_retry( svga, SVGA_STATE_NEED_SWTNL );
#ifdef DEBUG
diff --git a/src/gallium/drivers/svga/svga_pipe_fs.c b/src/gallium/drivers/svga/svga_pipe_fs.c
index b71bc66..600a143 100644
--- a/src/gallium/drivers/svga/svga_pipe_fs.c
+++ b/src/gallium/drivers/svga/svga_pipe_fs.c
@@ -38,7 +38,7 @@
/***********************************************************************
- * Fragment shaders
+ * Fragment shaders
*/
static void *
@@ -61,7 +61,7 @@ svga_create_fs_state(struct pipe_context *pipe,
fs->base.id = svga->debug.shader_id++;
fs->base.use_sm30 = svgascreen->use_ps30;
-
+
if (SVGA_DEBUG & DEBUG_TGSI || 0) {
debug_printf("%s id: %u, inputs: %u, outputs: %u\n",
__FUNCTION__, fs->base.id,
@@ -94,12 +94,12 @@ void svga_delete_fs_state(struct pipe_context *pipe, void *shader)
for (result = fs->base.results; result; result = tmp ) {
tmp = result->next;
- ret = SVGA3D_DestroyShader(svga->swc,
+ ret = SVGA3D_DestroyShader(svga->swc,
result->id,
SVGA3D_SHADERTYPE_PS );
if(ret != PIPE_OK) {
svga_context_flush(svga, NULL);
- ret = SVGA3D_DestroyShader(svga->swc,
+ ret = SVGA3D_DestroyShader(svga->swc,
result->id,
SVGA3D_SHADERTYPE_PS );
assert(ret == PIPE_OK);
diff --git a/src/gallium/drivers/svga/svga_pipe_misc.c b/src/gallium/drivers/svga/svga_pipe_misc.c
index 8c24fb3..4ff5071 100644
--- a/src/gallium/drivers/svga/svga_pipe_misc.c
+++ b/src/gallium/drivers/svga/svga_pipe_misc.c
@@ -91,7 +91,7 @@ static void svga_set_framebuffer_state(struct pipe_context *pipe,
if (propagate) {
/* make sure that drawing calls comes before propagation calls */
svga_hwtnl_flush_retry( svga );
-
+
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++)
if (dst->cbufs[i] && dst->cbufs[i] != fb->cbufs[i])
svga_propagate_surface(pipe, dst->cbufs[i]);
@@ -102,8 +102,8 @@ static void svga_set_framebuffer_state(struct pipe_context *pipe,
* know that make no such assumption here. */
for(i = 0; i < fb->nr_cbufs; ++i) {
if (fb->zsbuf && fb->cbufs[i]) {
- assert(fb->zsbuf->width == fb->cbufs[i]->width);
- assert(fb->zsbuf->height == fb->cbufs[i]->height);
+ assert(fb->zsbuf->width == fb->cbufs[i]->width);
+ assert(fb->zsbuf->height == fb->cbufs[i]->height);
}
}
diff --git a/src/gallium/drivers/svga/svga_pipe_query.c b/src/gallium/drivers/svga/svga_pipe_query.c
index 579f803..b5461a7 100644
--- a/src/gallium/drivers/svga/svga_pipe_query.c
+++ b/src/gallium/drivers/svga/svga_pipe_query.c
@@ -60,7 +60,7 @@ svga_query( struct pipe_query *q )
return (struct svga_query *)q;
}
-static boolean svga_get_query_result(struct pipe_context *pipe,
+static boolean svga_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
boolean wait,
void *result);
@@ -87,9 +87,9 @@ static struct pipe_query *svga_create_query( struct pipe_context *pipe,
sizeof *sq->queryResult);
if(!sq->hwbuf)
goto no_hwbuf;
-
- sq->queryResult = (SVGA3dQueryResult *)sws->buffer_map(sws,
- sq->hwbuf,
+
+ sq->queryResult = (SVGA3dQueryResult *)sws->buffer_map(sws,
+ sq->hwbuf,
PIPE_TRANSFER_WRITE);
if(!sq->queryResult)
goto no_query_result;
@@ -99,7 +99,7 @@ static struct pipe_query *svga_create_query( struct pipe_context *pipe,
/*
* We request the buffer to be pinned and assume it is always mapped.
- *
+ *
* The reason is that we don't want to wait for fences when checking the
* query status.
*/
@@ -128,7 +128,7 @@ static void svga_destroy_query(struct pipe_context *pipe,
FREE(sq);
}
-static void svga_begin_query(struct pipe_context *pipe,
+static void svga_begin_query(struct pipe_context *pipe,
struct pipe_query *q)
{
struct svga_screen *svgascreen = svga_screen(pipe->screen);
@@ -138,14 +138,14 @@ static void svga_begin_query(struct pipe_context *pipe,
enum pipe_error ret;
SVGA_DBG(DEBUG_QUERY, "%s\n", __FUNCTION__);
-
+
assert(!svga->sq);
/* Need to flush out buffered drawing commands so that they don't
* get counted in the query results.
*/
svga_hwtnl_flush_retry(svga);
-
+
if(sq->queryResult->state == SVGA3D_QUERYSTATE_PENDING) {
/* The application doesn't care for the pending query result. We cannot
* let go the existing buffer and just get a new one because its storage
@@ -157,10 +157,10 @@ static void svga_begin_query(struct pipe_context *pipe,
uint64_t result;
svga_get_query_result(pipe, q, TRUE, &result);
-
+
assert(sq->queryResult->state != SVGA3D_QUERYSTATE_PENDING);
}
-
+
sq->queryResult->state = SVGA3D_QUERYSTATE_NEW;
sws->fence_reference(sws, &sq->fence, NULL);
@@ -174,7 +174,7 @@ static void svga_begin_query(struct pipe_context *pipe,
svga->sq = sq;
}
-static void svga_end_query(struct pipe_context *pipe,
+static void svga_end_query(struct pipe_context *pipe,
struct pipe_query *q)
{
struct svga_context *svga = svga_context( pipe );
@@ -185,7 +185,7 @@ static void svga_end_query(struct pipe_context *pipe,
assert(svga->sq == sq);
svga_hwtnl_flush_retry(svga);
-
+
/* Set to PENDING before sending EndQuery. */
sq->queryResult->state = SVGA3D_QUERYSTATE_PENDING;
@@ -195,8 +195,8 @@ static void svga_end_query(struct pipe_context *pipe,
ret = SVGA3D_EndQuery( svga->swc, sq->type, sq->hwbuf);
assert(ret == PIPE_OK);
}
-
- /* TODO: Delay flushing. We don't really need to flush here, just ensure
+
+ /* TODO: Delay flushing. We don't really need to flush here, just ensure
* that there is one flush before svga_get_query_result attempts to get the
* result */
svga_context_flush(svga, NULL);
@@ -204,7 +204,7 @@ static void svga_end_query(struct pipe_context *pipe,
svga->sq = NULL;
}
-static boolean svga_get_query_result(struct pipe_context *pipe,
+static boolean svga_get_query_result(struct pipe_context *pipe,
struct pipe_query *q,
boolean wait,
void *vresult)
@@ -215,11 +215,11 @@ static boolean svga_get_query_result(struct pipe_context *pipe,
struct svga_query *sq = svga_query( q );
SVGA3dQueryState state;
uint64_t *result = (uint64_t*)vresult;
-
+
SVGA_DBG(DEBUG_QUERY, "%s wait: %d\n", __FUNCTION__);
- /* The query status won't be updated by the host unless
- * SVGA_3D_CMD_WAIT_FOR_QUERY is emitted. Unfortunately this will cause a
+ /* The query status won't be updated by the host unless
+ * SVGA_3D_CMD_WAIT_FOR_QUERY is emitted. Unfortunately this will cause a
* synchronous wait on the host */
if(!sq->fence) {
enum pipe_error ret;
@@ -230,9 +230,9 @@ static boolean svga_get_query_result(struct pipe_context *pipe,
ret = SVGA3D_WaitForQuery( svga->swc, sq->type, sq->hwbuf);
assert(ret == PIPE_OK);
}
-
+
svga_context_flush(svga, &sq->fence);
-
+
assert(sq->fence);
}
@@ -240,15 +240,15 @@ static boolean svga_get_query_result(struct pipe_context *pipe,
if(state == SVGA3D_QUERYSTATE_PENDING) {
if(!wait)
return FALSE;
-
+
sws->fence_finish(sws, sq->fence, 0);
-
+
state = sq->queryResult->state;
}
- assert(state == SVGA3D_QUERYSTATE_SUCCEEDED ||
+ assert(state == SVGA3D_QUERYSTATE_SUCCEEDED ||
state == SVGA3D_QUERYSTATE_FAILED);
-
+
*result = (uint64_t)sq->queryResult->result32;
SVGA_DBG(DEBUG_QUERY, "%s result %d\n", __FUNCTION__, (unsigned)*result);
diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
index 660eb07..a17f128 100644
--- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c
+++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
@@ -82,7 +82,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
/* fill_cw, fill_ccw - draw module or index translation */
rast->shademode = svga_translate_flatshade( templ->flatshade );
- rast->cullmode = svga_translate_cullmode( templ->cull_face,
+ rast->cullmode = svga_translate_cullmode( templ->cull_face,
templ->front_ccw );
rast->scissortestenable = templ->scissor;
rast->multisampleantialias = templ->multisample;
@@ -101,7 +101,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
rast->need_pipeline |= SVGA_PIPELINE_FLAG_LINES;
if (templ->line_stipple_enable) {
- /* LinePattern not implemented on all backends.
+ /* LinePattern not implemented on all backends.
*/
if (0) {
SVGA3dLinePattern lp;
@@ -112,7 +112,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
else {
rast->need_pipeline |= SVGA_PIPELINE_FLAG_LINES;
}
- }
+ }
if (templ->point_smooth)
rast->need_pipeline |= SVGA_PIPELINE_FLAG_POINTS;
@@ -142,7 +142,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
break;
case PIPE_FACE_NONE:
- if (fill_front != fill_back || offset_front != offset_back)
+ if (fill_front != fill_back || offset_front != offset_back)
{
/* Always need the draw module to work out different
* front/back fill modes:
@@ -168,7 +168,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
(templ->flatshade ||
templ->light_twoside ||
offset ||
- templ->cull_face != PIPE_FACE_NONE))
+ templ->cull_face != PIPE_FACE_NONE))
{
fill = PIPE_POLYGON_MODE_FILL;
rast->need_pipeline |= SVGA_PIPELINE_FLAG_TRIS;
@@ -225,7 +225,7 @@ static void svga_bind_rasterizer_state( struct pipe_context *pipe,
draw_set_rasterizer_state(svga->swtnl.draw, raster ? &raster->templ : NULL,
state);
-
+
svga->dirty |= SVGA_NEW_RAST;
}
diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c
index f44a0e1..1b4993f 100644
--- a/src/gallium/drivers/svga/svga_pipe_sampler.c
+++ b/src/gallium/drivers/svga/svga_pipe_sampler.c
@@ -38,27 +38,27 @@ static INLINE unsigned
translate_wrap_mode(unsigned wrap)
{
switch (wrap) {
- case PIPE_TEX_WRAP_REPEAT:
+ case PIPE_TEX_WRAP_REPEAT:
return SVGA3D_TEX_ADDRESS_WRAP;
- case PIPE_TEX_WRAP_CLAMP:
+ case PIPE_TEX_WRAP_CLAMP:
return SVGA3D_TEX_ADDRESS_CLAMP;
- case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
+ case PIPE_TEX_WRAP_CLAMP_TO_EDGE:
/* Unfortunately SVGA3D_TEX_ADDRESS_EDGE not respected by
* hardware.
*/
return SVGA3D_TEX_ADDRESS_CLAMP;
- case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
+ case PIPE_TEX_WRAP_CLAMP_TO_BORDER:
return SVGA3D_TEX_ADDRESS_BORDER;
- case PIPE_TEX_WRAP_MIRROR_REPEAT:
+ case PIPE_TEX_WRAP_MIRROR_REPEAT:
return SVGA3D_TEX_ADDRESS_MIRROR;
- case PIPE_TEX_WRAP_MIRROR_CLAMP:
- case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
- case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
+ case PIPE_TEX_WRAP_MIRROR_CLAMP:
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE:
+ case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER:
return SVGA3D_TEX_ADDRESS_MIRRORONCE;
default:
@@ -96,7 +96,7 @@ svga_create_sampler_state(struct pipe_context *pipe,
{
struct svga_context *svga = svga_context(pipe);
struct svga_sampler_state *cso = CALLOC_STRUCT( svga_sampler_state );
-
+
cso->mipfilter = translate_mip_filter(sampler->min_mip_filter);
cso->magfilter = translate_img_filter( sampler->mag_img_filter );
cso->minfilter = translate_img_filter( sampler->min_img_filter );
@@ -243,12 +243,12 @@ static void svga_set_sampler_views(struct pipe_context *pipe,
svga->dirty |= SVGA_NEW_TEXTURE_BINDING;
if (flag_srgb != svga->curr.tex_flags.flag_srgb ||
- flag_1d != svga->curr.tex_flags.flag_1d)
+ flag_1d != svga->curr.tex_flags.flag_1d)
{
svga->dirty |= SVGA_NEW_TEXTURE_FLAGS;
svga->curr.tex_flags.flag_1d = flag_1d;
svga->curr.tex_flags.flag_srgb = flag_srgb;
- }
+ }
}
diff --git a/src/gallium/drivers/svga/svga_pipe_vertex.c b/src/gallium/drivers/svga/svga_pipe_vertex.c
index 86c7945..497449e 100644
--- a/src/gallium/drivers/svga/svga_pipe_vertex.c
+++ b/src/gallium/drivers/svga/svga_pipe_vertex.c
@@ -118,7 +118,7 @@ static void svga_delete_vertex_elements_state(struct pipe_context *pipe,
void svga_cleanup_vertex_state( struct svga_context *svga )
{
unsigned i;
-
+
for (i = 0 ; i < svga->curr.num_vertex_buffers; i++)
pipe_resource_reference(&svga->curr.vb[i].buffer, NULL);
}
diff --git a/src/gallium/drivers/svga/svga_pipe_vs.c b/src/gallium/drivers/svga/svga_pipe_vs.c
index de8c919..b17a6e2 100644
--- a/src/gallium/drivers/svga/svga_pipe_vs.c
+++ b/src/gallium/drivers/svga/svga_pipe_vs.c
@@ -39,7 +39,7 @@
#include "svga_debug.h"
-static const struct tgsi_token *substitute_vs(
+static const struct tgsi_token *substitute_vs(
unsigned shader_id,
const struct tgsi_token *old_tokens )
{
@@ -47,7 +47,7 @@ static const struct tgsi_token *substitute_vs(
if (shader_id == 12) {
static struct tgsi_token tokens[300];
- const char *text =
+ const char *text =
"VERT\n"
"DCL IN[0]\n"
"DCL IN[1]\n"
@@ -93,7 +93,7 @@ static const struct tgsi_token *substitute_vs(
/***********************************************************************
- * Vertex shaders
+ * Vertex shaders
*/
static void *
@@ -157,16 +157,16 @@ static void svga_delete_vs_state(struct pipe_context *pipe, void *shader)
svga_hwtnl_flush_retry( svga );
draw_delete_vertex_shader(svga->swtnl.draw, vs->draw_shader);
-
+
for (result = vs->base.results; result; result = tmp ) {
tmp = result->next;
- ret = SVGA3D_DestroyShader(svga->swc,
+ ret = SVGA3D_DestroyShader(svga->swc,
result->id,
SVGA3D_SHADERTYPE_VS );
if(ret != PIPE_OK) {
svga_context_flush(svga, NULL);
- ret = SVGA3D_DestroyShader(svga->swc,
+ ret = SVGA3D_DestroyShader(svga->swc,
result->id,
SVGA3D_SHADERTYPE_VS );
assert(ret == PIPE_OK);
diff --git a/src/gallium/drivers/svga/svga_resource.h b/src/gallium/drivers/svga/svga_resource.h
index 851e3b5..356a03a 100644
--- a/src/gallium/drivers/svga/svga_resource.h
+++ b/src/gallium/drivers/svga/svga_resource.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef SVGA_RESOURCE_H
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c
index f12e2b6..cf63bbe 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer.c
@@ -94,7 +94,7 @@ svga_buffer_map_range( struct pipe_screen *screen,
unsigned length,
unsigned usage )
{
- struct svga_screen *ss = svga_screen(screen);
+ struct svga_screen *ss = svga_screen(screen);
struct svga_winsys_screen *sws = ss->sws;
struct svga_buffer *sbuf = svga_buffer( buf );
void *map;
@@ -134,20 +134,20 @@ svga_buffer_map_range( struct pipe_screen *screen,
sbuf->map.flush_explicit = TRUE;
}
}
-
+
return map;
}
-static void
+static void
svga_buffer_flush_mapped_range( struct pipe_screen *screen,
struct pipe_resource *buf,
unsigned offset, unsigned length)
{
struct svga_buffer *sbuf = svga_buffer( buf );
struct svga_screen *ss = svga_screen(screen);
-
+
pipe_mutex_lock(ss->swc_mutex);
assert(sbuf->map.writing);
if(sbuf->map.writing) {
@@ -157,16 +157,16 @@ svga_buffer_flush_mapped_range( struct pipe_screen *screen,
pipe_mutex_unlock(ss->swc_mutex);
}
-static void
+static void
svga_buffer_unmap( struct pipe_screen *screen,
struct pipe_resource *buf)
{
- struct svga_screen *ss = svga_screen(screen);
+ struct svga_screen *ss = svga_screen(screen);
struct svga_winsys_screen *sws = ss->sws;
struct svga_buffer *sbuf = svga_buffer( buf );
-
+
pipe_mutex_lock(ss->swc_mutex);
-
+
assert(sbuf->map.count);
if(sbuf->map.count)
--sbuf->map.count;
@@ -178,10 +178,10 @@ svga_buffer_unmap( struct pipe_screen *screen,
if(!sbuf->map.flush_explicit) {
/* No mapped range was flushed -- flush the whole buffer */
SVGA_DBG(DEBUG_DMA, "flushing the whole buffer\n");
-
+
svga_buffer_add_range(sbuf, 0, sbuf->b.b.width0);
}
-
+
sbuf->map.writing = FALSE;
sbuf->map.flush_explicit = FALSE;
}
@@ -195,25 +195,25 @@ static void
svga_buffer_destroy( struct pipe_screen *screen,
struct pipe_resource *buf )
{
- struct svga_screen *ss = svga_screen(screen);
+ struct svga_screen *ss = svga_screen(screen);
struct svga_buffer *sbuf = svga_buffer( buf );
assert(!p_atomic_read(&buf->reference.count));
-
+
assert(!sbuf->dma.pending);
if(sbuf->handle)
svga_buffer_destroy_host_surface(ss, sbuf);
-
+
if(sbuf->uploaded.buffer)
pipe_resource_reference(&sbuf->uploaded.buffer, NULL);
if(sbuf->hwbuf)
svga_buffer_destroy_hw_storage(ss, sbuf);
-
+
if(sbuf->swbuf && !sbuf->user)
align_free(sbuf->swbuf);
-
+
FREE(sbuf);
}
@@ -267,7 +267,7 @@ static void svga_buffer_transfer_unmap( struct pipe_context *pipe,
-struct u_resource_vtbl svga_buffer_vtbl =
+struct u_resource_vtbl svga_buffer_vtbl =
{
u_default_resource_get_handle, /* get_handle */
svga_buffer_destroy, /* resource_destroy */
@@ -288,11 +288,11 @@ svga_buffer_create(struct pipe_screen *screen,
{
struct svga_screen *ss = svga_screen(screen);
struct svga_buffer *sbuf;
-
+
sbuf = CALLOC_STRUCT(svga_buffer);
if(!sbuf)
goto error1;
-
+
sbuf->b.b = *template;
sbuf->b.vtbl = &svga_buffer_vtbl;
pipe_reference_init(&sbuf->b.b.reference, 1);
@@ -307,8 +307,8 @@ svga_buffer_create(struct pipe_screen *screen,
if(!sbuf->swbuf)
goto error2;
}
-
- return &sbuf->b.b;
+
+ return &sbuf->b.b;
error2:
FREE(sbuf);
@@ -323,11 +323,11 @@ svga_user_buffer_create(struct pipe_screen *screen,
unsigned bind)
{
struct svga_buffer *sbuf;
-
+
sbuf = CALLOC_STRUCT(svga_buffer);
if(!sbuf)
goto no_sbuf;
-
+
pipe_reference_init(&sbuf->b.b.reference, 1);
sbuf->b.vtbl = &svga_buffer_vtbl;
sbuf->b.b.screen = screen;
@@ -341,8 +341,8 @@ svga_user_buffer_create(struct pipe_screen *screen,
sbuf->swbuf = ptr;
sbuf->user = TRUE;
-
- return &sbuf->b.b;
+
+ return &sbuf->b.b;
no_sbuf:
return NULL;
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.h b/src/gallium/drivers/svga/svga_resource_buffer.h
index d3ec11b..384b482 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.h
+++ b/src/gallium/drivers/svga/svga_resource_buffer.h
@@ -60,36 +60,36 @@ struct svga_buffer_range
/**
* SVGA pipe buffer.
*/
-struct svga_buffer
+struct svga_buffer
{
struct u_resource b;
/**
* Regular (non DMA'able) memory.
- *
+ *
* Used for user buffers or for buffers which we know before hand that can
* never be used by the virtual hardware directly, such as constant buffers.
*/
void *swbuf;
-
- /**
+
+ /**
* Whether swbuf was created by the user or not.
*/
boolean user;
-
+
/**
* Creation key for the host surface handle.
- *
- * This structure describes all the host surface characteristics so that it
+ *
+ * This structure describes all the host surface characteristics so that it
* can be looked up in cache, since creating a host surface is often a slow
* operation.
*/
struct svga_host_surface_cache_key key;
-
+
/**
* Host surface handle.
- *
- * This is a platform independent abstraction for host SID. We create when
+ *
+ * This is a platform independent abstraction for host SID. We create when
* trying to bind
*/
struct svga_winsys_surface *handle;
@@ -200,7 +200,7 @@ svga_buffer(struct pipe_resource *buffer)
* Returns TRUE for user buffers. We may
* decide to use an alternate upload path for these buffers.
*/
-static INLINE boolean
+static INLINE boolean
svga_buffer_is_user_buffer( struct pipe_resource *buffer )
{
return svga_buffer(buffer)->user;
@@ -239,7 +239,7 @@ svga_context_flush_buffers(struct svga_context *svga);
struct svga_winsys_buffer *
svga_winsys_buffer_create(struct svga_context *svga,
- unsigned alignment,
+ unsigned alignment,
unsigned usage,
unsigned size);
diff --git a/src/gallium/drivers/svga/svga_resource_buffer_upload.c b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
index 3de5216..e66f1b8 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer_upload.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer_upload.c
@@ -49,26 +49,26 @@
*/
struct svga_winsys_buffer *
svga_winsys_buffer_create( struct svga_context *svga,
- unsigned alignment,
+ unsigned alignment,
unsigned usage,
unsigned size )
{
struct svga_screen *svgascreen = svga_screen(svga->pipe.screen);
struct svga_winsys_screen *sws = svgascreen->sws;
struct svga_winsys_buffer *buf;
-
+
/* Just try */
buf = sws->buffer_create(sws, alignment, usage, size);
if(!buf) {
- SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "flushing screen to find %d bytes GMR\n",
- size);
-
+ SVGA_DBG(DEBUG_DMA|DEBUG_PERF, "flushing screen to find %d bytes GMR\n",
+ size);
+
/* Try flushing all pending DMAs */
svga_context_flush(svga, NULL);
buf = sws->buffer_create(sws, alignment, usage, size);
}
-
+
return buf;
}
@@ -89,8 +89,8 @@ svga_buffer_destroy_hw_storage(struct svga_screen *ss, struct svga_buffer *sbuf)
/**
- * Allocate DMA'ble storage for the buffer.
- *
+ * Allocate DMA'ble storage for the buffer.
+ *
* Called before mapping a buffer.
*/
enum pipe_error
@@ -104,14 +104,14 @@ svga_buffer_create_hw_storage(struct svga_screen *ss,
unsigned alignment = 16;
unsigned usage = 0;
unsigned size = sbuf->b.b.width0;
-
+
sbuf->hwbuf = sws->buffer_create(sws, alignment, usage, size);
if(!sbuf->hwbuf)
return PIPE_ERROR_OUT_OF_MEMORY;
-
+
assert(!sbuf->dma.pending);
}
-
+
return PIPE_OK;
}
@@ -123,27 +123,27 @@ svga_buffer_create_host_surface(struct svga_screen *ss,
{
if(!sbuf->handle) {
sbuf->key.flags = 0;
-
+
sbuf->key.format = SVGA3D_BUFFER;
if(sbuf->b.b.bind & PIPE_BIND_VERTEX_BUFFER)
sbuf->key.flags |= SVGA3D_SURFACE_HINT_VERTEXBUFFER;
if(sbuf->b.b.bind & PIPE_BIND_INDEX_BUFFER)
sbuf->key.flags |= SVGA3D_SURFACE_HINT_INDEXBUFFER;
-
+
sbuf->key.size.width = sbuf->b.b.width0;
sbuf->key.size.height = 1;
sbuf->key.size.depth = 1;
-
+
sbuf->key.numFaces = 1;
sbuf->key.numMipLevels = 1;
sbuf->key.cachable = 1;
-
+
SVGA_DBG(DEBUG_DMA, "surface_create for buffer sz %d\n", sbuf->b.b.width0);
sbuf->handle = svga_screen_surface_create(ss, &sbuf->key);
if(!sbuf->handle)
return PIPE_ERROR_OUT_OF_MEMORY;
-
+
/* Always set the discard flag on the first time the buffer is written
* as svga_screen_surface_create might have passed a recycled host
* buffer.
@@ -152,9 +152,9 @@ svga_buffer_create_host_surface(struct svga_screen *ss,
SVGA_DBG(DEBUG_DMA, " --> got sid %p sz %d (buffer)\n", sbuf->handle, sbuf->b.b.width0);
}
-
+
return PIPE_OK;
-}
+}
void
@@ -165,7 +165,7 @@ svga_buffer_destroy_host_surface(struct svga_screen *ss,
SVGA_DBG(DEBUG_DMA, " ungrab sid %p sz %d\n", sbuf->handle, sbuf->b.b.width0);
svga_screen_surface_destroy(ss, &sbuf->key, &sbuf->handle);
}
-}
+}
/**
@@ -249,12 +249,12 @@ svga_buffer_upload_flush(struct svga_context *svga,
SVGA3dCopyBox *boxes;
unsigned i;
- assert(sbuf->handle);
+ assert(sbuf->handle);
assert(sbuf->hwbuf);
assert(sbuf->map.num_ranges);
assert(sbuf->dma.svga == svga);
assert(sbuf->dma.boxes);
-
+
/*
* Patch the DMA command with the final copy box.
*/
@@ -282,7 +282,7 @@ svga_buffer_upload_flush(struct svga_context *svga,
assert(sbuf->head.prev && sbuf->head.next);
LIST_DEL(&sbuf->head);
#ifdef DEBUG
- sbuf->head.next = sbuf->head.prev = NULL;
+ sbuf->head.next = sbuf->head.prev = NULL;
#endif
sbuf->dma.pending = FALSE;
@@ -302,7 +302,7 @@ svga_buffer_upload_flush(struct svga_context *svga,
* This function only notes the range down. It doesn't actually emit a DMA
* upload command. That only happens when a context tries to refer to this
* buffer, and the DMA upload command is added to that context's command buffer.
- *
+ *
* We try to lump as many contiguous DMA transfers together as possible.
*/
void
@@ -315,7 +315,7 @@ svga_buffer_add_range(struct svga_buffer *sbuf,
unsigned nearest_dist;
assert(end > start);
-
+
if (sbuf->map.num_ranges < SVGA_BUFFER_MAX_RANGES) {
nearest_range = sbuf->map.num_ranges;
nearest_dist = ~0;
@@ -411,11 +411,11 @@ svga_buffer_update_hw(struct svga_screen *ss, struct svga_buffer *sbuf)
if(!sbuf->hwbuf) {
enum pipe_error ret;
void *map;
-
+
assert(sbuf->swbuf);
if(!sbuf->swbuf)
return PIPE_ERROR;
-
+
ret = svga_buffer_create_hw_storage(ss, sbuf);
if(ret != PIPE_OK)
return ret;
@@ -441,10 +441,10 @@ svga_buffer_update_hw(struct svga_screen *ss, struct svga_buffer *sbuf)
align_free(sbuf->swbuf);
sbuf->swbuf = NULL;
}
-
+
pipe_mutex_unlock(ss->swc_mutex);
}
-
+
return PIPE_OK;
}
@@ -547,10 +547,10 @@ svga_buffer_handle(struct svga_context *svga,
return NULL;
sbuf = svga_buffer(buf);
-
+
assert(!sbuf->map.count);
assert(!sbuf->user);
-
+
if(!sbuf->handle) {
ret = svga_buffer_create_host_surface(ss, sbuf);
if(ret != PIPE_OK)
@@ -631,10 +631,10 @@ svga_context_flush_buffers(struct svga_context *svga)
assert(p_atomic_read(&sbuf->b.b.reference.count) != 0);
assert(sbuf->dma.pending);
-
+
svga_buffer_upload_flush(svga, sbuf);
- curr = next;
+ curr = next;
next = curr->next;
}
}
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index 7c9e600..e52ff9e 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -81,7 +81,7 @@ SVGA3dSurfaceFormat
svga_translate_format(enum pipe_format format)
{
switch(format) {
-
+
case PIPE_FORMAT_B8G8R8A8_UNORM:
return SVGA3D_A8R8G8B8;
case PIPE_FORMAT_B8G8R8X8_UNORM:
@@ -99,7 +99,7 @@ svga_translate_format(enum pipe_format format)
case PIPE_FORMAT_B4G4R4A4_UNORM:
return SVGA3D_A4R4G4B4;
-
+
/* XXX: Doesn't seem to work properly.
case PIPE_FORMAT_Z32_UNORM:
return SVGA3D_Z_D32;
@@ -133,7 +133,7 @@ svga_translate_format(enum pipe_format format)
SVGA3dSurfaceFormat
svga_translate_format_render(enum pipe_format format)
{
- switch(format) {
+ switch(format) {
case PIPE_FORMAT_B8G8R8A8_UNORM:
case PIPE_FORMAT_B8G8R8X8_UNORM:
case PIPE_FORMAT_B5G5R5A1_UNORM:
@@ -168,10 +168,10 @@ svga_transfer_dma_band(struct svga_context *svga,
SVGA3dTransferType transfer,
unsigned y, unsigned h, unsigned srcy)
{
- struct svga_texture *texture = svga_texture(st->base.resource);
+ struct svga_texture *texture = svga_texture(st->base.resource);
SVGA3dCopyBox box;
enum pipe_error ret;
-
+
box.x = st->base.box.x;
box.y = y;
box.z = st->base.box.z;
@@ -190,7 +190,7 @@ svga_transfer_dma_band(struct svga_context *svga,
st->face = 0;
SVGA_DBG(DEBUG_DMA, "dma %s sid %p, face %u, (%u, %u, %u) - (%u, %u, %u), %ubpp\n",
- transfer == SVGA3D_WRITE_HOST_VRAM ? "to" : "from",
+ transfer == SVGA3D_WRITE_HOST_VRAM ? "to" : "from",
texture->handle,
st->face,
st->base.box.x,
@@ -216,7 +216,7 @@ svga_transfer_dma(struct svga_context *svga,
struct svga_transfer *st,
SVGA3dTransferType transfer)
{
- struct svga_texture *texture = svga_texture(st->base.resource);
+ struct svga_texture *texture = svga_texture(st->base.resource);
struct svga_screen *screen = svga_screen(texture->b.b.screen);
struct svga_winsys_screen *sws = screen->sws;
struct pipe_fence_handle *fence = NULL;
@@ -296,7 +296,7 @@ svga_transfer_dma(struct svga_context *svga,
-static boolean
+static boolean
svga_texture_get_handle(struct pipe_screen *screen,
struct pipe_resource *texture,
struct winsys_handle *whandle)
@@ -374,12 +374,12 @@ svga_texture_get_transfer(struct pipe_context *pipe,
st->hw_nblocksy = nblocksy;
st->hwbuf = svga_winsys_buffer_create(svga,
- 1,
+ 1,
0,
st->hw_nblocksy*st->base.stride);
while(!st->hwbuf && (st->hw_nblocksy /= 2)) {
st->hwbuf = svga_winsys_buffer_create(svga,
- 1,
+ 1,
0,
st->hw_nblocksy*st->base.stride);
}
@@ -388,7 +388,7 @@ svga_texture_get_transfer(struct pipe_context *pipe,
goto no_hwbuf;
if(st->hw_nblocksy < nblocksy) {
- /* We couldn't allocate a hardware buffer big enough for the transfer,
+ /* We couldn't allocate a hardware buffer big enough for the transfer,
* so allocate regular malloc memory instead */
debug_printf("%s: failed to allocate %u KB of DMA, splitting into %u x %u KB DMA transfers\n",
__FUNCTION__,
@@ -443,7 +443,7 @@ svga_texture_transfer_unmap(struct pipe_context *pipe,
struct svga_screen *ss = svga_screen(pipe->screen);
struct svga_winsys_screen *sws = ss->sws;
struct svga_transfer *st = svga_transfer(transfer);
-
+
if(!st->swbuf)
sws->buffer_unmap(sws, st->hwbuf);
}
@@ -479,7 +479,7 @@ svga_texture_transfer_destroy(struct pipe_context *pipe,
-struct u_resource_vtbl svga_texture_vtbl =
+struct u_resource_vtbl svga_texture_vtbl =
{
svga_texture_get_handle, /* get_handle */
svga_texture_destroy, /* resource_destroy */
@@ -513,7 +513,7 @@ svga_texture_create(struct pipe_screen *screen,
assert(template->last_level < SVGA_MAX_TEXTURE_LEVELS);
if(template->last_level >= SVGA_MAX_TEXTURE_LEVELS)
goto error2;
-
+
tex->key.flags = 0;
tex->key.size.width = template->width0;
tex->key.size.height = template->height0;
@@ -544,8 +544,8 @@ svga_texture_create(struct pipe_screen *screen,
tex->key.flags |= SVGA3D_SURFACE_HINT_SCANOUT;
tex->key.cachable = 0;
}
-
- /*
+
+ /*
* XXX: Never pass the SVGA3D_SURFACE_HINT_RENDERTARGET hint. Mesa cannot
* know beforehand whether a texture will be used as a rendertarget or not
* and it always requests PIPE_BIND_RENDER_TARGET, therefore
@@ -556,12 +556,12 @@ svga_texture_create(struct pipe_screen *screen,
!util_format_is_s3tc(template->format))
tex->key.flags |= SVGA3D_SURFACE_HINT_RENDERTARGET;
#endif
-
+
if(template->bind & PIPE_BIND_DEPTH_STENCIL)
tex->key.flags |= SVGA3D_SURFACE_HINT_DEPTHSTENCIL;
-
+
tex->key.numMipLevels = template->last_level + 1;
-
+
tex->key.format = svga_translate_format(template->format);
if(tex->key.format == SVGA3D_FORMAT_INVALID)
goto error2;
diff --git a/src/gallium/drivers/svga/svga_resource_texture.h b/src/gallium/drivers/svga/svga_resource_texture.h
index 9a2911c..94e8916 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.h
+++ b/src/gallium/drivers/svga/svga_resource_texture.h
@@ -46,12 +46,12 @@ enum SVGA3dSurfaceFormat;
extern struct u_resource_vtbl svga_texture_vtbl;
-struct svga_texture
+struct svga_texture
{
struct u_resource b;
boolean defined[6][SVGA_MAX_TEXTURE_LEVELS];
-
+
struct svga_sampler_view *cached_view;
unsigned view_age[SVGA_MAX_TEXTURE_LEVELS];
@@ -61,8 +61,8 @@ struct svga_texture
/**
* Creation key for the host surface handle.
- *
- * This structure describes all the host surface characteristics so that it
+ *
+ * This structure describes all the host surface characteristics so that it
* can be looked up in cache, since creating a host surface is often a slow
* operation.
*/
diff --git a/src/gallium/drivers/svga/svga_sampler_view.c b/src/gallium/drivers/svga/svga_sampler_view.c
index 6911f13..794cf28 100644
--- a/src/gallium/drivers/svga/svga_sampler_view.c
+++ b/src/gallium/drivers/svga/svga_sampler_view.c
@@ -47,7 +47,7 @@ svga_get_tex_sampler_view(struct pipe_context *pipe,
unsigned min_lod, unsigned max_lod)
{
struct svga_screen *ss = svga_screen(pt->screen);
- struct svga_texture *tex = svga_texture(pt);
+ struct svga_texture *tex = svga_texture(pt);
struct svga_sampler_view *sv = NULL;
SVGA3dSurfaceFormat format = svga_translate_format(pt->format);
boolean view = TRUE;
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 0781903..3fc4acc 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -294,7 +294,7 @@ static INLINE SVGA3dDevCapIndex
svga_translate_format_cap(enum pipe_format format)
{
switch(format) {
-
+
case PIPE_FORMAT_B8G8R8A8_UNORM:
return SVGA3D_DEVCAP_SURFACEFMT_A8R8G8B8;
case PIPE_FORMAT_B8G8R8X8_UNORM:
@@ -352,7 +352,7 @@ svga_is_format_supported( struct pipe_screen *screen,
/* Override host capabilities */
if (tex_usage & PIPE_BIND_RENDER_TARGET) {
- switch(format) {
+ switch(format) {
/* Often unsupported/problematic. This means we end up with the same
* visuals for all virtual hardware implementations.
@@ -360,7 +360,7 @@ svga_is_format_supported( struct pipe_screen *screen,
case PIPE_FORMAT_B4G4R4A4_UNORM:
case PIPE_FORMAT_B5G5R5A1_UNORM:
return FALSE;
-
+
/* Simulate ability to render into compressed textures */
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA:
@@ -372,14 +372,14 @@ svga_is_format_supported( struct pipe_screen *screen,
break;
}
}
-
+
/* Try to query the host */
index = svga_translate_format_cap(format);
- if( index < SVGA3D_DEVCAP_MAX &&
+ if( index < SVGA3D_DEVCAP_MAX &&
sws->get_cap(sws, index, &result) )
{
SVGA3dSurfaceFormatCaps mask;
-
+
mask.value = 0;
if (tex_usage & PIPE_BIND_RENDER_TARGET)
mask.offscreenRenderTarget = 1;
@@ -443,14 +443,14 @@ static void
svga_destroy_screen( struct pipe_screen *screen )
{
struct svga_screen *svgascreen = svga_screen(screen);
-
+
svga_screen_cache_cleanup(svgascreen);
pipe_mutex_destroy(svgascreen->swc_mutex);
pipe_mutex_destroy(svgascreen->tex_mutex);
svgascreen->sws->destroy(svgascreen->sws);
-
+
FREE(svgascreen);
}
diff --git a/src/gallium/drivers/svga/svga_screen.h b/src/gallium/drivers/svga/svga_screen.h
index 86ec89d..b0048fe 100644
--- a/src/gallium/drivers/svga/svga_screen.h
+++ b/src/gallium/drivers/svga/svga_screen.h
@@ -51,7 +51,7 @@ struct svga_screen
unsigned use_ps30;
unsigned use_vs30;
-
+
struct {
boolean force_level_surface_view;
boolean force_surface_view;
@@ -61,7 +61,7 @@ struct svga_screen
} debug;
unsigned texture_timestamp;
- pipe_mutex tex_mutex;
+ pipe_mutex tex_mutex;
pipe_mutex swc_mutex; /* Used for buffer uploads */
diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c
index eff36e0..683f312 100644
--- a/src/gallium/drivers/svga/svga_screen_cache.c
+++ b/src/gallium/drivers/svga/svga_screen_cache.c
@@ -35,8 +35,8 @@
#define SVGA_SURFACE_CACHE_ENABLED 1
-/**
- * Compute the bucket for this key.
+/**
+ * Compute the bucket for this key.
*/
static INLINE unsigned
svga_screen_cache_bucket(const struct svga_host_surface_cache_key *key)
@@ -67,37 +67,37 @@ svga_screen_cache_lookup(struct svga_screen *svgascreen,
next = curr->next;
while(curr != &cache->bucket[bucket]) {
++tries;
-
+
entry = LIST_ENTRY(struct svga_host_surface_cache_entry, curr, bucket_head);
assert(entry->handle);
-
+
if(memcmp(&entry->key, key, sizeof *key) == 0 &&
sws->fence_signalled( sws, entry->fence, 0 ) == 0) {
assert(sws->surface_is_flushed(sws, entry->handle));
-
+
handle = entry->handle; // Reference is transfered here.
entry->handle = NULL;
-
+
LIST_DEL(&entry->bucket_head);
LIST_DEL(&entry->head);
-
+
LIST_ADD(&entry->head, &cache->empty);
break;
}
- curr = next;
+ curr = next;
next = curr->next;
}
pipe_mutex_unlock(cache->mutex);
-
+
if (SVGA_DEBUG & DEBUG_DMA)
- debug_printf("%s: cache %s after %u tries (bucket %d)\n", __FUNCTION__,
+ debug_printf("%s: cache %s after %u tries (bucket %d)\n", __FUNCTION__,
handle ? "hit" : "miss", tries, bucket);
-
+
return handle;
}
@@ -105,30 +105,30 @@ svga_screen_cache_lookup(struct svga_screen *svgascreen,
/*
* Transfers a handle reference.
*/
-
+
static INLINE void
svga_screen_cache_add(struct svga_screen *svgascreen,
- const struct svga_host_surface_cache_key *key,
+ const struct svga_host_surface_cache_key *key,
struct svga_winsys_surface **p_handle)
{
struct svga_host_surface_cache *cache = &svgascreen->cache;
struct svga_winsys_screen *sws = svgascreen->sws;
struct svga_host_surface_cache_entry *entry = NULL;
struct svga_winsys_surface *handle = *p_handle;
-
+
assert(key->cachable);
assert(handle);
if(!handle)
return;
-
+
*p_handle = NULL;
pipe_mutex_lock(cache->mutex);
-
+
if(!LIST_IS_EMPTY(&cache->empty)) {
/* use the first empty entry */
entry = LIST_ENTRY(struct svga_host_surface_cache_entry, cache->empty.next, head);
-
+
LIST_DEL(&entry->head);
}
else if(!LIST_IS_EMPTY(&cache->unused)) {
@@ -146,7 +146,7 @@ svga_screen_cache_add(struct svga_screen *svgascreen,
if(entry) {
entry->handle = handle;
memcpy(&entry->key, key, sizeof entry->key);
-
+
SVGA_DBG(DEBUG_CACHE|DEBUG_DMA,
"cache sid %p\n", entry->handle);
LIST_ADD(&entry->head, &cache->validated);
@@ -157,7 +157,7 @@ svga_screen_cache_add(struct svga_screen *svgascreen,
"unref sid %p (couldn't find space)\n", handle);
sws->surface_reference(sws, &handle, NULL);
}
-
+
pipe_mutex_unlock(cache->mutex);
}
@@ -187,7 +187,7 @@ svga_screen_cache_flush(struct svga_screen *svgascreen,
if(sws->surface_is_flushed(sws, entry->handle)) {
LIST_DEL(&entry->head);
-
+
svgascreen->sws->fence_reference(svgascreen->sws, &entry->fence, fence);
LIST_ADD(&entry->head, &cache->unused);
@@ -196,7 +196,7 @@ svga_screen_cache_flush(struct svga_screen *svgascreen,
LIST_ADD(&entry->bucket_head, &cache->bucket[bucket]);
}
- curr = next;
+ curr = next;
next = curr->next;
}
@@ -210,7 +210,7 @@ svga_screen_cache_cleanup(struct svga_screen *svgascreen)
struct svga_host_surface_cache *cache = &svgascreen->cache;
struct svga_winsys_screen *sws = svgascreen->sws;
unsigned i;
-
+
for(i = 0; i < SVGA_HOST_SURFACE_CACHE_SIZE; ++i) {
if(cache->entries[i].handle) {
SVGA_DBG(DEBUG_CACHE|DEBUG_DMA,
@@ -221,7 +221,7 @@ svga_screen_cache_cleanup(struct svga_screen *svgascreen)
if(cache->entries[i].fence)
svgascreen->sws->fence_reference(svgascreen->sws, &cache->entries[i].fence, NULL);
}
-
+
pipe_mutex_destroy(cache->mutex);
}
@@ -233,14 +233,14 @@ svga_screen_cache_init(struct svga_screen *svgascreen)
unsigned i;
pipe_mutex_init(cache->mutex);
-
+
for(i = 0; i < SVGA_HOST_SURFACE_CACHE_BUCKETS; ++i)
LIST_INITHEAD(&cache->bucket[i]);
LIST_INITHEAD(&cache->unused);
-
+
LIST_INITHEAD(&cache->validated);
-
+
LIST_INITHEAD(&cache->empty);
for(i = 0; i < SVGA_HOST_SURFACE_CACHE_SIZE; ++i)
LIST_ADDTAIL(&cache->entries[i].head, &cache->empty);
@@ -248,7 +248,7 @@ svga_screen_cache_init(struct svga_screen *svgascreen)
return PIPE_OK;
}
-
+
struct svga_winsys_surface *
svga_screen_surface_create(struct svga_screen *svgascreen,
struct svga_host_surface_cache_key *key)
@@ -258,7 +258,7 @@ svga_screen_surface_create(struct svga_screen *svgascreen,
boolean cachable = SVGA_SURFACE_CACHE_ENABLED && key->cachable;
SVGA_DBG(DEBUG_CACHE|DEBUG_DMA,
- "%s sz %dx%dx%d mips %d faces %d cachable %d\n",
+ "%s sz %dx%dx%d mips %d faces %d cachable %d\n",
__FUNCTION__,
key->size.width,
key->size.height,
@@ -292,11 +292,11 @@ svga_screen_surface_create(struct svga_screen *svgascreen,
if (handle) {
if (key->format == SVGA3D_BUFFER)
SVGA_DBG(DEBUG_CACHE|DEBUG_DMA,
- "reuse sid %p sz %d (buffer)\n", handle,
+ "reuse sid %p sz %d (buffer)\n", handle,
key->size.width);
else
SVGA_DBG(DEBUG_CACHE|DEBUG_DMA,
- "reuse sid %p sz %dx%dx%d mips %d faces %d\n", handle,
+ "reuse sid %p sz %dx%dx%d mips %d faces %d\n", handle,
key->size.width,
key->size.height,
key->size.depth,
@@ -309,13 +309,13 @@ svga_screen_surface_create(struct svga_screen *svgascreen,
handle = sws->surface_create(sws,
key->flags,
key->format,
- key->size,
- key->numFaces,
+ key->size,
+ key->numFaces,
key->numMipLevels);
if (handle)
SVGA_DBG(DEBUG_CACHE|DEBUG_DMA,
- " CREATE sid %p sz %dx%dx%d\n",
- handle,
+ " CREATE sid %p sz %dx%dx%d\n",
+ handle,
key->size.width,
key->size.height,
key->size.depth);
@@ -331,7 +331,7 @@ svga_screen_surface_destroy(struct svga_screen *svgascreen,
struct svga_winsys_surface **p_handle)
{
struct svga_winsys_screen *sws = svgascreen->sws;
-
+
/* We only set the cachable flag for surfaces of which we are the
* exclusive owner. So just hold onto our existing reference in
* that case.
diff --git a/src/gallium/drivers/svga/svga_screen_cache.h b/src/gallium/drivers/svga/svga_screen_cache.h
index 62156e3..062caec 100644
--- a/src/gallium/drivers/svga/svga_screen_cache.h
+++ b/src/gallium/drivers/svga/svga_screen_cache.h
@@ -38,7 +38,7 @@
/* Guess the storage size of cached surfaces and try and keep it under
* this amount:
- */
+ */
#define SVGA_HOST_SURFACE_CACHE_BYTES 16*1024*1024
/* Maximum number of discrete surfaces in the cache:
@@ -67,51 +67,51 @@ struct svga_host_surface_cache_key
};
-struct svga_host_surface_cache_entry
+struct svga_host_surface_cache_entry
{
- /**
+ /**
* Head for the LRU list, svga_host_surface_cache::unused, and
* svga_host_surface_cache::empty
*/
struct list_head head;
-
+
/** Head for the bucket lists. */
struct list_head bucket_head;
struct svga_host_surface_cache_key key;
struct svga_winsys_surface *handle;
-
+
struct pipe_fence_handle *fence;
};
/**
* Cache of the host surfaces.
- *
+ *
* A cache entry can be in the following stages:
* 1. empty
* 2. holding a buffer in a validate list
* 3. holding a flushed buffer (not in any validate list) with an active fence
* 4. holding a flushed buffer with an expired fence
- *
- * An entry progresses from 1 -> 2 -> 3 -> 4. When we need an entry to put a
- * buffer into we preferencial take from 1, or from the least recentely used
+ *
+ * An entry progresses from 1 -> 2 -> 3 -> 4. When we need an entry to put a
+ * buffer into we preferencial take from 1, or from the least recentely used
* buffer from 3/4.
*/
-struct svga_host_surface_cache
+struct svga_host_surface_cache
{
pipe_mutex mutex;
-
+
/* Unused buffers are put in buckets to speed up lookups */
struct list_head bucket[SVGA_HOST_SURFACE_CACHE_BUCKETS];
-
- /* Entries with unused buffers, ordered from most to least recently used
+
+ /* Entries with unused buffers, ordered from most to least recently used
* (3 and 4) */
struct list_head unused;
-
+
/* Entries with buffers still in validate lists (2) */
struct list_head validated;
-
+
/** Empty entries (1) */
struct list_head empty;
diff --git a/src/gallium/drivers/svga/svga_state.c b/src/gallium/drivers/svga/svga_state.c
index 1c21d3a..1de2c16 100644
--- a/src/gallium/drivers/svga/svga_state.c
+++ b/src/gallium/drivers/svga/svga_state.c
@@ -87,7 +87,7 @@ static const struct svga_tracked_state *swtnl_draw_state[] =
/* Flattens the graph of state dependencies. Could swap the positions
* of hw_clear_state and need_swtnl_state without breaking anything.
*/
-static const struct svga_tracked_state **state_levels[] =
+static const struct svga_tracked_state **state_levels[] =
{
need_swtnl_state,
hw_clear_state,
@@ -136,15 +136,15 @@ static int update_state( struct svga_context *svga,
* state flags which are generated and checked to help ensure
* state atoms are ordered correctly in the list.
*/
- unsigned examined, prev;
+ unsigned examined, prev;
examined = 0;
prev = *state;
- for (i = 0; atoms[i] != NULL; i++) {
+ for (i = 0; atoms[i] != NULL; i++) {
unsigned generated;
- assert(atoms[i]->dirty);
+ assert(atoms[i]->dirty);
assert(atoms[i]->update);
if (check_state(*state, atoms[i]->dirty)) {
@@ -161,17 +161,17 @@ static int update_state( struct svga_context *svga,
*/
xor_states(&generated, prev, *state);
if (check_state(examined, generated)) {
- debug_printf("state atom %s generated state already examined\n",
+ debug_printf("state atom %s generated state already examined\n",
atoms[i]->name);
assert(0);
}
-
+
prev = *state;
accumulate_state(&examined, atoms[i]->dirty);
}
}
else {
- for (i = 0; atoms[i] != NULL; i++) {
+ for (i = 0; atoms[i] != NULL; i++) {
if (check_state(*state, atoms[i]->dirty)) {
ret = atoms[i]->update( svga, *state );
if (ret != 0)
@@ -205,8 +205,8 @@ int svga_update_state( struct svga_context *svga,
svga->dirty |= svga->state.dirty[i];
if (svga->dirty) {
- ret = update_state( svga,
- state_levels[i],
+ ret = update_state( svga,
+ state_levels[i],
&svga->dirty );
if (ret != 0)
return ret;
@@ -214,8 +214,8 @@ int svga_update_state( struct svga_context *svga,
svga->state.dirty[i] = 0;
}
}
-
- for (; i < SVGA_STATE_MAX; i++)
+
+ for (; i < SVGA_STATE_MAX; i++)
svga->state.dirty[i] |= svga->dirty;
svga->dirty = 0;
@@ -269,7 +269,7 @@ enum pipe_error svga_emit_initial_state( struct svga_context *svga )
*/
EMIT_RS(rs, count, SVGA3D_RS_COORDINATETYPE, SVGA3D_COORDINATE_LEFTHANDED );
EMIT_RS(rs, count, SVGA3D_RS_FRONTWINDING, SVGA3D_FRONTWINDING_CW );
-
+
assert( COUNT == count );
SVGA_FIFOCommitAll( svga->swc );
diff --git a/src/gallium/drivers/svga/svga_state_constants.c b/src/gallium/drivers/svga/svga_state_constants.c
index 97c818c..caa8013 100644
--- a/src/gallium/drivers/svga/svga_state_constants.c
+++ b/src/gallium/drivers/svga/svga_state_constants.c
@@ -35,7 +35,7 @@
#include "svga_hw_reg.h"
/***********************************************************************
- * Hardware update
+ * Hardware update
*/
/* Convert from PIPE_SHADER_* to SVGA3D_SHADERTYPE_*
@@ -64,7 +64,7 @@ static int emit_const( struct svga_context *svga,
value[2],
value[3]);
- ret = SVGA3D_SetShaderConst( svga->swc,
+ ret = SVGA3D_SetShaderConst( svga->swc,
i,
svga_shader_type(unit),
SVGA3D_CONST_TYPE_FLOAT,
@@ -74,7 +74,7 @@ static int emit_const( struct svga_context *svga,
memcpy(svga->state.hw_draw.cb[unit][i], value, 4 * sizeof(float));
}
-
+
return ret;
}
@@ -114,7 +114,7 @@ static int emit_consts( struct svga_context *svga,
return ret;
}
-
+
static int emit_fs_consts( struct svga_context *svga,
unsigned dirty )
{
@@ -162,7 +162,7 @@ static int emit_fs_consts( struct svga_context *svga,
}
-struct svga_tracked_state svga_hw_fs_parameters =
+struct svga_tracked_state svga_hw_fs_parameters =
{
"hw fs params",
(SVGA_NEW_FS_CONST_BUFFER |
@@ -184,10 +184,10 @@ static int emit_vs_consts( struct svga_context *svga,
/* SVGA_NEW_VS_RESULT
*/
- if (result == NULL)
+ if (result == NULL)
return 0;
- /* SVGA_NEW_VS_CONST_BUFFER
+ /* SVGA_NEW_VS_CONST_BUFFER
*/
ret = emit_consts( svga, 0, PIPE_SHADER_VERTEX );
if (ret)
@@ -229,7 +229,7 @@ static int emit_vs_consts( struct svga_context *svga,
}
-struct svga_tracked_state svga_hw_vs_parameters =
+struct svga_tracked_state svga_hw_vs_parameters =
{
"hw vs params",
(SVGA_NEW_PRESCALE |
diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c
index fcbb35e..df5621c 100644
--- a/src/gallium/drivers/svga/svga_state_framebuffer.c
+++ b/src/gallium/drivers/svga/svga_state_framebuffer.c
@@ -51,7 +51,7 @@ static int emit_framebuffer( struct svga_context *svga,
* We need to reemit non-null surface bindings, even when they are not
* dirty, to ensure that the resources are paged in.
*/
-
+
for(i = 0; i < PIPE_MAX_COLOR_BUFS; ++i) {
if (curr->cbufs[i] != hw->cbufs[i] ||
(reemit && hw->cbufs[i])) {
@@ -61,12 +61,12 @@ static int emit_framebuffer( struct svga_context *svga,
ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_COLOR0 + i, curr->cbufs[i]);
if (ret != PIPE_OK)
return ret;
-
+
pipe_surface_reference(&hw->cbufs[i], curr->cbufs[i]);
}
}
-
+
if (curr->zsbuf != hw->zsbuf ||
(reemit && hw->zsbuf)) {
ret = SVGA3D_SetRenderTarget(svga->swc, SVGA3D_RT_DEPTH, curr->zsbuf);
@@ -84,7 +84,7 @@ static int emit_framebuffer( struct svga_context *svga,
if (ret != PIPE_OK)
return ret;
}
-
+
pipe_surface_reference(&hw->zsbuf, curr->zsbuf);
}
@@ -93,7 +93,7 @@ static int emit_framebuffer( struct svga_context *svga,
}
-struct svga_tracked_state svga_hw_framebuffer =
+struct svga_tracked_state svga_hw_framebuffer =
{
"hw framebuffer state",
SVGA_NEW_FRAME_BUFFER |
@@ -104,7 +104,7 @@ struct svga_tracked_state svga_hw_framebuffer =
-/***********************************************************************
+/***********************************************************************
*/
static int emit_viewport( struct svga_context *svga,
@@ -127,8 +127,8 @@ static int emit_viewport( struct svga_context *svga,
float fx = viewport->scale[0] * -1.0 + viewport->translate[0];
float fy = flip * viewport->scale[1] * -1.0 + viewport->translate[1];
- float fw = viewport->scale[0] * 2;
- float fh = flip * viewport->scale[1] * 2;
+ float fw = viewport->scale[0] * 2;
+ float fh = flip * viewport->scale[1] * 2;
memset( &prescale, 0, sizeof(prescale) );
@@ -172,24 +172,24 @@ static int emit_viewport( struct svga_context *svga,
if (fx < 0) {
prescale.translate[0] += fx;
- prescale.scale[0] *= fw / (fw + fx);
+ prescale.scale[0] *= fw / (fw + fx);
fw += fx;
fx = 0;
}
if (fy < 0) {
prescale.translate[1] += fy;
- prescale.scale[1] *= fh / (fh + fy);
+ prescale.scale[1] *= fh / (fh + fy);
fh += fy;
fy = 0;
}
if (fx + fw > fb_width) {
- prescale.scale[0] *= fw / (fb_width - fx);
+ prescale.scale[0] *= fw / (fb_width - fx);
prescale.translate[0] -= fx * (fw / (fb_width - fx));
prescale.translate[0] += fx;
fw = fb_width - fx;
-
+
}
if (fy + fh > fb_height) {
@@ -268,8 +268,8 @@ static int emit_viewport( struct svga_context *svga,
*/
if (range_min > range_max) {
float range_tmp;
- range_tmp = range_min;
- range_min = range_max;
+ range_tmp = range_min;
+ range_min = range_max;
range_max = range_tmp;
prescale.scale[2] = -prescale.scale[2];
}
@@ -302,7 +302,7 @@ static int emit_viewport( struct svga_context *svga,
/* Adjust prescale to take into account the fact that it is
* going to be applied prior to the perspective divide and
* viewport transformation.
- *
+ *
* Vwin = H(Vc/Vc.w) + J
*
* We want to tweak Vwin with scale and translation from above,
@@ -352,7 +352,7 @@ static int emit_viewport( struct svga_context *svga,
}
if (svga->state.hw_clear.depthrange.zmin != range_min ||
- svga->state.hw_clear.depthrange.zmax != range_max)
+ svga->state.hw_clear.depthrange.zmax != range_max)
{
ret = SVGA3D_SetZRange(svga->swc, range_min, range_max );
if(ret != PIPE_OK)
@@ -371,7 +371,7 @@ static int emit_viewport( struct svga_context *svga,
}
-struct svga_tracked_state svga_hw_viewport =
+struct svga_tracked_state svga_hw_viewport =
{
"hw viewport state",
( SVGA_NEW_FRAME_BUFFER |
@@ -395,12 +395,12 @@ static int emit_scissor_rect( struct svga_context *svga,
rect.y = scissor->miny;
rect.w = scissor->maxx - scissor->minx; /* + 1 ?? */
rect.h = scissor->maxy - scissor->miny; /* + 1 ?? */
-
+
return SVGA3D_SetScissorRect(svga->swc, &rect);
}
-struct svga_tracked_state svga_hw_scissor =
+struct svga_tracked_state svga_hw_scissor =
{
"hw scissor state",
SVGA_NEW_SCISSOR,
@@ -432,7 +432,7 @@ static int emit_clip_planes( struct svga_context *svga,
}
-struct svga_tracked_state svga_hw_clip_planes =
+struct svga_tracked_state svga_hw_clip_planes =
{
"hw viewport state",
SVGA_NEW_CLIP,
diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c
index ad6f294..804aff3 100644
--- a/src/gallium/drivers/svga/svga_state_fs.c
+++ b/src/gallium/drivers/svga/svga_state_fs.c
@@ -61,7 +61,7 @@ static struct svga_shader_result *search_fs_key( struct svga_fragment_shader *fs
if (compare_fs_keys( key, &result->key.fkey ) == 0)
return result;
}
-
+
return NULL;
}
@@ -86,10 +86,10 @@ static enum pipe_error compile_fs( struct svga_context *svga,
goto fail;
}
- ret = SVGA3D_DefineShader(svga->swc,
+ ret = SVGA3D_DefineShader(svga->swc,
result->id,
SVGA3D_SHADERTYPE_PS,
- result->tokens,
+ result->tokens,
result->nr_tokens * sizeof result->tokens[0]);
if (ret)
goto fail;
@@ -138,20 +138,20 @@ static int make_fs_key( const struct svga_context *svga,
* requires that the incoming fragment color be white. This change
* achieves that by creating a varient of the current fragment
* shader that overrides all output colors with 1,1,1,1
- *
+ *
* This will work for most shaders, including those containing
* TEXKIL and/or depth-write. However, it will break on the
* combination of xor-logicop plus alphatest.
*
* Ultimately, we could implement alphatest in the shader using
* texkil prior to overriding the outgoing fragment color.
- *
+ *
* SVGA_NEW_BLEND
*/
if (svga->curr.blend->need_white_fragments) {
key->white_fragments = 1;
}
-
+
/* XXX: want to limit this to the textures that the shader actually
* refers to.
*
@@ -224,13 +224,13 @@ static int emit_hw_fs( struct svga_context *svga,
return ret;
svga->dirty |= SVGA_NEW_FS_RESULT;
- svga->state.hw_draw.fs = result;
+ svga->state.hw_draw.fs = result;
}
return 0;
}
-struct svga_tracked_state svga_hw_fs =
+struct svga_tracked_state svga_hw_fs =
{
"fragment shader (hwtnl)",
(SVGA_NEW_FS |
diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c
index 66fea02..38891f7 100644
--- a/src/gallium/drivers/svga/svga_state_need_swtnl.c
+++ b/src/gallium/drivers/svga/svga_state_need_swtnl.c
@@ -35,7 +35,7 @@
/***********************************************************************
*/
-static INLINE SVGA3dDeclType
+static INLINE SVGA3dDeclType
svga_translate_vertex_format(enum pipe_format format)
{
switch (format) {
@@ -89,11 +89,11 @@ static int update_need_swvfetch( struct svga_context *svga,
svga->state.sw.need_swvfetch = need_swvfetch;
svga->dirty |= SVGA_NEW_NEED_SWVFETCH;
}
-
+
return 0;
}
-struct svga_tracked_state svga_update_need_swvfetch =
+struct svga_tracked_state svga_update_need_swvfetch =
{
"update need_swvfetch",
( SVGA_NEW_VELEMENT ),
@@ -101,13 +101,13 @@ struct svga_tracked_state svga_update_need_swvfetch =
};
-/***********************************************************************
+/***********************************************************************
*/
static int update_need_pipeline( struct svga_context *svga,
unsigned dirty )
{
-
+
boolean need_pipeline = FALSE;
struct svga_vertex_shader *vs = svga->curr.vs;
@@ -128,7 +128,7 @@ static int update_need_pipeline( struct svga_context *svga,
need_pipeline = TRUE;
}
- /* SVGA_NEW_CLIP
+ /* SVGA_NEW_CLIP
*/
if (svga->curr.clip.nr) {
SVGA_DBG(DEBUG_SWTNL, "%s: userclip\n", __FUNCTION__);
@@ -144,7 +144,7 @@ static int update_need_pipeline( struct svga_context *svga,
}
-struct svga_tracked_state svga_update_need_pipeline =
+struct svga_tracked_state svga_update_need_pipeline =
{
"need pipeline",
(SVGA_NEW_RAST |
@@ -155,7 +155,7 @@ struct svga_tracked_state svga_update_need_pipeline =
};
-/***********************************************************************
+/***********************************************************************
*/
static int update_need_swtnl( struct svga_context *svga,
@@ -186,7 +186,7 @@ static int update_need_swtnl( struct svga_context *svga,
svga->dirty |= SVGA_NEW_NEED_SWTNL;
svga->swtnl.new_vdecl = TRUE;
}
-
+
return 0;
}
diff --git a/src/gallium/drivers/svga/svga_state_rss.c b/src/gallium/drivers/svga/svga_state_rss.c
index ab13f3f..a4a2f3d 100644
--- a/src/gallium/drivers/svga/svga_state_rss.c
+++ b/src/gallium/drivers/svga/svga_state_rss.c
@@ -89,7 +89,7 @@ static int emit_rss( struct svga_context *svga,
EMIT_RS( svga, curr->rt[0].dstblend, DSTBLEND, fail );
EMIT_RS( svga, curr->rt[0].blendeq, BLENDEQUATION, fail );
- EMIT_RS( svga, curr->rt[0].separate_alpha_blend_enable,
+ EMIT_RS( svga, curr->rt[0].separate_alpha_blend_enable,
SEPARATEALPHABLENDENABLE, fail );
if (curr->rt[0].separate_alpha_blend_enable) {
@@ -113,10 +113,10 @@ static int emit_rss( struct svga_context *svga,
}
if (dirty & (SVGA_NEW_DEPTH_STENCIL | SVGA_NEW_RAST)) {
- const struct svga_depth_stencil_state *curr = svga->curr.depth;
- const struct svga_rasterizer_state *rast = svga->curr.rast;
+ const struct svga_depth_stencil_state *curr = svga->curr.depth;
+ const struct svga_rasterizer_state *rast = svga->curr.rast;
- if (!curr->stencil[0].enabled)
+ if (!curr->stencil[0].enabled)
{
/* Stencil disabled
*/
@@ -138,7 +138,7 @@ static int emit_rss( struct svga_context *svga,
EMIT_RS( svga, curr->stencil_mask, STENCILMASK, fail );
EMIT_RS( svga, curr->stencil_writemask, STENCILWRITEMASK, fail );
}
- else
+ else
{
int cw, ccw;
@@ -193,7 +193,7 @@ static int emit_rss( struct svga_context *svga,
if (dirty & (SVGA_NEW_RAST | SVGA_NEW_NEED_PIPELINE))
{
- const struct svga_rasterizer_state *curr = svga->curr.rast;
+ const struct svga_rasterizer_state *curr = svga->curr.rast;
unsigned cullmode = curr->cullmode;
/* Shademode: still need to rearrange index list to move
@@ -221,7 +221,7 @@ static int emit_rss( struct svga_context *svga,
if (dirty & (SVGA_NEW_RAST | SVGA_NEW_FRAME_BUFFER | SVGA_NEW_NEED_PIPELINE))
{
- const struct svga_rasterizer_state *curr = svga->curr.rast;
+ const struct svga_rasterizer_state *curr = svga->curr.rast;
float slope = 0.0;
float bias = 0.0;
@@ -270,7 +270,7 @@ static int emit_rss( struct svga_context *svga,
}
-struct svga_tracked_state svga_hw_rss =
+struct svga_tracked_state svga_hw_rss =
{
"hw rss state",
diff --git a/src/gallium/drivers/svga/svga_state_tss.c b/src/gallium/drivers/svga/svga_state_tss.c
index f8b269a..87b856d 100644
--- a/src/gallium/drivers/svga/svga_state_tss.c
+++ b/src/gallium/drivers/svga/svga_state_tss.c
@@ -53,7 +53,7 @@ void svga_cleanup_tss_binding(struct svga_context *svga)
static int
-update_tss_binding(struct svga_context *svga,
+update_tss_binding(struct svga_context *svga,
unsigned dirty )
{
boolean reemit = !!(dirty & SVGA_NEW_COMMAND_BUFFER);
@@ -74,7 +74,7 @@ update_tss_binding(struct svga_context *svga,
} queue;
queue.bind_count = 0;
-
+
for (i = 0; i < count; i++) {
const struct svga_sampler_state *s = svga->curr.sampler[i];
struct svga_hw_view_state *view = &svga->state.hw_draw.views[i];
@@ -102,8 +102,8 @@ update_tss_binding(struct svga_context *svga,
view->max_lod = max_lod;
if (texture)
- view->v = svga_get_tex_sampler_view(&svga->pipe,
- texture,
+ view->v = svga_get_tex_sampler_view(&svga->pipe,
+ texture,
min_lod,
max_lod);
}
@@ -118,7 +118,7 @@ update_tss_binding(struct svga_context *svga,
queue.bind[queue.bind_count].unit = i;
queue.bind[queue.bind_count].view = view;
queue.bind_count++;
- }
+ }
if (!view->dirty && view->v) {
svga_validate_sampler_view(svga, view->v);
}
@@ -150,7 +150,7 @@ update_tss_binding(struct svga_context *svga,
&ts[i].value,
handle,
SVGA_RELOC_READ);
-
+
queue.bind[i].view->dirty = FALSE;
}
@@ -200,7 +200,7 @@ do { \
} while (0)
-static INLINE void
+static INLINE void
svga_queue_tss( struct ts_queue *q,
unsigned unit,
unsigned tss,
@@ -215,7 +215,7 @@ svga_queue_tss( struct ts_queue *q,
static int
-update_tss(struct svga_context *svga,
+update_tss(struct svga_context *svga,
unsigned dirty )
{
unsigned i;
@@ -250,7 +250,7 @@ update_tss(struct svga_context *svga,
}
}
-
+
if (queue.ts_count) {
SVGA3dTextureState *ts;
@@ -262,7 +262,7 @@ update_tss(struct svga_context *svga,
memcpy( ts,
queue.ts,
queue.ts_count * sizeof queue.ts[0]);
-
+
SVGA_FIFOCommitAll( svga->swc );
}
diff --git a/src/gallium/drivers/svga/svga_state_vdecl.c b/src/gallium/drivers/svga/svga_state_vdecl.c
index 3af7bf2..518bd6d 100644
--- a/src/gallium/drivers/svga/svga_state_vdecl.c
+++ b/src/gallium/drivers/svga/svga_state_vdecl.c
@@ -45,12 +45,12 @@ upload_user_buffers( struct svga_context *svga )
int i;
int nr;
- if (0)
+ if (0)
debug_printf("%s: %d\n", __FUNCTION__, svga->curr.num_vertex_buffers);
nr = svga->curr.num_vertex_buffers;
- for (i = 0; i < nr; i++)
+ for (i = 0; i < nr; i++)
{
if (svga_buffer_is_user_buffer(svga->curr.vb[i].buffer))
{
@@ -102,7 +102,7 @@ static int emit_hw_vs_vdecl( struct svga_context *svga,
assert(svga->curr.velems->count >=
svga->curr.vs->base.info.file_count[TGSI_FILE_INPUT]);
- svga_hwtnl_reset_vdecl( svga->hwtnl,
+ svga_hwtnl_reset_vdecl( svga->hwtnl,
svga->curr.velems->count );
for (i = 0; i < svga->curr.velems->count; i++) {
@@ -160,7 +160,7 @@ static int emit_hw_vdecl( struct svga_context *svga,
}
-struct svga_tracked_state svga_hw_vdecl =
+struct svga_tracked_state svga_hw_vdecl =
{
"hw vertex decl state (hwtnl version)",
( SVGA_NEW_NEED_SWTNL |
diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c
index 5133c70..5bc39b7 100644
--- a/src/gallium/drivers/svga/svga_state_vs.c
+++ b/src/gallium/drivers/svga/svga_state_vs.c
@@ -60,7 +60,7 @@ static struct svga_shader_result *search_vs_key( struct svga_vertex_shader *vs,
if (compare_vs_keys( key, &result->key.vkey ) == 0)
return result;
}
-
+
return NULL;
}
@@ -85,10 +85,10 @@ static enum pipe_error compile_vs( struct svga_context *svga,
goto fail;
}
- ret = SVGA3D_DefineShader(svga->swc,
+ ret = SVGA3D_DefineShader(svga->swc,
result->id,
SVGA3D_SHADERTYPE_VS,
- result->tokens,
+ result->tokens,
result->nr_tokens * sizeof result->tokens[0]);
if (ret)
goto fail;
@@ -159,13 +159,13 @@ static int emit_hw_vs( struct svga_context *svga,
return ret;
svga->dirty |= SVGA_NEW_VS_RESULT;
- svga->state.hw_draw.vs = result;
+ svga->state.hw_draw.vs = result;
}
return 0;
}
-struct svga_tracked_state svga_hw_vs =
+struct svga_tracked_state svga_hw_vs =
{
"vertex shader (hwtnl)",
(SVGA_NEW_VS |
@@ -219,8 +219,8 @@ static int update_zero_stride( struct svga_context *svga,
translate = translate_generic_create(&key);
assert(vel->src_offset == 0);
-
- mapped_buffer = pipe_buffer_map_range(&svga->pipe,
+
+ mapped_buffer = pipe_buffer_map_range(&svga->pipe,
vbuffer->buffer,
vel->src_offset,
util_format_get_blocksize(vel->src_format),
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c
index 3e4bed7..bbe6d95 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -114,7 +114,7 @@ svga_texture_view_surface(struct pipe_context *pipe,
uint32_t i, j;
unsigned z_offset = 0;
- SVGA_DBG(DEBUG_PERF,
+ SVGA_DBG(DEBUG_PERF,
"svga: Create surface view: face %d zslice %d mips %d..%d\n",
face_pick, zslice_pick, start_mip, start_mip+num_mip-1);
@@ -126,7 +126,7 @@ svga_texture_view_surface(struct pipe_context *pipe,
key->size.depth = zslice_pick < 0 ? u_minify(tex->b.b.depth0, start_mip) : 1;
key->cachable = 1;
assert(key->size.depth == 1);
-
+
if(tex->b.b.target == PIPE_TEXTURE_CUBE && face_pick < 0) {
key->flags |= SVGA3D_SURFACE_CUBEMAP;
key->numFaces = 6;
@@ -162,9 +162,9 @@ svga_texture_view_surface(struct pipe_context *pipe,
1);
svga_texture_copy_handle(svga_context(pipe),
- tex->handle,
- 0, 0, z_offset,
- i + start_mip,
+ tex->handle,
+ 0, 0, z_offset,
+ i + start_mip,
j + face_pick,
handle, 0, 0, 0, i, j,
u_minify(tex->b.b.width0, i + start_mip),
@@ -230,7 +230,7 @@ svga_create_surface(struct pipe_context *pipe,
view = TRUE;
/* Currently only used for compressed textures */
- if (render &&
+ if (render &&
format != svga_translate_format(surf_tmpl->format)) {
view = TRUE;
}
@@ -287,7 +287,7 @@ svga_surface_destroy(struct pipe_context *pipe,
}
-static INLINE void
+static INLINE void
svga_mark_surface_dirty(struct pipe_surface *surf)
{
struct svga_surface *s = svga_surface(surf);
diff --git a/src/gallium/drivers/svga/svga_swtnl_backend.c b/src/gallium/drivers/svga/svga_swtnl_backend.c
index ff3da84..0914bb7 100644
--- a/src/gallium/drivers/svga/svga_swtnl_backend.c
+++ b/src/gallium/drivers/svga/svga_swtnl_backend.c
@@ -118,7 +118,7 @@ svga_vbuf_render_map_vertices( struct vbuf_render *render )
char *ptr = (char*)pipe_buffer_map(&svga->pipe,
svga_render->vbuf,
- PIPE_TRANSFER_WRITE |
+ PIPE_TRANSFER_WRITE |
PIPE_TRANSFER_FLUSH_EXPLICIT |
PIPE_TRANSFER_DISCARD |
PIPE_TRANSFER_UNSYNCHRONIZED,
@@ -252,7 +252,7 @@ svga_vbuf_render_draw_elements( struct vbuf_render *render,
size_t size = 2 * nr_indices;
assert(( svga_render->vbuf_offset - svga_render->vdecl_offset) % svga_render->vertex_size == 0);
-
+
if (svga_render->ibuf_size < svga_render->ibuf_offset + size)
pipe_resource_reference(&svga_render->ibuf, NULL);
diff --git a/src/gallium/drivers/svga/svga_swtnl_draw.c b/src/gallium/drivers/svga/svga_swtnl_draw.c
index 814e8ed..31dda18 100644
--- a/src/gallium/drivers/svga/svga_swtnl_draw.c
+++ b/src/gallium/drivers/svga/svga_swtnl_draw.c
@@ -101,12 +101,12 @@ svga_swtnl_draw_vbo(struct svga_context *svga,
/* Ensure the draw module didn't touch this */
assert(i == svga->curr.num_vertex_buffers);
-
+
/*
* unmap vertex/index buffers
*/
for (i = 0; i < svga->curr.num_vertex_buffers; i++) {
- pipe_buffer_unmap(&svga->pipe, svga->curr.vb[i].buffer,
+ pipe_buffer_unmap(&svga->pipe, svga->curr.vb[i].buffer,
vb_transfer[i]);
draw_set_mapped_vertex_buffer(draw, i, NULL);
}
@@ -142,7 +142,7 @@ boolean svga_init_swtnl( struct svga_context *svga )
goto fail;
- draw_set_rasterize_stage(svga->swtnl.draw,
+ draw_set_rasterize_stage(svga->swtnl.draw,
draw_vbuf_stage( svga->swtnl.draw, svga->swtnl.backend ));
draw_set_render(svga->swtnl.draw, svga->swtnl.backend);
diff --git a/src/gallium/drivers/svga/svga_swtnl_state.c b/src/gallium/drivers/svga/svga_swtnl_state.c
index a759238..c2cd5f9 100644
--- a/src/gallium/drivers/svga/svga_swtnl_state.c
+++ b/src/gallium/drivers/svga/svga_swtnl_state.c
@@ -61,7 +61,7 @@ static void set_draw_viewport( struct svga_context *svga )
* going to be drawn with triangles, but we're not catching all
* cases where that will happen.
*/
- if (svga->curr.rast->templ.line_width > 1.0)
+ if (svga->curr.rast->templ.line_width > 1.0)
{
adjx = SVGA_LINE_ADJ_X + 0.175;
adjy = SVGA_LINE_ADJ_Y - 0.175;
@@ -88,26 +88,26 @@ static int update_swtnl_draw( struct svga_context *svga,
{
draw_flush( svga->swtnl.draw );
- if (dirty & SVGA_NEW_VS)
+ if (dirty & SVGA_NEW_VS)
draw_bind_vertex_shader(svga->swtnl.draw,
svga->curr.vs->draw_shader);
if (dirty & SVGA_NEW_VBUFFER)
- draw_set_vertex_buffers(svga->swtnl.draw,
- svga->curr.num_vertex_buffers,
+ draw_set_vertex_buffers(svga->swtnl.draw,
+ svga->curr.num_vertex_buffers,
svga->curr.vb);
if (dirty & SVGA_NEW_VELEMENT)
- draw_set_vertex_elements(svga->swtnl.draw,
- svga->curr.velems->count,
+ draw_set_vertex_elements(svga->swtnl.draw,
+ svga->curr.velems->count,
svga->curr.velems->velem );
if (dirty & SVGA_NEW_CLIP)
- draw_set_clip_state(svga->swtnl.draw,
+ draw_set_clip_state(svga->swtnl.draw,
&svga->curr.clip);
if (dirty & (SVGA_NEW_VIEWPORT |
- SVGA_NEW_REDUCED_PRIMITIVE |
+ SVGA_NEW_REDUCED_PRIMITIVE |
SVGA_NEW_RAST))
set_draw_viewport( svga );
@@ -117,7 +117,7 @@ static int update_swtnl_draw( struct svga_context *svga,
(void *) svga->curr.rast);
if (dirty & SVGA_NEW_FRAME_BUFFER)
- draw_set_mrd(svga->swtnl.draw,
+ draw_set_mrd(svga->swtnl.draw,
svga->curr.depthscale);
return 0;
diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c
index 781fe63..24f3135 100644
--- a/src/gallium/drivers/svga/svga_tgsi.c
+++ b/src/gallium/drivers/svga/svga_tgsi.c
@@ -78,7 +78,7 @@ static boolean svga_shader_expand( struct svga_shader_emitter *emit )
emit->ptr = new_buf + (emit->ptr - emit->buf);
emit->buf = new_buf;
return TRUE;
-}
+}
static INLINE boolean reserve( struct svga_shader_emitter *emit,
unsigned nr_dwords )
@@ -126,11 +126,11 @@ boolean svga_shader_emit_opcode( struct svga_shader_emitter *emit,
here->value = opcode;
if (emit->insn_offset) {
- SVGA3dShaderInstToken *prev = (SVGA3dShaderInstToken *)(emit->buf +
+ SVGA3dShaderInstToken *prev = (SVGA3dShaderInstToken *)(emit->buf +
emit->insn_offset);
prev->size = (here - prev) - 1;
}
-
+
emit->insn_offset = emit->ptr - emit->buf;
emit->ptr += sizeof(unsigned);
return TRUE;
@@ -153,7 +153,7 @@ static boolean svga_shader_emit_header( struct svga_shader_emitter *emit )
header.value = emit->use_sm30 ? SVGA3D_VS_30 : SVGA3D_VS_2X;
break;
}
-
+
return svga_shader_emit_dword( emit, header.value );
}
@@ -162,7 +162,7 @@ static boolean svga_shader_emit_header( struct svga_shader_emitter *emit )
/* Parse TGSI shader and translate to SVGA/DX9 serialized
- * representation.
+ * representation.
*
* In this function SVGA shader is emitted to an in-memory buffer that
* can be dynamically grown. Once we've finished and know how large
@@ -194,7 +194,7 @@ svga_tgsi_translate( const struct svga_shader *shader,
tgsi_scan_shader( shader->tokens, &emit.info);
emit.imm_start = emit.info.file_max[TGSI_FILE_CONSTANT] + 1;
-
+
if (unit == PIPE_SHADER_FRAGMENT)
emit.imm_start += key.fkey.num_unnormalized_coords;
@@ -213,7 +213,7 @@ svga_tgsi_translate( const struct svga_shader *shader,
if (!svga_shader_emit_instructions( &emit, shader->tokens ))
goto fail;
-
+
result = CALLOC_STRUCT(svga_shader_result);
if (result == NULL)
goto fail;
@@ -224,7 +224,7 @@ svga_tgsi_translate( const struct svga_shader *shader,
memcpy(&result->key, &key, sizeof key);
result->id = UTIL_BITMASK_INVALID_INDEX;
- if (SVGA_DEBUG & DEBUG_TGSI)
+ if (SVGA_DEBUG & DEBUG_TGSI)
{
debug_printf( "#####################################\n" );
debug_printf( "Shader %u below\n", shader->id );
@@ -256,7 +256,7 @@ svga_translate_fragment_program( const struct svga_fragment_shader *fs,
union svga_compile_key key;
memcpy(&key.fkey, fkey, sizeof *fkey);
- return svga_tgsi_translate( &fs->base,
+ return svga_tgsi_translate( &fs->base,
key,
PIPE_SHADER_FRAGMENT );
}
@@ -268,7 +268,7 @@ svga_translate_vertex_program( const struct svga_vertex_shader *vs,
union svga_compile_key key;
memcpy(&key.vkey, vkey, sizeof *vkey);
- return svga_tgsi_translate( &vs->base,
+ return svga_tgsi_translate( &vs->base,
key,
PIPE_SHADER_VERTEX );
}
diff --git a/src/gallium/drivers/svga/svga_tgsi.h b/src/gallium/drivers/svga/svga_tgsi.h
index 7ea909c..fba1c2d 100644
--- a/src/gallium/drivers/svga/svga_tgsi.h
+++ b/src/gallium/drivers/svga/svga_tgsi.h
@@ -82,7 +82,7 @@ struct svga_shader_result
/* SVGA Shader ID:
*/
unsigned id;
-
+
/* Next compilation result:
*/
struct svga_shader_result *next;
diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm20.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm20.c
index 1ae9906..d882fc2 100644
--- a/src/gallium/drivers/svga/svga_tgsi_decl_sm20.c
+++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm20.c
@@ -47,11 +47,11 @@ static boolean ps20_input( struct svga_shader_emitter *emit,
case TGSI_SEMANTIC_POSITION:
/* Special case:
*/
- reg = src_register( SVGA3DREG_MISCTYPE,
+ reg = src_register( SVGA3DREG_MISCTYPE,
SVGA3DMISCREG_POSITION );
break;
case TGSI_SEMANTIC_COLOR:
- reg = src_register( SVGA3DREG_INPUT,
+ reg = src_register( SVGA3DREG_INPUT,
semantic.Index );
break;
case TGSI_SEMANTIC_FOG:
@@ -95,7 +95,7 @@ static boolean ps20_output( struct svga_shader_emitter *emit,
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_col[cbuf] = emit->output_map[idx];
- emit->true_col[cbuf] = dst_register( SVGA3DREG_COLOROUT,
+ emit->true_col[cbuf] = dst_register( SVGA3DREG_COLOROUT,
semantic.Index );
}
else {
@@ -107,7 +107,7 @@ static boolean ps20_output( struct svga_shader_emitter *emit,
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_pos = emit->output_map[idx];
- emit->true_pos = dst_register( SVGA3DREG_DEPTHOUT,
+ emit->true_pos = dst_register( SVGA3DREG_DEPTHOUT,
semantic.Index );
break;
default:
@@ -164,7 +164,7 @@ static boolean vs20_output( struct svga_shader_emitter *emit,
/* Don't emit dcl instruction for vs20 inputs
*/
- /* Just build the register map table:
+ /* Just build the register map table:
*/
switch (semantic.Name) {
case TGSI_SEMANTIC_POSITION:
@@ -172,7 +172,7 @@ static boolean vs20_output( struct svga_shader_emitter *emit,
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_pos = emit->output_map[idx];
- emit->true_pos = dst_register( SVGA3DREG_RASTOUT,
+ emit->true_pos = dst_register( SVGA3DREG_RASTOUT,
SVGA3DRASTOUT_POSITION);
break;
case TGSI_SEMANTIC_PSIZE:
@@ -180,7 +180,7 @@ static boolean vs20_output( struct svga_shader_emitter *emit,
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_psiz = emit->output_map[idx];
- emit->true_psiz = dst_register( SVGA3DREG_RASTOUT,
+ emit->true_psiz = dst_register( SVGA3DREG_RASTOUT,
SVGA3DRASTOUT_PSIZE );
break;
case TGSI_SEMANTIC_FOG:
@@ -232,7 +232,7 @@ boolean svga_translate_decl_sm20( struct svga_shader_emitter *emit,
unsigned semantic = 0;
unsigned semantic_idx = 0;
unsigned idx;
-
+
if (decl->Declaration.Semantic) {
semantic = decl->Semantic.Name;
semantic_idx = decl->Semantic.Index;
diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
index 73102a7..216f4ca 100644
--- a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
+++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
@@ -35,11 +35,11 @@ static boolean translate_vs_ps_semantic( struct tgsi_declaration_semantic semant
unsigned *idx )
{
switch (semantic.Name) {
- case TGSI_SEMANTIC_POSITION:
+ case TGSI_SEMANTIC_POSITION:
*idx = semantic.Index;
*usage = SVGA3D_DECLUSAGE_POSITION;
break;
- case TGSI_SEMANTIC_COLOR:
+ case TGSI_SEMANTIC_COLOR:
*idx = semantic.Index;
*usage = SVGA3D_DECLUSAGE_COLOR;
@@ -48,20 +48,20 @@ static boolean translate_vs_ps_semantic( struct tgsi_declaration_semantic semant
*idx = semantic.Index + 2; /* sharing with COLOR */
*usage = SVGA3D_DECLUSAGE_COLOR;
break;
- case TGSI_SEMANTIC_FOG:
+ case TGSI_SEMANTIC_FOG:
*idx = 0;
assert(semantic.Index == 0);
*usage = SVGA3D_DECLUSAGE_TEXCOORD;
break;
- case TGSI_SEMANTIC_PSIZE:
+ case TGSI_SEMANTIC_PSIZE:
*idx = semantic.Index;
*usage = SVGA3D_DECLUSAGE_PSIZE;
break;
- case TGSI_SEMANTIC_GENERIC:
+ case TGSI_SEMANTIC_GENERIC:
*idx = semantic.Index + 1; /* texcoord[0] is reserved for fog */
*usage = SVGA3D_DECLUSAGE_TEXCOORD;
break;
- case TGSI_SEMANTIC_NORMAL:
+ case TGSI_SEMANTIC_NORMAL:
*idx = semantic.Index;
*usage = SVGA3D_DECLUSAGE_NORMAL;
break;
@@ -78,7 +78,7 @@ static boolean translate_vs_ps_semantic( struct tgsi_declaration_semantic semant
static boolean emit_decl( struct svga_shader_emitter *emit,
SVGA3dShaderDestToken reg,
- unsigned usage,
+ unsigned usage,
unsigned index )
{
SVGA3DOpDclArgs dcl;
@@ -200,11 +200,11 @@ static boolean ps30_output( struct svga_shader_emitter *emit,
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_col[idx] = emit->output_map[idx];
- emit->true_col[idx] = dst_register( SVGA3DREG_COLOROUT,
+ emit->true_col[idx] = dst_register( SVGA3DREG_COLOROUT,
semantic.Index );
}
else {
- emit->output_map[idx] = dst_register( SVGA3DREG_COLOROUT,
+ emit->output_map[idx] = dst_register( SVGA3DREG_COLOROUT,
semantic.Index );
}
break;
@@ -212,7 +212,7 @@ static boolean ps30_output( struct svga_shader_emitter *emit,
emit->output_map[idx] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
emit->temp_pos = emit->output_map[idx];
- emit->true_pos = dst_register( SVGA3DREG_DEPTHOUT,
+ emit->true_pos = dst_register( SVGA3DREG_DEPTHOUT,
semantic.Index );
break;
default:
@@ -305,7 +305,7 @@ static boolean vs30_output( struct svga_shader_emitter *emit,
emit->nr_hw_temp++ );
emit->temp_psiz = emit->output_map[idx];
- /* This has the effect of not declaring psiz (below) and not
+ /* This has the effect of not declaring psiz (below) and not
* emitting the final MOV to true_psiz in the postamble.
*/
if (!emit->key.vkey.allow_psiz)
diff --git a/src/gallium/drivers/svga/svga_tgsi_emit.h b/src/gallium/drivers/svga/svga_tgsi_emit.h
index 63ef7f8..e4ec9a4 100644
--- a/src/gallium/drivers/svga/svga_tgsi_emit.h
+++ b/src/gallium/drivers/svga/svga_tgsi_emit.h
@@ -51,7 +51,7 @@ struct svga_arl_consts {
struct svga_shader_emitter
{
boolean use_sm30;
-
+
unsigned size;
char *buf;
char *ptr;
@@ -65,7 +65,7 @@ struct svga_shader_emitter
int nr_hw_float_const;
int nr_hw_int_const;
int nr_hw_temp;
-
+
int insn_offset;
int internal_temp_count;
@@ -245,7 +245,7 @@ inst_token( unsigned opcode )
return inst;
}
-static INLINE SVGA3dShaderDestToken
+static INLINE SVGA3dShaderDestToken
dst_register( unsigned file,
int number )
{
@@ -261,7 +261,7 @@ dst_register( unsigned file,
dest.shfScale = 0;
dest.type_lower = file & 0x7;
dest.reserved0 = 1; /* is_reg */
-
+
return dest;
}
@@ -275,7 +275,7 @@ writemask( SVGA3dShaderDestToken dest,
}
-static INLINE SVGA3dShaderSrcToken
+static INLINE SVGA3dShaderSrcToken
src_token( unsigned file, int number )
{
SVGA3dShaderSrcToken src;
@@ -294,7 +294,7 @@ src_token( unsigned file, int number )
}
-static INLINE struct src_register
+static INLINE struct src_register
absolute( struct src_register src )
{
src.base.srcMod = SVGA3DSRCMOD_ABS;
@@ -303,7 +303,7 @@ absolute( struct src_register src )
}
-static INLINE struct src_register
+static INLINE struct src_register
negate( struct src_register src )
{
switch (src.base.srcMod) {
@@ -324,11 +324,11 @@ negate( struct src_register src )
}
-static INLINE struct src_register
+static INLINE struct src_register
src_register( unsigned file, int number )
{
struct src_register src;
-
+
src.base = src_token( file, number );
src.indirect.value = 0;
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c
index f2591c5..95c0cfc 100644
--- a/src/gallium/drivers/svga/svga_tgsi_insn.c
+++ b/src/gallium/drivers/svga/svga_tgsi_insn.c
@@ -37,7 +37,7 @@ static boolean emit_ps_postamble( struct svga_shader_emitter *emit );
-
+
static unsigned
translate_opcode(
uint opcode )
@@ -87,7 +87,7 @@ static unsigned translate_file( unsigned file )
-static SVGA3dShaderDestToken
+static SVGA3dShaderDestToken
translate_dst_register( struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn,
unsigned idx )
@@ -112,14 +112,14 @@ translate_dst_register( struct svga_shader_emitter *emit,
dest.mask = reg->Register.WriteMask;
assert(dest.mask);
- if (insn->Instruction.Saturate)
+ if (insn->Instruction.Saturate)
dest.dstMod = SVGA3DDSTMOD_SATURATE;
return dest;
}
-static struct src_register
+static struct src_register
swizzle( struct src_register src,
int x,
int y,
@@ -167,7 +167,7 @@ svga_arl_adjustment( const struct svga_shader_emitter *emit )
return 0;
}
-static struct src_register
+static struct src_register
translate_src_register( const struct svga_shader_emitter *emit,
const struct tgsi_full_src_register *reg )
{
@@ -180,13 +180,13 @@ translate_src_register( const struct svga_shader_emitter *emit,
*/
src = emit->input_map[reg->Register.Index];
break;
-
+
case TGSI_FILE_IMMEDIATE:
/* Immediates are appended after TGSI constants in the D3D
* constant buffer.
*/
src = src_register( translate_file( reg->Register.File ),
- reg->Register.Index +
+ reg->Register.Index +
emit->imm_start );
break;
@@ -259,7 +259,7 @@ translate_src_register( const struct svga_shader_emitter *emit,
/*
* Get a temporary register, return -1 if none available
*/
-static INLINE SVGA3dShaderDestToken
+static INLINE SVGA3dShaderDestToken
get_temp( struct svga_shader_emitter *emit )
{
int i = emit->nr_hw_temp + emit->internal_temp_count++;
@@ -271,7 +271,7 @@ get_temp( struct svga_shader_emitter *emit )
* allocated temp, otherwise release will be delayed until the next
* call to reset_temp_regs().
*/
-static INLINE void
+static INLINE void
release_temp( struct svga_shader_emitter *emit,
SVGA3dShaderDestToken temp )
{
@@ -283,13 +283,13 @@ static void reset_temp_regs( struct svga_shader_emitter *emit )
{
emit->internal_temp_count = 0;
}
-
+
static boolean submit_op0( struct svga_shader_emitter *emit,
SVGA3dShaderInstToken inst,
SVGA3dShaderDestToken dest )
{
- return (emit_instruction( emit, inst ) &&
+ return (emit_instruction( emit, inst ) &&
emit_dst( emit, dest ));
}
@@ -399,10 +399,10 @@ static boolean submit_op3( struct svga_shader_emitter *emit,
if (need_temp0)
{
temp0 = get_temp( emit );
-
+
if (!emit_op1( emit, inst_token( SVGA3DOP_MOV ), temp0, src0 ))
return FALSE;
-
+
src0 = src( temp0 );
}
@@ -481,10 +481,10 @@ static boolean submit_op4( struct svga_shader_emitter *emit,
if (need_temp0)
{
temp0 = get_temp( emit );
-
+
if (!emit_op1( emit, inst_token( SVGA3DOP_MOV ), temp0, src0 ))
return FALSE;
-
+
src0 = src( temp0 );
}
@@ -653,7 +653,7 @@ static INLINE struct src_register
get_vface( struct svga_shader_emitter *emit )
{
assert(emit->emitted_vface);
- return src_register(SVGA3DREG_MISCTYPE,
+ return src_register(SVGA3DREG_MISCTYPE,
SVGA3DMISCREG_FACE);
}
@@ -866,8 +866,8 @@ static boolean emit_div(struct svga_shader_emitter *emit,
unsigned channel = 1 << i;
if (dst.mask & channel) {
/* RCP TMP.?, SRC1.???? */
- if (!submit_op1( emit, inst_token( SVGA3DOP_RCP ),
- writemask(temp, channel),
+ if (!submit_op1( emit, inst_token( SVGA3DOP_RCP ),
+ writemask(temp, channel),
scalar(src1, i) ))
return FALSE;
}
@@ -1145,7 +1145,7 @@ static boolean emit_kilp(struct svga_shader_emitter *emit,
*
* SETP src0, cmp, src1 -- do this first to avoid aliasing problems.
* MOV dst, fail
- * MOV dst, pass, p0
+ * MOV dst, pass, p0
*/
static boolean
emit_conditional(struct svga_shader_emitter *emit,
@@ -1270,7 +1270,7 @@ static boolean emit_select_op(struct svga_shader_emitter *emit,
emit, &insn->Src[0] );
struct src_register src1 = translate_src_register(
emit, &insn->Src[1] );
-
+
return emit_select( emit, compare, dst, src0, src1 );
}
@@ -1285,7 +1285,7 @@ static boolean emit_tex2(struct svga_shader_emitter *emit,
struct src_register texcoord;
struct src_register sampler;
SVGA3dShaderDestToken tmp;
-
+
inst.value = 0;
switch (insn->Instruction.Opcode) {
@@ -1331,12 +1331,12 @@ static boolean emit_tex2(struct svga_shader_emitter *emit,
return FALSE;
/* MOV tmp.w, zero */
- if (!submit_op1( emit,
+ if (!submit_op1( emit,
inst_token( SVGA3DOP_MOV ),
- writemask( tmp, TGSI_WRITEMASK_W ),
+ writemask( tmp, TGSI_WRITEMASK_W ),
scalar( zero, TGSI_SWIZZLE_X )))
return FALSE;
-
+
texcoord = src( tmp );
inst.op = SVGA3DOP_TEXLDL;
}
@@ -1380,7 +1380,7 @@ static boolean emit_tex4(struct svga_shader_emitter *emit,
inst.value = 0;
switch (insn->Instruction.Opcode) {
- case TGSI_OPCODE_TXD:
+ case TGSI_OPCODE_TXD:
inst.op = SVGA3DOP_TEXLDD; /* 4 args! */
break;
default:
@@ -1395,7 +1395,7 @@ static boolean emit_tex4(struct svga_shader_emitter *emit,
static boolean emit_tex(struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn )
{
- SVGA3dShaderDestToken dst =
+ SVGA3dShaderDestToken dst =
translate_dst_register( emit, insn, 0 );
struct src_register src0 =
translate_src_register( emit, &insn->Src[0] );
@@ -1475,7 +1475,7 @@ static boolean emit_tex(struct svga_shader_emitter *emit,
return TRUE;
}
- else if (!emit->use_sm30 && dst.mask != TGSI_WRITEMASK_XYZW)
+ else if (!emit->use_sm30 && dst.mask != TGSI_WRITEMASK_XYZW)
{
if (!emit_op1( emit, inst_token( SVGA3DOP_MOV ), dst, src(tex_result) ))
return FALSE;
@@ -1569,21 +1569,21 @@ static boolean emit_deriv(struct svga_shader_emitter *emit,
const struct tgsi_full_instruction *insn )
{
if (emit->dynamic_branching_level > 0 &&
- insn->Src[0].Register.File == TGSI_FILE_TEMPORARY)
+ insn->Src[0].Register.File == TGSI_FILE_TEMPORARY)
{
struct src_register zero = get_zero_immediate( emit );
- SVGA3dShaderDestToken dst =
+ SVGA3dShaderDestToken dst =
translate_dst_register( emit, insn, 0 );
/* Deriv opcodes not valid inside dynamic branching, workaround
* by zeroing out the destination.
*/
- if (!submit_op1(emit,
- inst_token( SVGA3DOP_MOV ),
+ if (!submit_op1(emit,
+ inst_token( SVGA3DOP_MOV ),
dst,
scalar(zero, TGSI_SWIZZLE_X)))
return FALSE;
-
+
return TRUE;
}
else {
@@ -1630,7 +1630,7 @@ static boolean alias_src_dst( struct src_register src,
if (src.base.num != dst.num)
return FALSE;
- if (SVGA3dShaderGetRegType(dst.value) !=
+ if (SVGA3dShaderGetRegType(dst.value) !=
SVGA3dShaderGetRegType(src.base.value))
return FALSE;
@@ -1646,11 +1646,11 @@ static boolean emit_pow(struct svga_shader_emitter *emit,
struct src_register src1 = translate_src_register(
emit, &insn->Src[1] );
boolean need_tmp = FALSE;
-
+
/* POW can only output to a temporary */
if (insn->Dst[0].Register.File != TGSI_FILE_TEMPORARY)
need_tmp = TRUE;
-
+
/* POW src1 must not be the same register as dst */
if (alias_src_dst( src1, dst ))
need_tmp = TRUE;
@@ -1666,7 +1666,7 @@ static boolean emit_pow(struct svga_shader_emitter *emit,
return FALSE;
return submit_op1(emit, inst_token( SVGA3DOP_MOV ), dst, scalar(src(tmp), 0) );
- }
+ }
else {
return submit_op2(emit, inst_token( SVGA3DOP_POW ), dst, src0, src1);
}
@@ -1683,7 +1683,7 @@ static boolean emit_xpd(struct svga_shader_emitter *emit,
boolean need_dst_tmp = FALSE;
/* XPD can only output to a temporary */
- if (SVGA3dShaderGetRegType(dst.value) != SVGA3DREG_TEMP)
+ if (SVGA3dShaderGetRegType(dst.value) != SVGA3DREG_TEMP)
need_dst_tmp = TRUE;
/* The dst reg must not be the same as src0 or src1*/
@@ -1703,7 +1703,7 @@ static boolean emit_xpd(struct svga_shader_emitter *emit,
if (!submit_op1(emit, inst_token( SVGA3DOP_MOV ), dst, src( tmp )))
return FALSE;
- }
+ }
else {
if (!submit_op2(emit, inst_token( SVGA3DOP_CRS ), dst, src0, src1))
return FALSE;
@@ -1714,8 +1714,8 @@ static boolean emit_xpd(struct svga_shader_emitter *emit,
if (dst.mask & TGSI_WRITEMASK_W) {
struct src_register zero = get_zero_immediate( emit );
- if (!submit_op1(emit,
- inst_token( SVGA3DOP_MOV ),
+ if (!submit_op1(emit,
+ inst_token( SVGA3DOP_MOV ),
writemask(dst, TGSI_WRITEMASK_W),
zero))
return FALSE;
@@ -1756,8 +1756,8 @@ static boolean emit_lrp(struct svga_shader_emitter *emit,
if (need_dst_tmp) {
if (!submit_op1(emit, inst_token( SVGA3DOP_MOV ), dst, src( tmp )))
- return FALSE;
- }
+ return FALSE;
+ }
return TRUE;
}
@@ -1803,16 +1803,16 @@ static boolean emit_dst_insn(struct svga_shader_emitter *emit,
/* tmp.xw = 1.0
*/
if (tmp.mask & TGSI_WRITEMASK_XW) {
- if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ),
+ if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ),
writemask(tmp, TGSI_WRITEMASK_XW ),
scalar( zero, 3 )))
return FALSE;
}
-
+
/* tmp.yz = src0
*/
if (tmp.mask & TGSI_WRITEMASK_YZ) {
- if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ),
+ if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ),
writemask(tmp, TGSI_WRITEMASK_YZ ),
src0))
return FALSE;
@@ -1821,7 +1821,7 @@ static boolean emit_dst_insn(struct svga_shader_emitter *emit,
/* tmp.yw = tmp * src1
*/
if (tmp.mask & TGSI_WRITEMASK_YW) {
- if (!submit_op2( emit, inst_token( SVGA3DOP_MUL ),
+ if (!submit_op2( emit, inst_token( SVGA3DOP_MUL ),
writemask(tmp, TGSI_WRITEMASK_YW ),
src(tmp),
src1))
@@ -1831,13 +1831,13 @@ static boolean emit_dst_insn(struct svga_shader_emitter *emit,
/* dst = tmp
*/
if (need_tmp) {
- if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ),
+ if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ),
dst,
src(tmp)))
return FALSE;
- }
+ }
}
-
+
return TRUE;
}
@@ -1945,9 +1945,9 @@ static boolean emit_lit(struct svga_shader_emitter *emit,
/* tmp = pow(src.y, src.w)
*/
if (dst.mask & TGSI_WRITEMASK_Z) {
- if (!submit_op2(emit, inst_token( SVGA3DOP_POW ),
- tmp,
- scalar(src0, 1),
+ if (!submit_op2(emit, inst_token( SVGA3DOP_POW ),
+ tmp,
+ scalar(src0, 1),
scalar(src0, 3)))
return FALSE;
}
@@ -1955,12 +1955,12 @@ static boolean emit_lit(struct svga_shader_emitter *emit,
/* tmp.y = src.x
*/
if (dst.mask & TGSI_WRITEMASK_Y) {
- if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ),
+ if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ),
writemask(tmp, TGSI_WRITEMASK_Y ),
scalar(src0, 0)))
return FALSE;
}
-
+
/* Can't quite do this with emit conditional due to the extra
* writemask on the predicated mov:
*/
@@ -1983,10 +1983,10 @@ static boolean emit_lit(struct svga_shader_emitter *emit,
/* SETP src0.xxyy, GT, {0}.x */
if (!submit_op2( emit, setp_token, pred_reg,
- predsrc,
+ predsrc,
swizzle(zero, 0, 0, 0, 0) ))
return FALSE;
-
+
/* MOV dst, fail */
if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), dst,
swizzle(zero, 3, 0, 0, 3 )))
@@ -2157,7 +2157,7 @@ static boolean emit_bgnsub( struct svga_shader_emitter *emit,
* shader.
*/
emit->in_main_func = FALSE;
-
+
for (i = 0; i < emit->nr_labels; i++) {
if (emit->label[i] == position) {
return (emit_instruction( emit, inst_token( SVGA3DOP_RET ) ) &&
@@ -2175,9 +2175,9 @@ static boolean emit_call( struct svga_shader_emitter *emit,
{
unsigned position = insn->Label.Label;
unsigned i;
-
+
for (i = 0; i < emit->nr_labels; i++) {
- if (emit->label[i] == position)
+ if (emit->label[i] == position)
break;
}
@@ -2441,7 +2441,7 @@ static boolean emit_ps_preamble( struct svga_shader_emitter *emit )
struct src_register zero = get_zero_immediate( emit );
for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) {
if (SVGA3dShaderGetRegType(emit->true_col[i].value) != 0) {
-
+
if (!submit_op1( emit,
inst_token(SVGA3DOP_MOV),
emit->temp_col[i],
@@ -2450,7 +2450,7 @@ static boolean emit_ps_preamble( struct svga_shader_emitter *emit )
}
}
}
-
+
return TRUE;
}
@@ -2514,7 +2514,7 @@ static boolean emit_vs_postamble( struct svga_shader_emitter *emit )
* touch PSIZ with a hand-crafted MOV below.
*/
if (SVGA3dShaderGetRegType(emit->true_psiz.value) != 0) {
-
+
if (!submit_op1( emit,
inst_token(SVGA3DOP_MOV),
emit->true_psiz,
@@ -2529,25 +2529,25 @@ static boolean emit_vs_postamble( struct svga_shader_emitter *emit )
SVGA3dShaderDestToken temp_pos = emit->temp_pos;
SVGA3dShaderDestToken pos = emit->true_pos;
unsigned offset = emit->info.file_max[TGSI_FILE_CONSTANT] + 1;
- struct src_register prescale_scale = src_register( SVGA3DREG_CONST,
- offset + 0 );
- struct src_register prescale_trans = src_register( SVGA3DREG_CONST,
- offset + 1 );
+ struct src_register prescale_scale = src_register( SVGA3DREG_CONST,
+ offset + 0 );
+ struct src_register prescale_trans = src_register( SVGA3DREG_CONST,
+ offset + 1 );
/* MUL temp_pos.xyz, temp_pos, prescale.scale
* MAD result.position, temp_pos.wwww, prescale.trans, temp_pos
* --> Note that prescale.trans.w == 0
*/
- if (!submit_op2( emit,
- inst_token(SVGA3DOP_MUL),
- writemask(temp_pos, TGSI_WRITEMASK_XYZ),
+ if (!submit_op2( emit,
+ inst_token(SVGA3DOP_MUL),
+ writemask(temp_pos, TGSI_WRITEMASK_XYZ),
src(temp_pos),
prescale_scale ))
return FALSE;
- if (!submit_op3( emit,
- inst_token(SVGA3DOP_MAD),
- pos,
+ if (!submit_op3( emit,
+ inst_token(SVGA3DOP_MAD),
+ pos,
swizzle(src(temp_pos), 3, 3, 3, 3),
prescale_trans,
src(temp_pos)))
@@ -2561,12 +2561,12 @@ static boolean emit_vs_postamble( struct svga_shader_emitter *emit )
/* Adjust GL clipping coordinate space to hardware (D3D-style):
*
* DP4 temp_pos.z, {0,0,.5,.5}, temp_pos
- * MOV result.position, temp_pos
+ * MOV result.position, temp_pos
*/
- if (!submit_op2( emit,
- inst_token(SVGA3DOP_DP4),
- writemask(temp_pos, TGSI_WRITEMASK_Z),
- imm_0055,
+ if (!submit_op2( emit,
+ inst_token(SVGA3DOP_DP4),
+ writemask(temp_pos, TGSI_WRITEMASK_Z),
+ imm_0055,
src(temp_pos) ))
return FALSE;
@@ -2608,7 +2608,7 @@ static boolean emit_light_twoside( struct svga_shader_emitter *emit )
* to reset_temp_regs().
*/
for (i = 0; i < count; i++) {
- color[i] = dst_register( SVGA3DREG_TEMP,
+ color[i] = dst_register( SVGA3DREG_TEMP,
emit->nr_hw_temp++ );
front[i] = emit->input_map[emit->internal_color_idx[i]];
@@ -2622,7 +2622,7 @@ static boolean emit_light_twoside( struct svga_shader_emitter *emit )
*/
emit->input_map[emit->internal_color_idx[i]] = src(color[i]);
}
-
+
if_token = inst_token( SVGA3DOP_IFC );
if (emit->key.fkey.front_ccw)
@@ -2644,7 +2644,7 @@ static boolean emit_light_twoside( struct svga_shader_emitter *emit )
if (!(emit_instruction( emit, inst_token( SVGA3DOP_ELSE))))
return FALSE;
-
+
for (i = 0; i < count; i++) {
if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), color[i], back[i] ))
return FALSE;
@@ -2924,14 +2924,14 @@ boolean svga_shader_emit_instructions( struct svga_shader_emitter *emit,
if (!ret)
goto done;
break;
-
+
case TGSI_TOKEN_TYPE_INSTRUCTION:
if (!helpers_emitted) {
if (!svga_shader_emit_helpers( emit ))
goto done;
helpers_emitted = TRUE;
}
- ret = svga_emit_instruction( emit,
+ ret = svga_emit_instruction( emit,
line_nr++,
&parse.FullToken.FullInstruction );
if (!ret)
@@ -2940,7 +2940,7 @@ boolean svga_shader_emit_instructions( struct svga_shader_emitter *emit,
default:
break;
}
-
+
reset_temp_regs( emit );
}
diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h
index 5e4bdef..b22dcb4 100644
--- a/src/gallium/drivers/svga/svga_winsys.h
+++ b/src/gallium/drivers/svga/svga_winsys.h
@@ -26,9 +26,9 @@
/**
* @file
* VMware SVGA specific winsys interface.
- *
+ *
* @author Jose Fonseca
- *
+ *
* Documentation taken from the VMware SVGA DDK.
*/
@@ -78,49 +78,49 @@ struct svga_winsys_context
void
(*destroy)(struct svga_winsys_context *swc);
- void *
- (*reserve)(struct svga_winsys_context *swc,
+ void *
+ (*reserve)(struct svga_winsys_context *swc,
uint32_t nr_bytes, uint32_t nr_relocs );
-
+
/**
* Emit a relocation for a host surface.
- *
+ *
* @param flags bitmask of SVGA_RELOC_* flags
- *
+ *
* NOTE: Order of this call does matter. It should be the same order
* as relocations appear in the command buffer.
*/
void
- (*surface_relocation)(struct svga_winsys_context *swc,
- uint32 *sid,
+ (*surface_relocation)(struct svga_winsys_context *swc,
+ uint32 *sid,
struct svga_winsys_surface *surface,
unsigned flags);
-
+
/**
* Emit a relocation for a guest memory region.
- *
+ *
* @param flags bitmask of SVGA_RELOC_* flags
- *
+ *
* NOTE: Order of this call does matter. It should be the same order
* as relocations appear in the command buffer.
*/
void
- (*region_relocation)(struct svga_winsys_context *swc,
- struct SVGAGuestPtr *ptr,
+ (*region_relocation)(struct svga_winsys_context *swc,
+ struct SVGAGuestPtr *ptr,
struct svga_winsys_buffer *buffer,
uint32 offset,
unsigned flags);
void
(*commit)(struct svga_winsys_context *swc);
-
+
enum pipe_error
- (*flush)(struct svga_winsys_context *swc,
+ (*flush)(struct svga_winsys_context *swc,
struct pipe_fence_handle **pfence);
- /**
+ /**
* Context ID used to fill in the commands
- *
+ *
* Context IDs are arbitrary small non-negative integers,
* global to the entire SVGA device.
*/
@@ -135,12 +135,12 @@ struct svga_winsys_screen
{
void
(*destroy)(struct svga_winsys_screen *sws);
-
+
boolean
(*get_cap)(struct svga_winsys_screen *sws,
SVGA3dDevCapIndex index,
SVGA3dDevCapResult *result);
-
+
/**
* Create a new context.
*
@@ -153,8 +153,8 @@ struct svga_winsys_screen
*/
struct svga_winsys_context *
(*context_create)(struct svga_winsys_screen *sws);
-
-
+
+
/**
* This creates a "surface" object in the SVGA3D device,
* and returns the surface ID (sid). Surfaces are generic
@@ -222,7 +222,7 @@ struct svga_winsys_screen
* Reference a SVGA3D surface object. This allows sharing of a
* surface between different objects.
*/
- void
+ void
(*surface_reference)(struct svga_winsys_screen *sws,
struct svga_winsys_surface **pdst,
struct svga_winsys_surface *src);
@@ -236,25 +236,25 @@ struct svga_winsys_screen
* SSE instructions.
*/
struct svga_winsys_buffer *
- (*buffer_create)( struct svga_winsys_screen *sws,
- unsigned alignment,
+ (*buffer_create)( struct svga_winsys_screen *sws,
+ unsigned alignment,
unsigned usage,
unsigned size );
- /**
+ /**
* Map the entire data store of a buffer object into the client's address.
* flags is a bitmaks of PIPE_TRANSFER_*
*/
void *
- (*buffer_map)( struct svga_winsys_screen *sws,
+ (*buffer_map)( struct svga_winsys_screen *sws,
struct svga_winsys_buffer *buf,
unsigned flags );
-
- void
- (*buffer_unmap)( struct svga_winsys_screen *sws,
+
+ void
+ (*buffer_unmap)( struct svga_winsys_screen *sws,
struct svga_winsys_buffer *buf );
- void
+ void
(*buffer_destroy)( struct svga_winsys_screen *sws,
struct svga_winsys_buffer *buf );
diff --git a/src/gallium/drivers/svga/svgadump/svga_dump.c b/src/gallium/drivers/svga/svgadump/svga_dump.c
index d59fb89..f43eeab 100644
--- a/src/gallium/drivers/svga/svgadump/svga_dump.c
+++ b/src/gallium/drivers/svga/svgadump/svga_dump.c
@@ -1443,12 +1443,12 @@ dump_SVGA3dCmdBlitSurfaceToScreen(const SVGA3dCmdBlitSurfaceToScreen *cmd)
}
-void
+void
svga_dump_command(uint32_t cmd_id, const void *data, uint32_t size)
{
const uint8_t *body = (const uint8_t *)data;
const uint8_t *next = body + size;
-
+
switch(cmd_id) {
case SVGA_3D_CMD_SURFACE_DEFINE:
_debug_printf("\tSVGA_3D_CMD_SURFACE_DEFINE\n");
@@ -1640,7 +1640,7 @@ svga_dump_command(uint32_t cmd_id, const void *data, uint32_t size)
const SVGA3dCmdDefineShader *cmd = (const SVGA3dCmdDefineShader *)body;
dump_SVGA3dCmdDefineShader(cmd);
body = (const uint8_t *)&cmd[1];
- svga_shader_dump((const uint32_t *)body,
+ svga_shader_dump((const uint32_t *)body,
(unsigned)(next - body)/sizeof(uint32_t),
FALSE );
body = next;
@@ -1749,14 +1749,14 @@ svga_dump_command(uint32_t cmd_id, const void *data, uint32_t size)
}
-void
+void
svga_dump_commands(const void *commands, uint32_t size)
{
const uint8_t *next = commands;
const uint8_t *last = next + size;
-
+
assert(size % sizeof(uint32_t) == 0);
-
+
while(next < last) {
const uint32_t cmd_id = *(const uint32_t *)next;
diff --git a/src/gallium/drivers/svga/svgadump/svga_dump.h b/src/gallium/drivers/svga/svgadump/svga_dump.h
index ca01543..7f3df4a 100644
--- a/src/gallium/drivers/svga/svgadump/svga_dump.h
+++ b/src/gallium/drivers/svga/svgadump/svga_dump.h
@@ -28,7 +28,7 @@
#include "pipe/p_compiler.h"
-void
+void
svga_dump_command(uint32_t cmd_id, const void *data, uint32_t size);
void
diff --git a/src/gallium/drivers/svga/svgadump/svga_shader.h b/src/gallium/drivers/svga/svgadump/svga_shader.h
index 5db64bf..d361e78 100644
--- a/src/gallium/drivers/svga/svgadump/svga_shader.h
+++ b/src/gallium/drivers/svga/svgadump/svga_shader.h
@@ -26,7 +26,7 @@
/**
* @file
* SVGA Shader Token Definitions
- *
+ *
* @author Michal Krol
*/
diff --git a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c
index 4ee1bf2..1db441a 100644
--- a/src/gallium/drivers/svga/svgadump/svga_shader_dump.c
+++ b/src/gallium/drivers/svga/svgadump/svga_shader_dump.c
@@ -26,7 +26,7 @@
/**
* @file
* SVGA Shader Dump Facilities
- *
+ *
* @author Michal Krol
*/
diff --git a/src/gallium/drivers/svga/svgadump/svga_shader_dump.h b/src/gallium/drivers/svga/svgadump/svga_shader_dump.h
index a2657ac..0147509 100644
--- a/src/gallium/drivers/svga/svgadump/svga_shader_dump.h
+++ b/src/gallium/drivers/svga/svgadump/svga_shader_dump.h
@@ -26,7 +26,7 @@
/**
* @file
* SVGA Shader Dump Facilities
- *
+ *
* @author Michal Krol
*/
diff --git a/src/gallium/drivers/svga/svgadump/svga_shader_op.c b/src/gallium/drivers/svga/svgadump/svga_shader_op.c
index 95612a8..b7bfaca 100644
--- a/src/gallium/drivers/svga/svgadump/svga_shader_op.c
+++ b/src/gallium/drivers/svga/svgadump/svga_shader_op.c
@@ -26,7 +26,7 @@
/**
* @file
* SVGA Shader Token Opcode Info
- *
+ *
* @author Michal Krol
*/
diff --git a/src/gallium/drivers/svga/svgadump/svga_shader_op.h b/src/gallium/drivers/svga/svgadump/svga_shader_op.h
index a5ccae5..d9709d1 100644
--- a/src/gallium/drivers/svga/svgadump/svga_shader_op.h
+++ b/src/gallium/drivers/svga/svgadump/svga_shader_op.h
@@ -26,7 +26,7 @@
/**
* @file
* SVGA Shader Token Opcode Info
- *
+ *
* @author Michal Krol
*/
diff --git a/src/gallium/drivers/trace/tr_context.h b/src/gallium/drivers/trace/tr_context.h
index dadbe56..faab674 100644
--- a/src/gallium/drivers/trace/tr_context.h
+++ b/src/gallium/drivers/trace/tr_context.h
@@ -41,7 +41,7 @@ extern "C" {
struct trace_screen;
-
+
struct trace_context
{
struct pipe_context base;
diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
index c2de2da..fe70463 100644
--- a/src/gallium/drivers/trace/tr_screen.c
+++ b/src/gallium/drivers/trace/tr_screen.c
@@ -380,7 +380,7 @@ trace_screen_fence_reference(struct pipe_screen *_screen,
assert(pdst);
dst = *pdst;
-
+
trace_dump_call_begin("pipe_screen", "fence_reference");
trace_dump_arg(ptr, screen);
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index 3d6b5b5..abfb16f 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef P_COMPILER_H
diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h
index 74a1fa2..c9fb0b3 100644
--- a/src/gallium/include/pipe/p_config.h
+++ b/src/gallium/include/pipe/p_config.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,24 +22,24 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
* Gallium configuration defines.
- *
- * This header file sets several defines based on the compiler, processor
- * architecture, and operating system being used. These defines should be used
- * throughout the code to facilitate porting to new platforms. It is likely that
- * this file is auto-generated by an autoconf-like tool at some point, as some
- * things cannot be determined by pre-defined environment alone.
- *
+ *
+ * This header file sets several defines based on the compiler, processor
+ * architecture, and operating system being used. These defines should be used
+ * throughout the code to facilitate porting to new platforms. It is likely that
+ * this file is auto-generated by an autoconf-like tool at some point, as some
+ * things cannot be determined by pre-defined environment alone.
+ *
* See also:
* - http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
* - echo | gcc -dM -E - | sort
* - http://msdn.microsoft.com/en-us/library/b0084kay.aspx
- *
+ *
* @author José Fonseca
*/
@@ -61,8 +61,8 @@
* - 1400: Visual C++ 2005
* - 1310: Visual C++ .NET 2003
* - 1300: Visual C++ .NET 2002
- *
- * __MSC__ seems to be an old macro -- it is not pre-defined on recent MSVC
+ *
+ * __MSC__ seems to be an old macro -- it is not pre-defined on recent MSVC
* versions.
*/
#if defined(_MSC_VER) || defined(__MSC__)
@@ -124,7 +124,7 @@
/*
* Auto-detect the operating system family.
- *
+ *
* See subsystem below for a more fine-grained distinction.
*/
@@ -182,7 +182,7 @@
/*
* Try to auto-detect the subsystem.
- *
+ *
* NOTE: There is no way to auto-detect most of these.
*/
@@ -192,9 +192,9 @@
#if defined(PIPE_OS_WINDOWS)
#if defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY)
-/* Windows 2000/XP Display Driver */
+/* Windows 2000/XP Display Driver */
#elif defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT)
-/* Windows 2000/XP Miniport Driver */
+/* Windows 2000/XP Miniport Driver */
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
/* Windows User-space Library */
#elif defined(PIPE_SUBSYSTEM_WINDOWS_CE)
@@ -203,7 +203,7 @@
#ifdef _WIN32_WCE
#define PIPE_SUBSYSTEM_WINDOWS_CE
#else /* !_WIN32_WCE */
-#error No PIPE_SUBSYSTEM_WINDOWS_xxx subsystem defined.
+#error No PIPE_SUBSYSTEM_WINDOWS_xxx subsystem defined.
#endif /* !_WIN32_WCE */
#endif
#endif /* PIPE_OS_WINDOWS */
diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
index 589cac2..da0d6fa 100644
--- a/src/gallium/include/pipe/p_context.h
+++ b/src/gallium/include/pipe/p_context.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef PIPE_CONTEXT_H
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index f5af15f..bcabcbc 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef PIPE_DEFINES_H
@@ -92,7 +92,7 @@ enum pipe_error {
#define PIPE_LOGICOP_COPY 12
#define PIPE_LOGICOP_OR_REVERSE 13
#define PIPE_LOGICOP_OR 14
-#define PIPE_LOGICOP_SET 15
+#define PIPE_LOGICOP_SET 15
#define PIPE_MASK_R 0x1
#define PIPE_MASK_G 0x2
@@ -172,7 +172,7 @@ enum pipe_texture_target {
#define PIPE_TEX_MIPFILTER_LINEAR 1
#define PIPE_TEX_MIPFILTER_NONE 2
-/* Within a mipmap, ie min/mag filter
+/* Within a mipmap, ie min/mag filter
*/
#define PIPE_TEX_FILTER_NEAREST 0
#define PIPE_TEX_FILTER_LINEAR 1
@@ -199,7 +199,7 @@ enum pipe_transfer_usage {
* create time.
*/
PIPE_TRANSFER_READ = (1 << 0),
-
+
/**
* Resource contents will be written back at transfer_destroy
* time (or modified as a result of being accessed directly).
@@ -211,7 +211,7 @@ enum pipe_transfer_usage {
*/
PIPE_TRANSFER_READ_WRITE = PIPE_TRANSFER_READ | PIPE_TRANSFER_WRITE,
- /**
+ /**
* The transfer should map the texture storage directly. The driver may
* return NULL if that isn't possible, and the state tracker needs to cope
* with that and use an alternative path without this flag.
@@ -332,7 +332,7 @@ enum pipe_transfer_usage {
#define PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO 0x2
-/**
+/**
* Flush types:
*/
#define PIPE_FLUSH_RENDER_CACHE 0x1
diff --git a/src/gallium/include/pipe/p_format.h b/src/gallium/include/pipe/p_format.h
index 22cc7aa..25ec754 100644
--- a/src/gallium/include/pipe/p_format.h
+++ b/src/gallium/include/pipe/p_format.h
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* Copyright (c) 2008 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef PIPE_FORMAT_H
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index 850eb84..e5efaa4 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,12 +22,12 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
- *
+ *
* Screen, Adapter or GPU
*
* These are driver functions/facilities that are context independent.
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index ba433b2..74cbb9c 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* Copyright 2009-2010 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef P_SHADER_TOKENS_H
@@ -196,8 +196,8 @@ struct tgsi_property_data {
unsigned Data;
};
-/* TGSI opcodes.
- *
+/* TGSI opcodes.
+ *
* For more information on semantics of opcodes and
* which APIs are known to use which opcodes, see
* gallium/docs/source/tgsi.rst
@@ -376,9 +376,9 @@ struct tgsi_instruction
* If tgsi_instruction::Label is TRUE, tgsi_instruction_label follows.
*
* If tgsi_instruction::Texture is TRUE, tgsi_instruction_texture follows.
- *
+ *
* Then, tgsi_instruction::NumDstRegs of tgsi_dst_register follow.
- *
+ *
* Then, tgsi_instruction::NumSrcRegs of tgsi_src_register follow.
*
* tgsi_instruction::NrTokens contains the total number of words that make the
@@ -460,7 +460,7 @@ struct tgsi_src_register
/**
* If tgsi_src_register::Modifier is TRUE, tgsi_src_register_modifier follows.
- *
+ *
* Then, if tgsi_src_register::Indirect is TRUE, another tgsi_src_register
* follows.
*
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 226ae86..b362c7c 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,13 +22,13 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
* @file
- *
+ *
* Abstract graphics pipe state objects.
*
* Basic notes:
@@ -102,13 +102,13 @@ struct pipe_rasterizer_state
unsigned line_stipple_pattern:16;
unsigned line_last_pixel:1;
- /**
+ /**
* Use the first vertex of a primitive as the provoking vertex for
* flat shading.
*/
- unsigned flatshade_first:1;
+ unsigned flatshade_first:1;
- /**
+ /**
* When true, triangle rasterization uses (0.5, 0.5) pixel centers
* for determining pixel ownership.
*
@@ -164,7 +164,7 @@ struct pipe_shader_state
};
-struct pipe_depth_state
+struct pipe_depth_state
{
unsigned enabled:1; /**< depth test enabled? */
unsigned writemask:1; /**< allow depth buffer writes? */
@@ -430,7 +430,7 @@ struct pipe_vertex_element
* this attribute live in?
*/
unsigned vertex_buffer_index;
-
+
enum pipe_format src_format;
};
@@ -479,5 +479,5 @@ struct pipe_draw_info
#ifdef __cplusplus
}
#endif
-
+
#endif
diff --git a/src/gallium/include/state_tracker/sw_winsys.h b/src/gallium/include/state_tracker/sw_winsys.h
index 0b11fe3..dd615f5 100644
--- a/src/gallium/include/state_tracker/sw_winsys.h
+++ b/src/gallium/include/state_tracker/sw_winsys.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007-2009 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
/**
@@ -59,29 +59,29 @@ struct sw_displaytarget;
/**
* This is the interface that sw expects any window system
* hosting it to implement.
- *
+ *
* sw is for the most part a self sufficient driver. The only thing it
* does not know is how to display a surface.
*/
struct sw_winsys
{
- void
+ void
(*destroy)( struct sw_winsys *ws );
boolean
(*is_displaytarget_format_supported)( struct sw_winsys *ws,
unsigned tex_usage,
enum pipe_format format );
-
+
/**
* Allocate storage for a render target.
- *
+ *
* Often surfaces which are meant to be blitted to the front screen (i.e.,
- * display targets) must be allocated with special characteristics, memory
+ * display targets) must be allocated with special characteristics, memory
* pools, or obtained directly from the windowing system.
- *
+ *
* This callback is invoked by the pipe_screen when creating a texture marked
- * with the PIPE_BIND_DISPLAY_TARGET flag to get the underlying
+ * with the PIPE_BIND_DISPLAY_TARGET flag to get the underlying
* storage.
*/
struct sw_displaytarget *
@@ -113,7 +113,7 @@ struct sw_winsys
* \param flags bitmask of PIPE_TRANSFER_x flags
*/
void *
- (*displaytarget_map)( struct sw_winsys *ws,
+ (*displaytarget_map)( struct sw_winsys *ws,
struct sw_displaytarget *dt,
unsigned flags );
@@ -127,12 +127,12 @@ struct sw_winsys
* This call will likely become asynchronous eventually.
*/
void
- (*displaytarget_display)( struct sw_winsys *ws,
+ (*displaytarget_display)( struct sw_winsys *ws,
struct sw_displaytarget *dt,
void *context_private );
- void
- (*displaytarget_destroy)( struct sw_winsys *ws,
+ void
+ (*displaytarget_destroy)( struct sw_winsys *ws,
struct sw_displaytarget *dt );
};
diff --git a/src/gallium/state_trackers/d3d1x/gd3d10/Makefile b/src/gallium/state_trackers/d3d1x/gd3d10/Makefile
index 300149d..cd2d44e 100644
--- a/src/gallium/state_trackers/d3d1x/gd3d10/Makefile
+++ b/src/gallium/state_trackers/d3d1x/gd3d10/Makefile
@@ -7,7 +7,7 @@ GEN_D3D10=perl d3d10.pl
include ../Makefile.inc
d3d10.generated.o: d3d10_objects.generated.h d3d10_screen.generated.h d3d10_context.generated.h d3d10_misc.generated.h
-
+
d3d10.generated.cpp: ../gd3d11/d3d11.cpp d3d10.pl
$(GEN_D3D10) $< > $@
d3d10_objects.generated.h: ../gd3d11/d3d11_objects.h d3d10.pl
diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h
index e1ba6c1..9ee2604 100644
--- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h
+++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h
@@ -1441,8 +1441,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl
return subresource / levels;
}
}
-
-
+
+
/* TODO: deferred contexts will need a different implementation of this,
* because we can't put the transfer info into the resource itself.
* Also, there are very different restrictions, for obvious reasons.
diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/state_trackers/dri/common/dri_drawable.c
index 6193670..203d373 100644
--- a/src/gallium/state_trackers/dri/common/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/common/dri_drawable.c
@@ -37,7 +37,7 @@
#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_inlines.h"
-
+
static boolean
dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
diff --git a/src/gallium/state_trackers/egl/Makefile b/src/gallium/state_trackers/egl/Makefile
index da91221..059ff31 100644
--- a/src/gallium/state_trackers/egl/Makefile
+++ b/src/gallium/state_trackers/egl/Makefile
@@ -70,7 +70,7 @@ default: depend libegl.a
libegl.a: $(EGL_OBJECTS) Makefile
$(MKLIB) -o egl -static $(EGL_OBJECTS)
-depend:
+depend:
rm -f depend
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(ALL_INCLUDES) $(ALL_SOURCES) 2> /dev/null
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d.c b/src/gallium/state_trackers/egl/common/egl_g3d.c
index 65826a7..48686c3 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d.c
@@ -412,7 +412,7 @@ egl_g3d_invalid_surface(struct native_display *ndpy,
/* XXX not thread safe? */
struct egl_g3d_surface *gsurf = egl_g3d_surface(nsurf->user_data);
struct egl_g3d_context *gctx;
-
+
/*
* Some functions such as egl_g3d_copy_buffers create a temporary native
* surface. There is no gsurf associated with it.
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_st.c b/src/gallium/state_trackers/egl/common/egl_g3d_st.c
index 2b944b5..dc336ea 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_st.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_st.c
@@ -196,7 +196,7 @@ egl_g3d_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi,
NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
}
-static boolean
+static boolean
egl_g3d_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
const enum st_attachment_type *statts,
unsigned count,
diff --git a/src/gallium/state_trackers/egl/psl1ght/native_psl1ght.c b/src/gallium/state_trackers/egl/psl1ght/native_psl1ght.c
index 39a4df7..08ac0c5 100644
--- a/src/gallium/state_trackers/egl/psl1ght/native_psl1ght.c
+++ b/src/gallium/state_trackers/egl/psl1ght/native_psl1ght.c
@@ -446,7 +446,7 @@ psl1ght_display_add_modes(struct native_connector *nconn,
return FALSE;
for (i=0; irefreshRates & rates[i].from)
- if (!psl1ght_display_add_mode(nconn, vmode, &vres, rates[i].from,
+ if (!psl1ght_display_add_mode(nconn, vmode, &vres, rates[i].from,
rates[i].to, rates[i].name))
return FALSE;
return TRUE;
@@ -465,7 +465,7 @@ psl1ght_display_init_connector(struct native_connector *nconn, u32 videoOut)
for(i=0; ideviceInfo.availableModeCount; i++)
if (!psl1ght_display_add_modes(nconn, &psconn->deviceInfo.availableModes[i]))
return FALSE;
-
+
return TRUE;
}
diff --git a/src/gallium/state_trackers/egl/x11/glcore.h b/src/gallium/state_trackers/egl/x11/glcore.h
index 547b111..3879727 100644
--- a/src/gallium/state_trackers/egl/x11/glcore.h
+++ b/src/gallium/state_trackers/egl/x11/glcore.h
@@ -58,11 +58,11 @@ typedef struct __GLcontextRec __GLcontext;
* kept around in the context so that values can be used during
* command execution, and for returning information about the
* context to the application.
- *
+ *
* Instances of this structure are shared by the driver and the loader. To
* maintain binary compatability, new fields \b must be added only to the
* end of the structure.
- *
+ *
* \sa _gl_context_modes_create
*/
typedef struct __GLcontextModesRec {
@@ -95,7 +95,7 @@ typedef struct __GLcontextModesRec {
/* GLX */
GLint visualID;
- GLint visualType; /**< One of the GLX X visual types. (i.e.,
+ GLint visualType; /**< One of the GLX X visual types. (i.e.,
* \c GLX_TRUE_COLOR, etc.)
*/
diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
index 205a7e3..def520a 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_api.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
@@ -243,8 +243,8 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo,
*/
xmvis->vishandle = vinfo;
/* Allocate more space for additional visual */
- VisualTable = (XMesaVisual *) _mesa_realloc( VisualTable,
- sizeof(XMesaVisual) * NumVisuals,
+ VisualTable = (XMesaVisual *) _mesa_realloc( VisualTable,
+ sizeof(XMesaVisual) * NumVisuals,
sizeof(XMesaVisual) * (NumVisuals + 1));
/* add xmvis to the list */
VisualTable[NumVisuals] = xmvis;
@@ -408,7 +408,7 @@ get_visual( Display *dpy, int scr, unsigned int depth, int xclass )
return NULL;
}
}
-
+
return vis;
}
@@ -461,7 +461,7 @@ get_env_visual(Display *dpy, int scr, const char *varname)
/*
* Select an X visual which satisfies the RGBA flag and minimum depth.
- * Input: dpy,
+ * Input: dpy,
* screen - X display and screen number
* min_depth - minimum visual depth
* preferred_class - preferred GLX visual class or DONT_CARE
@@ -974,13 +974,13 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
if (stencil_size > 0)
stencil_size = STENCIL_BITS;
- if (accumRedSize > 0 ||
- accumGreenSize > 0 ||
+ if (accumRedSize > 0 ||
+ accumGreenSize > 0 ||
accumBlueSize > 0 ||
accumAlphaSize > 0) {
- accumRedSize =
- accumGreenSize =
+ accumRedSize =
+ accumGreenSize =
accumBlueSize = default_accum_bits();
accumAlphaSize = alpha_flag ? accumRedSize : 0;
@@ -1130,7 +1130,7 @@ glXMakeContextCurrent( Display *dpy, GLXDrawable draw,
MakeCurrent_PrevDrawBuffer == drawBuffer &&
MakeCurrent_PrevReadBuffer == readBuffer)
return True;
-
+
MakeCurrent_PrevContext = ctx;
MakeCurrent_PrevDrawable = draw;
MakeCurrent_PrevReadable = read;
@@ -1796,7 +1796,7 @@ glXGetVisualFromFBConfig( Display *dpy, GLXFBConfig config )
{
if (dpy && config) {
XMesaVisual xmvis = (XMesaVisual) config;
-#if 0
+#if 0
return xmvis->vishandle;
#else
/* create a new vishandle - the cached one may be stale */
diff --git a/src/gallium/state_trackers/glx/xlib/glx_getproc.c b/src/gallium/state_trackers/glx/xlib/glx_getproc.c
index 26fcae7..7d68b8c 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_getproc.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_getproc.c
@@ -1,20 +1,20 @@
/*
* Mesa 3-D graphics library
* Version: 7.6
- *
+ *
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
* Copyright (C) 2009 VMware, Inc. All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index 7c47a25..dac7e6d 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -315,7 +315,7 @@ xmesa_get_window_size(Display *dpy, XMesaBuffer b,
static GLuint
choose_pixel_format(XMesaVisual v)
{
- boolean native_byte_order = (host_byte_order() ==
+ boolean native_byte_order = (host_byte_order() ==
ImageByteOrder(v->display));
if ( GET_REDMASK(v) == 0x0000ff
@@ -607,12 +607,12 @@ initialize_visual_and_buffer(XMesaVisual v, XMesaBuffer b,
/**
* Convert an X visual type to a GLX visual type.
- *
+ *
* \param visualType X visual type (i.e., \c TrueColor, \c StaticGray, etc.)
* to be converted.
* \return If \c visualType is a valid X visual type, a GLX visual type will
* be returned. Otherwise \c GLX_NONE will be returned.
- *
+ *
* \note
* This code was lifted directly from lib/GL/glx/glcontextmodes.c in the
* DRI CVS tree.
@@ -901,9 +901,9 @@ void XMesaDestroyContext( XMesaContext c )
{
c->st->destroy(c->st);
- /* FIXME: We should destroy the screen here, but if we do so, surfaces may
+ /* FIXME: We should destroy the screen here, but if we do so, surfaces may
* outlive it, causing segfaults
- struct pipe_screen *screen = c->st->pipe->screen;
+ struct pipe_screen *screen = c->st->pipe->screen;
screen->destroy(screen);
*/
@@ -1196,7 +1196,7 @@ void XMesaSwapBuffers( XMesaBuffer b )
if (xmctx && xmctx->xm_buffer == b) {
xmctx->st->flush( xmctx->st,
- PIPE_FLUSH_RENDER_CACHE |
+ PIPE_FLUSH_RENDER_CACHE |
PIPE_FLUSH_SWAPBUFFERS |
PIPE_FLUSH_FRAME,
NULL);
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.h b/src/gallium/state_trackers/glx/xlib/xm_api.h
index 4ea42dc..82f0b32 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.h
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.h
@@ -1,19 +1,19 @@
/*
* Mesa 3-D graphics library
* Version: 7.1
- *
+ *
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/gallium/state_trackers/glx/xlib/xm_public.h b/src/gallium/state_trackers/glx/xlib/xm_public.h
index 950eb21..9f6c201 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_public.h
+++ b/src/gallium/state_trackers/glx/xlib/xm_public.h
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef XM_PUBLIC_H
@@ -34,7 +34,7 @@
struct pipe_screen;
struct st_api;
-/* This is the driver interface required by the glx/xlib state tracker.
+/* This is the driver interface required by the glx/xlib state tracker.
*/
struct xm_driver {
struct pipe_screen *(*create_pipe_screen)( Display *display );
diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c
index 6bfe8b0..9bf25f1 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_st.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_st.c
@@ -196,7 +196,7 @@ xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi,
* \param count number of framebuffer attachments in statts[]
* \param out returns resources for each of the attachments
*/
-static boolean
+static boolean
xmesa_st_framebuffer_validate(struct st_framebuffer_iface *stfbi,
const enum st_attachment_type *statts,
unsigned count,
diff --git a/src/gallium/state_trackers/python/st_device.c b/src/gallium/state_trackers/python/st_device.c
index d0a4295..51b13d7 100644
--- a/src/gallium/state_trackers/python/st_device.c
+++ b/src/gallium/state_trackers/python/st_device.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -42,17 +42,17 @@
static void
-st_device_really_destroy(struct st_device *st_dev)
+st_device_really_destroy(struct st_device *st_dev)
{
if(st_dev->screen) {
- /* FIXME: Don't really destroy until we keep track of every single
- * reference or we end up causing a segmentation fault every time
+ /* FIXME: Don't really destroy until we keep track of every single
+ * reference or we end up causing a segmentation fault every time
* python exits. */
#if 0
st_dev->screen->destroy(st_dev->screen);
#endif
}
-
+
FREE(st_dev);
}
@@ -69,7 +69,7 @@ st_device_reference(struct st_device **ptr, struct st_device *st_dev)
void
-st_device_destroy(struct st_device *st_dev)
+st_device_destroy(struct st_device *st_dev)
{
st_device_reference(&st_dev, NULL);
}
@@ -93,10 +93,10 @@ st_device_create(boolean hardware)
st_dev = CALLOC_STRUCT(st_device);
if (!st_dev)
goto no_device;
-
+
pipe_reference_init(&st_dev->reference, 1);
st_dev->screen = screen;
-
+
return st_dev;
no_device:
@@ -107,23 +107,23 @@ st_device_create(boolean hardware)
void
-st_context_destroy(struct st_context *st_ctx)
+st_context_destroy(struct st_context *st_ctx)
{
unsigned i;
-
+
if(st_ctx) {
struct st_device *st_dev = st_ctx->st_dev;
-
+
if(st_ctx->cso) {
cso_delete_vertex_shader(st_ctx->cso, st_ctx->vs);
cso_delete_fragment_shader(st_ctx->cso, st_ctx->fs);
-
+
cso_destroy_context(st_ctx->cso);
}
-
+
if(st_ctx->pipe)
st_ctx->pipe->destroy(st_ctx->pipe);
-
+
for(i = 0; i < PIPE_MAX_SAMPLERS; ++i)
pipe_sampler_view_reference(&st_ctx->fragment_sampler_views[i], NULL);
for(i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; ++i)
@@ -131,23 +131,23 @@ st_context_destroy(struct st_context *st_ctx)
pipe_resource_reference(&st_ctx->default_texture, NULL);
FREE(st_ctx);
-
+
st_device_reference(&st_dev, NULL);
}
}
struct st_context *
-st_context_create(struct st_device *st_dev)
+st_context_create(struct st_device *st_dev)
{
struct st_context *st_ctx;
-
+
st_ctx = CALLOC_STRUCT(st_context);
if(!st_ctx)
return NULL;
-
+
st_device_reference(&st_ctx->st_dev, st_dev);
-
+
st_ctx->pipe = st_dev->screen->context_create(st_dev->screen, NULL);
if(!st_ctx->pipe) {
st_context_destroy(st_ctx);
@@ -159,7 +159,7 @@ st_context_create(struct st_device *st_dev)
st_context_destroy(st_ctx);
return NULL;
}
-
+
/* disabled blending/masking */
{
struct pipe_blend_state blend;
@@ -243,12 +243,12 @@ st_context_create(struct st_device *st_dev)
templat.array_size = 1;
templat.last_level = 0;
templat.bind = PIPE_BIND_SAMPLER_VIEW;
-
+
st_ctx->default_texture = screen->resource_create( screen, &templat );
if(st_ctx->default_texture) {
struct pipe_box box;
uint32_t zero = 0;
-
+
u_box_origin_2d( 1, 1, &box );
pipe->transfer_inline_write(pipe,
@@ -282,14 +282,14 @@ st_context_create(struct st_device *st_dev)
pipe_sampler_view_reference(&view, NULL);
}
-
+
/* vertex shader */
{
const uint semantic_names[] = { TGSI_SEMANTIC_POSITION,
TGSI_SEMANTIC_GENERIC };
const uint semantic_indexes[] = { 0, 0 };
- st_ctx->vs = util_make_vertex_passthrough_shader(st_ctx->pipe,
- 2,
+ st_ctx->vs = util_make_vertex_passthrough_shader(st_ctx->pipe,
+ 2,
semantic_names,
semantic_indexes);
cso_set_vertex_shader_handle(st_ctx->cso, st_ctx->vs);
diff --git a/src/gallium/state_trackers/python/st_device.h b/src/gallium/state_trackers/python/st_device.h
index 53e2556..506bd2e 100644
--- a/src/gallium/state_trackers/python/st_device.h
+++ b/src/gallium/state_trackers/python/st_device.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -35,7 +35,7 @@
struct cso_context;
struct pipe_screen;
struct pipe_context;
-struct st_winsys;
+struct st_winsys;
struct st_surface
@@ -49,11 +49,11 @@ struct st_surface
struct st_context
{
struct st_device *st_dev;
-
+
struct pipe_context *pipe;
-
+
struct cso_context *cso;
-
+
void *vs;
void *fs;
void *gs;
@@ -61,13 +61,13 @@ struct st_context
struct pipe_resource *default_texture;
struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_VERTEX_SAMPLERS];
-
+
unsigned num_vertex_buffers;
struct pipe_vertex_buffer vertex_buffers[PIPE_MAX_ATTRIBS];
-
+
unsigned num_vertex_elements;
struct pipe_vertex_element vertex_elements[PIPE_MAX_ATTRIBS];
-
+
struct pipe_framebuffer_state framebuffer;
};
@@ -82,7 +82,7 @@ struct st_device
static INLINE struct pipe_surface *
-st_pipe_surface(struct pipe_context *pipe, struct st_surface *surface, unsigned usage)
+st_pipe_surface(struct pipe_context *pipe, struct st_surface *surface, unsigned usage)
{
struct pipe_resource *texture = surface->texture;
struct pipe_surface surf_tmpl;
diff --git a/src/gallium/state_trackers/python/st_hardpipe_winsys.c b/src/gallium/state_trackers/python/st_hardpipe_winsys.c
index c6743db..b01c343 100644
--- a/src/gallium/state_trackers/python/st_hardpipe_winsys.c
+++ b/src/gallium/state_trackers/python/st_hardpipe_winsys.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Bismarck, ND., USA
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,20 +10,20 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
- *
+ *
+ *
**************************************************************************/
/**
@@ -155,7 +155,7 @@ st_hardpipe_load(void)
return FALSE;
scrnum = 0;
-
+
root = RootWindow(dpy, scrnum);
visinfo = glXChooseVisual(dpy, scrnum, attribSingle);
@@ -163,7 +163,7 @@ st_hardpipe_load(void)
visinfo = glXChooseVisual(dpy, scrnum, attribDouble);
if (!visinfo)
return FALSE;
-
+
ctx = glXCreateContext( dpy, visinfo, NULL, True );
if (!ctx)
@@ -173,9 +173,9 @@ st_hardpipe_load(void)
attr.border_pixel = 0;
attr.colormap = XCreateColormap(dpy, root, visinfo->visual, AllocNone);
attr.event_mask = StructureNotifyMask | ExposureMask;
-
+
mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
-
+
win = XCreateWindow(dpy, root, 0, 0, width, height,
0, visinfo->depth, InputOutput,
visinfo->visual, mask, &attr);
diff --git a/src/gallium/state_trackers/python/st_sample.c b/src/gallium/state_trackers/python/st_sample.c
index cac9a1a..3912586 100644
--- a/src/gallium/state_trackers/python/st_sample.c
+++ b/src/gallium/state_trackers/python/st_sample.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -42,14 +42,14 @@
/**
* Use our own pseudo random generator to ensure consistent runs among
* multiple runs and platforms.
- *
+ *
* @sa http://en.wikipedia.org/wiki/Linear_congruential_generator
*/
static uint32_t st_random(void) {
static uint64_t seed = UINT64_C(0xbb9a063afb0a739d);
seed = UINT64_C(134775813) * seed + UINT64_C(1);
-
+
return (uint32_t)(seed >> 32);
}
@@ -57,7 +57,7 @@ static uint32_t st_random(void) {
/**
* We don't want to include the patent-encumbered DXT code here, so instead
* we store several uncompressed/compressed data pairs for hardware testing
- * purposes.
+ * purposes.
*/
struct dxt_data
{
@@ -66,7 +66,7 @@ struct dxt_data
};
-static const struct dxt_data
+static const struct dxt_data
dxt1_rgb_data[] = {
{
{
@@ -155,7 +155,7 @@ dxt1_rgb_data[] = {
};
-static const struct dxt_data
+static const struct dxt_data
dxt1_rgba_data[] = {
{
{
@@ -244,7 +244,7 @@ dxt1_rgba_data[] = {
};
-static const struct dxt_data
+static const struct dxt_data
dxt3_rgba_data[] = {
{
{
@@ -333,7 +333,7 @@ dxt3_rgba_data[] = {
};
-static const struct dxt_data
+static const struct dxt_data
dxt5_rgba_data[] = {
{
{
@@ -422,17 +422,17 @@ dxt5_rgba_data[] = {
};
-static INLINE void
-st_sample_dxt_pixel_block(enum pipe_format format,
+static INLINE void
+st_sample_dxt_pixel_block(enum pipe_format format,
uint8_t *raw,
- float *rgba, unsigned rgba_stride,
+ float *rgba, unsigned rgba_stride,
unsigned w, unsigned h)
{
const struct dxt_data *data;
unsigned n;
unsigned i;
unsigned x, y, ch;
-
+
switch(format) {
case PIPE_FORMAT_DXT1_RGB:
data = dxt1_rgb_data;
@@ -454,20 +454,20 @@ st_sample_dxt_pixel_block(enum pipe_format format,
assert(0);
return;
}
-
+
i = st_random() % n;
-
+
for(y = 0; y < h; ++y)
for(x = 0; x < w; ++x)
for(ch = 0; ch < 4; ++ch)
rgba[y*rgba_stride + x*4 + ch] = (float)(data[i].rgba[y*4*4 + x*4 + ch])/255.0f;
-
+
memcpy(raw, data[i].raw, util_format_get_blocksize(format));
}
-static INLINE void
-st_sample_generic_pixel_block(enum pipe_format format,
+static INLINE void
+st_sample_generic_pixel_block(enum pipe_format format,
uint8_t *raw,
float *rgba, unsigned rgba_stride,
unsigned w, unsigned h,
@@ -476,7 +476,7 @@ st_sample_generic_pixel_block(enum pipe_format format,
unsigned i;
unsigned x, y, ch;
int blocksize = util_format_get_blocksize(format);
-
+
if (norm) {
for (y = 0; y < h; ++y) {
for (x = 0; x < w; ++x) {
@@ -518,7 +518,7 @@ st_sample_generic_pixel_block(enum pipe_format format,
/**
* Randomly sample pixels.
*/
-void
+void
st_sample_pixel_block(enum pipe_format format,
void *raw,
float *rgba, unsigned rgba_stride,
diff --git a/src/gallium/state_trackers/python/st_sample.h b/src/gallium/state_trackers/python/st_sample.h
index 2fdbb39..a7acdf8 100644
--- a/src/gallium/state_trackers/python/st_sample.h
+++ b/src/gallium/state_trackers/python/st_sample.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
@@ -36,7 +36,7 @@ struct pipe_context;
struct st_surface;
-void
+void
st_sample_pixel_block(enum pipe_format format,
void *raw,
float *rgba, unsigned rgba_stride,
diff --git a/src/gallium/state_trackers/python/st_softpipe_winsys.c b/src/gallium/state_trackers/python/st_softpipe_winsys.c
index 8584bad..5a5b992 100644
--- a/src/gallium/state_trackers/python/st_softpipe_winsys.c
+++ b/src/gallium/state_trackers/python/st_softpipe_winsys.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Bismarck, ND., USA
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,20 +10,20 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
- *
+ *
+ *
**************************************************************************/
#include "util/u_debug.h"
diff --git a/src/gallium/state_trackers/python/st_winsys.h b/src/gallium/state_trackers/python/st_winsys.h
index 7d4066d..7e8144a 100644
--- a/src/gallium/state_trackers/python/st_winsys.h
+++ b/src/gallium/state_trackers/python/st_winsys.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
diff --git a/src/gallium/state_trackers/vega/api_params.c b/src/gallium/state_trackers/vega/api_params.c
index a73b6c3..e27a66f 100644
--- a/src/gallium/state_trackers/vega/api_params.c
+++ b/src/gallium/state_trackers/vega/api_params.c
@@ -1415,7 +1415,7 @@ VGfloat vegaGetParameterf(VGHandle object,
case VG_IMAGE_WIDTH:
case VG_IMAGE_HEIGHT:
#ifdef OPENVG_VERSION_1_1
- case VG_FONT_NUM_GLYPHS:
+ case VG_FONT_NUM_GLYPHS:
return vgGetParameteri(object, paramType);
break;
#endif
diff --git a/src/gallium/state_trackers/wgl/SConscript b/src/gallium/state_trackers/wgl/SConscript
index 1b7597d..bb05e2b 100644
--- a/src/gallium/state_trackers/wgl/SConscript
+++ b/src/gallium/state_trackers/wgl/SConscript
@@ -12,7 +12,7 @@ env.Append(CPPPATH = [
env.AppendUnique(CPPDEFINES = [
'_GDI32_', # prevent wgl* being declared __declspec(dllimport)
- 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
+ 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
])
diff --git a/src/gallium/state_trackers/wgl/stw_context.c b/src/gallium/state_trackers/wgl/stw_context.c
index cd4f3c8..1b013a2 100644
--- a/src/gallium/state_trackers/wgl/stw_context.c
+++ b/src/gallium/state_trackers/wgl/stw_context.c
@@ -66,11 +66,11 @@ DrvCopyContext(
return FALSE;
pipe_mutex_lock( stw_dev->ctx_mutex );
-
+
src = stw_lookup_context_locked( dhrcSource );
dst = stw_lookup_context_locked( dhrcDest );
- if (src && dst) {
+ if (src && dst) {
/* FIXME */
assert(0);
(void) src;
@@ -79,7 +79,7 @@ DrvCopyContext(
}
pipe_mutex_unlock( stw_dev->ctx_mutex );
-
+
return ret;
}
@@ -96,7 +96,7 @@ DrvShareLists(
return FALSE;
pipe_mutex_lock( stw_dev->ctx_mutex );
-
+
ctx1 = stw_lookup_context_locked( dhglrc1 );
ctx2 = stw_lookup_context_locked( dhglrc2 );
@@ -104,7 +104,7 @@ DrvShareLists(
ret = ctx2->st->share(ctx2->st, ctx1->st);
pipe_mutex_unlock( stw_dev->ctx_mutex );
-
+
return ret;
}
@@ -124,19 +124,19 @@ DrvCreateLayerContext(
const struct stw_pixelformat_info *pfi;
struct st_context_attribs attribs;
struct stw_context *ctx = NULL;
-
+
if(!stw_dev)
return 0;
-
+
if (iLayerPlane != 0)
return 0;
iPixelFormat = GetPixelFormat(hdc);
if(!iPixelFormat)
return 0;
-
+
pfi = stw_pixelformat_get_info( iPixelFormat - 1 );
-
+
ctx = CALLOC_STRUCT( stw_context );
if (ctx == NULL)
goto no_ctx;
@@ -150,7 +150,7 @@ DrvCreateLayerContext(
ctx->st = stw_dev->stapi->create_context(stw_dev->stapi,
stw_dev->smapi, &attribs, NULL);
- if (ctx->st == NULL)
+ if (ctx->st == NULL)
goto no_st_ctx;
ctx->st->st_manager_private = (void *) ctx;
@@ -177,7 +177,7 @@ DrvDeleteContext(
{
struct stw_context *ctx ;
BOOL ret = FALSE;
-
+
if (!stw_dev)
return FALSE;
@@ -188,7 +188,7 @@ DrvDeleteContext(
if (ctx) {
struct stw_context *curctx = stw_current_context();
-
+
/* Unbind current if deleting current context. */
if (curctx == ctx)
stw_dev->stapi->make_current(stw_dev->stapi, NULL, NULL, NULL);
@@ -217,7 +217,7 @@ DrvReleaseContext(
if (!ctx)
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.
@@ -240,7 +240,7 @@ stw_get_current_context( void )
ctx = stw_current_context();
if(!ctx)
return 0;
-
+
return ctx->dhglrc;
}
@@ -252,7 +252,7 @@ stw_get_current_dc( void )
ctx = stw_current_context();
if(!ctx)
return NULL;
-
+
return ctx->hdc;
}
@@ -304,7 +304,7 @@ stw_make_current(
if (!fb)
goto fail;
}
-
+
if (fb->iPixelFormat != ctx->iPixelFormat) {
SetLastError(ERROR_INVALID_PIXEL_FORMAT);
goto fail;
@@ -318,7 +318,7 @@ stw_make_current(
} else {
ret = stw_dev->stapi->make_current(stw_dev->stapi, NULL, NULL, NULL);
}
-
+
fail:
if (fb) {
@@ -352,7 +352,7 @@ stw_flush_current_locked( struct stw_framebuffer *fb )
if (ctx && ctx->current_framebuffer == fb) {
ctx->st->flush(ctx->st,
- PIPE_FLUSH_RENDER_CACHE |
+ PIPE_FLUSH_RENDER_CACHE |
PIPE_FLUSH_SWAPBUFFERS |
PIPE_FLUSH_FRAME,
NULL);
diff --git a/src/gallium/state_trackers/wgl/stw_device.c b/src/gallium/state_trackers/wgl/stw_device.c
index c4822d4..86a3930 100644
--- a/src/gallium/state_trackers/wgl/stw_device.c
+++ b/src/gallium/state_trackers/wgl/stw_device.c
@@ -60,7 +60,7 @@ stw_init(const struct stw_winsys *stw_winsys)
struct pipe_screen *screen;
debug_printf("%s\n", __FUNCTION__);
-
+
assert(!stw_dev);
stw_tls_init();
@@ -71,7 +71,7 @@ stw_init(const struct stw_winsys *stw_winsys)
#ifdef DEBUG
stw_dev->memdbg_no = debug_memory_begin();
#endif
-
+
stw_dev->stw_winsys = stw_winsys;
_glthread_INIT_MUTEX(OneTimeLock);
@@ -142,7 +142,7 @@ stw_cleanup(void)
if (!stw_dev)
return;
-
+
/*
* Abort cleanup if there are still active contexts. In some situations
* this DLL may be unloaded before the DLL that is using GL contexts is.
@@ -159,10 +159,10 @@ stw_cleanup(void)
handle_table_destroy(stw_dev->ctx_table);
stw_framebuffer_cleanup();
-
+
pipe_mutex_destroy( stw_dev->fb_mutex );
pipe_mutex_destroy( stw_dev->ctx_mutex );
-
+
FREE(stw_dev->smapi);
stw_dev->stapi->destroy(stw_dev->stapi);
diff --git a/src/gallium/state_trackers/wgl/stw_device.h b/src/gallium/state_trackers/wgl/stw_device.h
index 3c2b6d9..8020b84 100644
--- a/src/gallium/state_trackers/wgl/stw_device.h
+++ b/src/gallium/state_trackers/wgl/stw_device.h
@@ -47,9 +47,9 @@ struct stw_framebuffer;
struct stw_device
{
const struct stw_winsys *stw_winsys;
-
+
struct pipe_screen *screen;
-
+
/* Cache some PIPE_CAP_* */
unsigned max_2d_levels;
unsigned max_2d_length;
@@ -67,10 +67,10 @@ struct stw_device
pipe_mutex ctx_mutex;
struct handle_table *ctx_table;
-
+
pipe_mutex fb_mutex;
struct stw_framebuffer *fb_head;
-
+
#ifdef DEBUG
unsigned long memdbg_no;
#endif
diff --git a/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c b/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c
index ecb326f..5452219 100644
--- a/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c
+++ b/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include
@@ -34,7 +34,7 @@
#include
-static const char *stw_extension_string =
+static const char *stw_extension_string =
"WGL_ARB_extensions_string "
"WGL_ARB_multisample "
"WGL_ARB_pbuffer "
diff --git a/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c b/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
index 32636c6..42e1e81 100644
--- a/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
+++ b/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2010 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include
diff --git a/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c b/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c
index d0a9586..320884f 100644
--- a/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c
+++ b/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c
@@ -27,9 +27,9 @@
/**
* @file
- *
+ *
* WGL_ARB_pixel_format extension implementation.
- *
+ *
* @sa http://www.opengl.org/registry/specs/ARB/wgl_pixel_format.txt
*/
diff --git a/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c b/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c
index 9eac6a1..06062dc 100644
--- a/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c
+++ b/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c
@@ -1,9 +1,9 @@
/**************************************************************************
- *
+ *
* Copyright 2009 VMware, Inc.
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -11,11 +11,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -23,7 +23,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include
diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c
index 733222a..ccea617 100644
--- a/src/gallium/state_trackers/wgl/stw_framebuffer.c
+++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c
@@ -91,11 +91,11 @@ stw_framebuffer_destroy_locked(
stw_dev->stw_winsys->shared_surface_close(stw_dev->screen, fb->shared_surface);
stw_st_destroy_framebuffer_locked(fb->stfb);
-
+
pipe_mutex_unlock( fb->mutex );
pipe_mutex_destroy( fb->mutex );
-
+
FREE( fb );
}
@@ -118,7 +118,7 @@ stw_framebuffer_get_size( struct stw_framebuffer *fb )
POINT client_pos;
assert(fb->hWnd);
-
+
/* Get the client area size. */
GetClientRect( fb->hWnd, &client_rect );
assert(client_rect.left == 0);
@@ -133,8 +133,8 @@ stw_framebuffer_get_size( struct stw_framebuffer *fb )
if(width != fb->width || height != fb->height) {
fb->must_resize = TRUE;
- fb->width = width;
- fb->height = height;
+ fb->width = width;
+ fb->height = height;
}
client_pos.x = 0;
@@ -177,26 +177,26 @@ stw_call_window_proc(
struct stw_tls_data *tls_data;
PCWPSTRUCT pParams = (PCWPSTRUCT)lParam;
struct stw_framebuffer *fb;
-
+
tls_data = stw_tls_get_data();
if(!tls_data)
return 0;
-
+
if (nCode < 0 || !stw_dev)
return CallNextHookEx(tls_data->hCallWndProcHook, nCode, wParam, lParam);
if (pParams->message == WM_WINDOWPOSCHANGED) {
/* We handle WM_WINDOWPOSCHANGED instead of WM_SIZE because according to
- * http://blogs.msdn.com/oldnewthing/archive/2008/01/15/7113860.aspx
- * WM_SIZE is generated from WM_WINDOWPOSCHANGED by DefWindowProc so it
+ * http://blogs.msdn.com/oldnewthing/archive/2008/01/15/7113860.aspx
+ * WM_SIZE is generated from WM_WINDOWPOSCHANGED by DefWindowProc so it
* can be masked out by the application. */
LPWINDOWPOS lpWindowPos = (LPWINDOWPOS)pParams->lParam;
- if((lpWindowPos->flags & SWP_SHOWWINDOW) ||
+ if((lpWindowPos->flags & SWP_SHOWWINDOW) ||
!(lpWindowPos->flags & SWP_NOMOVE) ||
!(lpWindowPos->flags & SWP_NOSIZE)) {
fb = stw_framebuffer_from_hwnd( pParams->hwnd );
if(fb) {
- /* Size in WINDOWPOS includes the window frame, so get the size
+ /* Size in WINDOWPOS includes the window frame, so get the size
* of the client area via GetClientRect. */
stw_framebuffer_get_size(fb);
stw_framebuffer_release(fb);
@@ -228,7 +228,7 @@ stw_framebuffer_create(
hWnd = WindowFromDC( hdc );
if(!hWnd)
return NULL;
-
+
fb = CALLOC_STRUCT( stw_framebuffer );
if (fb == NULL)
return NULL;
@@ -302,15 +302,15 @@ stw_framebuffer_update(
assert(fb->stfb);
assert(fb->height);
assert(fb->width);
-
- /* XXX: It would be nice to avoid checking the size again -- in theory
- * stw_call_window_proc would have cought the resize and stored the right
- * size already, but unfortunately threads created before the DllMain is
+
+ /* XXX: It would be nice to avoid checking the size again -- in theory
+ * stw_call_window_proc would have cought the resize and stored the right
+ * size already, but unfortunately threads created before the DllMain is
* called don't get a DLL_THREAD_ATTACH notification, and there is no way
* to know of their existing without using the not very portable PSAPI.
*/
stw_framebuffer_get_size(fb);
-}
+}
void
@@ -327,14 +327,14 @@ stw_framebuffer_cleanup( void )
fb = stw_dev->fb_head;
while (fb) {
next = fb->next;
-
+
pipe_mutex_lock(fb->mutex);
stw_framebuffer_destroy_locked(fb);
-
+
fb = next;
}
stw_dev->fb_head = NULL;
-
+
pipe_mutex_unlock( stw_dev->fb_mutex );
}
@@ -349,15 +349,15 @@ stw_framebuffer_from_hdc_locked(
HWND hwnd;
struct stw_framebuffer *fb;
- /*
- * Some applications create and use several HDCs for the same window, so
+ /*
+ * Some applications create and use several HDCs for the same window, so
* looking up the framebuffer by the HDC is not reliable. Use HWND whenever
* possible.
- */
+ */
hwnd = WindowFromDC(hdc);
if(hwnd)
return stw_framebuffer_from_hwnd_locked(hwnd);
-
+
for (fb = stw_dev->fb_head; fb != NULL; fb = fb->next)
if (fb->hDC == hdc) {
pipe_mutex_lock(fb->mutex);
@@ -433,16 +433,16 @@ DrvSetPixelFormat(
if(!fb) {
return FALSE;
}
-
+
stw_framebuffer_release( fb );
- /* Some applications mistakenly use the undocumented wglSetPixelFormat
- * function instead of SetPixelFormat, so we call SetPixelFormat here to
+ /* Some applications mistakenly use the undocumented wglSetPixelFormat
+ * function instead of SetPixelFormat, so we call SetPixelFormat here to
* avoid opengl32.dll's wglCreateContext to fail */
if (GetPixelFormat(hdc) == 0) {
SetPixelFormat(hdc, iPixelFormat, NULL);
}
-
+
return TRUE;
}
@@ -459,7 +459,7 @@ stw_pixelformat_get(
iPixelFormat = fb->iPixelFormat;
stw_framebuffer_release(fb);
}
-
+
return iPixelFormat;
}
diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.h b/src/gallium/state_trackers/wgl/stw_framebuffer.h
index 6604e54..d229f43 100644
--- a/src/gallium/state_trackers/wgl/stw_framebuffer.h
+++ b/src/gallium/state_trackers/wgl/stw_framebuffer.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef STW_FRAMEBUFFER_H
@@ -45,19 +45,19 @@ struct stw_framebuffer
* This mutex has two purposes:
* - protect the access to the mutable data members below
* - prevent the framebuffer from being deleted while being accessed.
- *
- * It is OK to lock this mutex while holding the stw_device::fb_mutex lock,
+ *
+ * It is OK to lock this mutex while holding the stw_device::fb_mutex lock,
* but the opposite must never happen.
*/
pipe_mutex mutex;
-
+
/*
* Immutable members.
- *
- * Note that even access to immutable members implies acquiring the mutex
+ *
+ * Note that even access to immutable members implies acquiring the mutex
* above, to prevent the framebuffer from being destroyed.
*/
-
+
HDC hDC;
HWND hWnd;
@@ -67,18 +67,18 @@ struct stw_framebuffer
struct st_framebuffer_iface *stfb;
/*
- * Mutable members.
+ * Mutable members.
*/
unsigned refcnt;
-
+
/* FIXME: Make this work for multiple contexts bound to the same framebuffer */
boolean must_resize;
unsigned width;
unsigned height;
-
+
/**
* Client area rectangle, relative to the window upper-left corner.
*
@@ -89,13 +89,13 @@ struct stw_framebuffer
HANDLE hSharedSurface;
struct stw_shared_surface *shared_surface;
- /**
+ /**
* This is protected by stw_device::fb_mutex, not the mutex above.
- *
+ *
* Deletions must be done by first acquiring stw_device::fb_mutex, and then
- * acquiring the stw_framebuffer::mutex of the framebuffer to be deleted.
+ * acquiring the stw_framebuffer::mutex of the framebuffer to be deleted.
* This ensures that nobody else is reading/writing to the.
- *
+ *
* It is not necessary to aquire the mutex above to navigate the linked list
* given that deletions are done with stw_device::fb_mutex held, so no other
* thread can delete.
@@ -106,9 +106,9 @@ struct stw_framebuffer
/**
* Create a new framebuffer object which will correspond to the given HDC.
- *
+ *
* This function will acquire stw_framebuffer::mutex. stw_framebuffer_release
- * must be called when done
+ * must be called when done
*/
struct stw_framebuffer *
stw_framebuffer_create(
@@ -122,9 +122,9 @@ stw_framebuffer_reference(
/**
* Search a framebuffer with a matching HWND.
- *
+ *
* This function will acquire stw_framebuffer::mutex. stw_framebuffer_release
- * must be called when done
+ * must be called when done
*/
struct stw_framebuffer *
stw_framebuffer_from_hwnd(
@@ -132,9 +132,9 @@ stw_framebuffer_from_hwnd(
/**
* Search a framebuffer with a matching HDC.
- *
+ *
* This function will acquire stw_framebuffer::mutex. stw_framebuffer_release
- * must be called when done
+ * must be called when done
*/
struct stw_framebuffer *
stw_framebuffer_from_hdc(
diff --git a/src/gallium/state_trackers/wgl/stw_pixelformat.c b/src/gallium/state_trackers/wgl/stw_pixelformat.c
index 5ede1d4..22a07cf 100644
--- a/src/gallium/state_trackers/wgl/stw_pixelformat.c
+++ b/src/gallium/state_trackers/wgl/stw_pixelformat.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#include "pipe/p_format.h"
@@ -86,7 +86,7 @@ stw_pf_color[] = {
};
-static const struct stw_pf_depth_info
+static const struct stw_pf_depth_info
stw_pf_depth_stencil[] = {
/* pure depth */
{ PIPE_FORMAT_Z32_UNORM, {32, 0} },
@@ -99,14 +99,14 @@ stw_pf_depth_stencil[] = {
};
-static const boolean
+static const boolean
stw_pf_doublebuffer[] = {
FALSE,
TRUE,
};
-const unsigned
+const unsigned
stw_pf_multisample[] = {
0,
4
@@ -124,7 +124,7 @@ stw_pixelformat_add(
{
boolean extended = FALSE;
struct stw_pixelformat_info *pfi;
-
+
assert(stw_dev->pixelformat_extended_count < STW_MAX_PIXELFORMATS);
if(stw_dev->pixelformat_extended_count >= STW_MAX_PIXELFORMATS)
return;
@@ -135,16 +135,16 @@ stw_pixelformat_add(
assert(util_format_get_component_bits(color->format, UTIL_FORMAT_COLORSPACE_RGB, 3) == color->bits.alpha);
assert(util_format_get_component_bits(depth->format, UTIL_FORMAT_COLORSPACE_ZS, 0) == depth->bits.depth);
assert(util_format_get_component_bits(depth->format, UTIL_FORMAT_COLORSPACE_ZS, 1) == depth->bits.stencil);
-
+
pfi = &stw_dev->pixelformats[stw_dev->pixelformat_extended_count];
-
+
memset(pfi, 0, sizeof *pfi);
-
+
pfi->pfd.nSize = sizeof pfi->pfd;
pfi->pfd.nVersion = 1;
pfi->pfd.dwFlags = PFD_SUPPORT_OPENGL;
-
+
/* TODO: also support non-native pixel formats */
pfi->pfd.dwFlags |= PFD_DRAW_TO_WINDOW;
@@ -153,7 +153,7 @@ stw_pixelformat_add(
if (doublebuffer)
pfi->pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SWAP_COPY;
-
+
pfi->pfd.iPixelType = PFD_TYPE_RGBA;
pfi->pfd.cColorBits = color->bits.red + color->bits.green + color->bits.blue + color->bits.alpha;
@@ -195,9 +195,9 @@ stw_pixelformat_add(
pfi->stvis.samples = samples;
pfi->stvis.render_buffer = ST_ATTACHMENT_INVALID;
-
+
++stw_dev->pixelformat_extended_count;
-
+
if(!extended) {
++stw_dev->pixelformat_count;
assert(stw_dev->pixelformat_count == stw_dev->pixelformat_extended_count);
@@ -209,32 +209,32 @@ stw_pixelformat_init( void )
{
struct pipe_screen *screen = stw_dev->screen;
unsigned i, j, k, l;
-
+
assert( !stw_dev->pixelformat_count );
assert( !stw_dev->pixelformat_extended_count );
for(i = 0; i < Elements(stw_pf_multisample); ++i) {
unsigned samples = stw_pf_multisample[i];
-
+
/* FIXME: re-enabled MSAA when we can query it */
if(samples)
continue;
for(j = 0; j < Elements(stw_pf_color); ++j) {
const struct stw_pf_color_info *color = &stw_pf_color[j];
-
+
if(!screen->is_format_supported(screen, color->format, PIPE_TEXTURE_2D,
0, PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET, 0))
continue;
-
+
for(k = 0; k < Elements(stw_pf_doublebuffer); ++k) {
unsigned doublebuffer = stw_pf_doublebuffer[k];
-
+
for(l = 0; l < Elements(stw_pf_depth_stencil); ++l) {
const struct stw_pf_depth_info *depth = &stw_pf_depth_stencil[l];
-
- if(!screen->is_format_supported(screen, depth->format, PIPE_TEXTURE_2D,
+
+ if(!screen->is_format_supported(screen, depth->format, PIPE_TEXTURE_2D,
0, PIPE_BIND_DEPTH_STENCIL, 0))
continue;
@@ -244,7 +244,7 @@ stw_pixelformat_init( void )
}
}
}
-
+
assert( stw_dev->pixelformat_count <= stw_dev->pixelformat_extended_count );
assert( stw_dev->pixelformat_extended_count <= STW_MAX_PIXELFORMATS );
}
@@ -295,7 +295,7 @@ DrvDescribePixelFormat(
return 0;
pfi = stw_pixelformat_get_info( index );
-
+
memcpy(ppfd, &pfi->pfd, sizeof( PIXELFORMATDESCRIPTOR ));
return count;
diff --git a/src/gallium/state_trackers/wgl/stw_pixelformat.h b/src/gallium/state_trackers/wgl/stw_pixelformat.h
index 282c9f6..7b3c7e8 100644
--- a/src/gallium/state_trackers/wgl/stw_pixelformat.h
+++ b/src/gallium/state_trackers/wgl/stw_pixelformat.h
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,11 +10,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
**************************************************************************/
#ifndef STW_PIXELFORMAT_H
@@ -41,7 +41,7 @@
struct stw_pixelformat_info
{
PIXELFORMATDESCRIPTOR pfd;
-
+
struct st_visual stvis;
};
diff --git a/src/gallium/state_trackers/wgl/stw_st.c b/src/gallium/state_trackers/wgl/stw_st.c
index b58d916..5fa5aeb 100644
--- a/src/gallium/state_trackers/wgl/stw_st.c
+++ b/src/gallium/state_trackers/wgl/stw_st.c
@@ -119,7 +119,7 @@ stw_st_framebuffer_validate_locked(struct st_framebuffer_iface *stfb,
stwfb->texture_mask = mask;
}
-static boolean
+static boolean
stw_st_framebuffer_validate(struct st_framebuffer_iface *stfb,
const enum st_attachment_type *statts,
unsigned count,
diff --git a/src/gallium/state_trackers/wgl/stw_tls.c b/src/gallium/state_trackers/wgl/stw_tls.c
index 4bd6a92..f292364 100644
--- a/src/gallium/state_trackers/wgl/stw_tls.c
+++ b/src/gallium/state_trackers/wgl/stw_tls.c
@@ -98,12 +98,12 @@ stw_tls_cleanup_thread(void)
data = (struct stw_tls_data *) TlsGetValue(tlsIndex);
if(data) {
TlsSetValue(tlsIndex, NULL);
-
+
if(data->hCallWndProcHook) {
UnhookWindowsHookEx(data->hCallWndProcHook);
data->hCallWndProcHook = NULL;
}
-
+
FREE(data);
}
}
@@ -121,14 +121,14 @@ struct stw_tls_data *
stw_tls_get_data(void)
{
struct stw_tls_data *data;
-
+
if (tlsIndex == TLS_OUT_OF_INDEXES) {
return NULL;
}
-
+
data = (struct stw_tls_data *) TlsGetValue(tlsIndex);
if(!data) {
- /* DllMain is called with DLL_THREAD_ATTACH only by threads created after
+ /* DllMain is called with DLL_THREAD_ATTACH only by threads created after
* the DLL is loaded by the process */
data = stw_tls_data_create();
if(!data)
diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c
index d4dc84a..9c6f96b 100644
--- a/src/gallium/state_trackers/xorg/xorg_composite.c
+++ b/src/gallium/state_trackers/xorg/xorg_composite.c
@@ -547,7 +547,7 @@ boolean xorg_solid_bind_state(struct exa_context *exa,
vs_traits = VS_SOLID_FILL;
fs_traits = FS_SOLID_FILL;
- renderer_bind_destination(exa->renderer, dst_surf,
+ renderer_bind_destination(exa->renderer, dst_surf,
pixmap->width, pixmap->height);
bind_blend_state(exa, PictOpSrc, NULL, NULL, NULL);
cso_set_samplers(exa->renderer->cso, 0, NULL);
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index 66685ec..dbf1101 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -549,12 +549,12 @@ void xorg_flush(ScreenPtr pScreen)
ms->dirtyThrottling ?
&ms->fence[XORG_NR_FENCES-1] :
NULL);
-
+
if (ms->dirtyThrottling) {
if (ms->fence[0])
ms->ctx->screen->fence_finish(ms->ctx->screen,
ms->fence[0], 0);
-
+
/* The amount of rendering generated by a block handler can be
* quite small. Let us get a fair way ahead of hardware before
* throttling.
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 718a345..eb80d17 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -272,7 +272,7 @@ ExaPrepareAccess(PixmapPtr pPix, int index)
PIPE_TRANSFER_MAP_DIRECTLY |
#endif
PIPE_TRANSFER_READ_WRITE,
- 0, 0,
+ 0, 0,
pPix->drawable.width,
pPix->drawable.height );
if (!priv->map_transfer)
@@ -388,7 +388,7 @@ ExaDoneSolid(PixmapPtr pPixmap)
if (!priv)
return;
-
+
xorg_composite_done(exa);
}
@@ -470,7 +470,7 @@ ExaPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
&surf_tmpl);
- renderer_copy_prepare(exa->renderer,
+ renderer_copy_prepare(exa->renderer,
exa->copy.dst_surface,
exa->copy.src_texture );
}
@@ -507,7 +507,7 @@ ExaCopy(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY,
0, &src_box);
}
else {
- renderer_copy_pixmap(exa->renderer,
+ renderer_copy_pixmap(exa->renderer,
dstX, dstY,
srcX, srcY,
width, height,
@@ -823,10 +823,10 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
if (0) {
debug_printf("%s pixmap %p sz %dx%dx%d devKind %d\n",
__FUNCTION__, pPixmap, width, height, bitsPerPixel, devKind);
-
+
if (priv->tex)
debug_printf(" ==> old texture %dx%d\n",
- priv->tex->width0,
+ priv->tex->width0,
priv->tex->height0);
}
diff --git a/src/gallium/state_trackers/xorg/xorg_renderer.c b/src/gallium/state_trackers/xorg/xorg_renderer.c
index a3d7c5a..aaa1461 100644
--- a/src/gallium/state_trackers/xorg/xorg_renderer.c
+++ b/src/gallium/state_trackers/xorg/xorg_renderer.c
@@ -358,7 +358,7 @@ void renderer_bind_destination(struct xorg_renderer *r,
/* Constant buffer set up to match viewport dimensions:
*/
if (r->fb_width != width ||
- r->fb_height != height)
+ r->fb_height != height)
{
float vs_consts[8] = {
2.f/width, 2.f/height, 1, 1,
@@ -481,7 +481,7 @@ void renderer_copy_prepare(struct xorg_renderer *r,
cso_single_sampler_done(r->cso);
}
- renderer_bind_destination(r, dst_surface,
+ renderer_bind_destination(r, dst_surface,
dst_surface->width,
dst_surface->height);
diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c
index c72ba9e..0647ede 100644
--- a/src/gallium/state_trackers/xorg/xorg_xv.c
+++ b/src/gallium/state_trackers/xorg/xorg_xv.c
@@ -548,7 +548,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id,
pbox = REGION_RECTS(dstRegion);
nbox = REGION_NUM_RECTS(dstRegion);
- renderer_bind_destination(pPriv->r, dst_surf,
+ renderer_bind_destination(pPriv->r, dst_surf,
dst_surf->width, dst_surf->height);
bind_blend_state(pPriv);
diff --git a/src/gallium/targets/Makefile.dri b/src/gallium/targets/Makefile.dri
index 3fb4cc6..468392e 100644
--- a/src/gallium/targets/Makefile.dri
+++ b/src/gallium/targets/Makefile.dri
@@ -32,7 +32,7 @@ INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES)
OBJECTS = \
$(C_SOURCES:.c=.o) \
- $(ASM_SOURCES:.S=.o)
+ $(ASM_SOURCES:.S=.o)
### Include directories
diff --git a/src/gallium/targets/graw-gdi/graw_gdi.c b/src/gallium/targets/graw-gdi/graw_gdi.c
index 17ca2a7..40040fd 100644
--- a/src/gallium/targets/graw-gdi/graw_gdi.c
+++ b/src/gallium/targets/graw-gdi/graw_gdi.c
@@ -128,7 +128,7 @@ graw_create_window_and_screen(int x,
return NULL;
}
-void
+void
graw_set_display_func(void (* draw)(void))
{
graw.draw = draw;
diff --git a/src/gallium/targets/graw-null/graw_null.c b/src/gallium/targets/graw-null/graw_null.c
index f1fe387..04effe7 100644
--- a/src/gallium/targets/graw-null/graw_null.c
+++ b/src/gallium/targets/graw-null/graw_null.c
@@ -16,7 +16,7 @@ graw_create_window_and_screen( int x,
-void
+void
graw_set_display_func( void (*draw)( void ) )
{
}
diff --git a/src/gallium/targets/graw-xlib/graw_xlib.c b/src/gallium/targets/graw-xlib/graw_xlib.c
index 578086f..46c954b 100644
--- a/src/gallium/targets/graw-xlib/graw_xlib.c
+++ b/src/gallium/targets/graw-xlib/graw_xlib.c
@@ -123,7 +123,7 @@ graw_create_window_and_screen( int x,
break;
}
}
-
+
xlib_handle->visual = visinfo->visual;
xlib_handle->drawable = (Drawable)win;
xlib_handle->depth = visinfo->depth;
@@ -153,7 +153,7 @@ graw_create_window_and_screen( int x,
}
-void
+void
graw_set_display_func( void (*draw)( void ) )
{
graw.draw = draw;
diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript
index ec7dbad..f3b0739 100644
--- a/src/gallium/targets/libgl-gdi/SConscript
+++ b/src/gallium/targets/libgl-gdi/SConscript
@@ -31,7 +31,7 @@ if env['gcc']:
sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def']
else:
sources += ['#src/gallium/state_trackers/wgl/opengl32.def']
-
+
drivers += [trace, rbug]
env['no_import_lib'] = 1
diff --git a/src/gallium/targets/libgl-gdi/libgl_gdi.c b/src/gallium/targets/libgl-gdi/libgl_gdi.c
index 112904a..9858596 100644
--- a/src/gallium/targets/libgl-gdi/libgl_gdi.c
+++ b/src/gallium/targets/libgl-gdi/libgl_gdi.c
@@ -90,7 +90,7 @@ gdi_screen_create(void)
goto no_screen;
return screen;
-
+
no_screen:
winsys->destroy(winsys);
no_winsys:
diff --git a/src/gallium/targets/libgl-xlib/Makefile b/src/gallium/targets/libgl-xlib/Makefile
index fb537c3..ed8eaa6 100644
--- a/src/gallium/targets/libgl-xlib/Makefile
+++ b/src/gallium/targets/libgl-xlib/Makefile
@@ -56,7 +56,7 @@ LIBS = \
# LLVM
ifeq ($(MESA_LLVM),1)
DEFINES += -DGALLIUM_LLVMPIPE
-GL_LIB_DEPS += $(LLVM_LIBS)
+GL_LIB_DEPS += $(LLVM_LIBS)
LDFLAGS += $(LLVM_LDFLAGS)
endif
diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript
index 7f0f245..68abde2 100644
--- a/src/gallium/targets/libgl-xlib/SConscript
+++ b/src/gallium/targets/libgl-xlib/SConscript
@@ -36,7 +36,7 @@ if True:
if env['llvm']:
env.Append(CPPDEFINES = ['GALLIUM_LLVMPIPE'])
env.Prepend(LIBS = [llvmpipe])
-
+
if False:
# TODO: Detect Cell SDK
env.Append(CPPDEFINES = 'GALLIUM_CELL')
diff --git a/src/gallium/targets/libgl-xlib/xlib.c b/src/gallium/targets/libgl-xlib/xlib.c
index 9a3e0e0..023b579 100644
--- a/src/gallium/targets/libgl-xlib/xlib.c
+++ b/src/gallium/targets/libgl-xlib/xlib.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Bismarck, ND., USA
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,20 +10,20 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
- *
+ *
+ *
**************************************************************************/
/*
@@ -76,7 +76,7 @@ swrast_xlib_create_screen( Display *display )
return NULL;
}
-static struct xm_driver xlib_driver =
+static struct xm_driver xlib_driver =
{
.create_pipe_screen = swrast_xlib_create_screen,
.create_st_api = st_gl_api_create,
diff --git a/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c b/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c
index 7625d2f..2887136 100644
--- a/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c
+++ b/src/gallium/targets/xorg-vmwgfx/vmw_ioctl.c
@@ -199,20 +199,20 @@ vmw_ioctl_buffer_create(struct vmw_customizer *vmw, uint32_t size, unsigned *han
void
vmw_ioctl_buffer_destroy(struct vmw_customizer *vmw, struct vmw_dma_buffer *buf)
-{
- struct drm_vmw_unref_dmabuf_arg arg;
+{
+ struct drm_vmw_unref_dmabuf_arg arg;
- if (buf->data) {
- munmap(buf->data, buf->size);
- buf->data = NULL;
- }
+ if (buf->data) {
+ munmap(buf->data, buf->size);
+ buf->data = NULL;
+ }
- memset(&arg, 0, sizeof(arg));
- arg.handle = buf->handle;
- drmCommandWrite(vmw->fd, DRM_VMW_UNREF_DMABUF, &arg, sizeof(arg));
+ memset(&arg, 0, sizeof(arg));
+ arg.handle = buf->handle;
+ drmCommandWrite(vmw->fd, DRM_VMW_UNREF_DMABUF, &arg, sizeof(arg));
free(buf);
-}
+}
void *
vmw_ioctl_buffer_map(struct vmw_customizer *vmw, struct vmw_dma_buffer *buf)
diff --git a/src/gallium/tests/graw/SConscript b/src/gallium/tests/graw/SConscript
index 3341b88..77066a1 100644
--- a/src/gallium/tests/graw/SConscript
+++ b/src/gallium/tests/graw/SConscript
@@ -6,7 +6,7 @@ env.Prepend(LIBS = [gallium])
env.Prepend(LIBPATH = [graw.dir])
env.Prepend(LIBS = ['graw'])
-
+
if env['platform'] in ('freebsd8', 'sunos5'):
env.Append(LIBS = ['m'])
diff --git a/src/gallium/tests/graw/clear.c b/src/gallium/tests/graw/clear.c
index 1ff80ca..20c3f9c 100644
--- a/src/gallium/tests/graw/clear.c
+++ b/src/gallium/tests/graw/clear.c
@@ -48,17 +48,17 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
+ for (i = 0;
window == NULL && formats[i] != PIPE_FORMAT_NONE;
i++) {
-
+
screen = graw_create_window_and_screen(0,0,300,300,
formats[i],
&window);
}
if (window == NULL)
exit(2);
-
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
@@ -73,7 +73,7 @@ static void init( void )
templat.nr_samples = 1;
templat.bind = (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET);
-
+
tex = screen->resource_create(screen,
&templat);
if (tex == NULL)
diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c
index 37be2d0..9167286 100644
--- a/src/gallium/tests/graw/fs-test.c
+++ b/src/gallium/tests/graw/fs-test.c
@@ -13,7 +13,7 @@
#include "util/u_inlines.h"
#include "util/u_memory.h" /* Offset() */
#include "util/u_draw_quad.h"
-#include "util/u_box.h"
+#include "util/u_box.h"
static const char *filename = NULL;
unsigned show_fps = 0;
@@ -74,7 +74,7 @@ static struct vertex vertices[] =
{ -1, 0, 0, 1 } },
};
-static float constants1[] =
+static float constants1[] =
{ 0.4, 0, 0, 1,
1, 1, 1, 1,
2, 2, 2, 2,
@@ -92,7 +92,7 @@ static float constants1[] =
};
-static float constants2[] =
+static float constants2[] =
{ 1, 0, 0, 1,
0, 1, 0, 1,
0, 0, 1, 1,
@@ -287,7 +287,7 @@ static void draw( void )
#define SIZE 16
static void init_tex( void )
-{
+{
struct pipe_sampler_view sv_template;
struct pipe_sampler_state sampler_desc;
struct pipe_resource templat;
@@ -346,7 +346,7 @@ static void init_tex( void )
templat.nr_samples = 1;
templat.bind = PIPE_BIND_SAMPLER_VIEW;
-
+
samptex = screen->resource_create(screen,
&templat);
if (samptex == NULL)
@@ -398,7 +398,7 @@ static void init_tex( void )
exit(5);
ctx->set_fragment_sampler_views(ctx, 1, &sv);
-
+
memset(&sampler_desc, 0, sizeof sampler_desc);
sampler_desc.wrap_s = PIPE_TEX_WRAP_REPEAT;
@@ -411,13 +411,13 @@ static void init_tex( void )
sampler_desc.compare_func = 0;
sampler_desc.normalized_coords = 1;
sampler_desc.max_anisotropy = 0;
-
+
sampler = ctx->create_sampler_state(ctx, &sampler_desc);
if (sampler == NULL)
exit(6);
ctx->bind_fragment_sampler_states(ctx, 1, &sampler);
-
+
}
static void init( void )
@@ -433,15 +433,15 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
+ for (i = 0;
window == NULL && formats[i] != PIPE_FORMAT_NONE;
i++) {
-
+
screen = graw_create_window_and_screen(0,0,WIDTH,HEIGHT,
formats[i],
&window);
}
-
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
@@ -456,7 +456,7 @@ static void init( void )
templat.nr_samples = 1;
templat.bind = (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET);
-
+
rttex = screen->resource_create(screen,
&templat);
if (rttex == NULL)
@@ -478,7 +478,7 @@ static void init( void )
fb.cbufs[0] = surf;
ctx->set_framebuffer_state(ctx, &fb);
-
+
{
struct pipe_blend_state blend;
void *handle;
diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c
index 812666a..808e84b 100644
--- a/src/gallium/tests/graw/gs-test.c
+++ b/src/gallium/tests/graw/gs-test.c
@@ -13,7 +13,7 @@
#include "util/u_inlines.h"
#include "util/u_memory.h" /* Offset() */
#include "util/u_draw_quad.h"
-#include "util/u_box.h"
+#include "util/u_box.h"
static const char *filename = NULL;
unsigned show_fps = 0;
@@ -351,7 +351,7 @@ static void draw( void )
#define SIZE 16
static void init_tex( void )
-{
+{
struct pipe_sampler_view sv_template;
struct pipe_sampler_state sampler_desc;
struct pipe_resource templat;
@@ -410,7 +410,7 @@ static void init_tex( void )
templat.nr_samples = 1;
templat.bind = PIPE_BIND_SAMPLER_VIEW;
-
+
samptex = screen->resource_create(screen,
&templat);
if (samptex == NULL)
@@ -462,7 +462,7 @@ static void init_tex( void )
exit(5);
ctx->set_fragment_sampler_views(ctx, 1, &sv);
-
+
memset(&sampler_desc, 0, sizeof sampler_desc);
sampler_desc.wrap_s = PIPE_TEX_WRAP_REPEAT;
@@ -475,13 +475,13 @@ static void init_tex( void )
sampler_desc.compare_func = 0;
sampler_desc.normalized_coords = 1;
sampler_desc.max_anisotropy = 0;
-
+
sampler = ctx->create_sampler_state(ctx, &sampler_desc);
if (sampler == NULL)
exit(6);
ctx->bind_fragment_sampler_states(ctx, 1, &sampler);
-
+
}
static void init( void )
@@ -497,15 +497,15 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
+ for (i = 0;
window == NULL && formats[i] != PIPE_FORMAT_NONE;
i++) {
-
+
screen = graw_create_window_and_screen(0,0,WIDTH,HEIGHT,
formats[i],
&window);
}
-
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
@@ -520,7 +520,7 @@ static void init( void )
templat.nr_samples = 1;
templat.bind = (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET);
-
+
rttex = screen->resource_create(screen,
&templat);
if (rttex == NULL)
@@ -542,7 +542,7 @@ static void init( void )
fb.cbufs[0] = surf;
ctx->set_framebuffer_state(ctx, &fb);
-
+
{
struct pipe_blend_state blend;
void *handle;
diff --git a/src/gallium/tests/graw/quad-tex.c b/src/gallium/tests/graw/quad-tex.c
index 952131d..8fa846d 100644
--- a/src/gallium/tests/graw/quad-tex.c
+++ b/src/gallium/tests/graw/quad-tex.c
@@ -12,7 +12,7 @@
#include "util/u_inlines.h"
#include "util/u_memory.h" /* Offset() */
#include "util/u_draw_quad.h"
-#include "util/u_box.h"
+#include "util/u_box.h"
enum pipe_format formats[] = {
PIPE_FORMAT_R8G8B8A8_UNORM,
@@ -157,7 +157,7 @@ static void draw( void )
#define SIZE 16
static void init_tex( void )
-{
+{
struct pipe_sampler_view sv_template;
struct pipe_sampler_state sampler_desc;
struct pipe_resource templat;
@@ -216,7 +216,7 @@ static void init_tex( void )
templat.nr_samples = 1;
templat.bind = PIPE_BIND_SAMPLER_VIEW;
-
+
samptex = screen->resource_create(screen,
&templat);
if (samptex == NULL)
@@ -268,7 +268,7 @@ static void init_tex( void )
exit(5);
ctx->set_fragment_sampler_views(ctx, 1, &sv);
-
+
memset(&sampler_desc, 0, sizeof sampler_desc);
sampler_desc.wrap_s = PIPE_TEX_WRAP_REPEAT;
@@ -281,13 +281,13 @@ static void init_tex( void )
sampler_desc.compare_func = 0;
sampler_desc.normalized_coords = 1;
sampler_desc.max_anisotropy = 0;
-
+
sampler = ctx->create_sampler_state(ctx, &sampler_desc);
if (sampler == NULL)
exit(6);
ctx->bind_fragment_sampler_states(ctx, 1, &sampler);
-
+
}
static void init( void )
@@ -303,15 +303,15 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
+ for (i = 0;
window == NULL && formats[i] != PIPE_FORMAT_NONE;
i++) {
-
+
screen = graw_create_window_and_screen(0,0,300,300,
formats[i],
&window);
}
-
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
@@ -326,7 +326,7 @@ static void init( void )
templat.nr_samples = 1;
templat.bind = (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET);
-
+
rttex = screen->resource_create(screen,
&templat);
if (rttex == NULL)
@@ -348,7 +348,7 @@ static void init( void )
fb.cbufs[0] = surf;
ctx->set_framebuffer_state(ctx, &fb);
-
+
{
struct pipe_blend_state blend;
void *handle;
diff --git a/src/gallium/tests/graw/shader-leak.c b/src/gallium/tests/graw/shader-leak.c
index b53f0a0..03f08ea 100644
--- a/src/gallium/tests/graw/shader-leak.c
+++ b/src/gallium/tests/graw/shader-leak.c
@@ -176,15 +176,15 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
+ for (i = 0;
window == NULL && formats[i] != PIPE_FORMAT_NONE;
i++) {
-
+
screen = graw_create_window_and_screen(0,0,300,300,
formats[i],
&window);
}
-
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
@@ -198,7 +198,7 @@ static void init( void )
templat.nr_samples = 1;
templat.bind = (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET);
-
+
tex = screen->resource_create(screen, &templat);
if (tex == NULL) {
fprintf(stderr, "Unable to create screen texture!\n");
@@ -223,7 +223,7 @@ static void init( void )
fb.cbufs[0] = surf;
ctx->set_framebuffer_state(ctx, &fb);
-
+
{
struct pipe_blend_state blend;
void *handle;
diff --git a/src/gallium/tests/graw/tri-gs.c b/src/gallium/tests/graw/tri-gs.c
index 84ff3e6..40b13d0 100644
--- a/src/gallium/tests/graw/tri-gs.c
+++ b/src/gallium/tests/graw/tri-gs.c
@@ -155,7 +155,7 @@ static void set_geometry_shader( void )
handle = graw_parse_geometry_shader(ctx, text);
ctx->bind_gs_state(ctx, handle);
-}
+}
static void draw( void )
{
@@ -182,15 +182,15 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
+ for (i = 0;
window == NULL && formats[i] != PIPE_FORMAT_NONE;
i++) {
-
+
screen = graw_create_window_and_screen(0,0,300,300,
formats[i],
&window);
}
-
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
@@ -205,7 +205,7 @@ static void init( void )
templat.nr_samples = 1;
templat.bind = (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET);
-
+
tex = screen->resource_create(screen,
&templat);
if (tex == NULL)
@@ -227,7 +227,7 @@ static void init( void )
fb.cbufs[0] = surf;
ctx->set_framebuffer_state(ctx, &fb);
-
+
{
struct pipe_blend_state blend;
void *handle;
diff --git a/src/gallium/tests/graw/tri-instanced.c b/src/gallium/tests/graw/tri-instanced.c
index f33c061..007654f 100644
--- a/src/gallium/tests/graw/tri-instanced.c
+++ b/src/gallium/tests/graw/tri-instanced.c
@@ -234,15 +234,15 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
+ for (i = 0;
window == NULL && formats[i] != PIPE_FORMAT_NONE;
i++) {
-
+
screen = graw_create_window_and_screen(0,0,300,300,
formats[i],
&window);
}
-
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
@@ -257,7 +257,7 @@ static void init( void )
templat.nr_samples = 1;
templat.bind = (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET);
-
+
tex = screen->resource_create(screen,
&templat);
if (tex == NULL)
@@ -279,7 +279,7 @@ static void init( void )
fb.cbufs[0] = surf;
ctx->set_framebuffer_state(ctx, &fb);
-
+
{
struct pipe_blend_state blend;
void *handle;
diff --git a/src/gallium/tests/graw/tri.c b/src/gallium/tests/graw/tri.c
index 2742c7c..594deae 100644
--- a/src/gallium/tests/graw/tri.c
+++ b/src/gallium/tests/graw/tri.c
@@ -162,15 +162,15 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
+ for (i = 0;
window == NULL && formats[i] != PIPE_FORMAT_NONE;
i++) {
-
+
screen = graw_create_window_and_screen(0,0,300,300,
formats[i],
&window);
}
-
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL) {
fprintf(stderr, "Unable to create context!\n");
@@ -187,7 +187,7 @@ static void init( void )
templat.nr_samples = 1;
templat.bind = (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET);
-
+
tex = screen->resource_create(screen,
&templat);
if (tex == NULL) {
@@ -213,7 +213,7 @@ static void init( void )
fb.cbufs[0] = surf;
ctx->set_framebuffer_state(ctx, &fb);
-
+
{
struct pipe_blend_state blend;
void *handle;
diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c
index 58908f3..ddf64e9 100644
--- a/src/gallium/tests/graw/vs-test.c
+++ b/src/gallium/tests/graw/vs-test.c
@@ -14,7 +14,7 @@
#include "util/u_inlines.h"
#include "util/u_memory.h" /* Offset() */
#include "util/u_draw_quad.h"
-#include "util/u_box.h"
+#include "util/u_box.h"
static const char *filename = NULL;
unsigned show_fps = 0;
@@ -60,7 +60,7 @@ struct vertex {
#define MESH_SZ 16
static struct vertex vertices[MESH_SZ * MESH_SZ];
-static float constants[] =
+static float constants[] =
{ 0.4, 0, 0, 1,
1, 1, 1, 1,
2, 2, 2, 2,
@@ -238,7 +238,7 @@ static void draw( void )
#define SIZE 16
static void init_tex( void )
-{
+{
struct pipe_sampler_view sv_template;
struct pipe_sampler_state sampler_desc;
struct pipe_resource templat;
@@ -297,7 +297,7 @@ static void init_tex( void )
templat.nr_samples = 1;
templat.bind = PIPE_BIND_SAMPLER_VIEW;
-
+
samptex = screen->resource_create(screen,
&templat);
if (samptex == NULL)
@@ -349,7 +349,7 @@ static void init_tex( void )
exit(5);
ctx->set_fragment_sampler_views(ctx, 1, &sv);
-
+
memset(&sampler_desc, 0, sizeof sampler_desc);
sampler_desc.wrap_s = PIPE_TEX_WRAP_REPEAT;
@@ -362,13 +362,13 @@ static void init_tex( void )
sampler_desc.compare_func = 0;
sampler_desc.normalized_coords = 1;
sampler_desc.max_anisotropy = 0;
-
+
sampler = ctx->create_sampler_state(ctx, &sampler_desc);
if (sampler == NULL)
exit(6);
ctx->bind_fragment_sampler_states(ctx, 1, &sampler);
-
+
}
static void init( void )
@@ -384,15 +384,15 @@ static void init( void )
* Also, no easy way of querying supported formats if the screen
* cannot be created first.
*/
- for (i = 0;
+ for (i = 0;
window == NULL && formats[i] != PIPE_FORMAT_NONE;
i++) {
-
+
screen = graw_create_window_and_screen(0,0,WIDTH,HEIGHT,
formats[i],
&window);
}
-
+
ctx = screen->context_create(screen, NULL);
if (ctx == NULL)
exit(3);
@@ -407,7 +407,7 @@ static void init( void )
templat.nr_samples = 1;
templat.bind = (PIPE_BIND_RENDER_TARGET |
PIPE_BIND_DISPLAY_TARGET);
-
+
rttex = screen->resource_create(screen,
&templat);
if (rttex == NULL)
@@ -429,7 +429,7 @@ static void init( void )
fb.cbufs[0] = surf;
ctx->set_framebuffer_state(ctx, &fb);
-
+
{
struct pipe_blend_state blend;
void *handle;
diff --git a/src/gallium/tests/unit/SConscript b/src/gallium/tests/unit/SConscript
index 655e8a9..fdf47ee 100644
--- a/src/gallium/tests/unit/SConscript
+++ b/src/gallium/tests/unit/SConscript
@@ -24,7 +24,7 @@ for prog in progs:
target = prog,
source = prog + '.c',
)
-
+
env.InstallProgram(prog)
# http://www.scons.org/wiki/UnitTests
diff --git a/src/gallium/winsys/i915/drm/i915_drm_buffer.c b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
index 01dd4bf..e7d0f12 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_buffer.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
@@ -54,7 +54,7 @@ i915_drm_buffer_create(struct i915_winsys *iws,
static struct i915_winsys_buffer *
i915_drm_buffer_create_tiled(struct i915_winsys *iws,
- unsigned *stride, unsigned height,
+ unsigned *stride, unsigned height,
enum i915_winsys_buffer_tile *tiling,
enum i915_winsys_buffer_type type)
{
diff --git a/src/gallium/winsys/i915/sw/i915_sw_buffer.c b/src/gallium/winsys/i915/sw/i915_sw_buffer.c
index 834805e..2678dbe 100644
--- a/src/gallium/winsys/i915/sw/i915_sw_buffer.c
+++ b/src/gallium/winsys/i915/sw/i915_sw_buffer.c
@@ -29,7 +29,7 @@ i915_sw_buffer_create(struct i915_winsys *iws,
static struct i915_winsys_buffer *
i915_sw_buffer_create_tiled(struct i915_winsys *iws,
- unsigned *stride, unsigned height,
+ unsigned *stride, unsigned height,
enum i915_winsys_buffer_tile *tiling,
enum i915_winsys_buffer_type type)
{
diff --git a/src/gallium/winsys/i965/drm/i965_drm_buffer.c b/src/gallium/winsys/i965/drm/i965_drm_buffer.c
index ed62db6..d6cc1de 100644
--- a/src/gallium/winsys/i965/drm/i965_drm_buffer.c
+++ b/src/gallium/winsys/i965/drm/i965_drm_buffer.c
@@ -62,7 +62,7 @@ const char *data_types[BRW_DATA_MAX] =
"(untyped)"
};
-static enum pipe_error
+static enum pipe_error
i965_libdrm_bo_alloc(struct brw_winsys_screen *sws,
enum brw_buffer_type type,
unsigned size,
@@ -102,9 +102,9 @@ i965_libdrm_bo_alloc(struct brw_winsys_screen *sws,
break;
}
- buf->bo = drm_intel_bo_alloc(idws->gem,
- names[type],
- size,
+ buf->bo = drm_intel_bo_alloc(idws->gem,
+ names[type],
+ size,
alignment);
if (!buf->bo)
@@ -195,7 +195,7 @@ i965_libdrm_bo_get_handle(struct brw_winsys_buffer *buffer,
return PIPE_OK;
}
-static void
+static void
i965_libdrm_bo_destroy(struct brw_winsys_buffer *buffer)
{
struct i965_libdrm_buffer *buf = i965_libdrm_buffer(buffer);
@@ -221,7 +221,7 @@ i965_libdrm_bo_emit_reloc(struct brw_winsys_buffer *buffer,
if (BRW_DUMP)
debug_printf("%s buf %p offset %x delta %x buf2 %p/%s/%s\n",
- __FUNCTION__, (void *)buffer,
+ __FUNCTION__, (void *)buffer,
offset, delta,
(void *)buffer2, names[buf2->data_type], usages[usage]);
@@ -279,7 +279,7 @@ i965_libdrm_bo_emit_reloc(struct brw_winsys_buffer *buffer,
return 0;
}
-static enum pipe_error
+static enum pipe_error
i965_libdrm_bo_exec(struct brw_winsys_buffer *buffer,
unsigned bytes_used)
{
@@ -315,16 +315,16 @@ i965_libdrm_bo_subdata(struct brw_winsys_buffer *buffer,
(void)data_type;
if (BRW_DUMP)
- debug_printf("%s buf %p off %d sz %d %s relocs: %d\n",
- __FUNCTION__,
- (void *)buffer, offset, size,
+ debug_printf("%s buf %p off %d sz %d %s relocs: %d\n",
+ __FUNCTION__,
+ (void *)buffer, offset, size,
data_types[data_type],
nr_reloc);
if (BRW_DUMP)
brw_dump_data( idws->base.pci_id,
data_type,
- buf->bo->offset + offset,
+ buf->bo->offset + offset,
data, size );
/* XXX: use bo_map_gtt/memcpy/unmap_gtt under some circumstances???
@@ -332,7 +332,7 @@ i965_libdrm_bo_subdata(struct brw_winsys_buffer *buffer,
ret = drm_intel_bo_subdata(buf->bo, offset, size, (void*)data);
if (ret)
return PIPE_ERROR;
-
+
for (i = 0; i < nr_reloc; i++) {
i965_libdrm_bo_emit_reloc(buffer, reloc[i].usage, reloc[i].delta,
reloc[i].offset, reloc[i].bo);
@@ -341,7 +341,7 @@ i965_libdrm_bo_subdata(struct brw_winsys_buffer *buffer,
return PIPE_OK;
}
-static boolean
+static boolean
i965_libdrm_bo_is_busy(struct brw_winsys_buffer *buffer)
{
struct i965_libdrm_buffer *buf = i965_libdrm_buffer(buffer);
@@ -358,7 +358,7 @@ i965_libdrm_bo_is_busy(struct brw_winsys_buffer *buffer)
return ret;
}
-static boolean
+static boolean
i965_libdrm_bo_references(struct brw_winsys_buffer *a,
struct brw_winsys_buffer *b)
{
@@ -424,7 +424,7 @@ i965_libdrm_bo_map(struct brw_winsys_buffer *buffer,
if (BRW_DUMP)
- debug_printf("%s %p %s %s\n", __FUNCTION__, (void *)buffer,
+ debug_printf("%s %p %s %s\n", __FUNCTION__, (void *)buffer,
write ? "read/write" : "read",
write ? data_types[data_type] : "");
@@ -462,12 +462,12 @@ i965_libdrm_bo_flush_range(struct brw_winsys_buffer *buffer,
if (BRW_DUMP)
brw_dump_data( idws->base.pci_id,
buf->data_type,
- buf->bo->offset + offset,
- (char*)buf->bo->virtual + offset,
+ buf->bo->offset + offset,
+ (char*)buf->bo->virtual + offset,
length );
}
-static void
+static void
i965_libdrm_bo_unmap(struct brw_winsys_buffer *buffer)
{
struct i965_libdrm_buffer *buf = i965_libdrm_buffer(buffer);
diff --git a/src/gallium/winsys/i965/drm/i965_drm_winsys.h b/src/gallium/winsys/i965/drm/i965_drm_winsys.h
index 82dbe61..d85bd9b 100644
--- a/src/gallium/winsys/i965/drm/i965_drm_winsys.h
+++ b/src/gallium/winsys/i965/drm/i965_drm_winsys.h
@@ -33,7 +33,7 @@ i965_libdrm_winsys(struct brw_winsys_screen *iws)
void i965_libdrm_winsys_init_buffer_functions(struct i965_libdrm_winsys *idws);
-/* Buffer.
+/* Buffer.
*/
struct i965_libdrm_buffer {
struct brw_winsys_buffer base;
diff --git a/src/gallium/winsys/i965/xlib/Makefile b/src/gallium/winsys/i965/xlib/Makefile
index cc82493..1183e4c 100644
--- a/src/gallium/winsys/i965/xlib/Makefile
+++ b/src/gallium/winsys/i965/xlib/Makefile
@@ -40,7 +40,7 @@ LIBS = \
$(TOP)/src/gallium/state_trackers/glx/xlib/libxlib.a \
$(TOP)/src/mapi/glapi/libglapi.a \
$(TOP)/src/mesa/libmesagallium.a \
- $(GALLIUM_AUXILIARIES)
+ $(GALLIUM_AUXILIARIES)
# $(TOP)/src/gallium/drivers/i965/lib/libi9xx.a \
diff --git a/src/gallium/winsys/i965/xlib/xlib_i965.c b/src/gallium/winsys/i965/xlib/xlib_i965.c
index c22df66..df428dd 100644
--- a/src/gallium/winsys/i965/xlib/xlib_i965.c
+++ b/src/gallium/winsys/i965/xlib/xlib_i965.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Bismarck, ND., USA
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,20 +10,20 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
- *
+ *
+ *
**************************************************************************/
/*
@@ -50,11 +50,11 @@
-extern int brw_disasm (FILE *file,
+extern int brw_disasm (FILE *file,
const struct brw_instruction *inst,
unsigned count );
-extern int intel_decode(const uint32_t *data,
+extern int intel_decode(const uint32_t *data,
int count,
uint32_t hw_offset,
uint32_t devid);
@@ -193,7 +193,7 @@ xlib_brw_bo_alloc( struct brw_winsys_screen *sws,
return PIPE_ERROR_OUT_OF_MEMORY;
}
-static void
+static void
xlib_brw_bo_destroy( struct brw_winsys_buffer *buffer )
{
struct xlib_brw_buffer *buf = xlib_brw_buffer(buffer);
@@ -201,7 +201,7 @@ xlib_brw_bo_destroy( struct brw_winsys_buffer *buffer )
FREE(buf);
}
-static int
+static int
xlib_brw_bo_emit_reloc( struct brw_winsys_buffer *buffer,
enum brw_buffer_usage usage,
unsigned delta,
@@ -222,7 +222,7 @@ xlib_brw_bo_emit_reloc( struct brw_winsys_buffer *buffer,
return 0;
}
-static int
+static int
xlib_brw_bo_exec( struct brw_winsys_buffer *buffer,
unsigned bytes_used )
{
@@ -249,9 +249,9 @@ xlib_brw_bo_subdata(struct brw_winsys_buffer *buffer,
unsigned i;
if (BRW_DEBUG & DEBUG_WINSYS)
- debug_printf("%s buf %p off %d sz %d %s relocs: %d\n",
- __FUNCTION__,
- (void *)buffer, offset, size,
+ debug_printf("%s buf %p off %d sz %d %s relocs: %d\n",
+ __FUNCTION__,
+ (void *)buffer, offset, size,
data_types[data_type],
nr_relocs);
@@ -262,18 +262,18 @@ xlib_brw_bo_subdata(struct brw_winsys_buffer *buffer,
*/
for (i = 0; i < nr_relocs; i++) {
if (BRW_DEBUG & DEBUG_WINSYS)
- debug_printf("\treloc[%d] usage %s off %d value %x+%x\n",
+ debug_printf("\treloc[%d] usage %s off %d value %x+%x\n",
i, usages[reloc[i].usage], reloc[i].offset,
xlib_brw_buffer(reloc[i].bo)->offset, reloc[i].delta);
- *(unsigned *)(buf->virtual + offset + reloc[i].offset) =
+ *(unsigned *)(buf->virtual + offset + reloc[i].offset) =
xlib_brw_buffer(reloc[i].bo)->offset + reloc[i].delta;
}
if (BRW_DUMP)
brw_dump_data( xbw->chipset.pci_id,
data_type,
- buf->offset + offset,
+ buf->offset + offset,
buf->virtual + offset, size );
@@ -281,7 +281,7 @@ xlib_brw_bo_subdata(struct brw_winsys_buffer *buffer,
}
-static boolean
+static boolean
xlib_brw_bo_is_busy(struct brw_winsys_buffer *buffer)
{
if (BRW_DEBUG & DEBUG_WINSYS)
@@ -289,7 +289,7 @@ xlib_brw_bo_is_busy(struct brw_winsys_buffer *buffer)
return TRUE;
}
-static boolean
+static boolean
xlib_brw_bo_references(struct brw_winsys_buffer *a,
struct brw_winsys_buffer *b)
{
@@ -310,8 +310,8 @@ xlib_brw_check_aperture_space( struct brw_winsys_screen *iws,
tot_size += buffers[i]->size;
if (BRW_DEBUG & DEBUG_WINSYS)
- debug_printf("%s %d bufs, tot_size: %d kb\n",
- __FUNCTION__, count,
+ debug_printf("%s %d bufs, tot_size: %d kb\n",
+ __FUNCTION__, count,
(tot_size + 1023) / 1024);
return PIPE_OK;
@@ -329,7 +329,7 @@ xlib_brw_bo_map(struct brw_winsys_buffer *buffer,
struct xlib_brw_buffer *buf = xlib_brw_buffer(buffer);
if (BRW_DEBUG & DEBUG_WINSYS)
- debug_printf("%s %p %s %s\n", __FUNCTION__, (void *)buffer,
+ debug_printf("%s %p %s %s\n", __FUNCTION__, (void *)buffer,
write ? "read/write" : "read",
write ? data_types[data_type] : "");
@@ -349,7 +349,7 @@ xlib_brw_bo_flush_range( struct brw_winsys_buffer *buffer,
}
-static void
+static void
xlib_brw_bo_unmap(struct brw_winsys_buffer *buffer)
{
struct xlib_brw_buffer *buf = xlib_brw_buffer(buffer);
@@ -364,7 +364,7 @@ xlib_brw_bo_unmap(struct brw_winsys_buffer *buffer)
buf->modified) {
buf->modified = 0;
-
+
/* Consider dumping new buffer contents here, using the
* flush-range info to minimize verbosity.
*/
@@ -477,14 +477,14 @@ xlib_create_i965_screen( void )
-struct xm_driver xlib_i965_driver =
+struct xm_driver xlib_i965_driver =
{
.create_pipe_screen = xlib_create_i965_screen,
.display_surface = xlib_i965_display_surface
};
-/* Register this driver at library load:
+/* Register this driver at library load:
*/
static void _init( void ) __attribute__((constructor));
static void _init( void )
diff --git a/src/gallium/winsys/psl1ght/Makefile b/src/gallium/winsys/psl1ght/Makefile
index 2a82430..339e0fe 100644
--- a/src/gallium/winsys/psl1ght/Makefile
+++ b/src/gallium/winsys/psl1ght/Makefile
@@ -28,7 +28,7 @@ LIBS = \
$(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/mapi/glapi/libglapi.a \
$(TOP)/src/mesa/libmesagallium.a \
- $(GALLIUM_AUXILIARIES)
+ $(GALLIUM_AUXILIARIES)
.c.o:
$(CC) -c $(INCLUDE_DIRS) $(DEFINES) $(CFLAGS) $< -o $@
diff --git a/src/gallium/winsys/psl1ght/nouveau/nouveau_bo.c b/src/gallium/winsys/psl1ght/nouveau/nouveau_bo.c
index cf31e0f..5e0263e 100644
--- a/src/gallium/winsys/psl1ght/nouveau/nouveau_bo.c
+++ b/src/gallium/winsys/psl1ght/nouveau/nouveau_bo.c
@@ -277,13 +277,13 @@ nouveau_bo_handle_get(struct nouveau_bo *bo, uint32_t *handle)
struct nouveau_device_priv *nvdev = nouveau_device(bo->device);
struct nouveau_bo_priv *nvbo = nouveau_bo(bo);
int ret;
-
+
if (!bo || !handle)
return -EINVAL;
if (!nvbo->global_handle) {
struct drm_gem_flink req;
-
+
ret = nouveau_bo_kalloc(nvbo, NULL);
if (ret)
return ret;
@@ -297,7 +297,7 @@ nouveau_bo_handle_get(struct nouveau_bo *bo, uint32_t *handle)
nvbo->global_handle = req.name;
}
-
+
*handle = nvbo->global_handle;
#else
printf("nouveau_bo_handle_get not implemented\n");
@@ -305,7 +305,7 @@ nouveau_bo_handle_get(struct nouveau_bo *bo, uint32_t *handle)
#endif
return 0;
}
-
+
int
nouveau_bo_handle_ref(struct nouveau_device *dev, uint32_t handle,
struct nouveau_bo **bo)
@@ -336,7 +336,7 @@ nouveau_bo_handle_ref(struct nouveau_device *dev, uint32_t handle,
abort();
#endif
return 0;
-}
+}
static void
nouveau_bo_del(struct nouveau_bo **bo)
diff --git a/src/gallium/winsys/psl1ght/nouveau/nouveau_grobj.c b/src/gallium/winsys/psl1ght/nouveau/nouveau_grobj.c
index d7bcbc3..2d3389c 100644
--- a/src/gallium/winsys/psl1ght/nouveau/nouveau_grobj.c
+++ b/src/gallium/winsys/psl1ght/nouveau/nouveau_grobj.c
@@ -110,7 +110,7 @@ nouveau_grobj_free(struct nouveau_grobj **grobj)
f.channel = chan->drm.channel;
f.handle = nvgrobj->base.handle;
drmCommandWrite(nvdev->fd, DRM_NOUVEAU_GPUOBJ_FREE,
- &f, sizeof(f));
+ &f, sizeof(f));
}
free(nvgrobj);
#else
diff --git a/src/gallium/winsys/psl1ght/nouveau/nouveau_notifier.c b/src/gallium/winsys/psl1ght/nouveau/nouveau_notifier.c
index 59b1db0..3526596 100644
--- a/src/gallium/winsys/psl1ght/nouveau/nouveau_notifier.c
+++ b/src/gallium/winsys/psl1ght/nouveau/nouveau_notifier.c
@@ -90,7 +90,7 @@ nouveau_notifier_free(struct nouveau_notifier **notifier)
f.channel = nvchan->drm.channel;
f.handle = nvnotify->base.handle;
- drmCommandWrite(nvdev->fd, DRM_NOUVEAU_GPUOBJ_FREE, &f, sizeof(f));
+ drmCommandWrite(nvdev->fd, DRM_NOUVEAU_GPUOBJ_FREE, &f, sizeof(f));
free(nvnotify);
#else
printf("nouveau_notifier_kfree not implemented\n");
diff --git a/src/gallium/winsys/psl1ght/nouveau/nouveau_pushbuf.h b/src/gallium/winsys/psl1ght/nouveau/nouveau_pushbuf.h
index 52d13a0..af383ce 100644
--- a/src/gallium/winsys/psl1ght/nouveau/nouveau_pushbuf.h
+++ b/src/gallium/winsys/psl1ght/nouveau/nouveau_pushbuf.h
@@ -125,7 +125,7 @@ static __inline__ void
BIND_RING(struct nouveau_channel *chan, struct nouveau_grobj *gr, unsigned sc)
{
struct nouveau_subchannel *subc = &gr->channel->subc[sc];
-
+
if (subc->gr) {
if (subc->gr->bound == NOUVEAU_GROBJ_BOUND_EXPLICIT)
assert(0);
diff --git a/src/gallium/winsys/psl1ght/nouveau/nouveau_resource.c b/src/gallium/winsys/psl1ght/nouveau/nouveau_resource.c
index 7acaf7d..5407c3b 100644
--- a/src/gallium/winsys/psl1ght/nouveau/nouveau_resource.c
+++ b/src/gallium/winsys/psl1ght/nouveau/nouveau_resource.c
@@ -81,7 +81,7 @@ nouveau_resource_alloc(struct nouveau_resource *heap, unsigned size, void *priv,
*res = r;
return 0;
}
-
+
heap = heap->next;
}
@@ -120,5 +120,5 @@ nouveau_resource_free(struct nouveau_resource **res)
r->prev->size += r->size;
free(r);
}
-
+
}
diff --git a/src/gallium/winsys/r600/drm/bof.c b/src/gallium/winsys/r600/drm/bof.c
index 0598cc6..5c923ad 100644
--- a/src/gallium/winsys/r600/drm/bof.c
+++ b/src/gallium/winsys/r600/drm/bof.c
@@ -46,7 +46,7 @@ static int bof_entry_grow(bof_t *bof)
}
/*
- * object
+ * object
*/
bof_t *bof_object(void)
{
diff --git a/src/gallium/winsys/r600/drm/radeon_bo.c b/src/gallium/winsys/r600/drm/radeon_bo.c
index 7e5f392..999de82 100644
--- a/src/gallium/winsys/r600/drm/radeon_bo.c
+++ b/src/gallium/winsys/r600/drm/radeon_bo.c
@@ -206,13 +206,13 @@ int radeon_bo_get_tiling_flags(struct radeon *radeon,
{
struct drm_radeon_gem_get_tiling args;
int ret;
-
+
args.handle = bo->handle;
ret = drmCommandWriteRead(radeon->fd, DRM_RADEON_GEM_GET_TILING,
&args, sizeof(args));
if (ret)
return ret;
-
+
*tiling_flags = args.tiling_flags;
*pitch = args.pitch;
return ret;
diff --git a/src/gallium/winsys/r600/drm/radeon_pciid.c b/src/gallium/winsys/r600/drm/radeon_pciid.c
index 4e1e746..851ab9f 100644
--- a/src/gallium/winsys/r600/drm/radeon_pciid.c
+++ b/src/gallium/winsys/r600/drm/radeon_pciid.c
@@ -40,29 +40,29 @@ struct pci_id radeon_pci_id[] = {
{0x1002, 0x3E54, CHIP_RV380},
{0x1002, 0x4136, CHIP_RS100},
{0x1002, 0x4137, CHIP_RS200},
- {0x1002, 0x4144, CHIP_R300},
- {0x1002, 0x4145, CHIP_R300},
- {0x1002, 0x4146, CHIP_R300},
- {0x1002, 0x4147, CHIP_R300},
- {0x1002, 0x4148, CHIP_R350},
- {0x1002, 0x4149, CHIP_R350},
- {0x1002, 0x414A, CHIP_R350},
- {0x1002, 0x414B, CHIP_R350},
- {0x1002, 0x4150, CHIP_RV350},
- {0x1002, 0x4151, CHIP_RV350},
- {0x1002, 0x4152, CHIP_RV350},
- {0x1002, 0x4153, CHIP_RV350},
- {0x1002, 0x4154, CHIP_RV350},
- {0x1002, 0x4155, CHIP_RV350},
- {0x1002, 0x4156, CHIP_RV350},
+ {0x1002, 0x4144, CHIP_R300},
+ {0x1002, 0x4145, CHIP_R300},
+ {0x1002, 0x4146, CHIP_R300},
+ {0x1002, 0x4147, CHIP_R300},
+ {0x1002, 0x4148, CHIP_R350},
+ {0x1002, 0x4149, CHIP_R350},
+ {0x1002, 0x414A, CHIP_R350},
+ {0x1002, 0x414B, CHIP_R350},
+ {0x1002, 0x4150, CHIP_RV350},
+ {0x1002, 0x4151, CHIP_RV350},
+ {0x1002, 0x4152, CHIP_RV350},
+ {0x1002, 0x4153, CHIP_RV350},
+ {0x1002, 0x4154, CHIP_RV350},
+ {0x1002, 0x4155, CHIP_RV350},
+ {0x1002, 0x4156, CHIP_RV350},
{0x1002, 0x4237, CHIP_RS200},
- {0x1002, 0x4242, CHIP_R200},
- {0x1002, 0x4243, CHIP_R200},
+ {0x1002, 0x4242, CHIP_R200},
+ {0x1002, 0x4243, CHIP_R200},
{0x1002, 0x4336, CHIP_RS100},
{0x1002, 0x4337, CHIP_RS200},
{0x1002, 0x4437, CHIP_RS200},
- {0x1002, 0x4966, CHIP_RV250},
- {0x1002, 0x4967, CHIP_RV250},
+ {0x1002, 0x4966, CHIP_RV250},
+ {0x1002, 0x4967, CHIP_RV250},
{0x1002, 0x4A48, CHIP_R420},
{0x1002, 0x4A49, CHIP_R420},
{0x1002, 0x4A4A, CHIP_R420},
@@ -85,14 +85,14 @@ struct pci_id radeon_pci_id[] = {
{0x1002, 0x4C64, CHIP_RV250},
{0x1002, 0x4C66, CHIP_RV250},
{0x1002, 0x4C67, CHIP_RV250},
- {0x1002, 0x4E44, CHIP_R300},
- {0x1002, 0x4E45, CHIP_R300},
- {0x1002, 0x4E46, CHIP_R300},
- {0x1002, 0x4E47, CHIP_R300},
- {0x1002, 0x4E48, CHIP_R350},
- {0x1002, 0x4E49, CHIP_R350},
- {0x1002, 0x4E4A, CHIP_R350},
- {0x1002, 0x4E4B, CHIP_R350},
+ {0x1002, 0x4E44, CHIP_R300},
+ {0x1002, 0x4E45, CHIP_R300},
+ {0x1002, 0x4E46, CHIP_R300},
+ {0x1002, 0x4E47, CHIP_R300},
+ {0x1002, 0x4E48, CHIP_R350},
+ {0x1002, 0x4E49, CHIP_R350},
+ {0x1002, 0x4E4A, CHIP_R350},
+ {0x1002, 0x4E4B, CHIP_R350},
{0x1002, 0x4E50, CHIP_RV350},
{0x1002, 0x4E51, CHIP_RV350},
{0x1002, 0x4E52, CHIP_RV350},
@@ -103,13 +103,13 @@ struct pci_id radeon_pci_id[] = {
{0x1002, 0x5145, CHIP_R100},
{0x1002, 0x5146, CHIP_R100},
{0x1002, 0x5147, CHIP_R100},
- {0x1002, 0x5148, CHIP_R200},
- {0x1002, 0x514C, CHIP_R200},
- {0x1002, 0x514D, CHIP_R200},
- {0x1002, 0x5157, CHIP_RV200},
- {0x1002, 0x5158, CHIP_RV200},
- {0x1002, 0x5159, CHIP_RV100},
- {0x1002, 0x515A, CHIP_RV100},
+ {0x1002, 0x5148, CHIP_R200},
+ {0x1002, 0x514C, CHIP_R200},
+ {0x1002, 0x514D, CHIP_R200},
+ {0x1002, 0x5157, CHIP_RV200},
+ {0x1002, 0x5158, CHIP_RV200},
+ {0x1002, 0x5159, CHIP_RV100},
+ {0x1002, 0x515A, CHIP_RV100},
{0x1002, 0x515E, CHIP_RV100},
{0x1002, 0x5460, CHIP_RV380},
{0x1002, 0x5462, CHIP_RV380},
@@ -138,10 +138,10 @@ struct pci_id radeon_pci_id[] = {
{0x1002, 0x5955, CHIP_RS480},
{0x1002, 0x5974, CHIP_RS480},
{0x1002, 0x5975, CHIP_RS480},
- {0x1002, 0x5960, CHIP_RV280},
- {0x1002, 0x5961, CHIP_RV280},
- {0x1002, 0x5962, CHIP_RV280},
- {0x1002, 0x5964, CHIP_RV280},
+ {0x1002, 0x5960, CHIP_RV280},
+ {0x1002, 0x5961, CHIP_RV280},
+ {0x1002, 0x5962, CHIP_RV280},
+ {0x1002, 0x5964, CHIP_RV280},
{0x1002, 0x5965, CHIP_RV280},
{0x1002, 0x5969, CHIP_RV100},
{0x1002, 0x5a41, CHIP_RS400},
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c
index dc4b517..4a1d472 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c
@@ -313,7 +313,7 @@ radeon_drm_bufmgr_create_buffer(struct pb_manager *_mgr,
error2:
FREE(buf);
error1:
- return NULL;
+ return NULL;
}
static void
diff --git a/src/gallium/winsys/svga/drm/SConscript b/src/gallium/winsys/svga/drm/SConscript
index b049ea6..5864533 100644
--- a/src/gallium/winsys/svga/drm/SConscript
+++ b/src/gallium/winsys/svga/drm/SConscript
@@ -7,11 +7,11 @@ env.ParseConfig('pkg-config --cflags libdrm')
if env['gcc']:
env.Append(CCFLAGS = ['-fvisibility=hidden'])
env.Append(CPPDEFINES = [
- 'HAVE_STDINT_H',
+ 'HAVE_STDINT_H',
'HAVE_SYS_TYPES_H',
'-D_FILE_OFFSET_BITS=64',
])
-
+
env.Prepend(CPPPATH = [
'include',
'#/src/gallium/drivers/svga',
diff --git a/src/gallium/winsys/svga/drm/vmw_buffer.c b/src/gallium/winsys/svga/drm/vmw_buffer.c
index eca174a..58ab1d0 100644
--- a/src/gallium/winsys/svga/drm/vmw_buffer.c
+++ b/src/gallium/winsys/svga/drm/vmw_buffer.c
@@ -26,15 +26,15 @@
/**
* @file
* SVGA buffer manager for Guest Memory Regions (GMRs).
- *
+ *
* GMRs are used for pixel and vertex data upload/download to/from the virtual
- * SVGA hardware. There is a limited number of GMRs available, and
- * creating/destroying them is also a slow operation so we must suballocate
+ * SVGA hardware. There is a limited number of GMRs available, and
+ * creating/destroying them is also a slow operation so we must suballocate
* them.
- *
+ *
* This file implements a pipebuffer library's buffer manager, so that we can
- * use pipepbuffer's suballocation, fencing, and debugging facilities with GMRs.
- *
+ * use pipepbuffer's suballocation, fencing, and debugging facilities with GMRs.
+ *
* @author Jose Fonseca
*/
@@ -58,12 +58,12 @@ struct vmw_gmr_bufmgr;
struct vmw_gmr_buffer
{
struct pb_buffer base;
-
+
struct vmw_gmr_bufmgr *mgr;
-
+
struct vmw_region *region;
void *map;
-
+
#ifdef DEBUG
struct pipe_fence_handle *last_fence;
#endif
@@ -85,7 +85,7 @@ vmw_gmr_buffer(struct pb_buffer *buf)
struct vmw_gmr_bufmgr
{
struct pb_manager base;
-
+
struct vmw_winsys_screen *vws;
};
@@ -111,7 +111,7 @@ vmw_gmr_buffer_destroy(struct pb_buffer *_buf)
#endif
vmw_ioctl_region_unmap(buf->region);
-
+
vmw_ioctl_region_destroy(buf->region);
FREE(buf);
@@ -146,7 +146,7 @@ vmw_gmr_buffer_get_base_buffer(struct pb_buffer *buf,
static enum pipe_error
-vmw_gmr_buffer_validate( struct pb_buffer *_buf,
+vmw_gmr_buffer_validate( struct pb_buffer *_buf,
struct pb_validate *vl,
unsigned flags )
{
@@ -156,11 +156,11 @@ vmw_gmr_buffer_validate( struct pb_buffer *_buf,
static void
-vmw_gmr_buffer_fence( struct pb_buffer *_buf,
+vmw_gmr_buffer_fence( struct pb_buffer *_buf,
struct pipe_fence_handle *fence )
{
/* We don't need to do anything, as the pipebuffer library
- * will take care of delaying the destruction of fenced buffers */
+ * will take care of delaying the destruction of fenced buffers */
#ifdef DEBUG
struct vmw_gmr_buffer *buf = vmw_gmr_buffer(_buf);
if(fence)
@@ -182,12 +182,12 @@ const struct pb_vtbl vmw_gmr_buffer_vtbl = {
static struct pb_buffer *
vmw_gmr_bufmgr_create_buffer(struct pb_manager *_mgr,
pb_size size,
- const struct pb_desc *desc)
+ const struct pb_desc *desc)
{
struct vmw_gmr_bufmgr *mgr = vmw_gmr_bufmgr(_mgr);
struct vmw_winsys_screen *vws = mgr->vws;
struct vmw_gmr_buffer *buf;
-
+
buf = CALLOC_STRUCT(vmw_gmr_buffer);
if(!buf)
goto error1;
@@ -202,7 +202,7 @@ vmw_gmr_bufmgr_create_buffer(struct pb_manager *_mgr,
buf->region = vmw_ioctl_region_create(vws, size);
if(!buf->region)
goto error2;
-
+
buf->map = vmw_ioctl_region_map(buf->region);
if(!buf->map)
goto error3;
@@ -219,14 +219,14 @@ vmw_gmr_bufmgr_create_buffer(struct pb_manager *_mgr,
static void
-vmw_gmr_bufmgr_flush(struct pb_manager *mgr)
+vmw_gmr_bufmgr_flush(struct pb_manager *mgr)
{
/* No-op */
}
static void
-vmw_gmr_bufmgr_destroy(struct pb_manager *_mgr)
+vmw_gmr_bufmgr_destroy(struct pb_manager *_mgr)
{
struct vmw_gmr_bufmgr *mgr = vmw_gmr_bufmgr(_mgr);
FREE(mgr);
@@ -234,10 +234,10 @@ vmw_gmr_bufmgr_destroy(struct pb_manager *_mgr)
struct pb_manager *
-vmw_gmr_bufmgr_create(struct vmw_winsys_screen *vws)
+vmw_gmr_bufmgr_create(struct vmw_winsys_screen *vws)
{
struct vmw_gmr_bufmgr *mgr;
-
+
mgr = CALLOC_STRUCT(vmw_gmr_bufmgr);
if(!mgr)
return NULL;
@@ -245,30 +245,30 @@ vmw_gmr_bufmgr_create(struct vmw_winsys_screen *vws)
mgr->base.destroy = vmw_gmr_bufmgr_destroy;
mgr->base.create_buffer = vmw_gmr_bufmgr_create_buffer;
mgr->base.flush = vmw_gmr_bufmgr_flush;
-
+
mgr->vws = vws;
-
+
return &mgr->base;
}
boolean
-vmw_gmr_bufmgr_region_ptr(struct pb_buffer *buf,
+vmw_gmr_bufmgr_region_ptr(struct pb_buffer *buf,
struct SVGAGuestPtr *ptr)
{
struct pb_buffer *base_buf;
unsigned offset = 0;
struct vmw_gmr_buffer *gmr_buf;
-
+
pb_get_base_buffer( buf, &base_buf, &offset );
-
+
gmr_buf = vmw_gmr_buffer(base_buf);
if(!gmr_buf)
return FALSE;
-
+
*ptr = vmw_ioctl_region_ptr(gmr_buf->region);
-
+
ptr->offset += offset;
-
+
return TRUE;
}
diff --git a/src/gallium/winsys/svga/drm/vmw_buffer.h b/src/gallium/winsys/svga/drm/vmw_buffer.h
index 41fb447..b650b4c 100644
--- a/src/gallium/winsys/svga/drm/vmw_buffer.h
+++ b/src/gallium/winsys/svga/drm/vmw_buffer.h
@@ -58,7 +58,7 @@ struct pb_manager *
vmw_gmr_bufmgr_create(struct vmw_winsys_screen *vws);
boolean
-vmw_gmr_bufmgr_region_ptr(struct pb_buffer *buf,
+vmw_gmr_bufmgr_region_ptr(struct pb_buffer *buf,
struct SVGAGuestPtr *ptr);
diff --git a/src/gallium/winsys/svga/drm/vmw_context.c b/src/gallium/winsys/svga/drm/vmw_context.c
index 11626ee..be0d28a 100644
--- a/src/gallium/winsys/svga/drm/vmw_context.c
+++ b/src/gallium/winsys/svga/drm/vmw_context.c
@@ -78,7 +78,7 @@ struct vmw_svga_winsys_context
uint32_t staged;
uint32_t reserved;
} surface;
-
+
struct {
struct vmw_region_relocation relocs[VMW_REGION_RELOCS];
uint32_t size;
@@ -143,7 +143,7 @@ vmw_swc_flush(struct svga_winsys_context *swc,
ret = pb_validate_validate(vswc->validate);
assert(ret == PIPE_OK);
if(ret == PIPE_OK) {
-
+
/* Apply relocations */
for(i = 0; i < vswc->region.used; ++i) {
struct vmw_region_relocation *reloc = &vswc->region.relocs[i];
@@ -240,13 +240,13 @@ vmw_swc_reserve(struct svga_winsys_context *swc,
assert(vswc->command.used + nr_bytes <= vswc->command.size);
assert(vswc->surface.used + nr_relocs <= vswc->surface.size);
assert(vswc->region.used + nr_relocs <= vswc->region.size);
-
+
vswc->command.reserved = nr_bytes;
vswc->surface.reserved = nr_relocs;
vswc->surface.staged = 0;
vswc->region.reserved = nr_relocs;
vswc->region.staged = 0;
-
+
return vswc->command.buffer + vswc->command.used;
}
@@ -288,7 +288,7 @@ vmw_swc_region_relocation(struct svga_winsys_context *swc,
struct vmw_region_relocation *reloc;
unsigned translated_flags;
enum pipe_error ret;
-
+
assert(vswc->region.staged < vswc->region.reserved);
reloc = &vswc->region.relocs[vswc->region.used + vswc->region.staged];
diff --git a/src/gallium/winsys/svga/drm/vmw_fence.c b/src/gallium/winsys/svga/drm/vmw_fence.c
index 873dd51..31d56fe 100644
--- a/src/gallium/winsys/svga/drm/vmw_fence.c
+++ b/src/gallium/winsys/svga/drm/vmw_fence.c
@@ -32,7 +32,7 @@
-struct vmw_fence_ops
+struct vmw_fence_ops
{
struct pb_fence_ops base;
@@ -87,7 +87,7 @@ vmw_fence_ops_destroy(struct pb_fence_ops *ops)
struct pb_fence_ops *
-vmw_fence_ops_create(struct vmw_winsys_screen *vws)
+vmw_fence_ops_create(struct vmw_winsys_screen *vws)
{
struct vmw_fence_ops *ops;
diff --git a/src/gallium/winsys/svga/drm/vmw_fence.h b/src/gallium/winsys/svga/drm/vmw_fence.h
index 5357b4f..430e808 100644
--- a/src/gallium/winsys/svga/drm/vmw_fence.h
+++ b/src/gallium/winsys/svga/drm/vmw_fence.h
@@ -53,7 +53,7 @@ vmw_pipe_fence( uint32_t fence )
struct pb_fence_ops *
-vmw_fence_ops_create(struct vmw_winsys_screen *vws);
+vmw_fence_ops_create(struct vmw_winsys_screen *vws);
#endif /* VMW_FENCE_H_ */
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
index d92ba38..648e126 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
@@ -418,14 +418,14 @@ vmw_ioctl_fence_signalled(struct vmw_winsys_screen *vws,
{
uint32_t expected;
uint32_t current;
-
+
assert(fence);
if(!fence)
return 0;
-
+
expected = fence;
current = vws->ioctl.fifo_map[SVGA_FIFO_FENCE];
-
+
if ((int32)(current - expected) >= 0)
return 0; /* fence passed */
else
@@ -434,7 +434,7 @@ vmw_ioctl_fence_signalled(struct vmw_winsys_screen *vws,
static void
-vmw_ioctl_sync(struct vmw_winsys_screen *vws,
+vmw_ioctl_sync(struct vmw_winsys_screen *vws,
uint32_t fence)
{
uint32_t cur_fence;
@@ -466,13 +466,13 @@ vmw_ioctl_fence_finish(struct vmw_winsys_screen *vws,
uint32_t fence)
{
assert(fence);
-
+
if(fence) {
if(vmw_ioctl_fence_signalled(vws, fence) != 0) {
vmw_ioctl_sync(vws, fence);
}
}
-
+
return 0;
}
diff --git a/src/gallium/winsys/svga/drm/vmw_surface.h b/src/gallium/winsys/svga/drm/vmw_surface.h
index 3d61595..619bd3d 100644
--- a/src/gallium/winsys/svga/drm/vmw_surface.h
+++ b/src/gallium/winsys/svga/drm/vmw_surface.h
@@ -26,7 +26,7 @@
/**
* @file
* Surfaces for VMware SVGA winsys.
- *
+ *
* @author Jose Fonseca
*/
diff --git a/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c b/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
index 2e12f6e..0c0323d 100644
--- a/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
+++ b/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c
@@ -79,9 +79,9 @@ gdi_sw_is_displaytarget_format_supported( struct sw_winsys *ws,
case PIPE_FORMAT_B8G8R8A8_UNORM:
return TRUE;
- /* TODO: Support other formats possible with BMPs, as described in
+ /* TODO: Support other formats possible with BMPs, as described in
* http://msdn.microsoft.com/en-us/library/dd183376(VS.85).aspx */
-
+
default:
return FALSE;
}
@@ -129,7 +129,7 @@ gdi_sw_displaytarget_create(struct sw_winsys *winsys,
struct gdi_sw_displaytarget *gdt;
unsigned cpp;
unsigned bpp;
-
+
gdt = CALLOC_STRUCT(gdi_sw_displaytarget);
if(!gdt)
goto no_gdt;
@@ -140,10 +140,10 @@ gdi_sw_displaytarget_create(struct sw_winsys *winsys,
bpp = util_format_get_blocksizebits(format);
cpp = util_format_get_blocksize(format);
-
+
gdt->stride = align(width * cpp, alignment);
gdt->size = gdt->stride * height;
-
+
gdt->data = align_malloc(gdt->size, alignment);
if(!gdt->data)
goto no_data;
@@ -205,7 +205,7 @@ gdi_sw_display( struct sw_winsys *winsys,
}
static void
-gdi_sw_displaytarget_display(struct sw_winsys *winsys,
+gdi_sw_displaytarget_display(struct sw_winsys *winsys,
struct sw_displaytarget *dt,
void *context_private)
{
diff --git a/src/gallium/winsys/sw/null/Makefile b/src/gallium/winsys/sw/null/Makefile
index b1882b5..620434e 100644
--- a/src/gallium/winsys/sw/null/Makefile
+++ b/src/gallium/winsys/sw/null/Makefile
@@ -9,7 +9,7 @@ LIBRARY_INCLUDES = \
-I$(TOP)/src/gallium/auxiliary
C_SOURCES = \
- null_sw_winsys.c
+ null_sw_winsys.c
include ../../../Makefile.template
diff --git a/src/gallium/winsys/sw/null/null_sw_winsys.c b/src/gallium/winsys/sw/null/null_sw_winsys.c
index 73b777f..4e8457d 100644
--- a/src/gallium/winsys/sw/null/null_sw_winsys.c
+++ b/src/gallium/winsys/sw/null/null_sw_winsys.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2010 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,25 +10,25 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
**************************************************************************/
/**
* @file
* Null software rasterizer winsys.
- *
+ *
* There is no present support. Framebuffer data needs to be obtained via
* transfers.
*
diff --git a/src/gallium/winsys/sw/xlib/Makefile b/src/gallium/winsys/sw/xlib/Makefile
index c669389..02e39af 100644
--- a/src/gallium/winsys/sw/xlib/Makefile
+++ b/src/gallium/winsys/sw/xlib/Makefile
@@ -10,7 +10,7 @@ LIBRARY_INCLUDES = \
$(X11_CFLAGS)
C_SOURCES = \
- xlib_sw_winsys.c
+ xlib_sw_winsys.c
include ../../../Makefile.template
diff --git a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
index 3aef8da..e8b3e9f 100644
--- a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
+++ b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Bismarck, ND., USA
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -10,20 +10,20 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
- *
+ *
+ *
**************************************************************************/
/*
@@ -252,7 +252,7 @@ xlib_displaytarget_destroy(struct sw_winsys *ws,
if (xlib_dt->shminfo.shmid >= 0) {
shmdt(xlib_dt->shminfo.shmaddr);
shmctl(xlib_dt->shminfo.shmid, IPC_RMID, 0);
-
+
xlib_dt->shminfo.shmid = -1;
xlib_dt->shminfo.shmaddr = (char *) -1;
diff --git a/src/glsl/README b/src/glsl/README
index dd80a53..4b03b28 100644
--- a/src/glsl/README
+++ b/src/glsl/README
@@ -134,9 +134,9 @@ or vector level? If we do it at the vector level, we're going to end
up with many different versions of the variable when encountering code
like:
-(assign (constant bool (1)) (swiz x (var_ref __retval) ) (var_ref a) )
-(assign (constant bool (1)) (swiz y (var_ref __retval) ) (var_ref b) )
-(assign (constant bool (1)) (swiz z (var_ref __retval) ) (var_ref c) )
+(assign (constant bool (1)) (swiz x (var_ref __retval) ) (var_ref a) )
+(assign (constant bool (1)) (swiz y (var_ref __retval) ) (var_ref b) )
+(assign (constant bool (1)) (swiz z (var_ref __retval) ) (var_ref c) )
If every masked update of a component relies on the previous value of
the variable, then we're probably going to be quite limited in our
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index da11f5a..e547247 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -309,7 +309,7 @@ class ast_declaration : public ast_node {
virtual void print(void) const;
char *identifier;
-
+
int is_array;
ast_expression *array_size;
@@ -439,7 +439,7 @@ class ast_type_specifier : public ast_node {
ast_type_specifier(int specifier);
/** Construct a type specifier from a type name */
- ast_type_specifier(const char *name)
+ ast_type_specifier(const char *name)
: type_specifier(ast_type_name), type_name(name), structure(NULL),
is_array(false), array_size(NULL), precision(ast_precision_none),
is_precision_statement(false)
@@ -661,7 +661,7 @@ class ast_iteration_statement : public ast_node {
ast_while,
ast_do_while
} mode;
-
+
ast_node *init_statement;
ast_node *condition;
diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp
index 9ff0c0d..a35694b 100644
--- a/src/glsl/ast_function.cpp
+++ b/src/glsl/ast_function.cpp
@@ -1258,7 +1258,7 @@ ast_function_expression::hir(exec_list *instructions,
process_parameters(instructions, &actual_parameters, &this->expressions,
state);
- return match_function_by_name(instructions,
+ return match_function_by_name(instructions,
id->primary_expression.identifier, & loc,
&actual_parameters, state);
}
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index ec25bcb..4ffe878 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -1630,7 +1630,7 @@ ast_expression::hir(exec_list *instructions,
* tree. This particular use must be at location specified in the grammar
* as 'variable_identifier'.
*/
- ir_variable *var =
+ ir_variable *var =
state->symbols->get_variable(this->primary_expression.identifier);
result = new(ctx) ir_dereference_variable(var);
diff --git a/src/glsl/glcpp/glcpp-lex.c b/src/glsl/glcpp/glcpp-lex.c
index 3e1b918..3ec49ac 100644
--- a/src/glsl/glcpp/glcpp-lex.c
+++ b/src/glsl/glcpp/glcpp-lex.c
@@ -34,7 +34,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -51,7 +51,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
@@ -175,7 +175,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -237,7 +237,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -704,9 +704,9 @@ static int yy_init_globals (yyscan_t yyscanner );
/* This must go here because YYSTYPE and YYLTYPE are included
* from bison output in section 1.*/
# define yylval yyg->yylval_r
-
+
# define yylloc yyg->yylloc_r
-
+
int glcpp_lex_init (yyscan_t* scanner);
int glcpp_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -749,9 +749,9 @@ YYSTYPE * glcpp_get_lval (yyscan_t yyscanner );
void glcpp_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
YYLTYPE *glcpp_get_lloc (yyscan_t yyscanner );
-
+
void glcpp_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -765,7 +765,7 @@ extern int glcpp_wrap (yyscan_t yyscanner );
#endif
static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
-
+
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif
@@ -785,11 +785,11 @@ static int input (yyscan_t yyscanner );
#endif
static void yy_push_state (int new_state ,yyscan_t yyscanner);
-
+
static void yy_pop_state (yyscan_t yyscanner );
-
+
static int yy_top_state (yyscan_t yyscanner );
-
+
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
@@ -1896,7 +1896,7 @@ static void glcpp__load_buffer_state (yyscan_t yyscanner)
YY_BUFFER_STATE glcpp__create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) glcpp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in glcpp__create_buffer()" );
@@ -1962,7 +1962,7 @@ static void glcpp__load_buffer_state (yyscan_t yyscanner)
}
b->yy_is_interactive = 0;
-
+
errno = oerrno;
}
@@ -2068,9 +2068,9 @@ static void glcpp_ensure_buffer_stack (yyscan_t yyscanner)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in glcpp_ensure_buffer_stack()" );
-
+
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_top = 0;
return;
@@ -2099,12 +2099,12 @@ static void glcpp_ensure_buffer_stack (yyscan_t yyscanner)
* @param base the character buffer
* @param size the size in bytes of the character buffer
* @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE glcpp__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -2140,7 +2140,7 @@ YY_BUFFER_STATE glcpp__scan_buffer (char * base, yy_size_t size , yyscan_t yys
*/
YY_BUFFER_STATE glcpp__scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
-
+
return glcpp__scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
@@ -2157,7 +2157,7 @@ YY_BUFFER_STATE glcpp__scan_bytes (yyconst char * yybytes, int _yybytes_len ,
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) glcpp_alloc(n ,yyscanner );
@@ -2265,10 +2265,10 @@ YY_EXTRA_TYPE glcpp_get_extra (yyscan_t yyscanner)
int glcpp_get_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yylineno;
}
@@ -2278,10 +2278,10 @@ int glcpp_get_lineno (yyscan_t yyscanner)
int glcpp_get_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yycolumn;
}
@@ -2342,8 +2342,8 @@ void glcpp_set_lineno (int line_number , yyscan_t yyscanner)
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "glcpp_set_lineno called with no buffer" , yyscanner);
-
+ yy_fatal_error( "glcpp_set_lineno called with no buffer" , yyscanner);
+
yylineno = line_number;
}
@@ -2357,8 +2357,8 @@ void glcpp_set_column (int column_no , yyscan_t yyscanner)
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "glcpp_set_column called with no buffer" , yyscanner);
-
+ yy_fatal_error( "glcpp_set_column called with no buffer" , yyscanner);
+
yycolumn = column_no;
}
@@ -2411,13 +2411,13 @@ YYLTYPE *glcpp_get_lloc (yyscan_t yyscanner)
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylloc;
}
-
+
void glcpp_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylloc = yylloc_param;
}
-
+
/* User-visible API */
/* glcpp_lex_init is special because it creates the scanner itself, so it is
@@ -2465,20 +2465,20 @@ int glcpp_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals
errno = EINVAL;
return 1;
}
-
+
*ptr_yy_globals = (yyscan_t) glcpp_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-
+
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
return 1;
}
-
+
/* By setting to 0xAA, we expose bugs in
yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
+
glcpp_set_extra (yy_user_defined, *ptr_yy_globals);
-
+
return yy_init_globals ( *ptr_yy_globals );
}
diff --git a/src/glsl/glcpp/glcpp-parse.c b/src/glsl/glcpp/glcpp-parse.c
index 46e690d..34263f6 100644
--- a/src/glsl/glcpp/glcpp-parse.c
+++ b/src/glsl/glcpp/glcpp-parse.c
@@ -1,20 +1,20 @@
/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
-
+
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2009, 2010 Free Software Foundation, Inc.
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see . */
@@ -27,7 +27,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -1894,7 +1894,7 @@ YYLTYPE yylloc;
parser->skip_stack->type == SKIP_NO_SKIP)
{
_glcpp_parser_expand_if (parser, IF_EXPANDED, (yyvsp[(2) - (3)].token_list));
- }
+ }
else
{
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), 0);
@@ -1914,7 +1914,7 @@ YYLTYPE yylloc;
parser->skip_stack->type == SKIP_NO_SKIP)
{
glcpp_error(& (yylsp[(1) - (2)]), parser, "#if with no expression");
- }
+ }
_glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (2)]), 0);
;}
break;
@@ -2289,7 +2289,7 @@ YYLTYPE yylloc;
/* Line 1464 of yacc.c */
#line 432 "glcpp/glcpp-parse.y"
{
- (yyval.string_list) = (yyvsp[(1) - (3)].string_list);
+ (yyval.string_list) = (yyvsp[(1) - (3)].string_list);
_string_list_append_item ((yyval.string_list), (yyvsp[(3) - (3)].str));
ralloc_steal ((yyval.string_list), (yyvsp[(3) - (3)].str));
;}
@@ -3206,7 +3206,7 @@ _token_list_equal_ignoring_space (token_list_t *a, token_list_t *b)
switch (node_a->token->type) {
case INTEGER:
- if (node_a->token->value.ival !=
+ if (node_a->token->value.ival !=
node_b->token->value.ival)
{
return 0;
@@ -3494,7 +3494,7 @@ typedef enum function_status
*
* FUNCTION_STATUS_SUCCESS:
*
- * Successfully parsed a set of function arguments.
+ * Successfully parsed a set of function arguments.
*
* FUNCTION_NOT_A_FUNCTION:
*
@@ -3613,7 +3613,7 @@ static token_list_t *
_glcpp_parser_expand_function (glcpp_parser_t *parser,
token_node_t *node,
token_node_t **last)
-
+
{
macro_t *macro;
const char *identifier;
@@ -3647,7 +3647,7 @@ _glcpp_parser_expand_function (glcpp_parser_t *parser,
return _token_list_create_with_one_space (parser);
}
- if (! ((_argument_list_length (arguments) ==
+ if (! ((_argument_list_length (arguments) ==
_string_list_length (macro->parameters)) ||
(_string_list_length (macro->parameters) == 0 &&
_argument_list_length (arguments) == 1 &&
@@ -3914,7 +3914,7 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
parser->active = _active_list_push (parser->active,
node->token->value.str,
last->next);
-
+
/* Splice expansion into list, supporting a
* simple deletion if the expansion is
* empty. */
diff --git a/src/glsl/glcpp/glcpp-parse.h b/src/glsl/glcpp/glcpp-parse.h
index 4055685..0959dc8 100644
--- a/src/glsl/glcpp/glcpp-parse.h
+++ b/src/glsl/glcpp/glcpp-parse.h
@@ -1,20 +1,20 @@
/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
-
+
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2009, 2010 Free Software Foundation, Inc.
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see . */
@@ -27,7 +27,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 7c51299..577add0 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -235,7 +235,7 @@ control_line:
parser->skip_stack->type == SKIP_NO_SKIP)
{
_glcpp_parser_expand_if (parser, IF_EXPANDED, $2);
- }
+ }
else
{
_glcpp_parser_skip_stack_push_if (parser, & @1, 0);
@@ -249,7 +249,7 @@ control_line:
parser->skip_stack->type == SKIP_NO_SKIP)
{
glcpp_error(& @1, parser, "#if with no expression");
- }
+ }
_glcpp_parser_skip_stack_push_if (parser, & @1, 0);
}
| HASH_IFDEF IDENTIFIER junk NEWLINE {
@@ -430,7 +430,7 @@ identifier_list:
ralloc_steal ($$, $1);
}
| identifier_list ',' IDENTIFIER {
- $$ = $1;
+ $$ = $1;
_string_list_append_item ($$, $3);
ralloc_steal ($$, $3);
}
@@ -881,7 +881,7 @@ _token_list_equal_ignoring_space (token_list_t *a, token_list_t *b)
switch (node_a->token->type) {
case INTEGER:
- if (node_a->token->value.ival !=
+ if (node_a->token->value.ival !=
node_b->token->value.ival)
{
return 0;
@@ -1169,7 +1169,7 @@ typedef enum function_status
*
* FUNCTION_STATUS_SUCCESS:
*
- * Successfully parsed a set of function arguments.
+ * Successfully parsed a set of function arguments.
*
* FUNCTION_NOT_A_FUNCTION:
*
@@ -1288,7 +1288,7 @@ static token_list_t *
_glcpp_parser_expand_function (glcpp_parser_t *parser,
token_node_t *node,
token_node_t **last)
-
+
{
macro_t *macro;
const char *identifier;
@@ -1322,7 +1322,7 @@ _glcpp_parser_expand_function (glcpp_parser_t *parser,
return _token_list_create_with_one_space (parser);
}
- if (! ((_argument_list_length (arguments) ==
+ if (! ((_argument_list_length (arguments) ==
_string_list_length (macro->parameters)) ||
(_string_list_length (macro->parameters) == 0 &&
_argument_list_length (arguments) == 1 &&
@@ -1589,7 +1589,7 @@ _glcpp_parser_expand_token_list (glcpp_parser_t *parser,
parser->active = _active_list_push (parser->active,
node->token->value.str,
last->next);
-
+
/* Splice expansion into list, supporting a
* simple deletion if the expansion is
* empty. */
diff --git a/src/glsl/glsl_lexer.cpp b/src/glsl/glsl_lexer.cpp
index 08a2f70..b86e058 100644
--- a/src/glsl/glsl_lexer.cpp
+++ b/src/glsl/glsl_lexer.cpp
@@ -34,7 +34,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -51,7 +51,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
@@ -175,7 +175,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -237,7 +237,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -1120,9 +1120,9 @@ static int yy_init_globals (yyscan_t yyscanner );
/* This must go here because YYSTYPE and YYLTYPE are included
* from bison output in section 1.*/
# define yylval yyg->yylval_r
-
+
# define yylloc yyg->yylloc_r
-
+
int _mesa_glsl_lex_init (yyscan_t* scanner);
int _mesa_glsl_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -1165,9 +1165,9 @@ YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner );
void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner );
-
+
void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -1399,7 +1399,7 @@ YY_RULE_SETUP
#line 99 "glsl_lexer.lpp"
;
YY_BREAK
-/* Preprocessor tokens. */
+/* Preprocessor tokens. */
case 2:
*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
yyg->yy_c_buf_p = yy_cp -= 1;
@@ -2537,7 +2537,7 @@ YY_RULE_SETUP
#line 419 "glsl_lexer.lpp"
{
struct _mesa_glsl_parse_state *state = yyextra;
- void *ctx = state;
+ void *ctx = state;
yylval->identifier = ralloc_strdup(ctx, yytext);
return classify_identifier(state, yytext);
}
@@ -3038,7 +3038,7 @@ static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner)
YY_BUFFER_STATE _mesa_glsl__create_buffer (FILE * file, int size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) _mesa_glsl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" );
@@ -3104,7 +3104,7 @@ static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner)
}
b->yy_is_interactive = 0;
-
+
errno = oerrno;
}
@@ -3210,9 +3210,9 @@ static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner)
, yyscanner);
if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" );
-
+
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_top = 0;
return;
@@ -3241,12 +3241,12 @@ static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner)
* @param base the character buffer
* @param size the size in bytes of the character buffer
* @param yyscanner The scanner object.
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE _mesa_glsl__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -3282,7 +3282,7 @@ YY_BUFFER_STATE _mesa_glsl__scan_buffer (char * base, yy_size_t size , yyscan_
*/
YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char * yystr , yyscan_t yyscanner)
{
-
+
return _mesa_glsl__scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
@@ -3299,7 +3299,7 @@ YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char * yybytes, int _yybytes_l
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) _mesa_glsl_alloc(n ,yyscanner );
@@ -3367,10 +3367,10 @@ YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner)
int _mesa_glsl_get_lineno (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yylineno;
}
@@ -3380,10 +3380,10 @@ int _mesa_glsl_get_lineno (yyscan_t yyscanner)
int _mesa_glsl_get_column (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
+
if (! YY_CURRENT_BUFFER)
return 0;
-
+
return yycolumn;
}
@@ -3444,8 +3444,8 @@ void _mesa_glsl_set_lineno (int line_number , yyscan_t yyscanner)
/* lineno is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "_mesa_glsl_set_lineno called with no buffer" , yyscanner);
-
+ yy_fatal_error( "_mesa_glsl_set_lineno called with no buffer" , yyscanner);
+
yylineno = line_number;
}
@@ -3459,8 +3459,8 @@ void _mesa_glsl_set_column (int column_no , yyscan_t yyscanner)
/* column is only valid if an input buffer exists. */
if (! YY_CURRENT_BUFFER )
- yy_fatal_error( "_mesa_glsl_set_column called with no buffer" , yyscanner);
-
+ yy_fatal_error( "_mesa_glsl_set_column called with no buffer" , yyscanner);
+
yycolumn = column_no;
}
@@ -3513,13 +3513,13 @@ YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner)
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yylloc;
}
-
+
void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yylloc = yylloc_param;
}
-
+
/* User-visible API */
/* _mesa_glsl_lex_init is special because it creates the scanner itself, so it is
@@ -3567,20 +3567,20 @@ int _mesa_glsl_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_glo
errno = EINVAL;
return 1;
}
-
+
*ptr_yy_globals = (yyscan_t) _mesa_glsl_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-
+
if (*ptr_yy_globals == NULL){
errno = ENOMEM;
return 1;
}
-
+
/* By setting to 0xAA, we expose bugs in
yy_init_globals. Leave at 0x00 for releases. */
memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-
+
_mesa_glsl_set_extra (yy_user_defined, *ptr_yy_globals);
-
+
return yy_init_globals ( *ptr_yy_globals );
}
diff --git a/src/glsl/glsl_lexer.lpp b/src/glsl/glsl_lexer.lpp
index 4dc39d2..dff6955 100644
--- a/src/glsl/glsl_lexer.lpp
+++ b/src/glsl/glsl_lexer.lpp
@@ -98,7 +98,7 @@ HASH ^{SPC}#{SPC}
[ \r\t]+ ;
- /* Preprocessor tokens. */
+ /* Preprocessor tokens. */
^[ \t]*#[ \t]*$ ;
^[ \t]*#[ \t]*version { BEGIN PP; return VERSION; }
^[ \t]*#[ \t]*extension { BEGIN PP; return EXTENSION; }
@@ -418,7 +418,7 @@ row_major KEYWORD(130, 999, ROW_MAJOR);
[_a-zA-Z][_a-zA-Z0-9]* {
struct _mesa_glsl_parse_state *state = yyextra;
- void *ctx = state;
+ void *ctx = state;
yylval->identifier = ralloc_strdup(ctx, yytext);
return classify_identifier(state, yytext);
}
diff --git a/src/glsl/glsl_parser.cpp b/src/glsl/glsl_parser.cpp
index 70a0fdb..8579393 100644
--- a/src/glsl/glsl_parser.cpp
+++ b/src/glsl/glsl_parser.cpp
@@ -1,20 +1,20 @@
/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
-
+
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2009, 2010 Free Software Foundation, Inc.
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see . */
@@ -27,7 +27,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -103,7 +103,7 @@
#include
#include
#include
-
+
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_types.h"
diff --git a/src/glsl/glsl_parser.h b/src/glsl/glsl_parser.h
index 7f36492..2c361e5 100644
--- a/src/glsl/glsl_parser.h
+++ b/src/glsl/glsl_parser.h
@@ -1,20 +1,20 @@
/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
-
+
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2009, 2010 Free Software Foundation, Inc.
-
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program. If not, see . */
@@ -27,7 +27,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
diff --git a/src/glsl/glsl_parser.ypp b/src/glsl/glsl_parser.ypp
index eaace32..236b924 100644
--- a/src/glsl/glsl_parser.ypp
+++ b/src/glsl/glsl_parser.ypp
@@ -25,7 +25,7 @@
#include
#include
#include
-
+
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_types.h"
@@ -213,7 +213,7 @@
%type for_rest_statement
%%
-translation_unit:
+translation_unit:
version_statement extension_statement_list
{
_mesa_glsl_initialize_types(state);
@@ -446,7 +446,7 @@ function_call_header_with_parameters:
}
;
- // Grammar Note: Constructors look like functions, but lexical
+ // Grammar Note: Constructors look like functions, but lexical
// analysis recognized most of them as keywords. They are now
// recognized through "type_specifier".
function_call_header:
@@ -501,7 +501,7 @@ method_call_header_with_parameters:
}
;
- // Grammar Note: Constructors look like methods, but lexical
+ // Grammar Note: Constructors look like methods, but lexical
// analysis recognized most of them as keywords. They are now
// recognized through "type_specifier".
method_call_header:
@@ -1680,7 +1680,7 @@ for_rest_statement:
// Grammar Note: No 'goto'. Gotos are not supported.
jump_statement:
- CONTINUE ';'
+ CONTINUE ';'
{
void *ctx = state;
$$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL);
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 3a17db8..eb10c46 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -331,7 +331,7 @@ void
ast_compound_statement::print(void) const
{
printf("{\n");
-
+
foreach_list_const(n, &this->statements) {
ast_node *ast = exec_node_data(ast_node, n, link);
ast->print();
@@ -640,7 +640,7 @@ ast_selection_statement::print(void) const
printf("else ");
else_statement->print();
}
-
+
}
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index 819333d..5b73e9a 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -225,7 +225,7 @@ extern void _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state,
extern void _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state);
union YYSTYPE;
-extern int _mesa_glsl_lex(union YYSTYPE *yylval, YYLTYPE *yylloc,
+extern int _mesa_glsl_lex(union YYSTYPE *yylval, YYLTYPE *yylloc,
void *scanner);
extern int _mesa_glsl_parse(struct _mesa_glsl_parse_state *);
diff --git a/src/glsl/glsl_symbol_table.h b/src/glsl/glsl_symbol_table.h
index 637bc03..a98d6f8 100644
--- a/src/glsl/glsl_symbol_table.h
+++ b/src/glsl/glsl_symbol_table.h
@@ -73,7 +73,7 @@ struct glsl_symbol_table {
ralloc_set_destructor(table, NULL);
ralloc_free(table);
}
-
+
glsl_symbol_table();
~glsl_symbol_table();
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp
index 0e18881..3da0590 100644
--- a/src/glsl/ir_reader.cpp
+++ b/src/glsl/ir_reader.cpp
@@ -76,7 +76,7 @@ _mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions,
ir_read_error(state, NULL, "couldn't parse S-Expression.");
return;
}
-
+
if (scan_for_protos) {
scan_for_prototypes(state, instructions, expr);
if (state->error)
@@ -155,7 +155,7 @@ read_type(_mesa_glsl_parse_state *st, s_expression *expr)
return NULL;
}
}
-
+
s_symbol *type_sym = SX_AS_SYMBOL(expr);
if (type_sym == NULL) {
ir_read_error(st, expr, "expected (symbol or list)");
@@ -734,8 +734,8 @@ read_expression(_mesa_glsl_parse_state *st, s_list *list)
ir_read_error(st, list, "invalid operator: %s", op_sym->value());
return NULL;
}
-
- /* Now that we know the operator, check for the right number of operands */
+
+ /* Now that we know the operator, check for the right number of operands */
if (ir_expression::get_num_operands(op) == 2) {
if (list_length != 5) {
ir_read_error(st, list, "expected (expression %s "
diff --git a/src/glsl/list.h b/src/glsl/list.h
index 1d46365..eed14ee 100644
--- a/src/glsl/list.h
+++ b/src/glsl/list.h
@@ -470,7 +470,7 @@ inline void exec_node::insert_before(exec_list *before)
/**
* This version is safe even if the current node is removed.
- */
+ */
#define foreach_list_safe(__node, __list) \
for (exec_node * __node = (__list)->head, * __next = __node->next \
; __next != NULL \
diff --git a/src/glu/sgi/Makefile.mgw b/src/glu/sgi/Makefile.mgw
index d00d97a..70c4f57 100644
--- a/src/glu/sgi/Makefile.mgw
+++ b/src/glu/sgi/Makefile.mgw
@@ -1,18 +1,18 @@
# Mesa 3-D graphics library
# Version: 5.1
-#
+#
# Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
-#
+#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
-#
+#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
-#
+#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -30,10 +30,10 @@
#
# Updated : by Heromyth, on 2007-7-21
# Email : zxpmyth@yahoo.com.cn
-# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
+# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
# The others havn't been tested yet.
# 2) The generated DLLs are *not* compatible with the ones built
-# with the other compilers like VC8, especially for GLUT.
+# with the other compilers like VC8, especially for GLUT.
# 3) Although more tests are needed, it can be used individually!
#
diff --git a/src/glu/sgi/Makefile.win b/src/glu/sgi/Makefile.win
index 9321732..7d9ed26 100644
--- a/src/glu/sgi/Makefile.win
+++ b/src/glu/sgi/Makefile.win
@@ -113,7 +113,7 @@ LFLAGS = $(dlllflags) $(lcommon) $(LFLAGS)
LIBS = ../lib/$(MESALIB) winmm.lib $(guilibsdll)
OBJS = $(GLU_SRCS_CC:.cc=.obj) $(GLU_SRCS:.c=.obj)
-NURBSINC = -Ilibnurbs\interface -Ilibnurbs\internals -Ilibnurbs\nurbtess
+NURBSINC = -Ilibnurbs\interface -Ilibnurbs\internals -Ilibnurbs\nurbtess
CFLAGS = $(CFLAGS) $(NURBSINC)
$(GLUDLL): $(OBJS) glu.def
@@ -132,12 +132,12 @@ install : $(GLUDLL) $(GLULIB)
-copy $(GLULIB) $(LIBINSTALL)
clean ::
- @del /f libtess\*.obj libutil\*.obj
- @del /f libnurbs\interface\*.obj libnurbs\internals\*.obj
+ @del /f libtess\*.obj libutil\*.obj
+ @del /f libnurbs\interface\*.obj libnurbs\internals\*.obj
@del /f libnurbs\nurbtess\*.obj
# override default inference rule with one that writes the object to
-# the same subdir as the c file.
+# the same subdir as the c file.
.c.obj :
$(cc) $(CFLAGS) -I. $< /Fo$*.obj
diff --git a/src/glu/sgi/glu.def b/src/glu/sgi/glu.def
index 0c8b021..16f56e6 100644
--- a/src/glu/sgi/glu.def
+++ b/src/glu/sgi/glu.def
@@ -11,7 +11,7 @@ VERSION 5.1
;
; The linker exports STDCALL entry points with
; 'decorated' names; e.g., _glBegin@0, where the
-; trailing number is the number of bytes of
+; trailing number is the number of bytes of
; parameter data pushed onto the stack. The
; callee is responsible for popping this data
; off the stack, usually via a RETF n instruction.
diff --git a/src/glu/sgi/libnurbs/interface/bezierPatch.cc b/src/glu/sgi/libnurbs/interface/bezierPatch.cc
index dbab3a1..1324720 100644
--- a/src/glu/sgi/libnurbs/interface/bezierPatch.cc
+++ b/src/glu/sgi/libnurbs/interface/bezierPatch.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -45,7 +45,7 @@
/*
*allocate an instance of bezierPatch. The control points are unknown. But
- *the space of this array is allocated with size of
+ *the space of this array is allocated with size of
* uorder*vorder*dimension
*
*/
@@ -89,7 +89,7 @@ bezierPatch* bezierPatchMake2(float umin, float vmin, float umax, float vmax, in
for(int j=0; jctlpoints[i * the_ustride + j*the_vstride+k] = ctlpoints[i*ustride+j*vstride+k];
-
+
ret->next = NULL;
return ret;
@@ -112,7 +112,7 @@ void bezierPatchDeleteList(bezierPatch *b)
while (b != NULL) {
temp = b;
b = b->next;
- bezierPatchDelete(temp);
+ bezierPatchDelete(temp);
}
}
@@ -130,7 +130,7 @@ void bezierPatchPrint(bezierPatch *b)
printf("uorder=%i, vorder=%i\n", b->uorder, b->vorder);
printf("idmension = %i\n", b->dimension);
}
-
+
/*print the whole list*/
void bezierPatchPrintList(bezierPatch *list)
{
@@ -150,15 +150,15 @@ void bezierPatchEval(bezierPatch *b, float u, float v, float ret[])
}
else if(b->next != NULL)
bezierPatchEval(b->next, u,v, ret);
- else
- bezierSurfEval(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret);
+ else
+ bezierSurfEval(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret);
}
/*the returned normal is normlized
*/
void bezierPatchEvalNormal(bezierPatch *b, float u, float v, float ret[])
{
- bezierSurfEvalNormal(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret);
+ bezierSurfEvalNormal(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret);
if( u >= b->umin && u<= b->umax
&& v >= b->vmin && v<= b->vmax)
@@ -167,8 +167,8 @@ void bezierPatchEvalNormal(bezierPatch *b, float u, float v, float ret[])
}
else if(b->next != NULL)
bezierPatchEvalNormal(b->next, u,v, ret);
- else
- bezierSurfEvalNormal(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret);
+ else
+ bezierSurfEvalNormal(b->umin, b->umax, b->uorder, b->vmin, b->vmax, b->vorder, b->dimension, b->ctlpoints, b->dimension * b->vorder, b->dimension, u, v, ret);
}
@@ -177,9 +177,9 @@ void bezierPatchDraw(bezierPatch *bpatch, int u_reso, int v_reso)
if(bpatch->dimension == 3)
glMap2f(GL_MAP2_VERTEX_3, bpatch->umin, bpatch->umax, 3*bpatch->vorder, bpatch->uorder, bpatch->vmin, bpatch->vmax,3, bpatch->vorder, (GLfloat*) bpatch->ctlpoints);
else
- glMap2f(GL_MAP2_VERTEX_4, bpatch->umin, bpatch->umax, 4*bpatch->vorder, bpatch->uorder, bpatch->vmin, bpatch->vmax,3, bpatch->vorder, (GLfloat*) bpatch->ctlpoints);
+ glMap2f(GL_MAP2_VERTEX_4, bpatch->umin, bpatch->umax, 4*bpatch->vorder, bpatch->uorder, bpatch->vmin, bpatch->vmax,3, bpatch->vorder, (GLfloat*) bpatch->ctlpoints);
- glMapGrid2f(u_reso, bpatch->umin, bpatch->umax,
+ glMapGrid2f(u_reso, bpatch->umin, bpatch->umax,
v_reso, bpatch->vmin, bpatch->vmax);
glEvalMesh2(GL_LINE, 0, u_reso, 0, v_reso);
}
@@ -201,6 +201,6 @@ printf("mapmap\n");
for(temp = list; temp != NULL; temp = temp->next)
bezierPatchDraw(temp, u_reso, v_reso);
}
-
+
diff --git a/src/glu/sgi/libnurbs/interface/bezierPatch.h b/src/glu/sgi/libnurbs/interface/bezierPatch.h
index 981183a..348289a 100644
--- a/src/glu/sgi/libnurbs/interface/bezierPatch.h
+++ b/src/glu/sgi/libnurbs/interface/bezierPatch.h
@@ -36,7 +36,7 @@
typedef struct bezierPatch{
float umin, vmin, umax, vmax;
int uorder; /*order= degree + 1*/
- int vorder;
+ int vorder;
/*
*the control points are stored in a one dimensional array.
@@ -45,13 +45,13 @@ typedef struct bezierPatch{
*where P(i,j) are the control points, B_i(.) are Bezier
*basis functions.
*Each control point can have dimension 3 or 4: (x,y,z,w).
- *The components of P(i,j) are stored in a one dimensional
- *array:
+ *The components of P(i,j) are stored in a one dimensional
+ *array:
* ctlpoints[]
*in the order of:
* P[0,0], P[0,1], ..., P[0,vorder-1],
* P[1,0], P[1,1], ..., P[1,vorder-1],
- * ...
+ * ...
* P[uorder-1,0], P[uorder-1,1], ..., P[uorder-1,vorder-1].
*/
int dimension;
@@ -60,7 +60,7 @@ typedef struct bezierPatch{
/*
*in case we have to manage multiple bezierPatches.
*/
- struct bezierPatch *next;
+ struct bezierPatch *next;
} bezierPatch;
diff --git a/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc b/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc
index ac7ff84..19f6ca8 100644
--- a/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc
+++ b/src/glu/sgi/libnurbs/interface/bezierPatchMesh.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -76,7 +76,7 @@ void bezierPatchMeshListDelete(bezierPatchMesh *list)
{
if(list == NULL) return;
bezierPatchMeshListDelete(list->next);
- bezierPatchMeshDelete(list);
+ bezierPatchMeshDelete(list);
}
@@ -126,7 +126,7 @@ bezierPatchMesh *bezierPatchMeshMake(int maptype, float umin, float umax, int us
for(j=0; jbpatch->ctlpoints[i * the_ustride + j*the_vstride+k] = ctlpoints[i*ustride+j*vstride+k];
-
+
ret->size_UVarray = size_UVarray;
ret->size_length_array = size_length_array;
@@ -203,18 +203,18 @@ void bezierPatchMeshPutPatch(bezierPatchMesh *bpm, int maptype, float umin, floa
break;
case GL_MAP2_TEXTURE_COORD_2:
bpm->bpatch_texcoord = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 2, ustride, vstride, ctlpoints);
- break;
+ break;
case GL_MAP2_TEXTURE_COORD_3:
bpm->bpatch_texcoord = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 3, ustride, vstride, ctlpoints);
- break;
+ break;
case GL_MAP2_TEXTURE_COORD_4:
bpm->bpatch_texcoord = bezierPatchMake2(umin, vmin, umax, vmax, uorder, vorder, 4, ustride, vstride, ctlpoints);
- break;
+ break;
default:
fprintf(stderr, "error in bezierPatchMeshPutPatch, maptype=%i is wrong, maptype,map is invalid\n", maptype);
}
}
-
+
/*delete everything including the arrays. So if you want to output the
*pointers of the arrays, you should not use this function to deallocate space.
@@ -230,7 +230,7 @@ void bezierPatchMeshDelete(bezierPatchMesh *bpm)
bezierPatchDelete(bpm->bpatch_color);
if(bpm->bpatch_texcoord != NULL)
bezierPatchDelete(bpm->bpatch_texcoord);
-
+
free(bpm->UVarray);
free(bpm->length_array);
free(bpm->vertex_array);
@@ -238,7 +238,7 @@ void bezierPatchMeshDelete(bezierPatchMesh *bpm)
free(bpm->type_array);
free(bpm);
}
-
+
/*begin a strip
*type is the primitive type:
*/
@@ -252,10 +252,10 @@ void bezierPatchMeshBeginStrip(bezierPatchMesh *bpm, GLenum type)
void bezierPatchMeshEndStrip(bezierPatchMesh *bpm)
{
int i;
-
+
/*if there are no vertices in this strip, then nothing needs to be done*/
if(bpm->counter == 0) return;
-
+
/*if the length_array is full, it should be expanded*/
if(bpm->index_length_array >= bpm->size_length_array)
{
@@ -265,18 +265,18 @@ void bezierPatchMeshEndStrip(bezierPatchMesh *bpm)
assert(temp_type);
/*update the size*/
bpm->size_length_array = bpm->size_length_array*2 + 1;
-
+
/*copy*/
for(i=0; iindex_length_array; i++)
{
temp[i] = bpm->length_array[i];
temp_type[i] = bpm->type_array[i];
}
-
+
/*deallocate old array*/
free(bpm->length_array);
free(bpm->type_array);
-
+
/*point to the new array which is twice as bigger*/
bpm->length_array = temp;
bpm->type_array = temp_type;
@@ -295,19 +295,19 @@ void bezierPatchMeshInsertUV(bezierPatchMesh *bpm, float u, float v)
{
float *temp = (float*) malloc(sizeof(float) * (bpm->size_UVarray * 2 + 2));
assert(temp);
-
+
/*update the size*/
bpm->size_UVarray = bpm->size_UVarray*2 + 2;
-
+
/*copy*/
for(i=0; iindex_UVarray; i++)
{
temp[i] = bpm->UVarray[i];
}
-
+
/*deallocate old array*/
free(bpm->UVarray);
-
+
/*pointing to the new arrays*/
bpm->UVarray = temp;
}
@@ -445,7 +445,7 @@ void bezierPatchMeshDelDeg(bezierPatchMesh* bpm)
index_new_UVarray=0;
k=0;
for(i=0; iindex_length_array; i++){
-
+
/*(if not degenerate, we have to copy*/
if( (bpm->length_array[i] != 3) || (!isDegenerate(bpm->UVarray+k, bpm->UVarray+k+2, bpm->UVarray+k+4)))
{
@@ -460,7 +460,7 @@ void bezierPatchMeshDelDeg(bezierPatchMesh* bpm)
{
k += 6;
}
- }
+ }
free(bpm->UVarray);
free(bpm->length_array);
free(bpm->type_array);
@@ -469,11 +469,11 @@ void bezierPatchMeshDelDeg(bezierPatchMesh* bpm)
bpm->type_array=new_type_array;
bpm->index_UVarray = index_new_UVarray;
bpm->index_length_array = index_new_length_array;
-
+
}
/*(u,v) to XYZ
- *the xyz and normals are stored in vertex_array,
+ *the xyz and normals are stored in vertex_array,
*and normal_array. the spaces of both are allocated here
*/
void bezierPatchMeshEval(bezierPatchMesh* bpm)
@@ -490,7 +490,7 @@ void bezierPatchMeshEval(bezierPatchMesh* bpm)
int ustride = dimension * vorder;
int vstride = dimension;
float *ctlpoints = bpm->bpatch->ctlpoints;
-
+
bpm->vertex_array = (float*) malloc(sizeof(float)* (bpm->index_UVarray/2) * 3);
assert(bpm->vertex_array);
bpm->normal_array = (float*) malloc(sizeof(float)* (bpm->index_UVarray/2) * 3);
@@ -511,7 +511,7 @@ void bezierPatchMeshEval(bezierPatchMesh* bpm)
}
}
}
-
+
void bezierPatchMeshListEval(bezierPatchMesh* list)
{
bezierPatchMesh* temp;
@@ -559,13 +559,13 @@ void bezierPatchMeshListCollect(bezierPatchMesh* list, float **vertex_array, flo
assert(*normal_array);
*num_strips = bezierPatchMeshListTotalStrips(list);
-
+
*length_array = (int*) malloc(sizeof(int) * (*num_strips));
assert(*length_array);
*type_array = (GLenum*) malloc(sizeof(GLenum) * (*num_strips));
assert(*type_array);
-
+
k=0;
l=0;
for(temp = list; temp != NULL; temp = temp->next)
diff --git a/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h b/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h
index ba6868a..1418edc 100644
--- a/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h
+++ b/src/glu/sgi/libnurbs/interface/bezierPatchMesh.h
@@ -38,7 +38,7 @@
typedef struct bezierPatchMesh{
bezierPatch *bpatch; /*vertex*/
- bezierPatch *bpatch_normal;
+ bezierPatch *bpatch_normal;
bezierPatch *bpatch_texcoord; /*s,t,r,q*/
bezierPatch *bpatch_color; /*RGBA*/
@@ -51,10 +51,10 @@ typedef struct bezierPatchMesh{
int index_UVarray;
int size_length_array;
int index_length_array;
-
+
int counter; /*track the current strip size*/
GLenum type; /*track the current type: 0: GL_TRIANGLES, 1: GL_TRIANGLE_STRIP*/
-
+
/*we eventually want to evaluate from (u,v) to (x,y,z) and draw them*/
float *vertex_array; /*each vertex contains three components*/
float *normal_array; /*each normal contains three components*/
@@ -102,7 +102,7 @@ void bezierPatchMeshDelDeg(bezierPatchMesh* bpm);
void bezierPatchMeshEval(bezierPatchMesh* bpm);
-
+
void bezierPatchMeshDraw(bezierPatchMesh* bpm);
void bezierPatchMeshListDraw(bezierPatchMesh* list);
diff --git a/src/glu/sgi/libnurbs/interface/glcurveval.cc b/src/glu/sgi/libnurbs/interface/glcurveval.cc
index b6591db..158d8b3 100644
--- a/src/glu/sgi/libnurbs/interface/glcurveval.cc
+++ b/src/glu/sgi/libnurbs/interface/glcurveval.cc
@@ -44,8 +44,8 @@
#include "glrenderer.h"
#include "glcurveval.h"
#include "nurbsconsts.h"
-
-OpenGLCurveEvaluator::OpenGLCurveEvaluator(void)
+
+OpenGLCurveEvaluator::OpenGLCurveEvaluator(void)
{
//no default callback functions
beginCallBackN = NULL;
@@ -62,7 +62,7 @@ OpenGLCurveEvaluator::OpenGLCurveEvaluator(void)
texcoordCallBackData = NULL;
userData = NULL;
-
+
vertex_flag = 0;
normal_flag = 0;
color_flag = 0;
@@ -75,8 +75,8 @@ OpenGLCurveEvaluator::OpenGLCurveEvaluator(void)
output_triangles = 0; // don't output triangles by default
}
-OpenGLCurveEvaluator::~OpenGLCurveEvaluator(void)
-{
+OpenGLCurveEvaluator::~OpenGLCurveEvaluator(void)
+{
}
/* added nonsense to avoid the warning messages at compile time */
@@ -143,7 +143,7 @@ OpenGLCurveEvaluator::enable(long type)
* mapgrid1f - define a lattice of points with origin and offset
*-------------------------------------------------------------------------
*/
-void
+void
OpenGLCurveEvaluator::mapgrid1f(long nu, REAL u0, REAL u1)
{
if(output_triangles)
@@ -185,7 +185,7 @@ OpenGLCurveEvaluator::endmap1f(void)
{
if(output_triangles)
{
-
+
}
else
glPopAttrib();
@@ -238,7 +238,7 @@ OpenGLCurveEvaluator::map1f(
which=3;
dimension = 2;
break;
-
+
case GL_MAP1_TEXTURE_COORD_3:
which=3;
dimension = 3;
@@ -246,12 +246,12 @@ OpenGLCurveEvaluator::map1f(
case GL_MAP1_TEXTURE_COORD_4:
which=3;
dimension = 4;
- break;
+ break;
}
- inMap1f(which, dimension, ulo, uhi, stride, order, pts);
- }
+ inMap1f(which, dimension, ulo, uhi, stride, order, pts);
+ }
else
- glMap1f((GLenum) type, (GLfloat) ulo, (GLfloat) uhi, (GLint) stride,
+ glMap1f((GLenum) type, (GLfloat) ulo, (GLfloat) uhi, (GLint) stride,
(GLint) order, (const GLfloat *) pts);
}
@@ -263,7 +263,7 @@ void OpenGLCurveEvaluator::mapmesh1f(long style, long from, long to)
{
if(output_triangles)
{
- inMapMesh1f((int) from, (int) to);
+ inMapMesh1f((int) from, (int) to);
}
else
{
diff --git a/src/glu/sgi/libnurbs/interface/glcurveval.h b/src/glu/sgi/libnurbs/interface/glcurveval.h
index 8fa4930..c688396 100644
--- a/src/glu/sgi/libnurbs/interface/glcurveval.h
+++ b/src/glu/sgi/libnurbs/interface/glcurveval.h
@@ -47,9 +47,9 @@ class CurveMap;
#ifndef IN_MAX_BEZIER_ORDER
#define IN_MAX_BEZIER_ORDER 40 /*XXX should be bigger than machine order*/
#endif
-
+
#ifndef IN_MAX_DIMENSION
-#define IN_MAX_DIMENSION 4
+#define IN_MAX_DIMENSION 4
#endif
typedef struct curveEvalMachine{
@@ -63,7 +63,7 @@ typedef struct curveEvalMachine{
REAL ucoeff[IN_MAX_BEZIER_ORDER];//cache the polynomial values
} curveEvalMachine;
-class OpenGLCurveEvaluator : public BasicCurveEvaluator {
+class OpenGLCurveEvaluator : public BasicCurveEvaluator {
public:
OpenGLCurveEvaluator(void);
virtual ~OpenGLCurveEvaluator(void);
diff --git a/src/glu/sgi/libnurbs/interface/glinterface.cc b/src/glu/sgi/libnurbs/interface/glinterface.cc
index ba64bcd..7efa998 100644
--- a/src/glu/sgi/libnurbs/interface/glinterface.cc
+++ b/src/glu/sgi/libnurbs/interface/glinterface.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -66,7 +66,7 @@ GLUnurbs * GLAPIENTRY
gluNewNurbsRenderer(void)
{
GLUnurbs *t;
-
+
t = new GLUnurbs();
return t;
}
@@ -92,19 +92,19 @@ gluBeginSurface(GLUnurbs *r)
surfcount++;
tempTrim = OTL_make(10,10);
#endif
- r->bgnsurface(0);
+ r->bgnsurface(0);
}
void GLAPIENTRY
gluBeginCurve(GLUnurbs *r)
{
- r->bgncurve(0);
+ r->bgncurve(0);
}
void GLAPIENTRY
gluEndCurve(GLUnurbs *r)
{
- r->endcurve();
+ r->endcurve();
}
void GLAPIENTRY
@@ -124,7 +124,7 @@ OTN_write(otn, "out.otn");
}
#endif
- r->endsurface();
+ r->endsurface();
}
void GLAPIENTRY
@@ -134,7 +134,7 @@ gluBeginTrim(GLUnurbs *r)
OTL_bgnTrim(tempTrim);
#endif
- r->bgntrim();
+ r->bgntrim();
}
void GLAPIENTRY
@@ -143,11 +143,11 @@ gluEndTrim(GLUnurbs *r)
#ifdef DOWN_LOAD_NURBS
OTL_endTrim(tempTrim);
#endif
- r->endtrim();
+ r->endtrim();
}
void GLAPIENTRY
-gluPwlCurve(GLUnurbs *r, GLint count, INREAL array[],
+gluPwlCurve(GLUnurbs *r, GLint count, INREAL array[],
GLint stride, GLenum type)
{
#ifdef DOWN_LOAD_NURBS
@@ -170,7 +170,7 @@ OTL_pwlCurve(tempTrim, count, array, stride, type);
}
void GLAPIENTRY
-gluNurbsCurve(GLUnurbs *r, GLint nknots, INREAL knot[], GLint stride,
+gluNurbsCurve(GLUnurbs *r, GLint nknots, INREAL knot[], GLint stride,
INREAL ctlarray[], GLint order, GLenum type)
{
#ifdef DOWN_LOAD_NURBS
@@ -191,15 +191,15 @@ OTL_nurbsCurve(tempTrim, nknots, knot, stride, ctlarray, order, type);
break;
}
- r->nurbscurve(nknots, knot, sizeof(INREAL) * stride, ctlarray, order,
+ r->nurbscurve(nknots, knot, sizeof(INREAL) * stride, ctlarray, order,
realType);
}
void GLAPIENTRY
-gluNurbsSurface(GLUnurbs *r, GLint sknot_count, GLfloat *sknot,
- GLint tknot_count, GLfloat *tknot,
- GLint s_stride, GLint t_stride,
- GLfloat *ctlarray, GLint sorder, GLint torder,
+gluNurbsSurface(GLUnurbs *r, GLint sknot_count, GLfloat *sknot,
+ GLint tknot_count, GLfloat *tknot,
+ GLint s_stride, GLint t_stride,
+ GLfloat *ctlarray, GLint sorder, GLint torder,
GLenum type)
{
#ifdef DOWN_LOAD_NURBS
@@ -222,18 +222,18 @@ tempNurb = nurbSurfMake(sknot_count, sknot,
dimension,
ctlarray,
s_stride, t_stride);
-
+
}
#endif
- r->nurbssurface(sknot_count, sknot, tknot_count, tknot,
- sizeof(INREAL) * s_stride, sizeof(INREAL) * t_stride,
+ r->nurbssurface(sknot_count, sknot, tknot_count, tknot,
+ sizeof(INREAL) * s_stride, sizeof(INREAL) * t_stride,
ctlarray, sorder, torder, type);
}
void GLAPIENTRY
gluLoadSamplingMatrices(GLUnurbs *r, const GLfloat modelMatrix[16],
- const GLfloat projMatrix[16],
+ const GLfloat projMatrix[16],
const GLint viewport[4])
{
r->useGLMatrices(modelMatrix, projMatrix, viewport);
@@ -243,9 +243,9 @@ void GLAPIENTRY
gluNurbsProperty(GLUnurbs *r, GLenum property, GLfloat value)
{
GLfloat nurbsValue;
-
+
switch (property) {
- case GLU_AUTO_LOAD_MATRIX:
+ case GLU_AUTO_LOAD_MATRIX:
r->setautoloadmode(value);
return;
@@ -272,11 +272,11 @@ gluNurbsProperty(GLUnurbs *r, GLenum property, GLfloat value)
} else if (value == GLU_OBJECT_PARAMETRIC_ERROR) {
nurbsValue = N_OBJECTSPACE_PARA;
- r->setautoloadmode( 0.0 );
+ r->setautoloadmode( 0.0 );
r->setSamplingMatrixIdentity();
} else if (value == GLU_OBJECT_PATH_LENGTH) {
nurbsValue = N_OBJECTSPACE_PATH;
- r->setautoloadmode( 0.0 );
+ r->setautoloadmode( 0.0 );
r->setSamplingMatrixIdentity();
} else {
r->postError(GLU_INVALID_VALUE);
@@ -302,10 +302,10 @@ gluNurbsProperty(GLUnurbs *r, GLenum property, GLfloat value)
r->setnurbsproperty(GL_MAP1_VERTEX_3, N_ERROR_TOLERANCE, value);
r->setnurbsproperty(GL_MAP1_VERTEX_4, N_ERROR_TOLERANCE, value);
return;
-
+
case GLU_DISPLAY_MODE:
-
+
if (value == GLU_FILL) {
nurbsValue = N_FILL;
} else if (value == GLU_OUTLINE_POLYGON) {
@@ -317,7 +317,7 @@ gluNurbsProperty(GLUnurbs *r, GLenum property, GLfloat value)
return;
}
r->setnurbsproperty(N_DISPLAY, nurbsValue);
-
+
break;
case GLU_U_STEP:
@@ -325,7 +325,7 @@ gluNurbsProperty(GLUnurbs *r, GLenum property, GLfloat value)
r->setnurbsproperty(GL_MAP1_VERTEX_4, N_S_STEPS, value);
r->setnurbsproperty(GL_MAP2_VERTEX_3, N_S_STEPS, value);
r->setnurbsproperty(GL_MAP2_VERTEX_4, N_S_STEPS, value);
-
+
//added for optimizing untrimmed case
r->set_domain_distance_u_rate(value);
break;
@@ -339,7 +339,7 @@ gluNurbsProperty(GLUnurbs *r, GLenum property, GLfloat value)
//added for optimizing untrimmed case
r->set_domain_distance_v_rate(value);
break;
-
+
case GLU_NURBS_MODE:
if(value == GLU_NURBS_RENDERER)
r->put_callbackFlag(0);
@@ -351,7 +351,7 @@ gluNurbsProperty(GLUnurbs *r, GLenum property, GLfloat value)
default:
r->postError(GLU_INVALID_ENUM);
- return;
+ return;
}
}
@@ -387,7 +387,7 @@ gluGetNurbsProperty(GLUnurbs *r, GLenum property, GLfloat *value)
else if(*value == N_OBJECTSPACE_PATH)
*value = GLU_OBJECT_PATH_LENGTH;
else if(*value == N_OBJECTSPACE_PARA)
- *value = GLU_OBJECT_PARAMETRIC_ERROR;
+ *value = GLU_OBJECT_PARAMETRIC_ERROR;
break;
case GLU_SAMPLING_TOLERANCE:
r->getnurbsproperty(GL_MAP2_VERTEX_3, N_PIXEL_TOLERANCE, value);
@@ -419,7 +419,7 @@ gluGetNurbsProperty(GLUnurbs *r, GLenum property, GLfloat *value)
else
*value = GLU_NURBS_RENDERER;
break;
-
+
default:
r->postError(GLU_INVALID_ENUM);
return;
@@ -441,7 +441,7 @@ gluNurbsCallback(GLUnurbs *r, GLenum which, _GLUfuncptr fn )
case GLU_NURBS_VERTEX_DATA:
case GLU_NURBS_NORMAL_DATA:
case GLU_NURBS_TEXTURE_COORD_DATA:
- case GLU_NURBS_COLOR_DATA:
+ case GLU_NURBS_COLOR_DATA:
r->putSurfCallBack(which, fn);
break;
diff --git a/src/glu/sgi/libnurbs/interface/glrenderer.h b/src/glu/sgi/libnurbs/interface/glrenderer.h
index 3b72d44..a2d4e60 100644
--- a/src/glu/sgi/libnurbs/interface/glrenderer.h
+++ b/src/glu/sgi/libnurbs/interface/glrenderer.h
@@ -51,7 +51,7 @@ class GLUnurbs : public NurbsTessellator {
public:
GLUnurbs( void );
void loadGLMatrices( void );
- void useGLMatrices( const GLfloat modelMatrix[16],
+ void useGLMatrices( const GLfloat modelMatrix[16],
const GLfloat projMatrix[16],
const GLint viewport[4] );
void setSamplingMatrixIdentity( void );
@@ -60,16 +60,16 @@ class GLUnurbs : public NurbsTessellator {
void bgnrender( void );
void endrender( void );
void setautoloadmode( INREAL value )
- {
-
- if (value) autoloadmode = GL_TRUE;
- else autoloadmode = GL_FALSE;
-
+ {
+
+ if (value) autoloadmode = GL_TRUE;
+ else autoloadmode = GL_FALSE;
+
}
GLboolean getautoloadmode( void ) { return autoloadmode; }
errorCallbackType errorCallback;
- void postError( int which )
+ void postError( int which )
{ if (errorCallback) (errorCallback)( (GLenum)which ); }
#ifdef _WIN32
void putSurfCallBack(GLenum which, void (GLAPIENTRY *fn)() )
@@ -85,7 +85,7 @@ class GLUnurbs : public NurbsTessellator {
{
return surfaceEvaluator.get_vertices_call_back();
}
-
+
void put_vertices_call_back(int flag)
{
surfaceEvaluator.put_vertices_call_back(flag);
@@ -95,7 +95,7 @@ class GLUnurbs : public NurbsTessellator {
{
return surfaceEvaluator.get_callback_auto_normal();
}
-
+
void put_callback_auto_normal(int flag)
{
surfaceEvaluator.put_callback_auto_normal(flag);
@@ -131,11 +131,11 @@ class GLUnurbs : public NurbsTessellator {
OpenGLSurfaceEvaluator surfaceEvaluator;
OpenGLCurveEvaluator curveEvaluator;
- void loadSamplingMatrix( const GLfloat vmat[4][4],
+ void loadSamplingMatrix( const GLfloat vmat[4][4],
const GLint viewport[4] );
void loadCullingMatrix( GLfloat vmat[4][4] );
static void grabGLMatrix( GLfloat vmat[4][4] );
- static void transform4d( GLfloat A[4], GLfloat B[4],
+ static void transform4d( GLfloat A[4], GLfloat B[4],
GLfloat mat[4][4] );
static void multmatrix4d( GLfloat n[4][4], const GLfloat left[4][4],
const GLfloat right[4][4] );
diff --git a/src/glu/sgi/libnurbs/interface/glsurfeval.cc b/src/glu/sgi/libnurbs/interface/glsurfeval.cc
index b5bfab1..d32b8d8 100644
--- a/src/glu/sgi/libnurbs/interface/glsurfeval.cc
+++ b/src/glu/sgi/libnurbs/interface/glsurfeval.cc
@@ -118,7 +118,7 @@ OpenGLSurfaceEvaluator::OpenGLSurfaceEvaluator()
global_uorder_BV = 0;
global_vorder_BV = 0;
global_baseData = NULL;
-
+
global_bpm = NULL;
output_triangles = 0; //don't output triangles by default
@@ -199,7 +199,7 @@ OpenGLSurfaceEvaluator::mapgrid2f(long nu, REAL u0, REAL u1, long nv, REAL v0, R
(REAL) v0, (REAL) v1);
#else
- if(output_triangles)
+ if(output_triangles)
{
global_grid_u0 = u0;
global_grid_u1 = u1;
@@ -223,7 +223,7 @@ OpenGLSurfaceEvaluator::polymode(long style)
switch(style) {
default:
case N_MESHFILL:
-
+
glPolygonMode((GLenum) GL_FRONT_AND_BACK, (GLenum) GL_FILL);
break;
case N_MESHLINE:
@@ -419,7 +419,7 @@ OpenGLSurfaceEvaluator::evalUStrip(int n_upper, REAL v_upper, REAL* upper_val, i
coord2f(leftMostV[0], leftMostV[1]);
// glNormal3fv(leftMostNormal);
// glVertex3fv(leftMostXYZ);
-
+
for(k=n_upper-1; k>=i; k--) /*reverse order for two-side lighting*/
{
coord2f(upper_val[k], v_upper);
@@ -483,11 +483,11 @@ OpenGLSurfaceEvaluator::evalUStrip(int n_upper, REAL v_upper, REAL* upper_val, i
coord2f(upper_val[i], v_upper);
// glNormal3fv(upperNormal[i]);
// glVertex3fv(upperXYZ[i]);
-
+
coord2f(leftMostV[0], leftMostV[1]);
// glNormal3fv(leftMostNormal);
// glVertex3fv(leftMostXYZ);
-
+
/*find the last k>=j such that
*lowerverts[k][0] < upperverts[i][0]
@@ -602,7 +602,7 @@ OpenGLSurfaceEvaluator::evalVStrip(int n_left, REAL u_left, REAL* left_val, int
coord2f(botMostV[0], botMostV[1]);
// glNormal3fv(botMostNormal);
// glVertex3fv(botMostXYZ);
-
+
for(k=n_left-1; k>=i; k--) /*reverse order for two-side lighting*/
{
coord2f(u_left, left_val[k]);
@@ -666,11 +666,11 @@ OpenGLSurfaceEvaluator::evalVStrip(int n_left, REAL u_left, REAL* left_val, int
coord2f(u_left, left_val[i]);
// glNormal3fv(leftNormal[i]);
// glVertex3fv(leftXYZ[i]);
-
+
coord2f(botMostV[0], botMostV[1]);
// glNormal3fv(botMostNormal);
// glVertex3fv(botMostXYZ);
-
+
/*find the last k>=j such that
*rightverts[k][0] < leftverts[i][0]
@@ -787,7 +787,7 @@ OpenGLSurfaceEvaluator::bgnmap2f(long)
glPushAttrib((GLbitfield) GL_EVAL_BIT);
/*to avoid side effect, we restor the opengl state for GL_POLYGON_MODE
- */
+ */
glGetIntegerv(GL_POLYGON_MODE, gl_polygon_mode);
}
@@ -984,7 +984,7 @@ if(output_triangles)
bgnqstrip();
for(j=vmax; j>=vmin; j--){
REAL v1 = (j == global_grid_nv)? global_grid_v1: (global_grid_v0 +j*dv);
-
+
coord2f(u1, v1);
coord2f(u2, v1);
}
@@ -999,7 +999,7 @@ if(output_triangles)
bgnqstrip();
for(j=umax; j>=umin; j--){
- REAL u1 = (j == global_grid_nu)? global_grid_u1: (global_grid_u0 +j*du);
+ REAL u1 = (j == global_grid_nu)? global_grid_u1: (global_grid_u0 +j*du);
coord2f(u1, v2);
coord2f(u1, v1);
}
diff --git a/src/glu/sgi/libnurbs/interface/glsurfeval.h b/src/glu/sgi/libnurbs/interface/glsurfeval.h
index 621e593..21d6d06 100644
--- a/src/glu/sgi/libnurbs/interface/glsurfeval.h
+++ b/src/glu/sgi/libnurbs/interface/glsurfeval.h
@@ -55,9 +55,9 @@ class StoredVertex;
#ifndef IN_MAX_BEZIER_ORDER
#define IN_MAX_BEZIER_ORDER 40 /*XXX should be bigger than machine order*/
#endif
-
+
#ifndef IN_MAX_DIMENSION
-#define IN_MAX_DIMENSION 4
+#define IN_MAX_DIMENSION 4
#endif
typedef struct surfEvalMachine{
@@ -78,14 +78,14 @@ typedef struct surfEvalMachine{
REAL ucoeffDeriv[IN_MAX_BEZIER_ORDER]; /*cache the polynomial derivatives*/
REAL vcoeffDeriv[IN_MAX_BEZIER_ORDER];
} surfEvalMachine;
-
-
+
+
class StoredVertex {
public:
StoredVertex() { type = 0; coord[0] = 0; coord[1] = 0; point[0] = 0; point[1] = 0; }
~StoredVertex(void) {}
- void saveEvalCoord(REAL x, REAL y)
+ void saveEvalCoord(REAL x, REAL y)
{coord[0] = x; coord[1] = y; type = TYPECOORD; }
void saveEvalPoint(long x, long y)
{point[0] = x; point[1] = y; type = TYPEPOINT; }
@@ -109,7 +109,7 @@ class OpenGLSurfaceEvaluator : public BasicSurfaceEvaluator {
void enable( long );
void disable( long );
void bgnmap2f( long );
- void map2f( long, REAL, REAL, long, long,
+ void map2f( long, REAL, REAL, long, long,
REAL, REAL, long, long, REAL * );
void mapgrid2f( long, REAL, REAL, long, REAL, REAL );
void mapmesh2f( long, long, long, long, long );
@@ -158,7 +158,7 @@ class OpenGLSurfaceEvaluator : public BasicSurfaceEvaluator {
void put_callback_auto_normal(int flag)
{
callback_auto_normal = flag;
- }
+ }
int get_callback_auto_normal()
{
@@ -175,7 +175,7 @@ class OpenGLSurfaceEvaluator : public BasicSurfaceEvaluator {
-
+
private:
StoredVertex *vertexCache[VERTEX_CACHE_SIZE];
int tmeshing;
@@ -218,14 +218,14 @@ class OpenGLSurfaceEvaluator : public BasicSurfaceEvaluator {
void LOD_triangle(REAL A[2], REAL B[2], REAL C[2],
int level);
void LOD_eval(int num_vert, REAL* verts, int type, int level);
-
+
int LOD_eval_level; //set by LOD_eval_list()
/*************begin for internal evaluators*****************/
-
- /*the following global variables are only defined in this file.
+
+ /*the following global variables are only defined in this file.
*They are used to cache the precomputed Bezier polynomial values.
- *These calues may be used consecutively in which case we don't have
+ *These calues may be used consecutively in which case we don't have
*recompute these values again.
*/
int global_uorder; /*store the uorder in the previous evaluation*/
@@ -269,9 +269,9 @@ class OpenGLSurfaceEvaluator : public BasicSurfaceEvaluator {
int global_grid_nv;
/*functions*/
- void inDoDomain2WithDerivs(int k, REAL u, REAL v,
- REAL u1, REAL u2, int uorder,
- REAL v1, REAL v2, int vorder,
+ void inDoDomain2WithDerivs(int k, REAL u, REAL v,
+ REAL u1, REAL u2, int uorder,
+ REAL v1, REAL v2, int vorder,
REAL *baseData,
REAL *retPoint, REAL *retdu, REAL *retdv);
void inPreEvaluate(int order, REAL vprime, REAL *coeff);
@@ -293,20 +293,20 @@ class OpenGLSurfaceEvaluator : public BasicSurfaceEvaluator {
int vorder,
REAL *ctlPoints);
- void inMapGrid2f(int nu, REAL u0, REAL u1,
+ void inMapGrid2f(int nu, REAL u0, REAL u1,
int nv, REAL v0, REAL v1);
void inEvalMesh2(int lowU, int lowV, int highU, int highV);
void inEvalPoint2(int i, int j);
void inEvalCoord2f(REAL u, REAL v);
-void inEvalULine(int n_points, REAL v, REAL* u_vals,
+void inEvalULine(int n_points, REAL v, REAL* u_vals,
int stride, REAL ret_points[][3], REAL ret_normals[][3]);
-void inEvalVLine(int n_points, REAL u, REAL* v_vals,
+void inEvalVLine(int n_points, REAL u, REAL* v_vals,
int stride, REAL ret_points[][3], REAL ret_normals[][3]);
-void inEvalUStrip(int n_upper, REAL v_upper, REAL* upper_val,
+void inEvalUStrip(int n_upper, REAL v_upper, REAL* upper_val,
int n_lower, REAL v_lower, REAL* lower_val
);
void inEvalVStrip(int n_left, REAL u_left, REAL* left_val, int n_right, REAL u_right, REAL* right_val);
@@ -320,7 +320,7 @@ void inPreEvaluateBV_intfac(REAL v )
void inPreEvaluateBU_intfac(REAL u)
{
- inPreEvaluateBU(global_ev_k, global_ev_uorder, global_ev_vorder, (u-global_ev_u1)/(global_ev_u2-global_ev_u1), global_ev_ctlPoints);
+ inPreEvaluateBU(global_ev_k, global_ev_uorder, global_ev_vorder, (u-global_ev_u1)/(global_ev_u2-global_ev_u1), global_ev_ctlPoints);
}
void inDoDomain2WithDerivsBV(int k, REAL u, REAL v,
@@ -371,9 +371,9 @@ void inMap2fEM(int which, //0:vert,1:norm,2:color,3:tex
int vorder,
REAL *ctlPoints);
-void inDoDomain2WithDerivsEM(surfEvalMachine *em, REAL u, REAL v,
+void inDoDomain2WithDerivsEM(surfEvalMachine *em, REAL u, REAL v,
REAL *retPoint, REAL *retdu, REAL *retdv);
-void inDoDomain2EM(surfEvalMachine *em, REAL u, REAL v,
+void inDoDomain2EM(surfEvalMachine *em, REAL u, REAL v,
REAL *retPoint);
void inDoEvalCoord2EM(REAL u, REAL v);
@@ -384,7 +384,7 @@ void inBPMListEvalEM(bezierPatchMesh* list);
/*************end for internal evaluators*****************/
-
+
};
inline void StoredVertex::invoke(OpenGLSurfaceEvaluator *eval)
diff --git a/src/glu/sgi/libnurbs/interface/incurveeval.cc b/src/glu/sgi/libnurbs/interface/incurveeval.cc
index 96ea889..966191a 100644
--- a/src/glu/sgi/libnurbs/interface/incurveeval.cc
+++ b/src/glu/sgi/libnurbs/interface/incurveeval.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -42,8 +42,8 @@
/*
- *compute the Bezier polynomials C[n,j](v) for all j at v with
- *return values stored in coeff[], where
+ *compute the Bezier polynomials C[n,j](v) for all j at v with
+ *return values stored in coeff[], where
* C[n,j](v) = (n,j) * v^j * (1-v)^(n-j),
* j=0,1,2,...,n.
*order : n+1
@@ -59,7 +59,7 @@ void OpenGLCurveEvaluator::inPreEvaluate(int order, REAL vprime, REAL *coeff)
int i, j;
REAL oldval, temp;
REAL oneMinusvprime;
-
+
/*
* Minor optimization
* Compute orders 1 and 2 outright, and set coeff[0], coeff[1] to
@@ -69,12 +69,12 @@ void OpenGLCurveEvaluator::inPreEvaluate(int order, REAL vprime, REAL *coeff)
coeff[0] = 1.0;
return;
}
-
+
oneMinusvprime = 1-vprime;
coeff[0] = oneMinusvprime;
coeff[1] = vprime;
if (order == 2) return;
-
+
for (i = 2; i < order; i++) {
oldval = coeff[0] * vprime;
coeff[0] = oneMinusvprime * coeff[0];
@@ -115,7 +115,7 @@ void OpenGLCurveEvaluator::inMap1f(int which, //0: vert, 1: norm, 2: color, 3: t
temp_em = &em_texcoord;
break;
}
-
+
REAL *data = temp_em->ctlpoints;
temp_em->uprime = -1; //initialized
temp_em->k = k;
@@ -130,7 +130,7 @@ void OpenGLCurveEvaluator::inMap1f(int which, //0: vert, 1: norm, 2: color, 3: t
}
ctlpoints += ustride;
data += k;
- }
+ }
}
void OpenGLCurveEvaluator::inDoDomain1(curveEvalMachine *em, REAL u, REAL *retPoint)
@@ -138,7 +138,7 @@ void OpenGLCurveEvaluator::inDoDomain1(curveEvalMachine *em, REAL u, REAL *retPo
int j, row;
REAL the_uprime;
REAL *data;
-
+
if(em->u2 == em->u1)
return;
the_uprime = (u-em->u1) / (em->u2-em->u1);
@@ -147,7 +147,7 @@ void OpenGLCurveEvaluator::inDoDomain1(curveEvalMachine *em, REAL u, REAL *retPo
inPreEvaluate(em->uorder, the_uprime, em->ucoeff);
em->uprime = the_uprime;
}
-
+
for(j=0; jk; j++){
data = em->ctlpoints+j;
retPoint[j] = 0.0;
@@ -156,7 +156,7 @@ void OpenGLCurveEvaluator::inDoDomain1(curveEvalMachine *em, REAL u, REAL *retPo
retPoint[j] += em->ucoeff[row] * (*data);
data += em->k;
}
- }
+ }
}
void OpenGLCurveEvaluator::inDoEvalCoord1(REAL u)
diff --git a/src/glu/sgi/libnurbs/interface/insurfeval.cc b/src/glu/sgi/libnurbs/interface/insurfeval.cc
index 9d0c82a..3a24d98 100644
--- a/src/glu/sgi/libnurbs/interface/insurfeval.cc
+++ b/src/glu/sgi/libnurbs/interface/insurfeval.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -89,8 +89,8 @@ static void LOD_interpolate(REAL A[2], REAL B[2], REAL C[2], int j, int k, int p
v = x*A[1] + y*B[1] + z*C[1];
}
-void OpenGLSurfaceEvaluator::LOD_triangle(REAL A[2], REAL B[2], REAL C[2],
- int level)
+void OpenGLSurfaceEvaluator::LOD_triangle(REAL A[2], REAL B[2], REAL C[2],
+ int level)
{
int k,j;
int pow2_level;
@@ -132,7 +132,7 @@ glBegin(GL_TRIANGLE_STRIP);
inDoEvalCoord2EM(u,v);
#endif
}
-// endCallBack();
+// endCallBack();
glEnd();
}
}
@@ -154,13 +154,13 @@ void OpenGLSurfaceEvaluator::LOD_eval(int num_vert, REAL* verts, int type,
level
);
}
- if(num_vert % 2 ==1)
+ if(num_vert % 2 ==1)
{
LOD_triangle(verts+2*(num_vert-3), verts+2*(num_vert-2), verts+2*(num_vert-1),
level
);
}
- break;
+ break;
case GL_TRIANGLE_FAN:
for(i=1, k=2; i<=num_vert-2; i++, k+=2)
{
@@ -169,12 +169,12 @@ void OpenGLSurfaceEvaluator::LOD_eval(int num_vert, REAL* verts, int type,
);
}
break;
-
+
default:
fprintf(stderr, "typy not supported in LOD_\n");
}
}
-
+
#endif //USE_LOD
@@ -227,7 +227,7 @@ static void gTessVertexCyl(float u, float v, float temp_normal[3], float temp_ve
temp_vertex[1] = y;
temp_vertex[2] = z;
-/*
+/*
glNormal3f(nx,ny,nz);
glVertex3f(x,y,z);
*/
@@ -251,7 +251,7 @@ void OpenGLSurfaceEvaluator::inBPMEval(bezierPatchMesh* bpm)
int ustride = bpm->bpatch->dimension * bpm->bpatch->vorder;
int vstride = bpm->bpatch->dimension;
- inMap2f(
+ inMap2f(
(bpm->bpatch->dimension == 3)? GL_MAP2_VERTEX_3 : GL_MAP2_VERTEX_4,
bpm->bpatch->umin,
bpm->bpatch->umax,
@@ -262,7 +262,7 @@ void OpenGLSurfaceEvaluator::inBPMEval(bezierPatchMesh* bpm)
vstride,
bpm->bpatch->vorder,
bpm->bpatch->ctlpoints);
-
+
bpm->vertex_array = (float*) malloc(sizeof(float)* (bpm->index_UVarray/2) * 3+1); /*in case the origional dimenion is 4, then we need 4 space to pass to evaluator.*/
assert(bpm->vertex_array);
bpm->normal_array = (float*) malloc(sizeof(float)* (bpm->index_UVarray/2) * 3);
@@ -406,39 +406,39 @@ void OpenGLSurfaceEvaluator::inEvalMesh2(int lowU, int lowV, int highU, int high
if(global_grid_nu == 0 || global_grid_nv == 0)
return; /*no points need to be output*/
du = (global_grid_u1 - global_grid_u0) / (REAL)global_grid_nu;
- dv = (global_grid_v1 - global_grid_v0) / (REAL)global_grid_nv;
-
+ dv = (global_grid_v1 - global_grid_v0) / (REAL)global_grid_nv;
+
if(global_grid_nu >= global_grid_nv){
for(i=lowU; i=lowV; j--){
REAL v1 = (j == global_grid_nv)? global_grid_v1: (global_grid_v0 +j*dv);
-
+
inDoEvalCoord2(u1, v1, point, normal);
inDoEvalCoord2(u2, v1, point, normal);
}
endqstrip();
}
}
-
+
else{
for(i=lowV; i=lowU; j--){
- REAL u1 = (j == global_grid_nu)? global_grid_u1: (global_grid_u0 +j*du);
+ REAL u1 = (j == global_grid_nu)? global_grid_u1: (global_grid_u0 +j*du);
inDoEvalCoord2(u1, v2, point, normal);
inDoEvalCoord2(u1, v1, point, normal);
}
endqstrip();
}
}
-
+
}
void OpenGLSurfaceEvaluator::inMap2f(int k,
@@ -454,7 +454,7 @@ void OpenGLSurfaceEvaluator::inMap2f(int k,
{
int i,j,x;
REAL *data = global_ev_ctlPoints;
-
+
if(k == GL_MAP2_VERTEX_3) k=3;
@@ -463,7 +463,7 @@ void OpenGLSurfaceEvaluator::inMap2f(int k,
printf("error in inMap2f, maptype=%i is wrong, k,map is not updated\n", k);
return;
}
-
+
global_ev_k = k;
global_ev_u1 = ulower;
global_ev_u2 = uupper;
@@ -490,12 +490,12 @@ void OpenGLSurfaceEvaluator::inMap2f(int k,
/*
- *given a point p with homegeneous coordiante (x,y,z,w),
+ *given a point p with homegeneous coordiante (x,y,z,w),
*let pu(x,y,z,w) be its partial derivative vector with
*respect to u
*and pv(x,y,z,w) be its partial derivative vector with repect to v.
*This function returns the partial derivative vectors of the
- *inhomegensous coordinates, i.e.,
+ *inhomegensous coordinates, i.e.,
* (x/w, y/w, z/w) with respect to u and v.
*/
void OpenGLSurfaceEvaluator::inComputeFirstPartials(REAL *p, REAL *pu, REAL *pv)
@@ -517,21 +517,21 @@ void OpenGLSurfaceEvaluator::inComputeFirstPartials(REAL *p, REAL *pu, REAL *pv)
*/
void OpenGLSurfaceEvaluator::inComputeNormal2(REAL *pu, REAL *pv, REAL *n)
{
- REAL mag;
+ REAL mag;
n[0] = pu[1]*pv[2] - pu[2]*pv[1];
n[1] = pu[2]*pv[0] - pu[0]*pv[2];
- n[2] = pu[0]*pv[1] - pu[1]*pv[0];
+ n[2] = pu[0]*pv[1] - pu[1]*pv[0];
mag = sqrt(n[0]*n[0] + n[1]*n[1] + n[2]*n[2]);
if (mag > 0.0) {
- n[0] /= mag;
+ n[0] /= mag;
n[1] /= mag;
n[2] /= mag;
}
}
-
+
/*Compute point and normal
@@ -545,7 +545,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2(REAL u, REAL v,
REAL du[4];
REAL dv[4];
-
+
assert(global_ev_k>=3 && global_ev_k <= 4);
/*compute homegeneous point and partial derivatives*/
inDoDomain2WithDerivs(global_ev_k, u, v, global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, retPoint, du, dv);
@@ -609,7 +609,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2(REAL u, REAL v,
#ifdef DEBUG
printf("vertex(%f,%f,%f)\n", retPoint[0],retPoint[1],retPoint[2]);
#endif
-
+
}
@@ -625,7 +625,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE_BU(REAL u, REAL v,
REAL du[4];
REAL dv[4];
-
+
assert(global_ev_k>=3 && global_ev_k <= 4);
/*compute homegeneous point and partial derivatives*/
// inPreEvaluateBU(global_ev_k, global_ev_uorder, global_ev_vorder, (u-global_ev_u1)/(global_ev_u2-global_ev_u1), global_ev_ctlPoints);
@@ -688,7 +688,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE_BV(REAL u, REAL v,
REAL du[4];
REAL dv[4];
-
+
assert(global_ev_k>=3 && global_ev_k <= 4);
/*compute homegeneous point and partial derivatives*/
// inPreEvaluateBV(global_ev_k, global_ev_uorder, global_ev_vorder, (v-global_ev_v1)/(global_ev_v2-global_ev_v1), global_ev_ctlPoints);
@@ -740,7 +740,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE_BV(REAL u, REAL v,
break;
}
}
-
+
/*Compute point and normal
*see the head of inDoDomain2WithDerivs
@@ -753,7 +753,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE(REAL u, REAL v,
REAL du[4];
REAL dv[4];
-
+
assert(global_ev_k>=3 && global_ev_k <= 4);
/*compute homegeneous point and partial derivatives*/
inDoDomain2WithDerivs(global_ev_k, u, v, global_ev_u1, global_ev_u2, global_ev_uorder, global_ev_v1, global_ev_v2, global_ev_vorder, global_ev_ctlPoints, retPoint, du, dv);
@@ -805,14 +805,14 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2NOGE(REAL u, REAL v,
// glNormal3fv(retNormal);
// glVertex3fv(retPoint);
}
-
+
void OpenGLSurfaceEvaluator::inPreEvaluateBV(int k, int uorder, int vorder, REAL vprime, REAL *baseData)
{
int j,row,col;
REAL p, pdv;
REAL *data;
- if(global_vprime != vprime || global_vorder != vorder) {
+ if(global_vprime != vprime || global_vorder != vorder) {
inPreEvaluateWithDeriv(vorder, vprime, global_vcoeff, global_vcoeffDeriv);
global_vprime = vprime;
global_vorder = vorder;
@@ -841,7 +841,7 @@ void OpenGLSurfaceEvaluator::inPreEvaluateBU(int k, int uorder, int vorder, REAL
REAL p, pdu;
REAL *data;
- if(global_uprime != uprime || global_uorder != uorder) {
+ if(global_uprime != uprime || global_uorder != uorder) {
inPreEvaluateWithDeriv(uorder, uprime, global_ucoeff, global_ucoeffDeriv);
global_uprime = uprime;
global_uorder = uorder;
@@ -864,7 +864,7 @@ void OpenGLSurfaceEvaluator::inPreEvaluateBU(int k, int uorder, int vorder, REAL
}
}
}
-
+
void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBU(int k, REAL u, REAL v,
REAL u1, REAL u2, int uorder,
REAL v1, REAL v2, int vorder,
@@ -898,8 +898,8 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBU(int k, REAL u, REAL v,
retdv[j] += global_BU[col][j] * global_vcoeffDeriv[col];
}
}
-}
-
+}
+
void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBV(int k, REAL u, REAL v,
REAL u1, REAL u2, int uorder,
REAL v1, REAL v2, int vorder,
@@ -932,7 +932,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBV(int k, REAL u, REAL v,
}
}
}
-
+
/*
*given a Bezier surface, and parameter (u,v), compute the point in the object space,
@@ -946,9 +946,9 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBV(int k, REAL u, REAL v,
*retdu: the computed partial derivative with respect to u.
*retdv: the computed partial derivative with respect to v.
*/
-void OpenGLSurfaceEvaluator::inDoDomain2WithDerivs(int k, REAL u, REAL v,
- REAL u1, REAL u2, int uorder,
- REAL v1, REAL v2, int vorder,
+void OpenGLSurfaceEvaluator::inDoDomain2WithDerivs(int k, REAL u, REAL v,
+ REAL u1, REAL u2, int uorder,
+ REAL v1, REAL v2, int vorder,
REAL *baseData,
REAL *retPoint, REAL *retdu, REAL *retdv)
{
@@ -963,7 +963,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivs(int k, REAL u, REAL v,
return;
uprime = (u - u1) / (u2 - u1);
vprime = (v - v1) / (v2 - v1);
-
+
/* Compute coefficients for values and derivs */
/* Use already cached values if possible */
@@ -972,7 +972,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivs(int k, REAL u, REAL v,
global_uorder = uorder;
global_uprime = uprime;
}
- if (global_vprime != vprime ||
+ if (global_vprime != vprime ||
global_vorder != vorder) {
inPreEvaluateWithDeriv(vorder, vprime, global_vcoeff, global_vcoeffDeriv);
global_vorder = vorder;
@@ -983,7 +983,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivs(int k, REAL u, REAL v,
data=baseData+j;
retPoint[j] = retdu[j] = retdv[j] = 0.0;
for (row = 0; row < uorder; row++) {
- /*
+ /*
** Minor optimization.
** The col == 0 part of the loop is extracted so we don't
** have to initialize p and pdv to 0.
@@ -1002,13 +1002,13 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivs(int k, REAL u, REAL v,
retdu[j] += global_ucoeffDeriv[row] * p;
retdv[j] += global_ucoeff[row] * pdv;
}
- }
+ }
}
/*
- *compute the Bezier polynomials C[n,j](v) for all j at v with
- *return values stored in coeff[], where
+ *compute the Bezier polynomials C[n,j](v) for all j at v with
+ *return values stored in coeff[], where
* C[n,j](v) = (n,j) * v^j * (1-v)^(n-j),
* j=0,1,2,...,n.
*order : n+1
@@ -1024,7 +1024,7 @@ void OpenGLSurfaceEvaluator::inPreEvaluate(int order, REAL vprime, REAL *coeff)
int i, j;
REAL oldval, temp;
REAL oneMinusvprime;
-
+
/*
* Minor optimization
* Compute orders 1 and 2 outright, and set coeff[0], coeff[1] to
@@ -1034,12 +1034,12 @@ void OpenGLSurfaceEvaluator::inPreEvaluate(int order, REAL vprime, REAL *coeff)
coeff[0] = 1.0;
return;
}
-
+
oneMinusvprime = 1-vprime;
coeff[0] = oneMinusvprime;
coeff[1] = vprime;
if (order == 2) return;
-
+
for (i = 2; i < order; i++) {
oldval = coeff[0] * vprime;
coeff[0] = oneMinusvprime * coeff[0];
@@ -1053,27 +1053,27 @@ void OpenGLSurfaceEvaluator::inPreEvaluate(int order, REAL vprime, REAL *coeff)
}
/*
- *compute the Bezier polynomials C[n,j](v) and derivatives for all j at v with
+ *compute the Bezier polynomials C[n,j](v) and derivatives for all j at v with
*return values stored in coeff[] and coeffDeriv[].
*see the head of function inPreEvaluate for the definition of C[n,j](v)
- *and how to compute the values.
+ *and how to compute the values.
*The algorithm to compute the derivative is:
* dC[0,0](v) = 0.
* dC[n,j](v) = n*(dC[n-1,j-1](v) - dC[n-1,j](v)).
*
*This code is copied from opengl/soft/so_eval.c:PreEvaluateWidthDeriv
*/
-void OpenGLSurfaceEvaluator::inPreEvaluateWithDeriv(int order, REAL vprime,
+void OpenGLSurfaceEvaluator::inPreEvaluateWithDeriv(int order, REAL vprime,
REAL *coeff, REAL *coeffDeriv)
{
int i, j;
REAL oldval, temp;
REAL oneMinusvprime;
-
+
oneMinusvprime = 1-vprime;
/*
* Minor optimization
- * Compute orders 1 and 2 outright, and set coeff[0], coeff[1] to
+ * Compute orders 1 and 2 outright, and set coeff[0], coeff[1] to
* their i==1 loop values to avoid the initialization and the i==1 loop.
*/
if (order == 1) {
@@ -1111,7 +1111,7 @@ void OpenGLSurfaceEvaluator::inPreEvaluateWithDeriv(int order, REAL vprime,
j++;
} while (j < order - 1);
coeffDeriv[j] = coeff[j-1];
-
+
oldval = coeff[0] * vprime;
coeff[0] = oneMinusvprime * coeff[0];
for (j = 1; j < i; j++) {
@@ -1122,7 +1122,7 @@ void OpenGLSurfaceEvaluator::inPreEvaluateWithDeriv(int order, REAL vprime,
coeff[j] = oldval;
}
-void OpenGLSurfaceEvaluator::inEvalULine(int n_points, REAL v, REAL* u_vals,
+void OpenGLSurfaceEvaluator::inEvalULine(int n_points, REAL v, REAL* u_vals,
int stride, REAL ret_points[][3], REAL ret_normals[][3])
{
int i,k;
@@ -1141,7 +1141,7 @@ inPreEvaluateBV_intfac(v);
}
-void OpenGLSurfaceEvaluator::inEvalVLine(int n_points, REAL u, REAL* v_vals,
+void OpenGLSurfaceEvaluator::inEvalVLine(int n_points, REAL u, REAL* v_vals,
int stride, REAL ret_points[][3], REAL ret_normals[][3])
{
int i,k;
@@ -1155,7 +1155,7 @@ inPreEvaluateBU_intfac(u);
ret_points[i][2] = temp[2];
}
}
-
+
/*triangulate a strip bounded by two lines which are parallel to U-axis
*upperVerts: the verteces on the upper line
@@ -1177,7 +1177,7 @@ void OpenGLSurfaceEvaluator::inEvalUStrip(int n_upper, REAL v_upper, REAL* upper
assert(lowerXYZ);
REAL3* lowerNormal = (REAL3*) malloc(sizeof(REAL3) * n_lower);
assert(lowerNormal);
-
+
inEvalULine(n_upper, v_upper, upper_val, 1, upperXYZ, upperNormal);
inEvalULine(n_lower, v_lower, lower_val, 1, lowerXYZ, lowerNormal);
@@ -1215,10 +1215,10 @@ void OpenGLSurfaceEvaluator::inEvalUStrip(int n_upper, REAL v_upper, REAL* upper
leftMostXYZ = lowerXYZ[0];
leftMostNormal = lowerNormal[0];
}
-
+
/*the main loop.
- *the invariance is that:
- *at the beginning of each loop, the meaning of i,j,and leftMostV are
+ *the invariance is that:
+ *at the beginning of each loop, the meaning of i,j,and leftMostV are
*maintained
*/
while(1)
@@ -1248,7 +1248,7 @@ void OpenGLSurfaceEvaluator::inEvalUStrip(int n_upper, REAL v_upper, REAL* upper
bgntfan();
glNormal3fv(leftMostNormal);
glVertex3fv(leftMostXYZ);
-
+
for(k=n_upper-1; k>=i; k--) /*reverse order for two-side lighting*/
{
glNormal3fv(upperNormal[k]);
@@ -1268,7 +1268,7 @@ void OpenGLSurfaceEvaluator::inEvalUStrip(int n_upper, REAL v_upper, REAL* upper
glNormal3fv(lowerNormal[j]);
glVertex3fv(lowerXYZ[j]);
- /*find the last k>=i such that
+ /*find the last k>=i such that
*upperverts[k][0] <= lowerverts[j][0]
*/
k=i;
@@ -1308,10 +1308,10 @@ void OpenGLSurfaceEvaluator::inEvalUStrip(int n_upper, REAL v_upper, REAL* upper
bgntfan();
glNormal3fv(upperNormal[i]);
glVertex3fv(upperXYZ[i]);
-
+
glNormal3fv(leftMostNormal);
glVertex3fv(leftMostXYZ);
-
+
/*find the last k>=j such that
*lowerverts[k][0] < upperverts[i][0]
@@ -1336,10 +1336,10 @@ void OpenGLSurfaceEvaluator::inEvalUStrip(int n_upper, REAL v_upper, REAL* upper
leftMostNormal = lowerNormal[j-1];
leftMostXYZ = lowerXYZ[j-1];
- }
+ }
}
}
- //clean up
+ //clean up
free(upperXYZ);
free(lowerXYZ);
free(upperNormal);
@@ -1366,7 +1366,7 @@ void OpenGLSurfaceEvaluator::inEvalVStrip(int n_left, REAL u_left, REAL* left_va
assert(rightXYZ);
REAL3* rightNormal = (REAL3*) malloc(sizeof(REAL3) * n_right);
assert(rightNormal);
-
+
inEvalVLine(n_left, u_left, left_val, 1, leftXYZ, leftNormal);
inEvalVLine(n_right, u_right, right_val, 1, rightXYZ, rightNormal);
@@ -1379,7 +1379,7 @@ void OpenGLSurfaceEvaluator::inEvalVStrip(int n_left, REAL u_left, REAL* left_va
*the algorithm works by scanning from bot to top.
*botMostV: the bot most of the remaining verteces (on both left and right).
* it could an element of leftVerts or rightVerts.
- *i: leftVerts[i] is the first vertex to the top of botMostV on left line
+ *i: leftVerts[i] is the first vertex to the top of botMostV on left line
*j: rightVerts[j] is the first vertex to the top of botMostV on rightline */
/*initialize i,j,and botMostV
@@ -1405,10 +1405,10 @@ void OpenGLSurfaceEvaluator::inEvalVStrip(int n_left, REAL u_left, REAL* left_va
botMostXYZ = rightXYZ[0];
botMostNormal = rightNormal[0];
}
-
+
/*the main loop.
- *the invariance is that:
- *at the beginning of each loop, the meaning of i,j,and botMostV are
+ *the invariance is that:
+ *at the beginning of each loop, the meaning of i,j,and botMostV are
*maintained
*/
while(1)
@@ -1438,7 +1438,7 @@ void OpenGLSurfaceEvaluator::inEvalVStrip(int n_left, REAL u_left, REAL* left_va
bgntfan();
glNormal3fv(botMostNormal);
glVertex3fv(botMostXYZ);
-
+
for(k=n_left-1; k>=i; k--) /*reverse order for two-side lighting*/
{
glNormal3fv(leftNormal[k]);
@@ -1458,7 +1458,7 @@ void OpenGLSurfaceEvaluator::inEvalVStrip(int n_left, REAL u_left, REAL* left_va
glNormal3fv(rightNormal[j]);
glVertex3fv(rightXYZ[j]);
- /*find the last k>=i such that
+ /*find the last k>=i such that
*leftverts[k][0] <= rightverts[j][0]
*/
k=i;
@@ -1498,10 +1498,10 @@ void OpenGLSurfaceEvaluator::inEvalVStrip(int n_left, REAL u_left, REAL* left_va
bgntfan();
glNormal3fv(leftNormal[i]);
glVertex3fv(leftXYZ[i]);
-
+
glNormal3fv(botMostNormal);
glVertex3fv(botMostXYZ);
-
+
/*find the last k>=j such that
*rightverts[k][0] < leftverts[i][0]
@@ -1526,10 +1526,10 @@ void OpenGLSurfaceEvaluator::inEvalVStrip(int n_left, REAL u_left, REAL* left_va
botMostNormal = rightNormal[j-1];
botMostXYZ = rightXYZ[j-1];
- }
+ }
}
}
- //clean up
+ //clean up
free(leftXYZ);
free(rightXYZ);
free(leftNormal);
@@ -1570,7 +1570,7 @@ void OpenGLSurfaceEvaluator::inMap2fEM(int which, int k,
}
REAL *data = temp_em->ctlPoints;
-
+
temp_em->uprime = -1;//initilized
temp_em->vprime = -1;
@@ -1597,7 +1597,7 @@ void OpenGLSurfaceEvaluator::inMap2fEM(int which, int k,
}
}
-void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsEM(surfEvalMachine *em, REAL u, REAL v,
+void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsEM(surfEvalMachine *em, REAL u, REAL v,
REAL *retPoint, REAL *retdu, REAL *retdv)
{
int j, row, col;
@@ -1611,7 +1611,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsEM(surfEvalMachine *em, REAL u
return;
the_uprime = (u - em->u1) / (em->u2 - em->u1);
the_vprime = (v - em->v1) / (em->v2 - em->v1);
-
+
/* Compute coefficients for values and derivs */
/* Use already cached values if possible */
@@ -1628,7 +1628,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsEM(surfEvalMachine *em, REAL u
data=em->ctlPoints+j;
retPoint[j] = retdu[j] = retdv[j] = 0.0;
for (row = 0; row < em->uorder; row++) {
- /*
+ /*
** Minor optimization.
** The col == 0 part of the loop is extracted so we don't
** have to initialize p and pdv to 0.
@@ -1647,10 +1647,10 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsEM(surfEvalMachine *em, REAL u
retdu[j] += em->ucoeffDeriv[row] * p;
retdv[j] += em->ucoeff[row] * pdv;
}
- }
-}
+ }
+}
-void OpenGLSurfaceEvaluator::inDoDomain2EM(surfEvalMachine *em, REAL u, REAL v,
+void OpenGLSurfaceEvaluator::inDoDomain2EM(surfEvalMachine *em, REAL u, REAL v,
REAL *retPoint)
{
int j, row, col;
@@ -1663,7 +1663,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2EM(surfEvalMachine *em, REAL u, REAL v,
return;
the_uprime = (u - em->u1) / (em->u2 - em->u1);
the_vprime = (v - em->v1) / (em->v2 - em->v1);
-
+
/* Compute coefficients for values and derivs */
/* Use already cached values if possible */
@@ -1680,7 +1680,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2EM(surfEvalMachine *em, REAL u, REAL v,
data=em->ctlPoints+j;
retPoint[j] = 0.0;
for (row = 0; row < em->uorder; row++) {
- /*
+ /*
** Minor optimization.
** The col == 0 part of the loop is extracted so we don't
** have to initialize p and pdv to 0.
@@ -1695,8 +1695,8 @@ void OpenGLSurfaceEvaluator::inDoDomain2EM(surfEvalMachine *em, REAL u, REAL v,
/* Use p, pdv value to incrementally add up r, du, dv */
retPoint[j] += em->ucoeff[row] * p;
}
- }
-}
+ }
+}
void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v)
@@ -1721,7 +1721,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v)
{
inDoDomain2EM(&em_normal, u,v, temp_normal);
normalCallBack(temp_normal, userData);
-
+
if(vertex_flag)
{
inDoDomain2EM(&em_vertex, u,v,temp_vertex);
@@ -1729,10 +1729,10 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v)
{
temp_vertex[0] /= temp_vertex[3];
temp_vertex[1] /= temp_vertex[3];
- temp_vertex[2] /= temp_vertex[3];
+ temp_vertex[2] /= temp_vertex[3];
}
temp_vertex[3]=u;
- temp_vertex[4]=v;
+ temp_vertex[4]=v;
vertexCallBack(temp_vertex, userData);
}
}
@@ -1740,7 +1740,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v)
{
REAL du[4];
REAL dv[4];
-
+
/*compute homegeneous point and partial derivatives*/
inDoDomain2WithDerivsEM(&em_vertex, u,v,temp_vertex,du,dv);
@@ -1750,7 +1750,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v)
#ifdef AVOID_ZERO_NORMAL
if(myabs(dv[0]) <= MYZERO && myabs(dv[1]) <= MYZERO && myabs(dv[2]) <= MYZERO)
{
-
+
REAL tempdu[4];
REAL tempdata[4];
REAL u1 = em_vertex.u1;
@@ -1762,7 +1762,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v)
inDoDomain2WithDerivsEM(&em_vertex,u,v, tempdata, tempdu, dv);
if(em_vertex.k ==4)
- inComputeFirstPartials(temp_vertex, du, dv);
+ inComputeFirstPartials(temp_vertex, du, dv);
}
else if(myabs(du[0]) <= MYZERO && myabs(du[1]) <= MYZERO && myabs(du[2]) <= MYZERO)
{
@@ -1802,7 +1802,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v)
temp_vertex[3] = u;
temp_vertex[4] = v;
vertexCallBack(temp_vertex, userData);
-
+
}/*end if auto_normal*/
else //no normal map, and no normal callback function
{
@@ -1813,7 +1813,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v)
{
temp_vertex[0] /= temp_vertex[3];
temp_vertex[1] /= temp_vertex[3];
- temp_vertex[2] /= temp_vertex[3];
+ temp_vertex[2] /= temp_vertex[3];
}
temp_vertex[3] = u;
temp_vertex[4] = v;
@@ -1955,8 +1955,8 @@ void OpenGLSurfaceEvaluator::inBPMEvalEM(bezierPatchMesh* bpm)
0
);
}
- k+= 2*bpm->length_array[i];
-
+ k+= 2*bpm->length_array[i];
+
#else //undef USE_LOD
#ifdef CRACK_TEST
@@ -2042,7 +2042,7 @@ return;
#endif //GENERIC_TEST
inDoEvalCoord2EM(u,v);
-
+
#endif //USE_LOD
k += 2;
diff --git a/src/glu/sgi/libnurbs/internals/arc.cc b/src/glu/sgi/libnurbs/internals/arc.cc
index cd4c404..da041c3 100644
--- a/src/glu/sgi/libnurbs/internals/arc.cc
+++ b/src/glu/sgi/libnurbs/internals/arc.cc
@@ -97,7 +97,7 @@ void
Arc::markverts( void )
{
Arc_ptr jarc = this;
-
+
do {
TrimVertex *p = jarc->pwlArc->pts;
for( int i=0; ipwlArc->npts; i++ )
@@ -277,7 +277,7 @@ Arc::check( void )
return 0;
}
if( jarc->tail()[0] != jarc->prev->rhead()[0] ) {
-
+
#ifndef NDEBUG
_glu_dprintf( "checkjarc: geometric linkage screwed up 2\n");
jarc->prev->show();
diff --git a/src/glu/sgi/libnurbs/internals/arc.h b/src/glu/sgi/libnurbs/internals/arc.h
index ca397f3..ec163ba 100644
--- a/src/glu/sgi/libnurbs/internals/arc.h
+++ b/src/glu/sgi/libnurbs/internals/arc.h
@@ -45,9 +45,9 @@
class Bin;
class Arc;
-struct BezierArc;
+struct BezierArc;
-typedef class Arc *Arc_ptr;
+typedef class Arc *Arc_ptr;
enum arc_side { arc_none = 0, arc_right, arc_top, arc_left, arc_bottom };
diff --git a/src/glu/sgi/libnurbs/internals/arcsorter.cc b/src/glu/sgi/libnurbs/internals/arcsorter.cc
index 1f85cb7..53ea9ca 100644
--- a/src/glu/sgi/libnurbs/internals/arcsorter.cc
+++ b/src/glu/sgi/libnurbs/internals/arcsorter.cc
@@ -62,17 +62,17 @@ ArcSorter::qsort( Arc **a, int n )
Sorter::qsort( (void *) a, n );
}
-void
-ArcSorter::qsexc( char *i, char *j )// i<-j, j<-i
+void
+ArcSorter::qsexc( char *i, char *j )// i<-j, j<-i
{
Arc **jarc1 = (Arc **) i;
Arc **jarc2 = (Arc **) j;
Arc *tmp = *jarc1;
*jarc1 = *jarc2;
*jarc2 = tmp;
-}
+}
-void
+void
ArcSorter::qstexc( char *i, char *j, char *k )// i<-k, k<-j, j<-i
{
Arc **jarc1 = (Arc **) i;
@@ -83,7 +83,7 @@ ArcSorter::qstexc( char *i, char *j, char *k )// i<-k, k<-j, j<-i
*jarc3 = *jarc2;
*jarc2 = tmp;
}
-
+
ArcSdirSorter::ArcSdirSorter( Subdivider &s ) : ArcSorter(s)
{
@@ -119,7 +119,7 @@ ArcSdirSorter::qscmp( char *i, char *j )
return subdivider.ccwTurn_sr( jarc1, jarc2 ) ? 1 : -1;
}
}
- }
+ }
}
ArcTdirSorter::ArcTdirSorter( Subdivider &s ) : ArcSorter(s)
@@ -127,11 +127,11 @@ ArcTdirSorter::ArcTdirSorter( Subdivider &s ) : ArcSorter(s)
}
/*----------------------------------------------------------------------------
- * ArcTdirSorter::qscmp -
- * compare two axis monotone arcs that are incident
+ * ArcTdirSorter::qscmp -
+ * compare two axis monotone arcs that are incident
* to the line T == compare_value. Determine which of the
* two intersects that line with a LESSER S value. If
- * jarc1 does, return 1. If jarc2 does, return -1.
+ * jarc1 does, return 1. If jarc2 does, return -1.
*----------------------------------------------------------------------------
*/
int
@@ -145,7 +145,7 @@ ArcTdirSorter::qscmp( char *i, char *j )
REAL diff = jarc1->pwlArc->pts[v1].param[0] -
jarc2->pwlArc->pts[v2].param[0];
-
+
if( diff < 0.0)
return 1;
else if( diff > 0.0)
diff --git a/src/glu/sgi/libnurbs/internals/arcsorter.h b/src/glu/sgi/libnurbs/internals/arcsorter.h
index a55df92..60770ab 100644
--- a/src/glu/sgi/libnurbs/internals/arcsorter.h
+++ b/src/glu/sgi/libnurbs/internals/arcsorter.h
@@ -49,8 +49,8 @@ class ArcSorter : private Sorter {
virtual int qscmp( char *, char * );
Subdivider& subdivider;
private:
- void qsexc( char *i, char *j ); // i<-j, j<-i
- void qstexc( char *i, char *j, char *k ); // i<-k, k<-j, j<-i
+ void qsexc( char *i, char *j ); // i<-j, j<-i
+ void qstexc( char *i, char *j, char *k ); // i<-k, k<-j, j<-i
};
diff --git a/src/glu/sgi/libnurbs/internals/arctess.cc b/src/glu/sgi/libnurbs/internals/arctess.cc
index 29e7cf4..1af6de4 100644
--- a/src/glu/sgi/libnurbs/internals/arctess.cc
+++ b/src/glu/sgi/libnurbs/internals/arctess.cc
@@ -56,7 +56,7 @@
*-----------------------------------------------------------------------------
*/
-ArcTessellator::ArcTessellator( TrimVertexPool& t, Pool& p )
+ArcTessellator::ArcTessellator( TrimVertexPool& t, Pool& p )
: pwlarcpool(p), trimvertexpool(t)
{
}
@@ -104,7 +104,7 @@ ArcTessellator::bezier( Arc *arc, REAL s1, REAL s2, REAL t1, REAL t2 )
break;
}
#endif
-
+
TrimVertex *p = trimvertexpool.get(2);
arc->pwlArc = new(pwlarcpool) PwlArc( 2, p );
p[0].param[0] = s1;
@@ -283,7 +283,7 @@ ArcTessellator::tessellateLinear( Arc *arc, REAL geo_stepsize, REAL arc_stepsize
//we don't need to scale by arc_stepsize if the trim curve
//is piecewise linear. Reason: In pwl_right, pwl_left, pwl_top, pwl_left,
- //and pwl, the nsteps is computed by deltaU (or V) /stepsize.
+ //and pwl, the nsteps is computed by deltaU (or V) /stepsize.
//The quantity deltaU/arc_stepsize doesn't have any meaning. And
//it causes problems: see bug 517641
REAL stepsize = geo_stepsize; /* * arc_stepsize*/;
@@ -307,7 +307,7 @@ ArcTessellator::tessellateLinear( Arc *arc, REAL geo_stepsize, REAL arc_stepsize
else
pwl_left( arc, s1, t1, t2, stepsize );
else if( t1 == t2 )
- if( s1 < s2 )
+ if( s1 < s2 )
pwl_bottom( arc, t1, s1, s2, stepsize );
else
pwl_top( arc, t1, s1, s2, stepsize );
@@ -329,7 +329,7 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps
BezierArc *bezierArc = arc->bezierArc;
- REAL size; //bounding box size of the curve in UV
+ REAL size; //bounding box size of the curve in UV
{
int i,j;
REAL min_u, min_v, max_u,max_v;
@@ -342,16 +342,16 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps
if(bezierArc->cpts[j] > max_u)
max_u = bezierArc->cpts[j];
if(bezierArc->cpts[j+1] < min_v)
- min_v = bezierArc->cpts[j+1];
+ min_v = bezierArc->cpts[j+1];
if(bezierArc->cpts[j+1] > max_v)
- max_v = bezierArc->cpts[j+1];
+ max_v = bezierArc->cpts[j+1];
}
size = max_u - min_u;
if(size < max_v - min_v)
size = max_v - min_v;
}
-
+
/*int nsteps = 1 + (int) (1.0/stepsize);*/
int nsteps = (int) (size/stepsize);
@@ -421,7 +421,7 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps
ods = ds;
odt = dt;
}
-#endif
+#endif
}
/* compute last point exactly */
@@ -482,7 +482,7 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps
ods = ds;
odt = dt;
}
-#endif
+#endif
}
/* compute last point exactly */
@@ -604,7 +604,7 @@ ArcTessellator::trim_power_coeffs( BezierArc *bez_arc, REAL *p, int coord )
register REAL s = 0.0;
register REAL *point = base;
register REAL const *mlast = *row + order;
- for( REAL const *m = *row; m != mlast; m++, point += stride )
+ for( REAL const *m = *row; m != mlast; m++, point += stride )
s += *(m) * (*point);
*(p++) = s;
}
diff --git a/src/glu/sgi/libnurbs/internals/backend.cc b/src/glu/sgi/libnurbs/internals/backend.cc
index 27b41eb..45f4f1f 100644
--- a/src/glu/sgi/libnurbs/internals/backend.cc
+++ b/src/glu/sgi/libnurbs/internals/backend.cc
@@ -68,7 +68,7 @@ Backend::bgnsurf( int wiretris, int wirequads, long nuid )
* GLU_OUTLINE_PATCH.
*In fact, GLU_FLL is has the same effect as
* set GL_FRONT_AND_BACK to be GL_FILL
- * and GLU_OUTLINE_POLY is the same as set
+ * and GLU_OUTLINE_POLY is the same as set
* GL_FRONT_AND_BACK to be GL_LINE
*It is more efficient to do this once at the beginning of
*each surface than to do it for each primitive.
@@ -101,7 +101,7 @@ Backend::surfbbox( long type, REAL *from, REAL *to )
* surfpts - pass a desription of a surface map
*-------------------------------------------------------------------------
*/
-void
+void
Backend::surfpts(
long type, /* geometry, color, texture, normal */
REAL *pts, /* control points */
@@ -186,7 +186,7 @@ Backend::bgntfan( void )
{
surfaceEvaluator.bgntfan();
/*
- if(wireframetris)
+ if(wireframetris)
surfaceEvaluator.polymode( N_MESHLINE );
else
surfaceEvaluator.polymode( N_MESHFILL );
@@ -207,7 +207,7 @@ Backend::bgnqstrip( void )
if(wireframequads)
surfaceEvaluator.polymode( N_MESHLINE );
else
- surfaceEvaluator.polymode( N_MESHFILL );
+ surfaceEvaluator.polymode( N_MESHFILL );
*/
}
@@ -222,12 +222,12 @@ Backend::evalUStrip(int n_upper, REAL v_upper, REAL* upper_val,
int n_lower, REAL v_lower, REAL* lower_val
)
{
- surfaceEvaluator.evalUStrip(n_upper, v_upper, upper_val,
+ surfaceEvaluator.evalUStrip(n_upper, v_upper, upper_val,
n_lower, v_lower, lower_val);
}
-void
-Backend::evalVStrip(int n_left, REAL u_left, REAL* left_val,
+void
+Backend::evalVStrip(int n_left, REAL u_left, REAL* left_val,
int n_right, REAL u_right, REAL* right_val
)
{
@@ -236,14 +236,14 @@ Backend::evalVStrip(int n_left, REAL u_left, REAL* left_val,
}
/***************************************/
-
+
/*-------------------------------------------------------------------------
* bgntmesh - preamble to a triangle mesh
*-------------------------------------------------------------------------
*/
void
-Backend::bgntmesh( const char * )
+Backend::bgntmesh( const char * )
{
#ifndef NOWIREFRAME
@@ -280,7 +280,7 @@ Backend::tmeshvertNOGE(TrimVertex *t)
{
// surfaceEvaluator.inDoEvalCoord2NOGE( t->param[0], t->param[1], temp, ttt);
#ifdef USE_OPTTT
- surfaceEvaluator.inDoEvalCoord2NOGE( t->param[0], t->param[1], t->cache_point, t->cache_normal);
+ surfaceEvaluator.inDoEvalCoord2NOGE( t->param[0], t->param[1], t->cache_point, t->cache_normal);
#endif
}
@@ -289,7 +289,7 @@ void
Backend::tmeshvertNOGE_BU(TrimVertex *t)
{
#ifdef USE_OPTTT
- surfaceEvaluator.inDoEvalCoord2NOGE_BU( t->param[0], t->param[1], t->cache_point, t->cache_normal);
+ surfaceEvaluator.inDoEvalCoord2NOGE_BU( t->param[0], t->param[1], t->cache_point, t->cache_normal);
#endif
}
@@ -298,7 +298,7 @@ void
Backend::tmeshvertNOGE_BV(TrimVertex *t)
{
#ifdef USE_OPTTT
- surfaceEvaluator.inDoEvalCoord2NOGE_BV( t->param[0], t->param[1], t->cache_point, t->cache_normal);
+ surfaceEvaluator.inDoEvalCoord2NOGE_BV( t->param[0], t->param[1], t->cache_point, t->cache_normal);
#endif
}
@@ -308,7 +308,7 @@ Backend::preEvaluateBU(REAL u)
surfaceEvaluator.inPreEvaluateBU_intfac(u);
}
-void
+void
Backend::preEvaluateBV(REAL v)
{
surfaceEvaluator.inPreEvaluateBV_intfac(v);
@@ -354,7 +354,7 @@ Backend::tmeshvert( TrimVertex *t )
surfaceEvaluator.evalcoord2f( nuid, u, v );
}
#else
-
+
surfaceEvaluator.evalcoord2f( 0, u, v );
//for uninitial memory read surfaceEvaluator.evalcoord2f( nuid, u, v );
#endif
@@ -366,7 +366,7 @@ Backend::tmeshvert( REAL u, REAL v )
{
#ifndef NOWIREFRAME
const long nuid = 0;
-
+
npts++;
if( wireframetris ) {
if( npts >= 3 ) {
@@ -391,7 +391,7 @@ Backend::tmeshvert( REAL u, REAL v )
surfaceEvaluator.evalcoord2f( nuid, u, v );
}
#else
-
+
surfaceEvaluator.evalcoord2f( 0, u, v );
#endif
}
@@ -510,7 +510,7 @@ Backend::endoutline( void )
}
/*-------------------------------------------------------------------------
- * triangle - output a triangle
+ * triangle - output a triangle
*-------------------------------------------------------------------------
*/
void
@@ -525,7 +525,7 @@ Backend::triangle( TrimVertex *a, TrimVertex *b, TrimVertex *c )
/* endtmesh();*/
}
-void
+void
Backend::bgncurv( void )
{
curveEvaluator.bgnmap1f( 0 );
@@ -535,10 +535,10 @@ void
Backend::segment( REAL ulo, REAL uhi )
{
curveEvaluator.domain1f( ulo, uhi );
-}
+}
-void
-Backend::curvpts(
+void
+Backend::curvpts(
long type, /* geometry, color, texture, normal */
REAL *pts, /* control points */
long stride, /* distance to next point */
@@ -551,37 +551,37 @@ Backend::curvpts(
curveEvaluator.enable( type );
}
-void
+void
Backend::curvgrid( REAL u0, REAL u1, long nu )
{
curveEvaluator.mapgrid1f( nu, u0, u1 );
}
-void
+void
Backend::curvmesh( long from, long n )
{
curveEvaluator.mapmesh1f( N_MESHFILL, from, from+n );
}
-void
+void
Backend::curvpt(REAL u)
{
curveEvaluator.evalcoord1f( 0, u );
}
-void
-Backend::bgnline( void )
+void
+Backend::bgnline( void )
{
curveEvaluator.bgnline();
}
-void
+void
Backend::endline( void )
{
curveEvaluator.endline();
}
-void
+void
Backend::endcurv( void )
{
curveEvaluator.endmap1f();
diff --git a/src/glu/sgi/libnurbs/internals/backend.h b/src/glu/sgi/libnurbs/internals/backend.h
index 6840cb1..305ce26 100644
--- a/src/glu/sgi/libnurbs/internals/backend.h
+++ b/src/glu/sgi/libnurbs/internals/backend.h
@@ -57,8 +57,8 @@ class Backend {
void surfpts( long, REAL *, long, long, int, int,
REAL, REAL, REAL, REAL );
void surfbbox( long, REAL *, REAL * );
- void surfgrid( REAL, REAL, long, REAL, REAL, long );
- void surfmesh( long, long, long, long );
+ void surfgrid( REAL, REAL, long, REAL, REAL, long );
+ void surfmesh( long, long, long, long );
void bgntmesh( const char * );
void endtmesh( void );
void swaptmesh( void );
@@ -77,10 +77,10 @@ class Backend {
void endtfan();
void bgnqstrip();
void endqstrip();
- void evalUStrip(int n_upper, REAL v_upper, REAL* upper_val,
+ void evalUStrip(int n_upper, REAL v_upper, REAL* upper_val,
int n_lower, REAL v_lower, REAL* lower_val
);
- void evalVStrip(int n_left, REAL u_left, REAL* left_val,
+ void evalVStrip(int n_left, REAL u_left, REAL* left_val,
int n_right, REAL v_right, REAL* right_val
);
void tmeshvertNOGE(TrimVertex *t);
@@ -88,7 +88,7 @@ class Backend {
void tmeshvertNOGE_BV(TrimVertex *t);
void preEvaluateBU(REAL u);
void preEvaluateBV(REAL v);
-
+
/* curve backend routines */
void bgncurv( void );
@@ -96,7 +96,7 @@ class Backend {
void curvpts( long, REAL *, long, int, REAL, REAL );
void curvgrid( REAL, REAL, long );
void curvmesh( long, long );
- void curvpt( REAL );
+ void curvpt( REAL );
void bgnline( void );
void endline( void );
void endcurv( void );
diff --git a/src/glu/sgi/libnurbs/internals/basicsurfeval.h b/src/glu/sgi/libnurbs/internals/basicsurfeval.h
index 8fe18a6..db834ff 100644
--- a/src/glu/sgi/libnurbs/internals/basicsurfeval.h
+++ b/src/glu/sgi/libnurbs/internals/basicsurfeval.h
@@ -49,8 +49,8 @@ class BasicSurfaceEvaluator : public CachingEvaluator {
virtual void enable( long );
virtual void disable( long );
virtual void bgnmap2f( long );
- virtual void map2f( long, REAL, REAL, long, long,
- REAL, REAL, long, long,
+ virtual void map2f( long, REAL, REAL, long, long,
+ REAL, REAL, long, long,
REAL * );
virtual void mapgrid2f( long, REAL, REAL, long, REAL, REAL );
virtual void mapmesh2f( long, long, long, long, long );
@@ -84,7 +84,7 @@ class BasicSurfaceEvaluator : public CachingEvaluator {
virtual void inDoEvalCoord2NOGE_BV(REAL u, REAL v, REAL* ret_point, REAL* ret_normal) = 0;
virtual void inPreEvaluateBV_intfac(REAL v ) = 0;
virtual void inPreEvaluateBU_intfac(REAL u ) = 0;
-
+
};
#endif /* __glubasicsurfeval_h_ */
diff --git a/src/glu/sgi/libnurbs/internals/bin.cc b/src/glu/sgi/libnurbs/internals/bin.cc
index ff75b86..b7ed27e 100644
--- a/src/glu/sgi/libnurbs/internals/bin.cc
+++ b/src/glu/sgi/libnurbs/internals/bin.cc
@@ -62,7 +62,7 @@ Bin::~Bin()
*----------------------------------------------------------------------------
*/
-void
+void
Bin::remove_this_arc( Arc_ptr arc )
{
Arc_ptr *j;
@@ -94,7 +94,7 @@ Bin::numarcs()
*----------------------------------------------------------------------------
*/
-void
+void
Bin::adopt()
{
markall();
@@ -135,7 +135,7 @@ Bin::show( char *name )
*----------------------------------------------------------------------------
*/
-void
+void
Bin::markall()
{
for( Arc_ptr jarc=firstarc(); jarc; jarc=nextarc() )
@@ -147,12 +147,12 @@ Bin::markall()
*----------------------------------------------------------------------------
*/
-void
+void
Bin::listBezier( void )
{
for( Arc_ptr jarc=firstarc(); jarc; jarc=nextarc() ) {
if( jarc->isbezier( ) ) {
- assert( jarc->pwlArc->npts == 2 );
+ assert( jarc->pwlArc->npts == 2 );
#ifndef NDEBUG
TrimVertex *pts = jarc->pwlArc->pts;
REAL s1 = pts[0].param[0];
diff --git a/src/glu/sgi/libnurbs/internals/bin.h b/src/glu/sgi/libnurbs/internals/bin.h
index 2f976eb..1b7f727 100644
--- a/src/glu/sgi/libnurbs/internals/bin.h
+++ b/src/glu/sgi/libnurbs/internals/bin.h
@@ -40,7 +40,7 @@
#include "arc.h"
#include "defines.h"
-class Bin
+class Bin
{ /* a linked list of jordan arcs */
private:
Arc_ptr head;/*first arc on list */
diff --git a/src/glu/sgi/libnurbs/internals/bufpool.cc b/src/glu/sgi/libnurbs/internals/bufpool.cc
index 53ac1a5..3a8744b 100644
--- a/src/glu/sgi/libnurbs/internals/bufpool.cc
+++ b/src/glu/sgi/libnurbs/internals/bufpool.cc
@@ -92,11 +92,11 @@ void Pool::grow( void )
}
/*-----------------------------------------------------------------------------
- * Pool::clear - free buffers associated with pool but keep pool
+ * Pool::clear - free buffers associated with pool but keep pool
*-----------------------------------------------------------------------------
*/
-void
+void
Pool::clear( void )
{
assert( (this != 0) && (magic == is_allocated) );
diff --git a/src/glu/sgi/libnurbs/internals/bufpool.h b/src/glu/sgi/libnurbs/internals/bufpool.h
index 0fa9433..0065632 100644
--- a/src/glu/sgi/libnurbs/internals/bufpool.h
+++ b/src/glu/sgi/libnurbs/internals/bufpool.h
@@ -54,7 +54,7 @@ class Pool {
inline void* new_buffer( void );
inline void free_buffer( void * );
void clear( void );
-
+
private:
void grow( void );
@@ -94,7 +94,7 @@ Pool::free_buffer( void *b )
*-----------------------------------------------------------------------------
*/
-inline void *
+inline void *
Pool::new_buffer( void )
{
void *buffer;
@@ -104,7 +104,7 @@ Pool::new_buffer( void )
/* find free buffer */
if( freelist ) {
- buffer = (void *) freelist;
+ buffer = (void *) freelist;
freelist = freelist->next;
} else {
if( ! nextfree )
@@ -114,7 +114,7 @@ Pool::new_buffer( void )
}
return buffer;
}
-
+
class PooledObj {
public:
inline void * operator new( size_t, Pool & );
diff --git a/src/glu/sgi/libnurbs/internals/cachingeval.cc b/src/glu/sgi/libnurbs/internals/cachingeval.cc
index 3fab38c..283219f 100644
--- a/src/glu/sgi/libnurbs/internals/cachingeval.cc
+++ b/src/glu/sgi/libnurbs/internals/cachingeval.cc
@@ -65,7 +65,7 @@ CachingEvaluator::beginOutput( ServiceMode, int )
void
CachingEvaluator::endOutput( void )
{
-}
+}
void
CachingEvaluator::discardRecording( int )
diff --git a/src/glu/sgi/libnurbs/internals/cachingeval.h b/src/glu/sgi/libnurbs/internals/cachingeval.h
index b390067..7ff1e33 100644
--- a/src/glu/sgi/libnurbs/internals/cachingeval.h
+++ b/src/glu/sgi/libnurbs/internals/cachingeval.h
@@ -44,7 +44,7 @@ class CachingEvaluator {
virtual int canPlayAndRecord( void );
virtual int createHandle( int handle );
virtual void beginOutput( ServiceMode, int handle );
- virtual void endOutput( void );
+ virtual void endOutput( void );
virtual void discardRecording( int handle );
virtual void playRecording( int handle );
};
diff --git a/src/glu/sgi/libnurbs/internals/ccw.cc b/src/glu/sgi/libnurbs/internals/ccw.cc
index eb01b77..127b54b 100644
--- a/src/glu/sgi/libnurbs/internals/ccw.cc
+++ b/src/glu/sgi/libnurbs/internals/ccw.cc
@@ -46,11 +46,11 @@
#include "trimvertex.h"
#include "simplemath.h"
-inline int
+inline int
Subdivider::bbox( TrimVertex *a, TrimVertex *b, TrimVertex *c, int p )
{
- return bbox( a->param[p], b->param[p], c->param[p],
- a->param[1-p], b->param[1-p], c->param[1-p] );
+ return bbox( a->param[p], b->param[p], c->param[p],
+ a->param[1-p], b->param[1-p], c->param[1-p] );
}
int
@@ -124,7 +124,7 @@ Subdivider::ccwTurn_sr( Arc_ptr j1, Arc_ptr j2 ) // dir = 1
return 1;
case 0:
sgn = ccw( v1next, v1, v2next );
- if( sgn != -1 ) {
+ if( sgn != -1 ) {
return sgn;
} else {
#ifdef DEBUG
@@ -188,7 +188,7 @@ Subdivider::ccwTurn_sl( Arc_ptr j1, Arc_ptr j2 ) // dir = 0
if( v1->param[0] == v1next->param[0] && v2->param[0] == v2next->param[0] )
return 0;
- if( v2next->param[0] > v2->param[0] || v1next->param[0] > v1->param[0] )
+ if( v2next->param[0] > v2->param[0] || v1next->param[0] > v1->param[0] )
::mylongjmp( jumpbuffer, 28 );
if( v1->param[1] < v2->param[1] )
@@ -208,7 +208,7 @@ Subdivider::ccwTurn_sl( Arc_ptr j1, Arc_ptr j2 ) // dir = 0
return 1;
case 0:
sgn = ccw( v1next, v2, v2next );
- if( sgn != -1 )
+ if( sgn != -1 )
return sgn;
else {
v1 = v1next--;
@@ -237,7 +237,7 @@ Subdivider::ccwTurn_sl( Arc_ptr j1, Arc_ptr j2 ) // dir = 0
return 0;
case 0:
sgn = ccw( v1next, v1, v2next );
- if( sgn != -1 )
+ if( sgn != -1 )
return sgn;
else {
v2 = v2next++;
@@ -350,7 +350,7 @@ Subdivider::ccwTurn_tr( Arc_ptr j1, Arc_ptr j2 ) // dir = 1
return 0;
case 0:
sgn = ccw( v1next, v1, v2next );
- if( sgn != -1 ) {
+ if( sgn != -1 ) {
return sgn;
} else {
#ifdef DEBUG
@@ -414,7 +414,7 @@ Subdivider::ccwTurn_tl( Arc_ptr j1, Arc_ptr j2 )
if( v1->param[1] == v1next->param[1] && v2->param[1] == v2next->param[1] )
return 0;
- if( v2next->param[1] > v2->param[1] || v1next->param[1] > v1->param[1] )
+ if( v2next->param[1] > v2->param[1] || v1next->param[1] > v1->param[1] )
::mylongjmp( jumpbuffer, 28 );
if( v1->param[0] < v2->param[0] )
@@ -434,7 +434,7 @@ Subdivider::ccwTurn_tl( Arc_ptr j1, Arc_ptr j2 )
return 0;
case 0:
sgn = ccw( v1next, v2, v2next );
- if( sgn != -1 )
+ if( sgn != -1 )
return sgn;
else {
v1 = v1next--;
@@ -463,7 +463,7 @@ Subdivider::ccwTurn_tl( Arc_ptr j1, Arc_ptr j2 )
return 1;
case 0:
sgn = ccw( v1next, v1, v2next );
- if( sgn != -1 )
+ if( sgn != -1 )
return sgn;
else {
v2 = v2next++;
@@ -550,9 +550,9 @@ Subdivider::bbox( register REAL sa, register REAL sb, register REAL sc,
/*----------------------------------------------------------------------------
* ccw - determine how three points are oriented by computing their
- * determinant.
- * Return 1 if the vertices are ccw oriented,
- * 0 if they are cw oriented, or
+ * determinant.
+ * Return 1 if the vertices are ccw oriented,
+ * 0 if they are cw oriented, or
* -1 if the computation is ill-conditioned.
*----------------------------------------------------------------------------
*/
diff --git a/src/glu/sgi/libnurbs/internals/coveandtiler.cc b/src/glu/sgi/libnurbs/internals/coveandtiler.cc
index ca5bf36..d756ad6 100644
--- a/src/glu/sgi/libnurbs/internals/coveandtiler.cc
+++ b/src/glu/sgi/libnurbs/internals/coveandtiler.cc
@@ -384,7 +384,7 @@ CoveAndTiler::coveLowerRight( void )
GridVertex gv( bot.uend, top.vindex );
right.last();
- backend.bgntmesh( "coveLowerRight" );
+ backend.bgntmesh( "coveLowerRight" );
output( bgv );
output( right.prev() );
output( gv );
diff --git a/src/glu/sgi/libnurbs/internals/curve.cc b/src/glu/sgi/libnurbs/internals/curve.cc
index b7c4d4a..bf48853 100644
--- a/src/glu/sgi/libnurbs/internals/curve.cc
+++ b/src/glu/sgi/libnurbs/internals/curve.cc
@@ -67,14 +67,14 @@ Curve::Curve( Quilt_ptr geo, REAL pta, REAL ptb, Curve *c )
stepsize = 0;
minstepsize = 0;
- REAL *ps = geo->cpts;
+ REAL *ps = geo->cpts;
Quiltspec_ptr qs = geo->qspec;
ps += qs->offset;
ps += qs->index * qs->order * qs->stride;
if( needsSampling )
mapdesc->xformSampling( ps, qs->order, qs->stride, spts, stride );
-
+
if( cullval == CULL_ACCEPT )
mapdesc->xformCulling( ps, qs->order, qs->stride, cpts, stride );
@@ -114,7 +114,7 @@ Curve::Curve( Curve& upper, REAL value, Curve *c )
if( needsSampling )
mapdesc->subdivide( upper.spts, lower.spts, d, upper.stride, upper.order );
- if( cullval == CULL_ACCEPT )
+ if( cullval == CULL_ACCEPT )
mapdesc->subdivide( upper.cpts, lower.cpts, d, upper.stride, upper.order );
lower.range[0] = upper.range[0];
@@ -160,11 +160,11 @@ Curve::getstepsize( void )
// upper bound on path length between sample points
assert( order <= MAXORDER );
-
+
/* points have been transformed, therefore they are homogeneous */
REAL tmp[MAXORDER][MAXCOORDS];
const int tstride = sizeof(tmp[0]) / sizeof(REAL);
- int val = mapdesc->project( spts, stride, &tmp[0][0], tstride, order );
+ int val = mapdesc->project( spts, stride, &tmp[0][0], tstride, order );
if( val == 0 ) {
// control points cross infinity, therefore derivatives are undefined
@@ -197,7 +197,7 @@ Curve::needsSamplingSubdivision( void )
int
Curve::cullCheck( void )
{
- if( cullval == CULL_ACCEPT )
+ if( cullval == CULL_ACCEPT )
cullval = mapdesc->cullCheck( cpts, order, stride );
return cullval;
}
diff --git a/src/glu/sgi/libnurbs/internals/curvelist.cc b/src/glu/sgi/libnurbs/internals/curvelist.cc
index 8f2ee46..5f3525c 100644
--- a/src/glu/sgi/libnurbs/internals/curvelist.cc
+++ b/src/glu/sgi/libnurbs/internals/curvelist.cc
@@ -48,7 +48,7 @@
Curvelist::Curvelist( Quilt *quilts, REAL pta, REAL ptb )
{
curve = 0;
- for( Quilt *q = quilts; q; q = q->next )
+ for( Quilt *q = quilts; q; q = q->next )
curve = new Curve( q, pta, ptb, curve );
range[0] = pta;
range[1] = ptb;
diff --git a/src/glu/sgi/libnurbs/internals/curvelist.h b/src/glu/sgi/libnurbs/internals/curvelist.h
index 733a511..a5d20d4 100644
--- a/src/glu/sgi/libnurbs/internals/curvelist.h
+++ b/src/glu/sgi/libnurbs/internals/curvelist.h
@@ -43,7 +43,7 @@ class Mapdesc;
class Quilt;
class Curve;
-class Curvelist
+class Curvelist
{
friend class Subdivider;
public:
diff --git a/src/glu/sgi/libnurbs/internals/curvesub.cc b/src/glu/sgi/libnurbs/internals/curvesub.cc
index 91f2ca8..26d56a5 100644
--- a/src/glu/sgi/libnurbs/internals/curvesub.cc
+++ b/src/glu/sgi/libnurbs/internals/curvesub.cc
@@ -77,7 +77,7 @@ Subdivider::drawCurves( void )
/*--------------------------------------------------------------------------
- * samplingSplit - recursively subdivide patch, cull check each subpatch
+ * samplingSplit - recursively subdivide patch, cull check each subpatch
*--------------------------------------------------------------------------
*/
diff --git a/src/glu/sgi/libnurbs/internals/dataTransform.cc b/src/glu/sgi/libnurbs/internals/dataTransform.cc
index 55c0fbb..98b3681 100644
--- a/src/glu/sgi/libnurbs/internals/dataTransform.cc
+++ b/src/glu/sgi/libnurbs/internals/dataTransform.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -56,7 +56,7 @@ static directedLine* copy_loop(Arc_ptr loop, Real2* vertArray, int& index, direc
{
vertArray[i][0] = loop->pwlArc->pts[j].param[0];
vertArray[i][1] = loop->pwlArc->pts[j].param[1];
- }
+ }
loop->clearmark();
for(Arc_ptr jarc = loop->next; jarc != loop; jarc=jarc->next)
@@ -70,7 +70,7 @@ static directedLine* copy_loop(Arc_ptr loop, Real2* vertArray, int& index, direc
}
//copy the first vertex again
vertArray[i][0] = loop->pwlArc->pts[0].param[0];
- vertArray[i][1] = loop->pwlArc->pts[0].param[1];
+ vertArray[i][1] = loop->pwlArc->pts[0].param[1];
i++;
index=i;
@@ -175,7 +175,7 @@ directedLine* o_pwlcurve_to_DLines(directedLine* original, O_pwlcurve* pwl)
else
ret->insert(dline);
}
- return ret;
+ return ret;
}
directedLine* o_curve_to_DLineLoop(O_curve* cur)
diff --git a/src/glu/sgi/libnurbs/internals/defines.h b/src/glu/sgi/libnurbs/internals/defines.h
index 32950d6..a0982b4 100644
--- a/src/glu/sgi/libnurbs/internals/defines.h
+++ b/src/glu/sgi/libnurbs/internals/defines.h
@@ -41,7 +41,7 @@
#define CULL_TRIVIAL_ACCEPT 1
#define CULL_ACCEPT 2
-/* maximum order of a B-Spline */
+/* maximum order of a B-Spline */
#define MAXORDER 24
/* maximum dimension of any B-spline range space */
diff --git a/src/glu/sgi/libnurbs/internals/displaylist.cc b/src/glu/sgi/libnurbs/internals/displaylist.cc
index 48593c6..7aae2b4 100644
--- a/src/glu/sgi/libnurbs/internals/displaylist.cc
+++ b/src/glu/sgi/libnurbs/internals/displaylist.cc
@@ -50,7 +50,7 @@ DisplayList::DisplayList( NurbsTessellator *_nt ) :
nt = _nt;
}
-DisplayList::~DisplayList( void )
+DisplayList::~DisplayList( void )
{
for( Dlnode *nextNode; nodes; nodes = nextNode ) {
nextNode = nodes->next;
@@ -59,20 +59,20 @@ DisplayList::~DisplayList( void )
}
}
-void
+void
DisplayList::play( void )
{
- for( Dlnode *node = nodes; node; node = node->next )
+ for( Dlnode *node = nodes; node; node = node->next )
if( node->work != 0 ) (nt->*node->work)( node->arg );
}
-void
+void
DisplayList::endList( void )
{
*lastNode = 0;
}
-void
+void
DisplayList::append( PFVS work, void *arg, PFVS cleanup )
{
Dlnode *node = new(dlnodePool) Dlnode( work, arg, cleanup );
diff --git a/src/glu/sgi/libnurbs/internals/displaylist.h b/src/glu/sgi/libnurbs/internals/displaylist.h
index d009a42..1cdeae5 100644
--- a/src/glu/sgi/libnurbs/internals/displaylist.h
+++ b/src/glu/sgi/libnurbs/internals/displaylist.h
@@ -54,7 +54,7 @@ struct Dlnode : public PooledObj {
};
inline
-Dlnode::Dlnode( PFVS _work, void *_arg, PFVS _cleanup )
+Dlnode::Dlnode( PFVS _work, void *_arg, PFVS _cleanup )
{
work = _work;
arg = _arg;
diff --git a/src/glu/sgi/libnurbs/internals/flist.cc b/src/glu/sgi/libnurbs/internals/flist.cc
index d3162b9..425d4bb 100644
--- a/src/glu/sgi/libnurbs/internals/flist.cc
+++ b/src/glu/sgi/libnurbs/internals/flist.cc
@@ -79,7 +79,7 @@ void Flist::filter( void )
start = 0;
int j = 0;
- for( int i = 1; i < end; i++ ) {
+ for( int i = 1; i < end; i++ ) {
if( pts[i] == pts[i-j-1] )
j++;
pts[i-j] = pts[i];
@@ -95,7 +95,7 @@ void Flist::grow( int maxpts )
{
if( npts < maxpts ) {
if( npts ) delete[] pts;
- npts = 2 * maxpts;
+ npts = 2 * maxpts;
pts = new REAL[npts];
assert( pts != 0 );
}
diff --git a/src/glu/sgi/libnurbs/internals/flistsorter.h b/src/glu/sgi/libnurbs/internals/flistsorter.h
index 65e6a57..2627c7a 100644
--- a/src/glu/sgi/libnurbs/internals/flistsorter.h
+++ b/src/glu/sgi/libnurbs/internals/flistsorter.h
@@ -45,9 +45,9 @@ class FlistSorter : public Sorter {
virtual ~FlistSorter() { /* silence warning*/ }
void qsort( REAL *a, int n );
-protected:
+protected:
virtual int qscmp( char *, char * );
- virtual void qsexc( char *i, char *j ); // i<-j, j<-i
- virtual void qstexc( char *i, char *j, char *k ); // i<-k, k<-j, j<-i
+ virtual void qsexc( char *i, char *j ); // i<-j, j<-i
+ virtual void qstexc( char *i, char *j, char *k ); // i<-k, k<-j, j<-i
};
#endif /* __gluflistsorter_h_ */
diff --git a/src/glu/sgi/libnurbs/internals/gridtrimvertex.h b/src/glu/sgi/libnurbs/internals/gridtrimvertex.h
index 707f649..9ee717a 100644
--- a/src/glu/sgi/libnurbs/internals/gridtrimvertex.h
+++ b/src/glu/sgi/libnurbs/internals/gridtrimvertex.h
@@ -50,7 +50,7 @@ class GridTrimVertex : public PooledObj
GridTrimVertex() { g = 0; t = 0; }
TrimVertex *t;
GridVertex *g;
-
+
inline void set( long, long );
inline void set( REAL, REAL );
inline void set( TrimVertex * );
diff --git a/src/glu/sgi/libnurbs/internals/hull.cc b/src/glu/sgi/libnurbs/internals/hull.cc
index 389ba66..f839568 100644
--- a/src/glu/sgi/libnurbs/internals/hull.cc
+++ b/src/glu/sgi/libnurbs/internals/hull.cc
@@ -105,7 +105,7 @@ Hull::init( void )
/*----------------------------------------------------------------------
* nextupper - find next vertex on upper hull of trim region.
- * - if vertex is on trim curve, set vtop point to
+ * - if vertex is on trim curve, set vtop point to
* that vertex. if vertex is on grid, set vtop to
* point to temporary area and stuff coordinants into
* temporary vertex. Also, place grid coords in temporary
@@ -119,23 +119,23 @@ Hull::nextupper( GridTrimVertex *gv )
gv->set( upper.left->prev() );
if( gv->isTrimVert() ) return gv;
upper.left = 0;
- }
+ }
if( upper.line ) {
assert( upper.index <= upper.line->uend );
gv->set( uarray.uarray[upper.index], upper.line->vval );
gv->set( upper.index, upper.line->vindex );
if( upper.index++ == upper.line->uend ) upper.line = 0;
- return gv;
- }
+ return gv;
+ }
if( upper.right ) {
gv->set( upper.right->next() );
if( gv->isTrimVert() ) return gv;
upper.right = 0;
- }
+ }
- return 0;
+ return 0;
}
GridTrimVertex *
@@ -145,20 +145,20 @@ Hull::nextlower( register GridTrimVertex *gv )
gv->set( lower.left->next() );
if( gv->isTrimVert() ) return gv;
lower.left = 0;
- }
+ }
if( lower.line ) {
gv->set( uarray.uarray[lower.index], lower.line->vval );
gv->set( lower.index, lower.line->vindex );
if( lower.index++ == lower.line->uend ) lower.line = 0;
return gv;
- }
+ }
if( lower.right ) {
gv->set( lower.right->prev() );
if( gv->isTrimVert() ) return gv;
lower.right = 0;
- }
+ }
return 0;
}
diff --git a/src/glu/sgi/libnurbs/internals/hull.h b/src/glu/sgi/libnurbs/internals/hull.h
index dfe8652..738c6bd 100644
--- a/src/glu/sgi/libnurbs/internals/hull.h
+++ b/src/glu/sgi/libnurbs/internals/hull.h
@@ -58,7 +58,7 @@ class Hull : virtual public TrimRegion {
Trimline *right;
long index;
};
-
+
Side lower;
Side upper;
Trimline fakeleft;
diff --git a/src/glu/sgi/libnurbs/internals/intersect.cc b/src/glu/sgi/libnurbs/internals/intersect.cc
index b39ea21..bce2667 100644
--- a/src/glu/sgi/libnurbs/internals/intersect.cc
+++ b/src/glu/sgi/libnurbs/internals/intersect.cc
@@ -58,7 +58,7 @@ static enum i_result pwlarc_intersect( PwlArc *, int, REAL, int, int[3] );
void
-Subdivider::partition( Bin & bin, Bin & left, Bin & intersections,
+Subdivider::partition( Bin & bin, Bin & left, Bin & intersections,
Bin & right, Bin & unknown, int param, REAL value )
{
Bin headonleft, headonright, tailonleft, tailonright;
@@ -153,7 +153,7 @@ Subdivider::partition( Bin & bin, Bin & left, Bin & intersections,
}
}
-inline static void
+inline static void
vert_interp( TrimVertex *n, TrimVertex *l, TrimVertex *r, int p, REAL val )
{
assert( val > l->param[p]);
@@ -164,13 +164,13 @@ vert_interp( TrimVertex *n, TrimVertex *l, TrimVertex *r, int p, REAL val )
n->param[p] = val;
if( l->param[1-p] != r->param[1-p] ) {
REAL ratio = (val - l->param[p]) / (r->param[p] - l->param[p]);
- n->param[1-p] = l->param[1-p] +
+ n->param[1-p] = l->param[1-p] +
ratio * (r->param[1-p] - l->param[1-p]);
} else {
n->param[1-p] = l->param[1-p];
}
}
-
+
int
Subdivider::arc_split( Arc_ptr jarc, int param, REAL value, int dir )
{
@@ -210,13 +210,13 @@ Subdivider::arc_split( Arc_ptr jarc, int param, REAL value, int dir )
#ifndef NOTDEF
// The split is between vertices at index j and i, in that
// order (j < i)
-
+
// JEB: This code is my idea of how to do the split without
// increasing the number of links. I'm doing this so that
// the is_rect routine can recognize rectangles created by
// subdivision. In exchange for simplifying the curve list,
// however, it costs in allocated space and vertex copies.
-
+
TrimVertex *newjunk = trimvertexpool.get(maxvertex -i+1 /*-j*/);
int k;
for(k=0; knuid;
}
-
+
TrimVertex *vcopy = trimvertexpool.get(maxvertex);
for(k=0; knuid;
v[j].nuid = jarc->nuid;
@@ -300,7 +300,7 @@ Subdivider::arc_split( Arc_ptr jarc, int param, REAL value, int dir )
// New vertex adjacent to starting point of arc
} else if (i == 1) {
jarc1 = new(arcpool) Arc( jarc, new(pwlarcpool) PwlArc( 2, newjunk+1 ) );
- jarc2 = new(arcpool) Arc( jarc,
+ jarc2 = new(arcpool) Arc( jarc,
new(pwlarcpool) PwlArc( maxvertex-1, &jarc->pwlArc->pts[1] ) );
jarc->pwlArc->npts = 2;
jarc->pwlArc->pts = newjunk;
@@ -354,10 +354,10 @@ pwlarc_intersect(
if( dir ) {
TrimVertex *v = pwlArc->pts;
- int imin = 0;
+ int imin = 0;
int imax = pwlArc->npts - 1;
assert( value > v[imin].param[param] );
- assert( value < v[imax].param[param] );
+ assert( value < v[imax].param[param] );
while( (imax - imin) > 1 ) {
int imid = (imax + imin)/2;
if( v[imid].param[param] > value )
@@ -374,10 +374,10 @@ pwlarc_intersect(
return INTERSECT_EDGE;
} else {
TrimVertex *v = pwlArc->pts;
- int imax = 0;
+ int imax = 0;
int imin = pwlArc->npts - 1;
assert( value > v[imin].param[param] );
- assert( value < v[imax].param[param] );
+ assert( value < v[imax].param[param] );
while( (imin - imax) > 1 ) {
int imid = (imax + imin)/2;
if( v[imid].param[param] > value )
@@ -396,7 +396,7 @@ pwlarc_intersect(
}
/*----------------------------------------------------------------------------
- * arc_classify - determine which side of a line a jarc lies
+ * arc_classify - determine which side of a line a jarc lies
*----------------------------------------------------------------------------
*/
@@ -460,7 +460,7 @@ Subdivider::classify_tailonleft_s( Bin& bin, Bin& in, Bin& out, REAL val )
else
in.addarc( j );
} else {
- if( j->next->tail()[1] > j->next->head()[1] )
+ if( j->next->tail()[1] > j->next->head()[1] )
in.addarc(j);
else
out.addarc(j);
@@ -559,7 +559,7 @@ Subdivider::classify_tailonright_s( Bin& bin, Bin& in, Bin& out, REAL val )
while( (j = bin.removearc()) != NULL ) {
assert( arc_classify( j, 0, val ) == 0x12);
-
+
j->clearitail();
REAL diff = j->next->head()[0] - val;
@@ -571,7 +571,7 @@ Subdivider::classify_tailonright_s( Bin& bin, Bin& in, Bin& out, REAL val )
} else if( diff < 0.0 ) {
in.addarc( j );
} else {
- if( j->next->tail()[1] > j->next->head()[1] )
+ if( j->next->tail()[1] > j->next->head()[1] )
out.addarc( j );
else
in.addarc( j );
@@ -587,7 +587,7 @@ Subdivider::classify_tailonright_t( Bin& bin, Bin& in, Bin& out, REAL val )
while( (j = bin.removearc()) != NULL ) {
assert( arc_classify( j, 1, val ) == 0x12);
-
+
j->clearitail();
REAL diff = j->next->head()[1] - val;
@@ -596,10 +596,10 @@ Subdivider::classify_tailonright_t( Bin& bin, Bin& in, Bin& out, REAL val )
out.addarc( j );
else
in.addarc( j );
- } else if( diff < 0.0 ) {
+ } else if( diff < 0.0 ) {
in.addarc( j );
} else {
- if( j->next->tail()[0] > j->next->head()[0] )
+ if( j->next->tail()[0] > j->next->head()[0] )
in.addarc( j );
else
out.addarc( j );
@@ -615,11 +615,11 @@ Subdivider::classify_headonright_s( Bin& bin, Bin& in, Bin& out, REAL val )
while( (j = bin.removearc()) != NULL ) {
assert( arc_classify( j, 0, val ) == 0x21 );
-
+
j->setitail();
REAL diff = j->prev->tail()[0] - val;
- if( diff > 0.0 ) {
+ if( diff > 0.0 ) {
if( ccwTurn_sr( j->prev, j ) )
out.addarc( j );
else
@@ -643,11 +643,11 @@ Subdivider::classify_headonright_t( Bin& bin, Bin& in, Bin& out, REAL val )
while( (j = bin.removearc()) != NULL ) {
assert( arc_classify( j, 1, val ) == 0x21 );
-
+
j->setitail();
REAL diff = j->prev->tail()[1] - val;
- if( diff > 0.0 ) {
+ if( diff > 0.0 ) {
if( ccwTurn_tr( j->prev, j ) )
out.addarc( j );
else
diff --git a/src/glu/sgi/libnurbs/internals/jarcloc.h b/src/glu/sgi/libnurbs/internals/jarcloc.h
index 5297036..168d3ef 100644
--- a/src/glu/sgi/libnurbs/internals/jarcloc.h
+++ b/src/glu/sgi/libnurbs/internals/jarcloc.h
@@ -71,7 +71,7 @@ Jarcloc::getnextpt()
}
return p++;
}
-
+
inline TrimVertex *
Jarcloc::getprevpt()
{
diff --git a/src/glu/sgi/libnurbs/internals/knotvector.cc b/src/glu/sgi/libnurbs/internals/knotvector.cc
index dcbf006..c0c4fdb 100644
--- a/src/glu/sgi/libnurbs/internals/knotvector.cc
+++ b/src/glu/sgi/libnurbs/internals/knotvector.cc
@@ -98,7 +98,7 @@ int Knotvector::validate( void )
// decreasing knot sequence
return( 4 );
}
-
+
/* check for valid multiplicity */
/* kindex is currently the index of the last knot.
diff --git a/src/glu/sgi/libnurbs/internals/knotvector.h b/src/glu/sgi/libnurbs/internals/knotvector.h
index 85b162f..a8b7e98 100644
--- a/src/glu/sgi/libnurbs/internals/knotvector.h
+++ b/src/glu/sgi/libnurbs/internals/knotvector.h
@@ -54,7 +54,7 @@ struct Knotvector { /* a knot vector */
/* tolerance to test knot coincidence */
#define TOLERANCE 1.0e-5
-inline int
+inline int
identical( Knot x, Knot y )
{
return ((x-y) < TOLERANCE) ? 1 : 0;
diff --git a/src/glu/sgi/libnurbs/internals/mapdesc.cc b/src/glu/sgi/libnurbs/internals/mapdesc.cc
index d59f8fd..3c72353 100644
--- a/src/glu/sgi/libnurbs/internals/mapdesc.cc
+++ b/src/glu/sgi/libnurbs/internals/mapdesc.cc
@@ -47,7 +47,7 @@
#include "nurbsconsts.h"
#include "mapdesc.h"
-Mapdesc::Mapdesc( long _type, int _israt, int _ncoords, Backend& b )
+Mapdesc::Mapdesc( long _type, int _israt, int _ncoords, Backend& b )
: backend( b )
{
type = _type;
@@ -64,7 +64,7 @@ Mapdesc::Mapdesc( long _type, int _israt, int _ncoords, Backend& b )
pixel_tolerance = 1.0;
error_tolerance = 1.0;
bbox_subdividing = N_NOBBOXSUBDIVISION;
- culling_method = N_NOCULLING;
+ culling_method = N_NOCULLING;
sampling_method = N_NOSAMPLING;
clampfactor = N_NOCLAMPING;
minsavings = N_NOSAVINGSSUBDIVISION;
@@ -101,7 +101,7 @@ Mapdesc::surfbbox( REAL bb[2][MAXCOORDS] )
backend.surfbbox( type, bb[0], bb[1] );
}
-void
+void
Mapdesc::copy( REAL dest[MAXCOORDS][MAXCOORDS], long n, INREAL *src,
long rstride, long cstride )
{
@@ -120,25 +120,25 @@ Mapdesc::copyPt( REAL *d, REAL *s )
{
assert( hcoords > 0 );
switch( hcoords ) {
- case 4:
+ case 4:
d[3] = s[3];
d[2] = s[2];
d[1] = s[1];
d[0] = s[0];
break;
- case 3:
+ case 3:
d[2] = s[2];
d[1] = s[1];
d[0] = s[0];
break;
- case 2:
+ case 2:
d[1] = s[1];
d[0] = s[0];
break;
- case 1:
+ case 1:
d[0] = s[0];
break;
- case 5:
+ case 5:
d[4] = s[4];
d[3] = s[3];
d[2] = s[2];
@@ -160,25 +160,25 @@ Mapdesc::sumPt( REAL *dst, REAL *src1, REAL *src2, register REAL alpha, register
{
assert( hcoords > 0 );
switch( hcoords ) {
- case 4:
+ case 4:
dst[3] = src1[3] * alpha + src2[3] * beta;
dst[2] = src1[2] * alpha + src2[2] * beta;
dst[1] = src1[1] * alpha + src2[1] * beta;
dst[0] = src1[0] * alpha + src2[0] * beta;
break;
- case 3:
+ case 3:
dst[2] = src1[2] * alpha + src2[2] * beta;
dst[1] = src1[1] * alpha + src2[1] * beta;
dst[0] = src1[0] * alpha + src2[0] * beta;
break;
- case 2:
+ case 2:
dst[1] = src1[1] * alpha + src2[1] * beta;
dst[0] = src1[0] * alpha + src2[0] * beta;
break;
- case 1:
+ case 1:
dst[0] = src1[0] * alpha + src2[0] * beta;
break;
- case 5:
+ case 5:
dst[4] = src1[4] * alpha + src2[4] * beta;
dst[3] = src1[3] * alpha + src2[3] * beta;
dst[2] = src1[2] * alpha + src2[2] * beta;
@@ -234,16 +234,16 @@ Mapdesc::clipbits( REAL *p )
default: {
int bit = 1;
for( int i=0; i= nw ) bits |= bit;
+ if( p[i] >= nw ) bits |= bit;
bit <<= 1;
- if( p[i] <= pw ) bits |= bit;
+ if( p[i] <= pw ) bits |= bit;
bit <<= 1;
}
abort();
break;
}
}
- } else {
+ } else {
switch( nc ) {
case 3:
if( p[2] <= nw ) bits |= (1<<5);
@@ -264,11 +264,11 @@ Mapdesc::clipbits( REAL *p )
if( p[0] >= pw ) bits |= (1<<0);
return bits;
default: {
- int bit = 1;
+ int bit = 1;
for( int i=0; i= pw ) bits |= bit;
+ if( p[i] >= pw ) bits |= bit;
bit <<= 1;
- if( p[i] <= nw ) bits |= bit;
+ if( p[i] <= nw ) bits |= bit;
bit <<= 1;
}
abort();
@@ -345,14 +345,14 @@ Mapdesc::xformNonrational( Maxmatrix mat, REAL *d, REAL *s )
}
/*--------------------------------------------------------------------------
- * xformAndCullCheck - transform a set of points that may be EITHER
+ * xformAndCullCheck - transform a set of points that may be EITHER
* homogeneous or inhomogeneous depending on the map description and
- * check if they are either completely inside, completely outside,
+ * check if they are either completely inside, completely outside,
* or intersecting the viewing frustrum.
*--------------------------------------------------------------------------
*/
int
-Mapdesc::xformAndCullCheck(
+Mapdesc::xformAndCullCheck(
REAL *pts, int uorder, int ustride, int vorder, int vstride )
{
assert( uorder > 0 );
@@ -371,7 +371,7 @@ Mapdesc::xformAndCullCheck(
outbits |= bits;
inbits &= bits;
if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT;
- }
+ }
}
if( outbits != (unsigned int)mask ) {
@@ -384,8 +384,8 @@ Mapdesc::xformAndCullCheck(
}
/*--------------------------------------------------------------------------
- * cullCheck - check if a set of homogeneous transformed points are
- * either completely inside, completely outside,
+ * cullCheck - check if a set of homogeneous transformed points are
+ * either completely inside, completely outside,
* or intersecting the viewing frustrum.
*--------------------------------------------------------------------------
*/
@@ -403,7 +403,7 @@ Mapdesc::cullCheck( REAL *pts, int uorder, int ustride, int vorder, int vstride
outbits |= bits;
inbits &= bits;
if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT;
- }
+ }
}
if( outbits != (unsigned int)mask ) {
@@ -416,8 +416,8 @@ Mapdesc::cullCheck( REAL *pts, int uorder, int ustride, int vorder, int vstride
}
/*--------------------------------------------------------------------------
- * cullCheck - check if a set of homogeneous transformed points are
- * either completely inside, completely outside,
+ * cullCheck - check if a set of homogeneous transformed points are
+ * either completely inside, completely outside,
* or intersecting the viewing frustrum.
*--------------------------------------------------------------------------
*/
@@ -445,9 +445,9 @@ Mapdesc::cullCheck( REAL *pts, int order, int stride )
}
/*--------------------------------------------------------------------------
- * xformSampling - transform a set of points that may be EITHER
- * homogeneous or inhomogeneous depending on the map description
- * into sampling space
+ * xformSampling - transform a set of points that may be EITHER
+ * homogeneous or inhomogeneous depending on the map description
+ * into sampling space
*--------------------------------------------------------------------------
*/
void
@@ -463,9 +463,9 @@ Mapdesc::xformBounding( REAL *pts, int order, int stride, REAL *sp, int outstrid
}
/*--------------------------------------------------------------------------
- * xformCulling - transform a set of points that may be EITHER
- * homogeneous or inhomogeneous depending on the map description
- * into culling space
+ * xformCulling - transform a set of points that may be EITHER
+ * homogeneous or inhomogeneous depending on the map description
+ * into culling space
*--------------------------------------------------------------------------
*/
void
@@ -475,51 +475,51 @@ Mapdesc::xformCulling( REAL *pts, int order, int stride, REAL *cp, int outstride
}
/*--------------------------------------------------------------------------
- * xformCulling - transform a set of points that may be EITHER
- * homogeneous or inhomogeneous depending on the map description
- * into culling space
+ * xformCulling - transform a set of points that may be EITHER
+ * homogeneous or inhomogeneous depending on the map description
+ * into culling space
*--------------------------------------------------------------------------
*/
void
-Mapdesc::xformCulling( REAL *pts,
+Mapdesc::xformCulling( REAL *pts,
int uorder, int ustride,
- int vorder, int vstride,
+ int vorder, int vstride,
REAL *cp, int outustride, int outvstride )
{
xformMat( cmat, pts, uorder, ustride, vorder, vstride, cp, outustride, outvstride );
}
/*--------------------------------------------------------------------------
- * xformSampling - transform a set of points that may be EITHER
- * homogeneous or inhomogeneous depending on the map description
- * into sampling space
+ * xformSampling - transform a set of points that may be EITHER
+ * homogeneous or inhomogeneous depending on the map description
+ * into sampling space
*--------------------------------------------------------------------------
*/
void
-Mapdesc::xformSampling( REAL *pts,
- int uorder, int ustride,
- int vorder, int vstride,
+Mapdesc::xformSampling( REAL *pts,
+ int uorder, int ustride,
+ int vorder, int vstride,
REAL *sp, int outustride, int outvstride )
{
xformMat( smat, pts, uorder, ustride, vorder, vstride, sp, outustride, outvstride );
}
void
-Mapdesc::xformBounding( REAL *pts,
- int uorder, int ustride,
- int vorder, int vstride,
+Mapdesc::xformBounding( REAL *pts,
+ int uorder, int ustride,
+ int vorder, int vstride,
REAL *sp, int outustride, int outvstride )
{
xformMat( bmat, pts, uorder, ustride, vorder, vstride, sp, outustride, outvstride );
}
void
-Mapdesc::xformMat(
- Maxmatrix mat,
- REAL * pts,
- int order,
+Mapdesc::xformMat(
+ Maxmatrix mat,
+ REAL * pts,
+ int order,
int stride,
- REAL * cp,
+ REAL * cp,
int outstride )
{
if( isrational ) {
@@ -527,20 +527,20 @@ Mapdesc::xformMat(
for( REAL *p = pts ; p != pend; p += stride ) {
xformRational( mat, cp, p );
cp += outstride;
- }
+ }
} else {
REAL *pend = pts + order * stride;
for( REAL *p = pts ; p != pend; p += stride ) {
xformNonrational( mat, cp, p );
cp += outstride;
- }
+ }
}
}
void
-Mapdesc::xformMat( Maxmatrix mat, REAL *pts,
- int uorder, int ustride,
- int vorder, int vstride,
+Mapdesc::xformMat( Maxmatrix mat, REAL *pts,
+ int uorder, int ustride,
+ int vorder, int vstride,
REAL *cp, int outustride, int outvstride )
{
if( isrational ) {
@@ -551,7 +551,7 @@ Mapdesc::xformMat( Maxmatrix mat, REAL *pts,
for( REAL *q = p; q != qend; q += vstride ) {
xformRational( mat, cpts2, q );
cpts2 += outvstride;
- }
+ }
cp += outustride;
}
} else {
@@ -562,7 +562,7 @@ Mapdesc::xformMat( Maxmatrix mat, REAL *pts,
for( REAL *q = p; q != qend; q += vstride ) {
xformNonrational( mat, cpts2, q );
cpts2 += outvstride;
- }
+ }
cp += outustride;
}
}
@@ -592,7 +592,7 @@ Mapdesc::subdivide( REAL *src, REAL *dst, REAL v, int stride, int order )
*/
void
-Mapdesc::subdivide( REAL *src, REAL *dst, REAL v,
+Mapdesc::subdivide( REAL *src, REAL *dst, REAL v,
int so, int ss, int to, int ts )
{
REAL mv = 1.0 - v;
@@ -617,7 +617,7 @@ Mapdesc::subdivide( REAL *src, REAL *dst, REAL v,
*--------------------------------------------------------------------------
*/
int
-Mapdesc::project( REAL *src, int rstride, int cstride,
+Mapdesc::project( REAL *src, int rstride, int cstride,
REAL *dest, int trstride, int tcstride,
int nrows, int ncols )
{
@@ -652,7 +652,7 @@ Mapdesc::project( REAL *src, int stride, REAL *dest, int tstride, int ncols )
for( REAL *cptr = src, *tcptr = dest; cptr != clast; cptr+=stride, tcptr+=tstride ) {
REAL *coordlast = cptr + inhcoords;
if( sign( *coordlast ) != s ) return 0;
- for( REAL *coord = cptr, *tcoord = tcptr; coord != coordlast; coord++, tcoord++ )
+ for( REAL *coord = cptr, *tcoord = tcptr; coord != coordlast; coord++, tcoord++ )
*tcoord = *coord / *coordlast;
}
@@ -660,8 +660,8 @@ Mapdesc::project( REAL *src, int stride, REAL *dest, int tstride, int ncols )
}
int
-Mapdesc::bboxTooBig(
- REAL *p,
+Mapdesc::bboxTooBig(
+ REAL *p,
int rstride,
int cstride,
int nrows,
@@ -670,11 +670,11 @@ Mapdesc::bboxTooBig(
{
REAL bbpts[MAXORDER][MAXORDER][MAXCOORDS];
const int trstride = sizeof(bbpts[0]) / sizeof(REAL);
- const int tcstride = sizeof(bbpts[0][0]) / sizeof(REAL);
+ const int tcstride = sizeof(bbpts[0][0]) / sizeof(REAL);
// points have been transformed, therefore they are homogeneous
// project points
- int val = project( p, rstride, cstride,
+ int val = project( p, rstride, cstride,
&bbpts[0][0][0], trstride, tcstride, nrows, ncols );
if( val == 0 ) return -1;
@@ -689,13 +689,13 @@ Mapdesc::bboxTooBig(
for( int k=0; k != inhcoords; k++ )
if( bb[1][k] - bb[0][k] > bboxsize[k] ) return 1;
}
- return 0;
+ return 0;
}
void
-Mapdesc::bbox(
- REAL bb[2][MAXCOORDS],
- REAL *p,
+Mapdesc::bbox(
+ REAL bb[2][MAXCOORDS],
+ REAL *p,
int rstride,
int cstride,
int nrows,
@@ -705,8 +705,8 @@ Mapdesc::bbox(
for( k=0; k != inhcoords; k++ )
bb[0][k] = bb[1][k] = p[k];
- for( int i=0; i != nrows; i++ )
- for( int j=0; j != ncols; j++ )
+ for( int i=0; i != nrows; i++ )
+ for( int j=0; j != ncols; j++ )
for( k=0; k != inhcoords; k++ ) {
REAL x = p[i*rstride + j*cstride + k];
if( x < bb[0][k] ) bb[0][k] = x;
@@ -715,7 +715,7 @@ Mapdesc::bbox(
}
/*--------------------------------------------------------------------------
- * calcVelocityRational - calculate upper bound on first partial derivative
+ * calcVelocityRational - calculate upper bound on first partial derivative
* of a homogeneous set of points and bounds on each row of points.
*--------------------------------------------------------------------------
*/
@@ -726,7 +726,7 @@ Mapdesc::calcVelocityRational( REAL *p, int stride, int ncols )
assert( ncols <= MAXORDER );
- const int tstride = sizeof(tmp[0]) / sizeof(REAL);
+ const int tstride = sizeof(tmp[0]) / sizeof(REAL);
if( project( p, stride, &tmp[0][0], tstride, ncols ) ) {
return calcPartialVelocity( &tmp[0][0], tstride, ncols, 1, 1.0 );
@@ -736,7 +736,7 @@ Mapdesc::calcVelocityRational( REAL *p, int stride, int ncols )
}
/*--------------------------------------------------------------------------
- * calcVelocityNonrational - calculate upper bound on first partial
+ * calcVelocityNonrational - calculate upper bound on first partial
* derivative of a inhomogeneous set of points.
*--------------------------------------------------------------------------
*/
diff --git a/src/glu/sgi/libnurbs/internals/mapdesc.h b/src/glu/sgi/libnurbs/internals/mapdesc.h
index 6f06154..56a74dd 100644
--- a/src/glu/sgi/libnurbs/internals/mapdesc.h
+++ b/src/glu/sgi/libnurbs/internals/mapdesc.h
@@ -48,7 +48,7 @@ class Backend;
class Mapdesc : public PooledObj {
friend class Maplist;
-
+
public:
Mapdesc( long, int, int, Backend & );
int isProperty( long );
@@ -123,7 +123,7 @@ class Mapdesc : public PooledObj {
Maxmatrix smat;
REAL s_steps; /* max samples in s direction */
REAL t_steps; /* max samples in t direction */
- REAL sampling_method;
+ REAL sampling_method;
REAL culling_method; /* check for culling */
REAL bbox_subdividing;
Mapdesc * next;
@@ -188,62 +188,62 @@ Mapdesc::xformSampling( REAL *d, REAL *s )
xformNonrational( smat, d, s );
}
-inline int
+inline int
Mapdesc::isRational( void )
{
return isrational ? 1 : 0;
}
-inline int
-Mapdesc::getNcoords( void )
+inline int
+Mapdesc::getNcoords( void )
{
- return ncoords;
+ return ncoords;
}
-inline int
-Mapdesc::isConstantSampling( void )
+inline int
+Mapdesc::isConstantSampling( void )
{
- return ((sampling_method == N_FIXEDRATE) ? 1 : 0);
+ return ((sampling_method == N_FIXEDRATE) ? 1 : 0);
}
-inline int
-Mapdesc::isDomainSampling( void )
-{
- return ((sampling_method == N_DOMAINDISTANCE) ? 1 : 0);
+inline int
+Mapdesc::isDomainSampling( void )
+{
+ return ((sampling_method == N_DOMAINDISTANCE) ? 1 : 0);
}
-inline int
-Mapdesc::isParametricDistanceSampling( void )
+inline int
+Mapdesc::isParametricDistanceSampling( void )
{
return ((sampling_method == N_PARAMETRICDISTANCE) ? 1 : 0);
}
-inline int
-Mapdesc::isObjectSpaceParaSampling( void )
+inline int
+Mapdesc::isObjectSpaceParaSampling( void )
{
return ((sampling_method == N_OBJECTSPACE_PARA) ? 1 : 0);
}
-inline int
-Mapdesc::isObjectSpacePathSampling( void )
+inline int
+Mapdesc::isObjectSpacePathSampling( void )
{
return ((sampling_method == N_OBJECTSPACE_PATH) ? 1 : 0);
}
-inline int
-Mapdesc::isSurfaceAreaSampling( void )
+inline int
+Mapdesc::isSurfaceAreaSampling( void )
{
return ((sampling_method == N_SURFACEAREA) ? 1 : 0);
}
-inline int
-Mapdesc::isPathLengthSampling( void )
+inline int
+Mapdesc::isPathLengthSampling( void )
{
return ((sampling_method == N_PATHLENGTH) ? 1 : 0);
}
-inline int
-Mapdesc::isRangeSampling( void )
+inline int
+Mapdesc::isRangeSampling( void )
{
return ( isParametricDistanceSampling() || isPathLengthSampling() ||
isSurfaceAreaSampling() ||
@@ -257,14 +257,14 @@ Mapdesc::isSampling( void )
return isRangeSampling() || isConstantSampling() || isDomainSampling();
}
-inline int
-Mapdesc::isCulling( void )
+inline int
+Mapdesc::isCulling( void )
{
return ((culling_method != N_NOCULLING) ? 1 : 0);
}
-inline int
-Mapdesc::isBboxSubdividing( void )
+inline int
+Mapdesc::isBboxSubdividing( void )
{
return ((bbox_subdividing != N_NOBBOXSUBDIVISION) ? 1 : 0);
}
diff --git a/src/glu/sgi/libnurbs/internals/mapdescv.cc b/src/glu/sgi/libnurbs/internals/mapdescv.cc
index 35b38b1..a37f1bd 100644
--- a/src/glu/sgi/libnurbs/internals/mapdescv.cc
+++ b/src/glu/sgi/libnurbs/internals/mapdescv.cc
@@ -65,13 +65,13 @@ Mapdesc::calcPartialVelocity (
int j, k, t;
// copy inhomogeneous control points into temporary array
- for( j=0; j != ncols; j++ )
+ for( j=0; j != ncols; j++ )
for( k=0; k != inhcoords; k++ )
tmp[j][k] = p[j*stride + k];
- for( t=0; t != partial; t++ )
- for( j=0; j != ncols-t-1; j++ )
- for( k=0; k != inhcoords; k++ )
+ for( t=0; t != partial; t++ )
+ for( j=0; j != ncols-t-1; j++ )
+ for( k=0; k != inhcoords; k++ )
tmp[j][k] = tmp[j+1][k] - tmp[j][k];
// compute magnitude and store in mag array
@@ -84,7 +84,7 @@ Mapdesc::calcPartialVelocity (
// compute scale factor
REAL fac = 1;
REAL invt = 1.0 / range;
- for( t = ncols-1; t != ncols-1-partial; t-- )
+ for( t = ncols-1; t != ncols-1-partial; t-- )
fac *= t * invt;
// compute max magnitude of all entries in array
@@ -111,7 +111,7 @@ Mapdesc::calcPartialVelocity (
int ncols,
int spartial,
int tpartial,
- REAL srange,
+ REAL srange,
REAL trange,
int side )
{
@@ -155,7 +155,7 @@ Mapdesc::calcPartialVelocity (
qj += cstride;
}
ti += istride;
- qi += rstride;
+ qi += rstride;
}
}
@@ -177,7 +177,7 @@ Mapdesc::calcPartialVelocity (
for( ; tjl != tjll; tjl -= jstride )
for( REAL *tj = tp; tj != tjl; tj += jstride )
for( REAL *ti = tj, *til = ti + id; ti != til; ti += istride )
- for( int k=0; k != inhcoords; k++ )
+ for( int k=0; k != inhcoords; k++ )
ti[k] = ti[k+jstride] - ti[k];
}
@@ -202,9 +202,9 @@ Mapdesc::calcPartialVelocity (
{
REAL invs = 1.0 / srange;
REAL invt = 1.0 / trange;
- for( int s = nrows-1, slast = s-spartial; s != slast; s-- )
+ for( int s = nrows-1, slast = s-spartial; s != slast; s-- )
fac *= s * invs;
- for( int t = ncols-1, tlast = t-tpartial; t != tlast; t-- )
+ for( int t = ncols-1, tlast = t-tpartial; t != tlast; t-- )
fac *= t * invt;
}
@@ -215,7 +215,7 @@ Mapdesc::calcPartialVelocity (
for( i=0; i != nrows-spartial; i++ ) {
j = 0;
if( mag[i][j] > dist[0] ) dist[0] = mag[i][j];
-
+
j = ncols-tpartial-1;
if( mag[i][j] > dist[1] ) dist[1] = mag[i][j];
}
@@ -228,7 +228,7 @@ Mapdesc::calcPartialVelocity (
for( j=0; j != ncols-tpartial; j++ ) {
i = 0;
if( mag[i][j] > dist[0] ) dist[0] = mag[i][j];
-
+
i = nrows-spartial-1;
if( mag[i][j] > dist[1] ) dist[1] = mag[i][j];
}
diff --git a/src/glu/sgi/libnurbs/internals/maplist.cc b/src/glu/sgi/libnurbs/internals/maplist.cc
index e51a3e8..485dd0c 100644
--- a/src/glu/sgi/libnurbs/internals/maplist.cc
+++ b/src/glu/sgi/libnurbs/internals/maplist.cc
@@ -44,7 +44,7 @@
#include "nurbsconsts.h"
#include "maplist.h"
#include "mapdesc.h"
-
+
Maplist::Maplist( Backend& b )
: mapdescPool( sizeof( Mapdesc ), 10, "mapdesc pool" ),
backend( b )
@@ -52,7 +52,7 @@ Maplist::Maplist( Backend& b )
maps = 0; lastmap = &maps;
}
-void
+void
Maplist::initialize( void )
{
freeMaps();
@@ -60,14 +60,14 @@ Maplist::initialize( void )
define( N_P2DR, 1, 3 );
}
-void
+void
Maplist::add( long type, int israt, int ncoords )
{
*lastmap = new(mapdescPool) Mapdesc( type, israt, ncoords, backend );
lastmap = &((*lastmap)->next);
}
-void
+void
Maplist::define( long type, int israt, int ncoords )
{
#ifndef NDEBUG // to avoid warning
@@ -77,7 +77,7 @@ Maplist::define( long type, int israt, int ncoords )
add( type, israt, ncoords );
}
-void
+void
Maplist::remove( Mapdesc *m )
{
for( Mapdesc **curmap = &maps; *curmap; curmap = &((*curmap)->next) ) {
@@ -98,7 +98,7 @@ Maplist::freeMaps( void )
lastmap = &maps;
}
-Mapdesc *
+Mapdesc *
Maplist::find( long type )
{
Mapdesc *val = locate( type );
@@ -106,7 +106,7 @@ Maplist::find( long type )
return val;
}
-Mapdesc *
+Mapdesc *
Maplist::locate( long type )
{
Mapdesc *m;
diff --git a/src/glu/sgi/libnurbs/internals/maplist.h b/src/glu/sgi/libnurbs/internals/maplist.h
index 49720e4..ddc9519 100644
--- a/src/glu/sgi/libnurbs/internals/maplist.h
+++ b/src/glu/sgi/libnurbs/internals/maplist.h
@@ -71,7 +71,7 @@ Maplist::isMap( long type )
return (locate( type ) ? 1 : 0);
}
-inline void
+inline void
Maplist::undefine( long type )
{
Mapdesc *m = locate( type );
diff --git a/src/glu/sgi/libnurbs/internals/mesher.cc b/src/glu/sgi/libnurbs/internals/mesher.cc
index b2d83f4..fea3f20 100644
--- a/src/glu/sgi/libnurbs/internals/mesher.cc
+++ b/src/glu/sgi/libnurbs/internals/mesher.cc
@@ -52,8 +52,8 @@
const float Mesher::ZERO = 0.0;
-Mesher::Mesher( Backend& b )
- : backend( b ),
+Mesher::Mesher( Backend& b )
+ : backend( b ),
p( sizeof( GridTrimVertex ), 100, "GridTrimVertexPool" )
{
stacksize = 0;
@@ -61,7 +61,7 @@ Mesher::Mesher( Backend& b )
last[0] = 0;
last[1] = 0;
itop = 0;
- lastedge = 0; //needed to prevent purify UMR
+ lastedge = 0; //needed to prevent purify UMR
}
Mesher::~Mesher( void )
@@ -69,15 +69,15 @@ Mesher::~Mesher( void )
if( vdata ) delete[] vdata;
}
-void
+void
Mesher::init( unsigned int npts )
{
p.clear();
if( stacksize < npts ) {
stacksize = 2 * npts;
- if( vdata ) delete[] vdata;
+ if( vdata ) delete[] vdata;
vdata = new GridTrimVertex_p[stacksize];
- }
+ }
}
inline void
@@ -120,9 +120,9 @@ Mesher::clearStack()
void
Mesher::finishLower( GridTrimVertex *gtlower )
{
- for( push(gtlower);
- nextlower( gtlower=new(p) GridTrimVertex );
- push(gtlower) )
+ for( push(gtlower);
+ nextlower( gtlower=new(p) GridTrimVertex );
+ push(gtlower) )
addLower();
addLast();
}
@@ -130,9 +130,9 @@ Mesher::finishLower( GridTrimVertex *gtlower )
void
Mesher::finishUpper( GridTrimVertex *gtupper )
{
- for( push(gtupper);
- nextupper( gtupper=new(p) GridTrimVertex );
- push(gtupper) )
+ for( push(gtupper);
+ nextupper( gtupper=new(p) GridTrimVertex );
+ push(gtupper) )
addUpper();
addLast();
}
@@ -154,7 +154,7 @@ Mesher::mesh( void )
nextlower( gtlower );
assert( gtupper->t && gtlower->t );
-
+
if( gtupper->t->param[0] < gtlower->t->param[0] ) {
push(gtupper);
lastedge = 1;
@@ -247,9 +247,9 @@ Mesher::copy( int x, int y )
{
last[0] = vdata[x]; last[1] = vdata[y];
}
-
+
inline void
-Mesher::move( int x, int y )
+Mesher::move( int x, int y )
{
vdata[x] = vdata[y];
}
@@ -403,7 +403,7 @@ Mesher::addUpper( )
for( register int i=ilast-2; i>=itop-1; i-- ) {
swapMesh();
output( i );
- }
+ }
copy( ilast, itop-1 );
}
//for( register int k=itop; k=1; i--) {
if(isIncreasing) {
isReflex = (area(queue[i-1], queue[i], v) <= 0.0);
}
else /*decreasing*/{
- isReflex = (area(v, queue[i], queue[i-1]) <= 0.0);
+ isReflex = (area(v, queue[i], queue[i-1]) <= 0.0);
}
if(isReflex) {
break;
@@ -109,10 +109,10 @@ void reflexChain::processNewVertex(Real v[2], Backend* backend)
/*
*if ibgntfan();
/*
@@ -144,7 +144,7 @@ void reflexChain::processNewVertex(Real v[2], Backend* backend)
backend->tmeshvert(queue[k][0], queue[k][1]);
}
}
-
+
backend->endtfan();
}
@@ -156,7 +156,7 @@ void reflexChain::processNewVertex(Real v[2], Backend* backend)
}
-void monoTriangulationRec(Real* topVertex, Real* botVertex,
+void monoTriangulationRec(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current,
vertexArray* dec_chain, Int dec_current,
Backend* backend)
@@ -175,7 +175,7 @@ void monoTriangulationRec(Real* topVertex, Real* botVertex,
{
dec_array = dec_chain->getArray();
- dec_nVertices = dec_chain->getNumElements();
+ dec_nVertices = dec_chain->getNumElements();
reflexChain rChain(20,0);
/*put the top vertex into the reflex chain*/
rChain.processNewVertex(topVertex, backend);
@@ -207,7 +207,7 @@ void monoTriangulationRec(Real* topVertex, Real* botVertex,
dec_array = dec_chain -> getArray();
inc_nVertices= inc_chain->getNumElements();
dec_nVertices= dec_chain->getNumElements();
- /*if top of inc_chain is 'lower' than top of dec_chain, process all the
+ /*if top of inc_chain is 'lower' than top of dec_chain, process all the
*vertices on the dec_chain which are higher than top of inc_chain
*/
if(compV2InY(inc_array[inc_current], dec_array[dec_current]) <= 0)
@@ -219,11 +219,11 @@ void monoTriangulationRec(Real* topVertex, Real* botVertex,
{
if(compV2InY(inc_array[inc_current], dec_array[i]) <= 0)
rChain.processNewVertex(dec_array[i], backend);
- else
+ else
break;
}
rChain.outputFan(inc_array[inc_current], backend);
- monoTriangulationRec(dec_array[i-1], botVertex,
+ monoTriangulationRec(dec_array[i-1], botVertex,
inc_chain, inc_current,
dec_chain, i,
backend);
@@ -235,13 +235,13 @@ void monoTriangulationRec(Real* topVertex, Real* botVertex,
rChain.processNewVertex(topVertex, backend);
for(i=inc_current; i0)
- rChain.processNewVertex(inc_array[i], backend);
+ if(compV2InY(inc_array[i], dec_array[dec_current]) >0)
+ rChain.processNewVertex(inc_array[i], backend);
else
break;
}
rChain.outputFan(dec_array[dec_current], backend);
- monoTriangulationRec(inc_array[i-1], botVertex,
+ monoTriangulationRec(inc_array[i-1], botVertex,
inc_chain, i,
dec_chain, dec_current,
backend);
@@ -281,7 +281,7 @@ void monoTriangulationFunBackend(Arc_ptr loop, Int (*compFun)(Real*, Real*), Bac
inc_chain.appendVertex(tempV->pwlArc->pts[i].param);
}
}
-
+
vertexArray dec_chain(20);
for(tempV = topV->prev; tempV != botV; tempV = tempV->prev)
{
@@ -289,18 +289,18 @@ void monoTriangulationFunBackend(Arc_ptr loop, Int (*compFun)(Real*, Real*), Bac
dec_chain.appendVertex(tempV->pwlArc->pts[i].param);
}
}
- for(i=botV->pwlArc->npts-2; i>=1; i--){
+ for(i=botV->pwlArc->npts-2; i>=1; i--){
dec_chain.appendVertex(tempV->pwlArc->pts[i].param);
}
-
+
monoTriangulationRecFunBackend(topV->tail(), botV->tail(), &inc_chain, 0, &dec_chain, 0, compFun, backend);
-}
+}
/*if compFun == compV2InY, top to bottom: V-monotone
*if compFun == compV2InX, right to left: U-monotone
*/
-void monoTriangulationRecFunBackend(Real* topVertex, Real* botVertex,
+void monoTriangulationRecFunBackend(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current,
vertexArray* dec_chain, Int dec_current,
Int (*compFun)(Real*, Real*),
@@ -320,7 +320,7 @@ void monoTriangulationRecFunBackend(Real* topVertex, Real* botVertex,
{
dec_array = dec_chain->getArray();
- dec_nVertices = dec_chain->getNumElements();
+ dec_nVertices = dec_chain->getNumElements();
reflexChain rChain(20,0);
/*put the top vertex into the reflex chain*/
rChain.processNewVertex(topVertex, backend);
@@ -352,7 +352,7 @@ void monoTriangulationRecFunBackend(Real* topVertex, Real* botVertex,
dec_array = dec_chain -> getArray();
inc_nVertices= inc_chain->getNumElements();
dec_nVertices= dec_chain->getNumElements();
- /*if top of inc_chain is 'lower' than top of dec_chain, process all the
+ /*if top of inc_chain is 'lower' than top of dec_chain, process all the
*vertices on the dec_chain which are higher than top of inc_chain
*/
if(compFun(inc_array[inc_current], dec_array[dec_current]) <= 0)
@@ -364,11 +364,11 @@ void monoTriangulationRecFunBackend(Real* topVertex, Real* botVertex,
{
if(compFun(inc_array[inc_current], dec_array[i]) <= 0)
rChain.processNewVertex(dec_array[i], backend);
- else
+ else
break;
}
rChain.outputFan(inc_array[inc_current], backend);
- monoTriangulationRecFunBackend(dec_array[i-1], botVertex,
+ monoTriangulationRecFunBackend(dec_array[i-1], botVertex,
inc_chain, inc_current,
dec_chain, i,
compFun,
@@ -381,13 +381,13 @@ void monoTriangulationRecFunBackend(Real* topVertex, Real* botVertex,
rChain.processNewVertex(topVertex, backend);
for(i=inc_current; i0)
- rChain.processNewVertex(inc_array[i], backend);
+ if(compFun(inc_array[i], dec_array[dec_current]) >0)
+ rChain.processNewVertex(inc_array[i], backend);
else
break;
}
rChain.outputFan(dec_array[dec_current], backend);
- monoTriangulationRecFunBackend(inc_array[i-1], botVertex,
+ monoTriangulationRecFunBackend(inc_array[i-1], botVertex,
inc_chain, i,
dec_chain, dec_current,
compFun,
diff --git a/src/glu/sgi/libnurbs/internals/monotonizer.cc b/src/glu/sgi/libnurbs/internals/monotonizer.cc
index 5845d31..1ca8355 100644
--- a/src/glu/sgi/libnurbs/internals/monotonizer.cc
+++ b/src/glu/sgi/libnurbs/internals/monotonizer.cc
@@ -61,7 +61,7 @@ Subdivider::decompose( Bin& bin, REAL geo_stepsize )
/* points have not been transformed, therefore they may be either
homogeneous or inhomogeneous */
tessellate( jarc, geo_stepsize );
- if( jarc->isDisconnected() || jarc->next->isDisconnected() )
+ if( jarc->isDisconnected() || jarc->next->isDisconnected() )
return 1;
}
}
@@ -87,15 +87,15 @@ Subdivider::tessellate( Arc_ptr jarc, REAL geo_stepsize )
if( mapdesc->isRational() ) {
REAL max = mapdesc->calcVelocityRational( b->cpts, b->stride, b->order );
- REAL arc_stepsize = (max > 1.0) ? (1.0/max) : 1.0;
+ REAL arc_stepsize = (max > 1.0) ? (1.0/max) : 1.0;
if( jarc->bezierArc->order != 2 )
arctessellator.tessellateNonlinear( jarc, geo_stepsize, arc_stepsize, 1 );
else {
arctessellator.tessellateLinear( jarc, geo_stepsize, arc_stepsize, 1 );
}
- } else {
+ } else {
REAL max = mapdesc->calcVelocityNonrational( b->cpts, b->stride, b->order );
- REAL arc_stepsize = (max > 1.0) ? (1.0/max) : 1.0;
+ REAL arc_stepsize = (max > 1.0) ? (1.0/max) : 1.0;
if( jarc->bezierArc->order != 2 )
arctessellator.tessellateNonlinear( jarc, geo_stepsize, arc_stepsize, 0 );
else {
@@ -131,7 +131,7 @@ Subdivider::monotonize( Arc_ptr jarc, Bin& bin )
change = 0;
/* check change relative to s axis, clear degenerate bit if needed */
- REAL sdiff = vert[1].param[0] - vert[0].param[0];
+ REAL sdiff = vert[1].param[0] - vert[0].param[0];
if( sdiff == 0 ) {
if( sdir != same ) {
sdir = same;
@@ -150,10 +150,10 @@ Subdivider::monotonize( Arc_ptr jarc, Bin& bin )
}
nudegenerate = 0;
}
-
+
/* check change relative to t axis, clear degenerate bit if needed */
- REAL tdiff = vert[1].param[1] - vert[0].param[1];
- if( tdiff == 0 ) {
+ REAL tdiff = vert[1].param[1] - vert[0].param[1];
+ if( tdiff == 0 ) {
if( tdir != same ) {
tdir = same;
change = 1;
@@ -171,7 +171,7 @@ Subdivider::monotonize( Arc_ptr jarc, Bin& bin )
}
nudegenerate = 0;
}
-
+
if( change ) {
if( ! degenerate ) {
/* make last segment into separate pwl curve */
@@ -182,7 +182,7 @@ Subdivider::monotonize( Arc_ptr jarc, Bin& bin )
}
firstvert = jarc->pwlArc->pts = vert;
degenerate = nudegenerate;
- }
+ }
}
jarc->pwlArc->npts = vert - firstvert + 1;
@@ -199,7 +199,7 @@ Subdivider::monotonize( Arc_ptr jarc, Bin& bin )
jarc->pwlArc->deleteMe( pwlarcpool ); jarc->pwlArc = 0;
jarc->deleteMe( arcpool );
- }
+ }
}
/*-------------------------------------------------------------------------
@@ -218,16 +218,16 @@ Subdivider::isMonotone( Arc_ptr jarc )
enum dir sdir;
enum dir tdir;
- REAL diff = vert[1].param[0] - vert[0].param[0];
- if( diff == 0.0 )
+ REAL diff = vert[1].param[0] - vert[0].param[0];
+ if( diff == 0.0 )
sdir = same;
else if( diff < 0.0 )
sdir = down;
else
sdir = up;
- diff = vert[1].param[1] - vert[0].param[1];
- if( diff == 0.0 )
+ diff = vert[1].param[1] - vert[0].param[1];
+ if( diff == 0.0 )
tdir = same;
else if( diff < 0.0 )
tdir = down;
@@ -235,9 +235,9 @@ Subdivider::isMonotone( Arc_ptr jarc )
tdir = up;
if( (sdir == same) && (tdir == same) ) return 0;
-
+
for( ++vert ; vert != lastvert; vert++ ) {
- diff = vert[1].param[0] - vert[0].param[0];
+ diff = vert[1].param[0] - vert[0].param[0];
if( diff == 0.0 ) {
if( sdir != same ) return 0;
} else if( diff < 0.0 ) {
@@ -246,7 +246,7 @@ Subdivider::isMonotone( Arc_ptr jarc )
if( sdir != up ) return 0;
}
- diff = vert[1].param[1] - vert[0].param[1];
+ diff = vert[1].param[1] - vert[0].param[1];
if( diff == 0.0 ) {
if( tdir != same ) return 0;
} else if( diff < 0.0 ) {
diff --git a/src/glu/sgi/libnurbs/internals/monotonizer.h b/src/glu/sgi/libnurbs/internals/monotonizer.h
index e951084..197225f 100644
--- a/src/glu/sgi/libnurbs/internals/monotonizer.h
+++ b/src/glu/sgi/libnurbs/internals/monotonizer.h
@@ -57,7 +57,7 @@ class Monotonizer {
void monotonize( Arc *, Bin & );
int isMonotone( Arc * );
public:
- Monotonizer( ArcTessellator& at, Pool& ap, Pool& p, jmp_buf& j )
+ Monotonizer( ArcTessellator& at, Pool& ap, Pool& p, jmp_buf& j )
: arctessellator(at), arcpool(ap), pwlarcpool(p), nurbsJmpBuf(j) {}
int decompose( Bin &, REAL );
};
diff --git a/src/glu/sgi/libnurbs/internals/mycode.cc b/src/glu/sgi/libnurbs/internals/mycode.cc
index 3625cac..e8ec199 100644
--- a/src/glu/sgi/libnurbs/internals/mycode.cc
+++ b/src/glu/sgi/libnurbs/internals/mycode.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
diff --git a/src/glu/sgi/libnurbs/internals/mymath.h b/src/glu/sgi/libnurbs/internals/mymath.h
index 17ef723..8966d88 100644
--- a/src/glu/sgi/libnurbs/internals/mymath.h
+++ b/src/glu/sgi/libnurbs/internals/mymath.h
@@ -43,7 +43,7 @@
#if defined(GLBUILD) || defined(STANDALONE)
#define M_SQRT2 1.41421356237309504880
#define ceilf myceilf
-#define floorf myfloorf
+#define floorf myfloorf
#define sqrtf sqrt
extern "C" double sqrt(double);
extern "C" float ceilf(float);
diff --git a/src/glu/sgi/libnurbs/internals/mysetjmp.h b/src/glu/sgi/libnurbs/internals/mysetjmp.h
index 2a3f6a8..5703e53 100644
--- a/src/glu/sgi/libnurbs/internals/mysetjmp.h
+++ b/src/glu/sgi/libnurbs/internals/mysetjmp.h
@@ -70,7 +70,7 @@ deleteJumpbuffer(JumpBuffer *jb)
}
inline void
-mylongjmp( JumpBuffer *j, int code )
+mylongjmp( JumpBuffer *j, int code )
{
::longjmp( j->buf, code );
}
diff --git a/src/glu/sgi/libnurbs/internals/nurbsconsts.h b/src/glu/sgi/libnurbs/internals/nurbsconsts.h
index acc5d7f..6a0b961 100644
--- a/src/glu/sgi/libnurbs/internals/nurbsconsts.h
+++ b/src/glu/sgi/libnurbs/internals/nurbsconsts.h
@@ -36,7 +36,7 @@
#ifndef __glunurbsconsts_h_
#define __glunurbsconsts_h_
-/* NURBS Properties - one set per map,
+/* NURBS Properties - one set per map,
each takes a single INREAL arg */
#define N_SAMPLING_TOLERANCE 1
#define N_S_RATE 6
@@ -46,7 +46,7 @@
#define N_MINSAVINGS 14
#define N_NOSAVINGSSUBDIVISION 0.0
-/* NURBS Properties - one set per map,
+/* NURBS Properties - one set per map,
each takes an enumerated value */
#define N_CULLING 2
#define N_NOCULLING 0.0
@@ -68,7 +68,7 @@
/* NURBS Rendering Properties - one set per renderer
each takes an enumerated value */
#define N_DISPLAY 3
-#define N_FILL 1.0
+#define N_FILL 1.0
#define N_OUTLINE_POLY 2.0
#define N_OUTLINE_TRI 3.0
#define N_OUTLINE_QUAD 4.0
@@ -113,8 +113,8 @@
/* type argument for trimming curves */
#ifndef N_P2D
-#define N_P2D 0x8
+#define N_P2D 0x8
#define N_P2DR 0xd
-#endif
+#endif
#endif /* __glunurbsconsts_h_ */
diff --git a/src/glu/sgi/libnurbs/internals/nurbsinterfac.cc b/src/glu/sgi/libnurbs/internals/nurbsinterfac.cc
index 520bd41..0cfe52a 100644
--- a/src/glu/sgi/libnurbs/internals/nurbsinterfac.cc
+++ b/src/glu/sgi/libnurbs/internals/nurbsinterfac.cc
@@ -63,7 +63,7 @@
work( );\
}
-NurbsTessellator::NurbsTessellator( BasicCurveEvaluator &c, BasicSurfaceEvaluator& e)
+NurbsTessellator::NurbsTessellator( BasicCurveEvaluator &c, BasicSurfaceEvaluator& e)
: maplist( backend ),
backend( c, e ),
subdivider( renderhints, backend ),
@@ -85,7 +85,7 @@ NurbsTessellator::NurbsTessellator( BasicCurveEvaluator &c, BasicSurfaceEvaluato
subdivider.setJumpbuffer( jumpbuffer );
}
-NurbsTessellator::~NurbsTessellator( void )
+NurbsTessellator::~NurbsTessellator( void )
{
if( inTrim ) {
do_nurbserror( 12 );
@@ -100,7 +100,7 @@ NurbsTessellator::~NurbsTessellator( void )
if (jumpbuffer) {
deleteJumpbuffer(jumpbuffer);
jumpbuffer= 0;
- }
+ }
}
/*-----------------------------------------------------------------------------
@@ -119,7 +119,7 @@ NurbsTessellator::bgnsurface( long nuid )
/*-----------------------------------------------------------------------------
* bgncurve - allocate an initialize an o_curve structure
- *
+ *
* Client: GL user
*-----------------------------------------------------------------------------
*/
@@ -132,7 +132,7 @@ NurbsTessellator::bgncurve( long nuid )
}
/*-----------------------------------------------------------------------------
* endcurve -
- *
+ *
* Client:
*-----------------------------------------------------------------------------
*/
@@ -299,11 +299,11 @@ NurbsTessellator::nurbscurve(
knots.init( nknots, byte_stride, order, knot );
if( do_check_knots( &knots, "curve" ) ) return;
-
+
O_nurbscurve *o_nurbscurve = new(o_nurbscurvePool) O_nurbscurve(type);
o_nurbscurve->bezier_curves = new(quiltPool) Quilt(mapdesc);
o_nurbscurve->bezier_curves->toBezier( knots,ctlarray, mapdesc->getNcoords() );
-
+
THREAD( do_nurbscurve, o_nurbscurve, do_freenurbscurve );
}
@@ -326,7 +326,7 @@ NurbsTessellator::nurbssurface(
long sorder, /* order of the spline in s parameter */
long torder, /* order of the spline in t parameter */
long type) /* description of range space */
-{
+{
Mapdesc *mapdesc = maplist.locate( type );
if( mapdesc == 0 ) {
@@ -359,14 +359,14 @@ NurbsTessellator::nurbssurface(
o_nurbssurface->bezier_patches = new(quiltPool) Quilt(mapdesc);
o_nurbssurface->bezier_patches->toBezier( sknotvector, tknotvector,
- ctlarray, mapdesc->getNcoords() );
+ ctlarray, mapdesc->getNcoords() );
THREAD( do_nurbssurface, o_nurbssurface, do_freenurbssurface );
}
/*-----------------------------------------------------------------------------
* setnurbsproperty -
- *
+ *
*-----------------------------------------------------------------------------
*/
void
@@ -382,7 +382,7 @@ NurbsTessellator::setnurbsproperty( long tag, INREAL value )
/*-----------------------------------------------------------------------------
* setnurbsproperty -
- *
+ *
*-----------------------------------------------------------------------------
*/
void
@@ -406,8 +406,8 @@ NurbsTessellator::setnurbsproperty( long type, long tag, INREAL value )
/*-----------------------------------------------------------------------------
- * getnurbsproperty -
- *
+ * getnurbsproperty -
+ *
*-----------------------------------------------------------------------------
*/
@@ -422,8 +422,8 @@ NurbsTessellator::getnurbsproperty( long tag, INREAL *value )
}
/*-----------------------------------------------------------------------------
- * getnurbsproperty -
- *
+ * getnurbsproperty -
+ *
*-----------------------------------------------------------------------------
*/
@@ -432,7 +432,7 @@ NurbsTessellator::getnurbsproperty( long type, long tag, INREAL *value )
{
Mapdesc *mapdesc = maplist.locate( type );
- if( mapdesc == 0 )
+ if( mapdesc == 0 )
do_nurbserror( 35 );
if( mapdesc->isProperty( tag ) ) {
@@ -447,7 +447,7 @@ NurbsTessellator::getnurbsproperty( long type, long tag, INREAL *value )
*--------------------------------------------------------------------------
*/
-void
+void
NurbsTessellator::setnurbsproperty( long type, long purpose, INREAL *mat )
{
// XXX - cannot be put in display list
@@ -470,8 +470,8 @@ NurbsTessellator::setnurbsproperty( long type, long purpose, INREAL *mat )
*--------------------------------------------------------------------------
*/
-void
-NurbsTessellator::setnurbsproperty( long type, long purpose, INREAL *mat,
+void
+NurbsTessellator::setnurbsproperty( long type, long purpose, INREAL *mat,
long rstride, long cstride )
{
// XXX - cannot be put in display list
@@ -493,39 +493,39 @@ NurbsTessellator::setnurbsproperty( long type, long purpose, INREAL *mat,
}
}
-void
+void
NurbsTessellator::redefineMaps( void )
{
maplist.initialize();
}
-void
+void
NurbsTessellator::defineMap( long type, long rational, long ncoords )
{
maplist.define( type, (int) rational, (int) ncoords );
}
-void
+void
NurbsTessellator::discardRecording( void *_dl )
{
delete (DisplayList *) _dl;
}
-void *
+void *
NurbsTessellator::beginRecording( void )
{
dl = new DisplayList( this );
return (void *) dl;
}
-void
+void
NurbsTessellator::endRecording( void )
{
dl->endList();
dl = 0;
}
-void
+void
NurbsTessellator::playRecording( void *_dl )
{
playBack = 1;
diff --git a/src/glu/sgi/libnurbs/internals/nurbstess.cc b/src/glu/sgi/libnurbs/internals/nurbstess.cc
index 68dfd95..af40a9c 100644
--- a/src/glu/sgi/libnurbs/internals/nurbstess.cc
+++ b/src/glu/sgi/libnurbs/internals/nurbstess.cc
@@ -49,13 +49,13 @@
#include "mapdesc.h"
#include "maplist.h"
-void
+void
NurbsTessellator::set_domain_distance_u_rate(REAL u_rate)
{
subdivider.set_domain_distance_u_rate(u_rate);
}
-void
+void
NurbsTessellator::set_domain_distance_v_rate(REAL v_rate)
{
subdivider.set_domain_distance_v_rate(v_rate);
@@ -106,7 +106,7 @@ NurbsTessellator::endrender( void )
}
/*-----------------------------------------------------------------------------
- * do_freebgnsurface - free o_surface structure
+ * do_freebgnsurface - free o_surface structure
*
* Client: do_freeall(), bgnsurface()
*-----------------------------------------------------------------------------
@@ -145,8 +145,8 @@ NurbsTessellator::do_bgnsurface( O_surface *o_surface )
}
/*-----------------------------------------------------------------------------
- * do_bgncurve - begin the display of a curve
- *
+ * do_bgncurve - begin the display of a curve
+ *
* Client: bgncurve()
*-----------------------------------------------------------------------------
*/
@@ -178,11 +178,11 @@ NurbsTessellator::do_bgncurve( O_curve *o_curve )
/*-----------------------------------------------------------------------------
* do_endcurve -
- *
+ *
* Client: endcurve()
*-----------------------------------------------------------------------------
*/
-
+
void
NurbsTessellator::do_endcurve( void )
{
@@ -200,7 +200,7 @@ NurbsTessellator::do_endcurve( void )
if ( ! inTrim ) {
if( ! isDataValid ) {
- do_freecurveall( currentCurve );
+ do_freecurveall( currentCurve );
return;
}
@@ -209,10 +209,10 @@ NurbsTessellator::do_endcurve( void )
if( errval == 0 ) {
if( currentCurve->curvetype == ct_nurbscurve ) {
subdivider.beginQuilts();
- for( O_nurbscurve *n = currentCurve->curve.o_nurbscurve; n != 0; n = n->next )
+ for( O_nurbscurve *n = currentCurve->curve.o_nurbscurve; n != 0; n = n->next )
subdivider.addQuilt( n->bezier_curves );
subdivider.endQuilts();
- subdivider.drawCurves();
+ subdivider.drawCurves();
if( ! playBack ) endrender();
} else {
/* XXX */
@@ -230,7 +230,7 @@ NurbsTessellator::do_endcurve( void )
}
/*-----------------------------------------------------------------------------
- * do_endsurface - mark end of surface, display surface, free immediate data
+ * do_endsurface - mark end of surface, display surface, free immediate data
*
* Client:
*-----------------------------------------------------------------------------
@@ -252,7 +252,7 @@ NurbsTessellator::do_endsurface( void )
*nextNurbssurface = 0;
if( ! isDataValid ) {
- do_freeall( );
+ do_freeall( );
return;
}
@@ -270,18 +270,18 @@ NurbsTessellator::do_endsurface( void )
subdivider.beginTrims();
for( O_trim *trim = currentSurface->o_trim; trim; trim = trim->next ) {
subdivider.beginLoop();
- for( O_curve *curve = trim->o_curve; curve; curve = curve->next ) {
+ for( O_curve *curve = trim->o_curve; curve; curve = curve->next ) {
curve->used = 0;
assert( curve->curvetype != ct_none );
if (curve->curvetype == ct_pwlcurve) {
- O_pwlcurve *c = curve->curve.o_pwlcurve;
+ O_pwlcurve *c = curve->curve.o_pwlcurve;
subdivider.addArc( c->npts, c->pts, curve->nuid );
} else {
Quilt *quilt = curve->curve.o_nurbscurve->bezier_curves;
Quiltspec *qspec = quilt->qspec;
REAL *cpts = quilt->cpts + qspec->offset;
REAL *cptsend = cpts + (qspec->width * qspec->order * qspec->stride);
- for( ; cpts != cptsend; cpts += qspec->order*qspec->stride )
+ for( ; cpts != cptsend; cpts += qspec->order*qspec->stride )
subdivider.addArc( cpts, quilt, curve->nuid );
}
}
@@ -291,10 +291,10 @@ NurbsTessellator::do_endsurface( void )
}
subdivider.beginQuilts();
- for( O_nurbssurface *n = currentSurface->o_nurbssurface; n; n = n->next )
+ for( O_nurbssurface *n = currentSurface->o_nurbssurface; n; n = n->next )
subdivider.addQuilt( n->bezier_patches );
subdivider.endQuilts();
- subdivider.drawSurfaces( currentSurface->nuid );
+ subdivider.drawSurfaces( currentSurface->nuid );
if( ! playBack ) endrender();
} else {
if( ! playBack ) endrender();
@@ -374,7 +374,7 @@ NurbsTessellator::do_freecurveall( O_curve *curve )
*/
void
NurbsTessellator::do_freebgntrim( O_trim *o_trim )
-{
+{
o_trim->deleteMe( o_trimPool );
}
@@ -402,7 +402,7 @@ NurbsTessellator::do_bgntrim( O_trim *o_trim )
inTrim = 1;
if( *nextTrim != o_trim ) {
- isTrimModified = 1;
+ isTrimModified = 1;
*nextTrim = o_trim;
}
@@ -413,7 +413,7 @@ NurbsTessellator::do_bgntrim( O_trim *o_trim )
/*-----------------------------------------------------------------------------
- * do_endtrim - mark the end of the current trim loop
+ * do_endtrim - mark the end of the current trim loop
*
* Client: endtrim()
*-----------------------------------------------------------------------------
@@ -433,16 +433,16 @@ NurbsTessellator::do_endtrim( void )
}
numTrims++;
-
+
if( *nextCurve != 0 ) {
isTrimModified = 1;
- *nextCurve = 0;
+ *nextCurve = 0;
}
}
/*-----------------------------------------------------------------------------
* do_freepwlcurve -
- *
+ *
* Client:
*-----------------------------------------------------------------------------
*/
@@ -460,7 +460,7 @@ NurbsTessellator::do_freebgncurve( O_curve *o_curve )
/*-----------------------------------------------------------------------------
* do_pwlcurve - link in pwl trim loop to the current surface description
- *
+ *
* Client: pwlcurve()
*-----------------------------------------------------------------------------
*/
@@ -493,7 +493,7 @@ NurbsTessellator::do_pwlcurve( O_pwlcurve *o_pwlcurve )
isDataValid = 0;
return;
}
-
+
if( *nextPwlcurve != o_pwlcurve ) {
isCurveModified = 1;
*nextPwlcurve = o_pwlcurve;
@@ -505,14 +505,14 @@ NurbsTessellator::do_pwlcurve( O_pwlcurve *o_pwlcurve )
o_pwlcurve->owner = currentCurve;
}
- if( (inCurve == 2) )
+ if( (inCurve == 2) )
endcurve();
}
/*-----------------------------------------------------------------------------
* do_freenurbscurve -
- *
+ *
* Client:
*-----------------------------------------------------------------------------
*/
@@ -526,8 +526,8 @@ NurbsTessellator::do_freenurbscurve( O_nurbscurve *o_nurbscurve )
/*-----------------------------------------------------------------------------
* do_nurbscurve -
- *
- * Client: nurbscurve()
+ *
+ * Client: nurbscurve()
*-----------------------------------------------------------------------------
*/
void
@@ -553,7 +553,7 @@ NurbsTessellator::do_nurbscurve( O_nurbscurve *o_nurbscurve )
isDataValid = 0;
return;
}
-
+
if( *nextNurbscurve != o_nurbscurve ) {
isCurveModified = 1;
*nextNurbscurve = o_nurbscurve;
@@ -568,7 +568,7 @@ NurbsTessellator::do_nurbscurve( O_nurbscurve *o_nurbscurve )
if( o_nurbscurve->owner == 0 )
isCurveModified = 1;
-
+
if( inCurve == 2 )
endcurve();
}
@@ -590,7 +590,7 @@ NurbsTessellator::do_freenurbssurface( O_nurbssurface *o_nurbssurface )
/*-----------------------------------------------------------------------------
* do_nurbssurface -
- *
+ *
* Client: nurbssurface()
*-----------------------------------------------------------------------------
*/
@@ -628,7 +628,7 @@ NurbsTessellator::do_nurbssurface( O_nurbssurface *o_nurbssurface )
/*-----------------------------------------------------------------------------
* do_freenurbsproperty
- *
+ *
*-----------------------------------------------------------------------------
*/
@@ -638,10 +638,10 @@ NurbsTessellator::do_freenurbsproperty( Property *prop )
prop->deleteMe( propertyPool );
}
-
+
/*-----------------------------------------------------------------------------
* do_setnurbsproperty -
- *
+ *
*-----------------------------------------------------------------------------
*/
@@ -674,7 +674,7 @@ NurbsTessellator::do_nurbserror( int msg )
errorHandler( msg );
}
-int
+int
NurbsTessellator::do_check_knots( Knotvector *knots, const char *msg )
{
int status = knots->validate();
diff --git a/src/glu/sgi/libnurbs/internals/nurbstess.h b/src/glu/sgi/libnurbs/internals/nurbstess.h
index a686900..5e017ac 100644
--- a/src/glu/sgi/libnurbs/internals/nurbstess.h
+++ b/src/glu/sgi/libnurbs/internals/nurbstess.h
@@ -98,7 +98,7 @@ class NurbsTessellator {
void set_domain_distance_u_rate(REAL u_rate);
void set_domain_distance_v_rate(REAL v_rate);
void set_is_domain_distance_sampling(int flag);
-
+
protected:
Renderhints renderhints;
diff --git a/src/glu/sgi/libnurbs/internals/patch.cc b/src/glu/sgi/libnurbs/internals/patch.cc
index 808baa6..12d47a4 100644
--- a/src/glu/sgi/libnurbs/internals/patch.cc
+++ b/src/glu/sgi/libnurbs/internals/patch.cc
@@ -76,23 +76,23 @@ Patch::Patch( Quilt_ptr geo, REAL *pta, REAL *ptb, Patch *n )
ps += geo->qspec[1].index * geo->qspec[1].order * geo->qspec[1].stride;
if( needsSampling ) {
- mapdesc->xformSampling( ps, geo->qspec[0].order, geo->qspec[0].stride,
+ mapdesc->xformSampling( ps, geo->qspec[0].order, geo->qspec[0].stride,
geo->qspec[1].order, geo->qspec[1].stride,
spts, pspec[0].stride, pspec[1].stride );
}
if( cullval == CULL_ACCEPT ) {
- mapdesc->xformCulling( ps, geo->qspec[0].order, geo->qspec[0].stride,
+ mapdesc->xformCulling( ps, geo->qspec[0].order, geo->qspec[0].stride,
geo->qspec[1].order, geo->qspec[1].stride,
- cpts, pspec[0].stride, pspec[1].stride );
+ cpts, pspec[0].stride, pspec[1].stride );
}
-
+
if( notInBbox ) {
- mapdesc->xformBounding( ps, geo->qspec[0].order, geo->qspec[0].stride,
+ mapdesc->xformBounding( ps, geo->qspec[0].order, geo->qspec[0].stride,
geo->qspec[1].order, geo->qspec[1].stride,
- bpts, pspec[0].stride, pspec[1].stride );
+ bpts, pspec[0].stride, pspec[1].stride );
}
-
+
/* set scale range */
pspec[0].range[0] = geo->qspec[0].breakpoints[geo->qspec[0].index];
pspec[0].range[1] = geo->qspec[0].breakpoints[geo->qspec[0].index+1];
@@ -155,14 +155,14 @@ Patch::Patch( Patch& upper, int param, REAL value, Patch *n )
mapdesc->subdivide( upper.spts, lower.spts, d, pspec[1].order,
pspec[1].stride, pspec[0].order, pspec[0].stride );
- if( cullval == CULL_ACCEPT )
+ if( cullval == CULL_ACCEPT )
mapdesc->subdivide( upper.cpts, lower.cpts, d, pspec[1].order,
pspec[1].stride, pspec[0].order, pspec[0].stride );
- if( notInBbox )
+ if( notInBbox )
mapdesc->subdivide( upper.bpts, lower.bpts, d, pspec[1].order,
pspec[1].stride, pspec[0].order, pspec[0].stride );
-
+
lower.pspec[0].range[0] = upper.pspec[0].range[0];
lower.pspec[0].range[1] = value;
lower.pspec[0].range[2] = value - upper.pspec[0].range[0];
@@ -179,10 +179,10 @@ Patch::Patch( Patch& upper, int param, REAL value, Patch *n )
if( needsSampling )
mapdesc->subdivide( upper.spts, lower.spts, d, pspec[0].order,
pspec[0].stride, pspec[1].order, pspec[1].stride );
- if( cullval == CULL_ACCEPT )
+ if( cullval == CULL_ACCEPT )
mapdesc->subdivide( upper.cpts, lower.cpts, d, pspec[0].order,
pspec[0].stride, pspec[1].order, pspec[1].stride );
- if( notInBbox )
+ if( notInBbox )
mapdesc->subdivide( upper.bpts, lower.bpts, d, pspec[0].order,
pspec[0].stride, pspec[1].order, pspec[1].stride );
lower.pspec[0].range[0] = upper.pspec[0].range[0];
@@ -201,7 +201,7 @@ Patch::Patch( Patch& upper, int param, REAL value, Patch *n )
// inherit bounding box
if( mapdesc->isBboxSubdividing() && ! notInBbox )
memcpy( lower.bb, upper.bb, sizeof( bb ) );
-
+
lower.checkBboxConstraint();
upper.checkBboxConstraint();
}
@@ -220,7 +220,7 @@ Patch::clamp( void )
}
}
-void
+void
Patchspec::clamp( REAL clampfactor )
{
if( sidestep[0] < minstepsize )
@@ -231,10 +231,10 @@ Patchspec::clamp( REAL clampfactor )
stepsize = clampfactor * minstepsize;
}
-void
+void
Patch::checkBboxConstraint( void )
{
- if( notInBbox &&
+ if( notInBbox &&
mapdesc->bboxTooBig( bpts, pspec[0].stride, pspec[1].stride,
pspec[0].order, pspec[1].order, bb ) != 1 ) {
notInBbox = 0;
@@ -280,15 +280,15 @@ Patch::getstepsize( void )
// upper bound on path length between sample points
REAL tmp[MAXORDER][MAXORDER][MAXCOORDS];
const int trstride = sizeof(tmp[0]) / sizeof(REAL);
- const int tcstride = sizeof(tmp[0][0]) / sizeof(REAL);
+ const int tcstride = sizeof(tmp[0][0]) / sizeof(REAL);
assert( pspec[0].order <= MAXORDER );
-
+
/* points have been transformed, therefore they are homogeneous */
- int val = mapdesc->project( spts, pspec[0].stride, pspec[1].stride,
- &tmp[0][0][0], trstride, tcstride,
- pspec[0].order, pspec[1].order );
+ int val = mapdesc->project( spts, pspec[0].stride, pspec[1].stride,
+ &tmp[0][0][0], trstride, tcstride,
+ pspec[0].order, pspec[1].order );
if( val == 0 ) {
// control points cross infinity, therefore partials are undefined
pspec[0].getstepsize( mapdesc->maxsrate );
@@ -296,17 +296,17 @@ Patch::getstepsize( void )
} else {
REAL t1 = mapdesc->getProperty( N_PIXEL_TOLERANCE );
// REAL t2 = mapdesc->getProperty( N_ERROR_TOLERANCE );
- pspec[0].minstepsize = ( mapdesc->maxsrate > 0.0 ) ?
+ pspec[0].minstepsize = ( mapdesc->maxsrate > 0.0 ) ?
(pspec[0].range[2] / mapdesc->maxsrate) : 0.0;
- pspec[1].minstepsize = ( mapdesc->maxtrate > 0.0 ) ?
+ pspec[1].minstepsize = ( mapdesc->maxtrate > 0.0 ) ?
(pspec[1].range[2] / mapdesc->maxtrate) : 0.0;
if( mapdesc->isParametricDistanceSampling() ||
- mapdesc->isObjectSpaceParaSampling() ) {
+ mapdesc->isObjectSpaceParaSampling() ) {
REAL t2;
t2 = mapdesc->getProperty( N_ERROR_TOLERANCE );
-
- // t2 is upper bound on the distance between surface and tessellant
+
+ // t2 is upper bound on the distance between surface and tessellant
REAL ssv[2], ttv[2];
REAL ss = mapdesc->calcPartialVelocity( ssv, &tmp[0][0][0], trstride, tcstride, pspec[0].order, pspec[1].order, 2, 0, pspec[0].range[2], pspec[1].range[2], 0 );
REAL st = mapdesc->calcPartialVelocity( 0, &tmp[0][0][0], trstride, tcstride, pspec[0].order, pspec[1].order, 1, 1, pspec[0].range[2], pspec[1].range[2], -1 );
@@ -317,7 +317,7 @@ Patch::getstepsize( void )
if(tt <0) tt = -tt;
if( ss != 0.0 && tt != 0.0 ) {
- /* printf( "ssv[0] %g ssv[1] %g ttv[0] %g ttv[1] %g\n",
+ /* printf( "ssv[0] %g ssv[1] %g ttv[0] %g ttv[1] %g\n",
ssv[0], ssv[1], ttv[0], ttv[1] ); */
REAL ttq = sqrtf( (float) ss );
REAL ssq = sqrtf( (float) tt );
@@ -327,7 +327,7 @@ Patch::getstepsize( void )
REAL scutoff = 2.0 * t2 / ( pspec[0].range[2] * pspec[0].range[2]);
pspec[0].sidestep[0] = (ssv[0] > scutoff) ? sqrtf( 2.0 * t2 / ssv[0] ) : pspec[0].range[2];
pspec[0].sidestep[1] = (ssv[1] > scutoff) ? sqrtf( 2.0 * t2 / ssv[1] ) : pspec[0].range[2];
-
+
pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2];
REAL tcutoff = 2.0 * t2 / ( pspec[1].range[2] * pspec[1].range[2]);
pspec[1].sidestep[0] = (ttv[0] > tcutoff) ? sqrtf( 2.0 * t2 / ttv[0] ) : pspec[1].range[2];
@@ -359,12 +359,12 @@ Patch::getstepsize( void )
pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2];
pspec[0].sidestep[0] = pspec[0].range[2];
pspec[0].sidestep[1] = pspec[0].range[2];
-
+
pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2];
pspec[1].sidestep[0] = pspec[1].range[2];
pspec[1].sidestep[1] = pspec[1].range[2];
}
- }
+ }
} else if( mapdesc->isPathLengthSampling() ||
mapdesc->isObjectSpacePathSampling()) {
// t1 is upper bound on path length
@@ -379,11 +379,11 @@ Patch::getstepsize( void )
/* REAL ds = mt * d;*/
REAL ds = t1 / (2.0*ms);
/* REAL dt = ms * d;*/
- REAL dt = t1 / (2.0*mt);
+ REAL dt = t1 / (2.0*mt);
pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2];
pspec[0].sidestep[0] = ( msv[0] * pspec[0].range[2] > t1 ) ? (side_scale* t1 / msv[0]) : pspec[0].range[2];
pspec[0].sidestep[1] = ( msv[1] * pspec[0].range[2] > t1 ) ? (side_scale* t1 / msv[1]) : pspec[0].range[2];
-
+
pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2];
pspec[1].sidestep[0] = ( mtv[0] * pspec[1].range[2] > t1 ) ? (side_scale*t1 / mtv[0]) : pspec[1].range[2];
pspec[1].sidestep[1] = ( mtv[1] * pspec[1].range[2] > t1 ) ? (side_scale*t1 / mtv[1]) : pspec[1].range[2];
@@ -391,7 +391,7 @@ Patch::getstepsize( void )
pspec[0].stepsize = ( t1 < ms * pspec[0].range[2] ) ? (t1 / ms) : pspec[0].range[2];
pspec[0].sidestep[0] = ( msv[0] * pspec[0].range[2] > t1 ) ? (t1 / msv[0]) : pspec[0].range[2];
pspec[0].sidestep[1] = ( msv[1] * pspec[0].range[2] > t1 ) ? (t1 / msv[1]) : pspec[0].range[2];
-
+
pspec[1].singleStep();
}
} else {
@@ -420,7 +420,7 @@ Patch::getstepsize( void )
pspec[0].stepsize = ( ds < pspec[0].range[2] ) ? ds : pspec[0].range[2];
pspec[0].sidestep[0] = ( msv[0] * pspec[0].range[2] > t ) ? (t / msv[0]) : pspec[0].range[2];
pspec[0].sidestep[1] = ( msv[1] * pspec[0].range[2] > t ) ? (t / msv[1]) : pspec[0].range[2];
-
+
pspec[1].stepsize = ( dt < pspec[1].range[2] ) ? dt : pspec[1].range[2];
pspec[1].sidestep[0] = ( mtv[0] * pspec[1].range[2] > t ) ? (t / mtv[0]) : pspec[1].range[2];
pspec[1].sidestep[1] = ( mtv[1] * pspec[1].range[2] > t ) ? (t / mtv[1]) : pspec[1].range[2];
@@ -445,9 +445,9 @@ Patch::getstepsize( void )
if( mapdesc->minsavings != N_NOSAVINGSSUBDIVISION ) {
REAL savings = 1./(pspec[0].stepsize * pspec[1].stepsize) ;
- savings-= (2./( pspec[0].sidestep[0] + pspec[0].sidestep[1] )) *
+ savings-= (2./( pspec[0].sidestep[0] + pspec[0].sidestep[1] )) *
(2./( pspec[1].sidestep[0] + pspec[1].sidestep[1] ));
-
+
savings *= pspec[0].range[2] * pspec[1].range[2];
if( savings > mapdesc->minsavings ) {
pspec[0].needsSubdivision = pspec[1].needsSubdivision = 1;
@@ -465,7 +465,7 @@ Patchspec::singleStep()
stepsize = sidestep[0] = sidestep[1] = glu_abs(range[2]);
}
-void
+void
Patchspec::getstepsize( REAL max ) // max is number of samples for entire patch
{
stepsize = ( max >= 1.0 ) ? range[2] / max : range[2];
@@ -496,7 +496,7 @@ Patch::needsSubdivision( int param )
int
Patch::cullCheck( void )
{
- if( cullval == CULL_ACCEPT )
+ if( cullval == CULL_ACCEPT )
cullval = mapdesc->cullCheck( cpts, pspec[0].order, pspec[0].stride,
pspec[1].order, pspec[1].stride );
return cullval;
diff --git a/src/glu/sgi/libnurbs/internals/patch.h b/src/glu/sgi/libnurbs/internals/patch.h
index 324a259..d77b73b 100644
--- a/src/glu/sgi/libnurbs/internals/patch.h
+++ b/src/glu/sgi/libnurbs/internals/patch.h
@@ -56,7 +56,7 @@ struct Patchspec : public Pspec {
int stride;
void clamp( REAL );
void getstepsize( REAL );
- void singleStep( void );
+ void singleStep( void );
};
class Patch {
@@ -84,8 +84,8 @@ friend class Patchlist;
int cullval;
int notInBbox;
int needsSampling;
- REAL cpts[MAXORDER*MAXORDER*MAXCOORDS]; //culling pts
- REAL spts[MAXORDER*MAXORDER*MAXCOORDS]; //sampling pts
+ REAL cpts[MAXORDER*MAXORDER*MAXCOORDS]; //culling pts
+ REAL spts[MAXORDER*MAXORDER*MAXCOORDS]; //sampling pts
REAL bpts[MAXORDER*MAXORDER*MAXCOORDS]; //bbox pts
Patchspec pspec[2];
void checkBboxConstraint( void );
diff --git a/src/glu/sgi/libnurbs/internals/patchlist.cc b/src/glu/sgi/libnurbs/internals/patchlist.cc
index 6a400ab..102e917 100644
--- a/src/glu/sgi/libnurbs/internals/patchlist.cc
+++ b/src/glu/sgi/libnurbs/internals/patchlist.cc
@@ -48,12 +48,12 @@
Patchlist::Patchlist( Quilt *quilts, REAL *pta, REAL *ptb )
{
patch = 0;
- for( Quilt *q = quilts; q; q = q->next )
+ for( Quilt *q = quilts; q; q = q->next )
patch = new Patch( q, pta, ptb, patch );
pspec[0].range[0] = pta[0];
pspec[0].range[1] = ptb[0];
pspec[0].range[2] = ptb[0] - pta[0];
-
+
pspec[1].range[0] = pta[1];
pspec[1].range[1] = ptb[1];
pspec[1].range[2] = ptb[1] - pta[1];
diff --git a/src/glu/sgi/libnurbs/internals/patchlist.h b/src/glu/sgi/libnurbs/internals/patchlist.h
index 9bfc5b4..7660b1f 100644
--- a/src/glu/sgi/libnurbs/internals/patchlist.h
+++ b/src/glu/sgi/libnurbs/internals/patchlist.h
@@ -47,7 +47,7 @@ friend class Subdivider;
public:
Patchlist( Quilt *, REAL *, REAL * );
Patchlist( Patchlist &, int , REAL );
- ~Patchlist();
+ ~Patchlist();
void bbox();
int cullCheck( void );
void getstepsize( void );
@@ -74,14 +74,14 @@ Patchlist::getStepsize( int param )
inline int
Patchlist::get_uorder()
-{
+{
return patch->get_uorder();
}
inline int
Patchlist::get_vorder()
-{
+{
return patch->get_vorder();
}
diff --git a/src/glu/sgi/libnurbs/internals/quilt.cc b/src/glu/sgi/libnurbs/internals/quilt.cc
index d16f4bf..c05df95 100644
--- a/src/glu/sgi/libnurbs/internals/quilt.cc
+++ b/src/glu/sgi/libnurbs/internals/quilt.cc
@@ -56,7 +56,7 @@ Quilt::Quilt( Mapdesc *_mapdesc )
{
mapdesc = _mapdesc;
}
-
+
void
Quilt::deleteMe( Pool& p )
{
@@ -65,13 +65,13 @@ Quilt::deleteMe( Pool& p )
if( q->breakpoints) delete[] q->breakpoints; q->breakpoints = 0;
#else
if( q->breakpoints) {
- delete[] q->breakpoints;
+ delete[] q->breakpoints;
q->breakpoints = 0;
printf("in here\n");
}
#endif
}
- if( cpts ) delete[] cpts;
+ if( cpts ) delete[] cpts;
cpts = 0;
PooledObj::deleteMe( p );
}
@@ -81,7 +81,7 @@ Quilt::show( void )
{
#ifndef NDEBUG
int nc = mapdesc->getNcoords();
- REAL *ps = cpts;
+ REAL *ps = cpts;
ps += qspec[0].offset;
ps += qspec[1].offset;
for( int i=0; i!= qspec[0].order * qspec[0].width; i++ ) {
@@ -105,28 +105,28 @@ Quilt::show( void )
void
Quilt::select( REAL *pta, REAL *ptb )
{
- int dim = eqspec - qspec;
+ int dim = eqspec - qspec;
int i, j;
for( i=0; i=0; j-- )
if( (qspec[i].breakpoints[j] <= pta[i] ) &&
- (ptb[i] <= qspec[i].breakpoints[j+1] ) )
+ (ptb[i] <= qspec[i].breakpoints[j+1] ) )
break;
- assert( j != -1 );
+ assert( j != -1 );
qspec[i].index = j;
}
}
-void
+void
Quilt::download( Backend &backend )
{
if( getDimension() == 2 ) {
- REAL *ps = cpts;
+ REAL *ps = cpts;
ps += qspec[0].offset;
ps += qspec[1].offset;
ps += qspec[0].index * qspec[0].order * qspec[0].stride;
ps += qspec[1].index * qspec[1].order * qspec[1].stride;
- backend.surfpts( mapdesc->getType(), ps,
+ backend.surfpts( mapdesc->getType(), ps,
qspec[0].stride,
qspec[1].stride,
qspec[0].order,
@@ -136,10 +136,10 @@ Quilt::download( Backend &backend )
qspec[1].breakpoints[qspec[1].index],
qspec[1].breakpoints[qspec[1].index+1] );
} else {
- REAL *ps = cpts;
+ REAL *ps = cpts;
ps += qspec[0].offset;
ps += qspec[0].index * qspec[0].order * qspec[0].stride;
- backend.curvpts( mapdesc->getType(), ps,
+ backend.curvpts( mapdesc->getType(), ps,
qspec[0].stride,
qspec[0].order,
qspec[0].breakpoints[qspec[0].index],
@@ -171,7 +171,7 @@ Quilt::isCulled( void )
{
if( mapdesc->isCulling() )
return mapdesc->xformAndCullCheck( cpts + qspec[0].offset + qspec[1].offset,
- qspec[0].order * qspec[0].width, qspec[0].stride,
+ qspec[0].order * qspec[0].width, qspec[0].stride,
qspec[1].order * qspec[1].width, qspec[1].stride );
else
return CULL_ACCEPT;
@@ -199,12 +199,12 @@ Quilt::getRange( REAL *from, REAL *to, int i, Flist &list )
from[i] = maps->qspec[i].breakpoints[0];
to[i] = maps->qspec[i].breakpoints[maps->qspec[i].width];
int maxpts = 0;
- Quilt_ptr m;
+ Quilt_ptr m;
for( m=maps; m; m=m->next ) {
- if( m->qspec[i].breakpoints[0] > from[i] )
- from[i] = m->qspec[i].breakpoints[0];
- if( m->qspec[i].breakpoints[m->qspec[i].width] < to[i] )
- to[i] = m->qspec[i].breakpoints[m->qspec[i].width];
+ if( m->qspec[i].breakpoints[0] > from[i] )
+ from[i] = m->qspec[i].breakpoints[0];
+ if( m->qspec[i].breakpoints[m->qspec[i].width] < to[i] )
+ to[i] = m->qspec[i].breakpoints[m->qspec[i].width];
maxpts += m->qspec[i].width + 1;
}
@@ -234,9 +234,9 @@ Quilt::findRates( Flist& slist, Flist& tlist, REAL rate[2] )
for( Quilt *q = next; q; q = q->next ) {
q->findSampleRates( slist, tlist );
- if( q->qspec[0].step_size < rate[0] )
+ if( q->qspec[0].step_size < rate[0] )
rate[0] = q->qspec[0].step_size;
- if( q->qspec[1].step_size < rate[1] )
+ if( q->qspec[1].step_size < rate[1] )
rate[1] = q->qspec[1].step_size;
}
}
@@ -244,11 +244,11 @@ Quilt::findRates( Flist& slist, Flist& tlist, REAL rate[2] )
void
Quilt::findSampleRates( Flist& slist, Flist& tlist )
{
- qspec[0].step_size = DEF_PATCH_STEPSIZE *
- (qspec[0].breakpoints[qspec[0].width] - qspec[0].breakpoints[0]);
- qspec[1].step_size = DEF_PATCH_STEPSIZE *
- (qspec[1].breakpoints[qspec[1].width] - qspec[1].breakpoints[0]);
-
+ qspec[0].step_size = DEF_PATCH_STEPSIZE *
+ (qspec[0].breakpoints[qspec[0].width] - qspec[0].breakpoints[0]);
+ qspec[1].step_size = DEF_PATCH_STEPSIZE *
+ (qspec[1].breakpoints[qspec[1].width] - qspec[1].breakpoints[0]);
+
for( int i = slist.start; i < slist.end-1; i++ ) {
for( int j = tlist.start; j < tlist.end-1; j++ ) {
@@ -259,14 +259,14 @@ Quilt::findSampleRates( Flist& slist, Flist& tlist )
ptb[1] = tlist.pts[j+1];
Patchlist patchlist( this, pta, ptb );
patchlist.getstepsize();
-
+
{
float edge_len_s = min(glu_abs(ptb[0]-pta[0]),1.0);
float edge_len_t = min(glu_abs(ptb[1]-pta[1]),1.0);
- if( patchlist.getStepsize(0)/edge_len_s < qspec[0].step_size )
+ if( patchlist.getStepsize(0)/edge_len_s < qspec[0].step_size )
qspec[0].step_size = patchlist.getStepsize(0)/edge_len_s;
- if( patchlist.getStepsize(1)/edge_len_t < qspec[1].step_size )
+ if( patchlist.getStepsize(1)/edge_len_t < qspec[1].step_size )
qspec[1].step_size = patchlist.getStepsize(1)/edge_len_t;
}
}
diff --git a/src/glu/sgi/libnurbs/internals/quilt.h b/src/glu/sgi/libnurbs/internals/quilt.h
index fe1e330..1433d47 100644
--- a/src/glu/sgi/libnurbs/internals/quilt.h
+++ b/src/glu/sgi/libnurbs/internals/quilt.h
@@ -45,7 +45,7 @@ class Mapdesc;
class Flist;
struct Knotvector;
-/* constants for memory allocation of NURBS to Bezier conversion */
+/* constants for memory allocation of NURBS to Bezier conversion */
#define MAXDIM 2
struct Quiltspec { /* a specification for a dimension of a quilt */
@@ -60,7 +60,7 @@ struct Quiltspec { /* a specification for a dimension of a quilt */
};
typedef Quiltspec *Quiltspec_ptr;
-
+
class Quilt : public PooledObj { /* an array of bezier patches */
public:
Quilt( Mapdesc * );
@@ -69,7 +69,7 @@ class Quilt : public PooledObj { /* an array of bezier patches */
Quiltspec qspec[MAXDIM]; /* the dimensional data */
Quiltspec_ptr eqspec; /* qspec trailer */
Quilt *next; /* next quilt in linked list */
-
+
public:
void deleteMe( Pool& );
void toBezier( Knotvector &, INREAL *, long );
diff --git a/src/glu/sgi/libnurbs/internals/reader.cc b/src/glu/sgi/libnurbs/internals/reader.cc
index c59240d..314fe7b 100644
--- a/src/glu/sgi/libnurbs/internals/reader.cc
+++ b/src/glu/sgi/libnurbs/internals/reader.cc
@@ -44,19 +44,19 @@
#include "trimvertex.h"
#include "simplemath.h"
-//when read a pwlCurve, if two consecutive points are the same, then
+//when read a pwlCurve, if two consecutive points are the same, then
//eliminate one of them. This makes the tessellator more robust. The spec
-//assumes the application makes sure there are no redundant points.
+//assumes the application makes sure there are no redundant points.
//but in Inspector, the trim curves seem to have redundant points a lot.
//I guess other similar users may have the same problem.
-#define ELIMINATE_REDUNDANT_POINTS
+#define ELIMINATE_REDUNDANT_POINTS
-#ifdef ELIMINATE_REDUNDANT_POINTS
+#ifdef ELIMINATE_REDUNDANT_POINTS
#define equal(x,y) ( glu_abs(x-y) <= 0.00001)
#endif
-#ifdef ELIMINATE_REDUNDANT_POINTS
+#ifdef ELIMINATE_REDUNDANT_POINTS
O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride, TrimVertex *trimpts )
{
next = 0;
@@ -83,7 +83,7 @@ O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride,
doit = 0;
}
}
-
+
if(doit)
{
v->param[0] = (REAL) array[0];
@@ -140,7 +140,7 @@ O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride,
}
}
}
-#endif
+#endif
diff --git a/src/glu/sgi/libnurbs/internals/reader.h b/src/glu/sgi/libnurbs/internals/reader.h
index cae6cad..c4b0dd2 100644
--- a/src/glu/sgi/libnurbs/internals/reader.h
+++ b/src/glu/sgi/libnurbs/internals/reader.h
@@ -40,7 +40,7 @@
#include "types.h"
enum Curvetype { ct_nurbscurve, ct_pwlcurve, ct_none };
-
+
struct Property;
struct O_surface;
struct O_nurbssurface;
@@ -63,7 +63,7 @@ struct O_curve : public PooledObj {
int used; /* curve called in cur surf */
int save; /* 1 if in display list */
long nuid;
- O_curve() { next = 0; used = 0; owner = 0;
+ O_curve() { next = 0; used = 0; owner = 0;
curve.o_pwlcurve = 0; curvetype = ct_none; save = 0; nuid = 0; }
};
@@ -76,10 +76,10 @@ struct O_nurbscurve : public PooledObj {
int used; /* curve called in cur surf */
int save; /* 1 if in display list */
O_curve * owner; /* owning curve */
- O_nurbscurve( long _type )
+ O_nurbscurve( long _type )
{ bezier_curves = 0; type = _type; tesselation = 0; method = 0; next = 0; used = 0; save = 0; owner = 0; }
};
-
+
class O_pwlcurve : public PooledObj {
public:
TrimVertex *pts; /* array of trim vertices */
@@ -105,7 +105,7 @@ struct O_nurbssurface : public PooledObj {
O_nurbssurface * next; /* next surface in chain */
int save; /* 1 if in display list */
int used; /* 1 if prev called in block */
- O_nurbssurface( long _type )
+ O_nurbssurface( long _type )
{ bezier_patches = 0; type = _type; owner = 0; next = 0; save = 0; used = 0; }
};
diff --git a/src/glu/sgi/libnurbs/internals/renderhints.cc b/src/glu/sgi/libnurbs/internals/renderhints.cc
index 4b347eb..49fd362 100644
--- a/src/glu/sgi/libnurbs/internals/renderhints.cc
+++ b/src/glu/sgi/libnurbs/internals/renderhints.cc
@@ -95,7 +95,7 @@ Renderhints::isProperty( long property )
}
}
-REAL
+REAL
Renderhints::getProperty( long property )
{
switch ( property ) {
@@ -113,7 +113,7 @@ Renderhints::getProperty( long property )
}
}
-void
+void
Renderhints::setProperty( long property, REAL value )
{
switch ( property ) {
diff --git a/src/glu/sgi/libnurbs/internals/simplemath.h b/src/glu/sgi/libnurbs/internals/simplemath.h
index d00062d..4b4d1ce 100644
--- a/src/glu/sgi/libnurbs/internals/simplemath.h
+++ b/src/glu/sgi/libnurbs/internals/simplemath.h
@@ -40,13 +40,13 @@
#include "types.h"
-inline int
+inline int
max( int x, int y ) { return ( x < y ) ? y : x; }
-inline REAL
+inline REAL
min( REAL x, REAL y ) { return ( x > y ) ? y : x; }
-inline REAL
+inline REAL
glu_abs( REAL x ) { return ( x < 0.0 ) ? -x : x; }
#endif /* __glusimplemath_h_ */
diff --git a/src/glu/sgi/libnurbs/internals/slicer.cc b/src/glu/sgi/libnurbs/internals/slicer.cc
index 1b18d73..de385fd 100644
--- a/src/glu/sgi/libnurbs/internals/slicer.cc
+++ b/src/glu/sgi/libnurbs/internals/slicer.cc
@@ -63,7 +63,7 @@
#endif
//#define USE_READ_FLAG //whether to use new or old tesselator
- //if defined, it reads "flagFile",
+ //if defined, it reads "flagFile",
// if the number is 1, then use new tess
// otherwise, use the old tess.
//if not defined, then use new tess.
@@ -183,7 +183,7 @@ void monoTriangulationLoop(Arc_ptr loop, Backend& backend, primStream* pStream)
}
//creat increase and decrease chains
vertexArray inc_chain(50); //this is a dynamci array
- for(i=1; i<=top->pwlArc->npts-2; i++)
+ for(i=1; i<=top->pwlArc->npts-2; i++)
{
//the first vertex is the top which doesn't below to inc_chain
inc_chain.appendVertex(top->pwlArc->pts[i].param);
@@ -194,7 +194,7 @@ void monoTriangulationLoop(Arc_ptr loop, Backend& backend, primStream* pStream)
{
inc_chain.appendVertex(jarc->pwlArc->pts[i].param);
}
-
+
}
vertexArray dec_chain(50);
for(jarc = top->prev; jarc != bot; jarc = jarc->prev)
@@ -207,7 +207,7 @@ void monoTriangulationLoop(Arc_ptr loop, Backend& backend, primStream* pStream)
for(i=bot->pwlArc->npts-2; i>=1; i--)
{
dec_chain.appendVertex(jarc->pwlArc->pts[i].param);
- }
+ }
monoTriangulationRec(top->tail(), bot->tail(), &inc_chain, 0,
&dec_chain, 0, &backend);
@@ -242,14 +242,14 @@ if(loop->next->tail()[1] == loop->next->head()[1])
printf("equal 2\n");
*/
- if( (glu_abs(loop->tail()[0] - loop->head()[0])<=ZERO) &&
+ if( (glu_abs(loop->tail()[0] - loop->head()[0])<=ZERO) &&
(glu_abs(loop->next->tail()[1] - loop->next->head()[1])<=ZERO) &&
(glu_abs(loop->prev->tail()[1] - loop->prev->head()[1])<=ZERO) &&
(glu_abs(loop->prev->prev->tail()[0] - loop->prev->prev->head()[0])<=ZERO)
)
return 1;
else if
- ( (glu_abs(loop->tail()[1] - loop->head()[1]) <= ZERO) &&
+ ( (glu_abs(loop->tail()[1] - loop->head()[1]) <= ZERO) &&
(glu_abs(loop->next->tail()[0] - loop->next->head()[0]) <= ZERO) &&
(glu_abs(loop->prev->tail()[0] - loop->prev->head()[0]) <= ZERO) &&
(glu_abs(loop->prev->prev->tail()[1] - loop->prev->prev->head()[1]) <= ZERO)
@@ -300,11 +300,11 @@ static void evalLineNOGE(TrimVertex *verts, int n, Backend& backend)
}
#endif
-inline void OPT_OUTVERT(TrimVertex& vv, Backend& backend)
+inline void OPT_OUTVERT(TrimVertex& vv, Backend& backend)
{
#ifdef USE_OPTTT
- glNormal3fv(vv.cache_normal);
+ glNormal3fv(vv.cache_normal);
glVertex3fv(vv.cache_point);
#else
@@ -332,7 +332,7 @@ static void triangulateRect(Arc_ptr loop, Backend& backend, int TB_or_LR, int ul
top = loop->prev->prev;
}
}
- else
+ else
{
if(loop->tail()[0] > loop->prev->prev->tail()[0])
{
@@ -373,14 +373,14 @@ static void triangulateRect(Arc_ptr loop, Backend& backend, int TB_or_LR, int ul
if(TB_or_LR == 1)
triangulateRectAux(top->pwlArc, bot->pwlArc, left->pwlArc, right->pwlArc, backend);
else if(TB_or_LR == -1)
- triangulateRectAux(left->pwlArc, right->pwlArc, bot->pwlArc, top->pwlArc, backend);
+ triangulateRectAux(left->pwlArc, right->pwlArc, bot->pwlArc, top->pwlArc, backend);
else
{
Int maxPointsTB = top->pwlArc->npts + bot->pwlArc->npts;
Int maxPointsLR = left->pwlArc->npts + right->pwlArc->npts;
-
+
if(maxPointsTB < maxPointsLR)
- triangulateRectAux(left->pwlArc, right->pwlArc, bot->pwlArc, top->pwlArc, backend);
+ triangulateRectAux(left->pwlArc, right->pwlArc, bot->pwlArc, top->pwlArc, backend);
else
triangulateRectAux(top->pwlArc, bot->pwlArc, left->pwlArc, right->pwlArc, backend);
}
@@ -410,7 +410,7 @@ static void triangulateRectAux(PwlArc* top, PwlArc* bot, PwlArc* left, PwlArc* r
OPT_OUTVERT(bot->pts[i], backend);
}
backend.endtfan();
-
+
backend.bgntfan();
OPT_OUTVERT(bot->pts[bot->npts-2], backend);
for(i=0; inpts; i++){
@@ -428,7 +428,7 @@ static void triangulateRectAux(PwlArc* top, PwlArc* bot, PwlArc* left, PwlArc* r
OPT_OUTVERT(top->pts[i], backend);
}
backend.endtfan();
-
+
backend.bgntfan();
OPT_OUTVERT(top->pts[top->npts-2], backend);
for(i=0; inpts; i++){
@@ -437,26 +437,26 @@ static void triangulateRectAux(PwlArc* top, PwlArc* bot, PwlArc* left, PwlArc* r
backend.endtfan();
}
else { //both top and bot have >=3 points
-
+
backend.bgntfan();
-
+
OPT_OUTVERT(top->pts[top->npts-2], backend);
-
+
for(i=0; i<=d; i++)
{
- OPT_OUTVERT(left->pts[i], backend);
+ OPT_OUTVERT(left->pts[i], backend);
}
backend.endtfan();
-
+
backend.bgntfan();
-
+
OPT_OUTVERT(bot->pts[1], backend);
-
+
OPT_OUTVERT(top->pts[top->npts-2], backend);
-
+
for(i=d; i< left->npts; i++)
- {
- OPT_OUTVERT(left->pts[i], backend);
+ {
+ OPT_OUTVERT(left->pts[i], backend);
}
backend.endtfan();
@@ -464,20 +464,20 @@ static void triangulateRectAux(PwlArc* top, PwlArc* bot, PwlArc* left, PwlArc* r
//output only when dnpts-1 and
//
if(dnpts-1)
- {
+ {
backend.bgntfan();
// backend.tmeshvert(& top->pts[1]);
OPT_OUTVERT(top->pts[1], backend);
for(i=d; i< right->npts; i++)
{
// backend.tmeshvert(& right->pts[i]);
-
+
OPT_OUTVERT(right->pts[i], backend);
-
+
}
backend.endtfan();
}
-
+
backend.bgntfan();
// backend.tmeshvert(& bot->pts[bot->npts-2]);
OPT_OUTVERT( bot->pts[bot->npts-2], backend);
@@ -485,12 +485,12 @@ static void triangulateRectAux(PwlArc* top, PwlArc* bot, PwlArc* left, PwlArc* r
{
// backend.tmeshvert(& right->pts[i]);
OPT_OUTVERT(right->pts[i], backend);
-
+
}
-
+
// backend.tmeshvert(& top->pts[1]);
- OPT_OUTVERT(top->pts[1], backend);
-
+ OPT_OUTVERT(top->pts[1], backend);
+
backend.endtfan();
@@ -500,14 +500,14 @@ static void triangulateRectAux(PwlArc* top, PwlArc* bot, PwlArc* left, PwlArc* r
botd_left = 1;
botd_right = bot->npts-2; //botd_left<= bot_dright
-
+
if(top->npts < bot->npts)
{
int delta=bot->npts - top->npts;
int u = delta/2;
botd_left = 1+ u;
- botd_right = bot->npts-2-( delta-u);
-
+ botd_right = bot->npts-2-( delta-u);
+
if(botd_left >1)
{
backend.bgntfan();
@@ -535,7 +535,7 @@ static void triangulateRectAux(PwlArc* top, PwlArc* bot, PwlArc* left, PwlArc* r
int u = delta/2;
topd_left = top->npts-2 - u;
topd_right = 1+delta-u;
-
+
if(topd_left < top->npts-2)
{
backend.bgntfan();
@@ -557,8 +557,8 @@ static void triangulateRectAux(PwlArc* top, PwlArc* bot, PwlArc* left, PwlArc* r
backend.endtfan();
}
}
-
- if(topd_left <= topd_right)
+
+ if(topd_left <= topd_right)
return;
backend.bgnqstrip();
@@ -570,13 +570,13 @@ static void triangulateRectAux(PwlArc* top, PwlArc* bot, PwlArc* left, PwlArc* r
OPT_OUTVERT(bot->pts[j], backend);
}
backend.endqstrip();
-
+
}
}
}
-
-static void triangulateRectCenter(int n_ulines, REAL* u_val,
+
+static void triangulateRectCenter(int n_ulines, REAL* u_val,
int n_vlines, REAL* v_val,
Backend& backend)
{
@@ -585,7 +585,7 @@ static void triangulateRectCenter(int n_ulines, REAL* u_val,
// to fix a problem in which glMapGrid2f() was called with bad parameters.
// This has beens submitted to SGI but not integrated as of May 1, 2001.
if(n_ulines>1 && n_vlines>1) {
- backend.surfgrid(u_val[0], u_val[n_ulines-1], n_ulines-1,
+ backend.surfgrid(u_val[0], u_val[n_ulines-1], n_ulines-1,
v_val[n_vlines-1], v_val[0], n_vlines-1);
backend.surfmesh(0,0,n_ulines-1,n_vlines-1);
}
@@ -601,10 +601,10 @@ static void triangulateRectCenter(int n_ulines, REAL* u_val,
{
trimVert.param[0] = u_val[j];
trimVert.param[1] = v_val[i+1];
- backend.tmeshvert(& trimVert);
+ backend.tmeshvert(& trimVert);
trimVert.param[1] = v_val[i];
- backend.tmeshvert(& trimVert);
+ backend.tmeshvert(& trimVert);
}
backend.endqstrip();
@@ -626,7 +626,7 @@ static void triangulateRectTopGen(Arc_ptr arc, int n_ulines, REAL* u_val, Real v
for(k=0,i=arc->pwlArc->npts-1; i>=0; i--,k++)
{
upper_val[k] = arc->pwlArc->pts[i].param[0];
- }
+ }
backend.evalUStrip(arc->pwlArc->npts, arc->pwlArc->pts[0].param[1],
upper_val,
n_ulines, v, u_val);
@@ -637,12 +637,12 @@ static void triangulateRectTopGen(Arc_ptr arc, int n_ulines, REAL* u_val, Real v
{
upper_val[k] = arc->pwlArc->pts[i].param[0];
- }
+ }
backend.evalUStrip(
n_ulines, v, u_val,
arc->pwlArc->npts, arc->pwlArc->pts[0].param[1], upper_val
- );
+ );
}
free(upper_val);
@@ -652,7 +652,7 @@ static void triangulateRectTopGen(Arc_ptr arc, int n_ulines, REAL* u_val, Real v
{
int i,k;
REAL* left_val = (REAL*) malloc(sizeof(REAL) * arc->pwlArc->npts);
- assert(left_val);
+ assert(left_val);
if(dir)
{
for(k=0,i=arc->pwlArc->npts-1; i>=0; i--,k++)
@@ -663,7 +663,7 @@ static void triangulateRectTopGen(Arc_ptr arc, int n_ulines, REAL* u_val, Real v
left_val,
n_ulines, v, u_val);
}
- else
+ else
{
for(k=0,i=0; ipwlArc->npts; i++,k++)
{
@@ -672,12 +672,12 @@ static void triangulateRectTopGen(Arc_ptr arc, int n_ulines, REAL* u_val, Real v
backend.evalVStrip(
n_ulines, v, u_val,
arc->pwlArc->npts, arc->pwlArc->pts[0].param[0], left_val
- );
+ );
}
free(left_val);
return;
}
-
+
//the following is a different version of the above code. If you comment
//the above code, the following code will still work. The reason to leave
//the folliwng code here is purely for testing purpose.
@@ -712,7 +712,7 @@ static void triangulateRectTopGen(Arc_ptr arc, int n_ulines, REAL* u_val, Real v
trimVert.param[1] = u_val[0];
trimVert.param[0] = v;
}
-
+
backend.tmeshvert(& trimVert);
for(i=d1; i< parc->npts; i++)
backend.tmeshvert(& parc->pts[i]);
@@ -762,7 +762,7 @@ static void triangulateRectTopGen(Arc_ptr arc, int n_ulines, REAL* u_val, Real v
backend.tmeshvert(&trimVert);
-
+
}
backend.endqstrip();
@@ -795,7 +795,7 @@ static void triangulateRectGen(Arc_ptr loop, int n_ulines, int n_vlines, Backend
top = loop->prev->prev;
}
}
- else
+ else
{
if(loop->tail()[0] > loop->prev->prev->tail()[0])
{
@@ -815,16 +815,16 @@ static void triangulateRectGen(Arc_ptr loop, int n_ulines, int n_vlines, Backend
right= bot->next;
#ifdef COUNT_TRIANGLES
- num_triangles += loop->pwlArc->npts +
- left->pwlArc->npts +
- bot->pwlArc->npts +
- right->pwlArc->npts
- + 2*n_ulines + 2*n_vlines
+ num_triangles += loop->pwlArc->npts +
+ left->pwlArc->npts +
+ bot->pwlArc->npts +
+ right->pwlArc->npts
+ + 2*n_ulines + 2*n_vlines
-8;
num_quads += (n_ulines-1)*(n_vlines-1);
#endif
/*
- backend.surfgrid(left->tail()[0], right->tail()[0], n_ulines+1,
+ backend.surfgrid(left->tail()[0], right->tail()[0], n_ulines+1,
top->tail()[1], bot->tail()[1], n_vlines+1);
// if(n_ulines>1 && n_vlines>1)
backend.surfmesh(0,0,n_ulines+1,n_vlines+1);
@@ -862,11 +862,11 @@ return;
free(u_val);
free(v_val);
-
+
}
-
+
/**********for reading newtess_flag from a file**********/
#ifdef USE_READ_FLAG
@@ -883,7 +883,7 @@ static Int read_flag(char* name)
fclose(fp);
return ret;
}
-#endif
+#endif
/***********nextgen tess****************/
#include "sampleMonoPoly.h"
@@ -902,7 +902,7 @@ directedLine* arcToDLine(Arc_ptr arc)
ret = new directedLine(INCREASING, sline);
return ret;
}
-
+
/*an pwlArc may not be a straight line*/
directedLine* arcToMultDLines(directedLine* original, Arc_ptr arc)
{
@@ -912,7 +912,7 @@ directedLine* arcToMultDLines(directedLine* original, Arc_ptr arc)
is_linear = 1;
else if(area(arc->pwlArc->pts[0].param, arc->pwlArc->pts[1].param, arc->pwlArc->pts[arc->pwlArc->npts-1].param) == 0.0)
is_linear = 1;
-
+
if(is_linear)
{
directedLine *dline = arcToDLine(arc);
@@ -931,7 +931,7 @@ directedLine* arcToMultDLines(directedLine* original, Arc_ptr arc)
vert[0][1] = arc->pwlArc->pts[i].param[1];
vert[1][0] = arc->pwlArc->pts[i+1].param[0];
vert[1][1] = arc->pwlArc->pts[i+1].param[1];
-
+
sampledLine *sline = new sampledLine(2, vert);
directedLine *dline = new directedLine(INCREASING, sline);
if(ret == NULL)
@@ -942,9 +942,9 @@ directedLine* arcToMultDLines(directedLine* original, Arc_ptr arc)
return ret;
}
}
-
-
-
+
+
+
directedLine* arcLoopToDLineLoop(Arc_ptr loop)
{
directedLine* ret;
@@ -993,7 +993,7 @@ void Slicer::evalRBArray(rectBlockArray* rbArray, gridWrap* grid)
}
}
-
+
free(trimVert);
}
*/
@@ -1001,7 +1001,7 @@ void Slicer::evalRBArray(rectBlockArray* rbArray, gridWrap* grid)
void Slicer::evalRBArray(rectBlockArray* rbArray, gridWrap* grid)
{
Int i,j,k;
-
+
Int n_vlines=grid->get_n_vlines();
//the reason to switch the position of v_max and v_min is because of the
//the orientation problem. glEvalMesh generates quad_strip clockwise, but
@@ -1042,17 +1042,17 @@ void Slicer::evalStream(primStream* pStream)
backend.bgntfan();
for(j=0; jget_length(i); j++)
- {
+ {
trimVert->param[0] = vertices[k];
trimVert->param[1] = vertices[k+1];
- backend.tmeshvert(trimVert);
-
+ backend.tmeshvert(trimVert);
+
// backend.tmeshvert(vertices[k], vertices[k+1]);
k += 2;
}
backend.endtfan();
break;
-
+
default:
fprintf(stderr, "evalStream: not implemented yet\n");
exit(1);
@@ -1061,9 +1061,9 @@ void Slicer::evalStream(primStream* pStream)
}
free(trimVert);
}
-
-
-
+
+
+
void Slicer::slice_new(Arc_ptr loop)
{
@@ -1118,14 +1118,14 @@ void Slicer::slice_new(Arc_ptr loop)
if(vlinear)
triangulateRect(loop, backend, 1, ulinear, vlinear);
else if(ulinear)
- triangulateRect(loop, backend, -1, ulinear, vlinear);
+ triangulateRect(loop, backend, -1, ulinear, vlinear);
else
- triangulateRect(loop, backend, 0, ulinear, vlinear);
+ triangulateRect(loop, backend, 0, ulinear, vlinear);
}
else if(isRect)
{
- triangulateRectGen(loop, num_ulines-2, num_vlines-2, backend);
+ triangulateRectGen(loop, num_ulines-2, num_vlines-2, backend);
}
else if( (num_ulines<=2 || num_vlines <=2) && ulinear)
{
@@ -1135,7 +1135,7 @@ void Slicer::slice_new(Arc_ptr loop)
{
monoTriangulationFunBackend(loop, compV2InY, &backend);
}
- else
+ else
{
directedLine* poly = arcLoopToDLineLoop(loop);
@@ -1148,14 +1148,14 @@ void Slicer::slice_new(Arc_ptr loop)
evalStream(&pStream);
evalRBArray(&rbArray, &grid);
-
+
#ifdef COUNT_TRIANGLES
num_triangles += pStream.num_triangles();
num_quads += rbArray.num_quads();
#endif
- poly->deleteSinglePolygonWithSline();
+ poly->deleteSinglePolygonWithSline();
}
-
+
#ifdef COUNT_TRIANGLES
printf("num_triangles=%i\n", num_triangles);
printf("num_quads = %i\n", num_quads);
@@ -1176,9 +1176,9 @@ void Slicer::slice(Arc_ptr loop)
}
-
-Slicer::Slicer( Backend &b )
+
+Slicer::Slicer( Backend &b )
: CoveAndTiler( b ), Mesher( b ), backend( b )
{
oneOverDu = 0;
@@ -1232,17 +1232,17 @@ Slicer::slice_old( Arc_ptr loop )
getGridExtent( &extrema[0]->pwlArc->pts[0], &extrema[0]->pwlArc->pts[0] );
for( long quad=0; quadtail()[0] > (jarc2)->head()[0] ) ) {
+ if( ! ( jarc2->tail()[0] > (jarc2)->head()[0] ) ) {
#ifndef NDEBUG
_glu_dprintf( "s difference %f\n", (jarc2)->tail()[0] - (jarc2)->head()[0] );
#endif
@@ -160,7 +160,7 @@ Subdivider::link( Arc_ptr jarc1, Arc_ptr jarc2, Arc_ptr up, Arc_ptr down )
up->prev->next = up;
}
-inline void
+inline void
Subdivider::simple_link( Arc_ptr jarc1, Arc_ptr jarc2 )
{
Arc_ptr tmp = jarc2->prev;
@@ -196,7 +196,7 @@ Subdivider::join_s( Bin& left, Bin& right, Arc_ptr jarc1, Arc_ptr jarc2 )
if( t1 == t2 ) {
simple_link( jarc1, jarc2 );
} else {
- Arc_ptr newright = new(arcpool) Arc( arc_right, 0 );
+ Arc_ptr newright = new(arcpool) Arc( arc_right, 0 );
Arc_ptr newleft = new(arcpool) Arc( arc_left, 0 );
assert( t1 < t2 );
if( isBezierArcType() ) {
@@ -235,7 +235,7 @@ Subdivider::check_t( Arc_ptr jarc1, Arc_ptr jarc2 )
::mylongjmp( jumpbuffer, 28 );
}
- if( ! ( jarc2->tail()[1] > (jarc2)->head()[1] ) ) {
+ if( ! ( jarc2->tail()[1] > (jarc2)->head()[1] ) ) {
#ifndef NDEBUG
_glu_dprintf( "t difference %f\n", jarc2->tail()[1] - (jarc2)->head()[1] );
#endif
diff --git a/src/glu/sgi/libnurbs/internals/subdivider.cc b/src/glu/sgi/libnurbs/internals/subdivider.cc
index ccddc27..4479618 100644
--- a/src/glu/sgi/libnurbs/internals/subdivider.cc
+++ b/src/glu/sgi/libnurbs/internals/subdivider.cc
@@ -71,7 +71,7 @@
Bin*
Subdivider::makePatchBoundary( const REAL *from, const REAL *to )
-{
+{
Bin* ret = new Bin();
REAL smin = from[0];
REAL smax = to[0];
@@ -109,9 +109,9 @@ Subdivider::makePatchBoundary( const REAL *from, const REAL *to )
*---------------------------------------------------------------------------
*/
-Subdivider::Subdivider( Renderhints& r, Backend& b )
+Subdivider::Subdivider( Renderhints& r, Backend& b )
: slicer( b ),
- arctessellator( trimvertexpool, pwlarcpool ),
+ arctessellator( trimvertexpool, pwlarcpool ),
arcpool( sizeof( Arc), 1, "arcpool" ),
bezierarcpool( sizeof( BezierArc ), 1, "Bezarcpool" ),
pwlarcpool( sizeof( PwlArc ), 1, "Pwlarcpool" ),
@@ -131,10 +131,10 @@ Subdivider::setJumpbuffer( JumpBuffer *j )
*---------------------------------------------------------------------------
*/
-void
+void
Subdivider::clear( void )
{
- trimvertexpool.clear();
+ trimvertexpool.clear();
arcpool.clear();
pwlarcpool.clear();
bezierarcpool.clear();
@@ -174,10 +174,10 @@ Subdivider::addArc( REAL *cpts, Quilt *quilt, long _nuid )
*/
void
-Subdivider::addArc( int npts, TrimVertex *pts, long _nuid )
+Subdivider::addArc( int npts, TrimVertex *pts, long _nuid )
{
Arc *jarc = new(arcpool) Arc( arc_none, _nuid );
- jarc->pwlArc = new(pwlarcpool) PwlArc( npts, pts );
+ jarc->pwlArc = new(pwlarcpool) PwlArc( npts, pts );
initialbin.addarc( jarc );
pjarc = jarc->append( pjarc );
}
@@ -205,7 +205,7 @@ Subdivider::drawSurfaces( long nuid )
{
renderhints.init( );
- if (qlist == NULL)
+ if (qlist == NULL)
{
//initialbin could be nonempty due to some errors
freejarcs(initialbin);
@@ -223,8 +223,8 @@ Subdivider::drawSurfaces( long nuid )
REAL from[2], to[2];
qlist->getRange( from, to, spbrkpts, tpbrkpts );
#ifdef OPTIMIZE_UNTRIMED_CASE
- //perform optimization only when the samplng method is
- //DOMAIN_DISTANCE and the display methdo is either
+ //perform optimization only when the samplng method is
+ //DOMAIN_DISTANCE and the display methdo is either
//fill or outline_polygon.
int optimize = (is_domain_distance_sampling && (renderhints.display_method != N_OUTLINE_PATCH));
#endif
@@ -232,7 +232,7 @@ Subdivider::drawSurfaces( long nuid )
if( ! initialbin.isnonempty() ) {
#ifdef OPTIMIZE_UNTRIMED_CASE
if(! optimize )
- {
+ {
makeBorderTrim( from, to );
}
@@ -243,14 +243,14 @@ Subdivider::drawSurfaces( long nuid )
REAL rate[2];
qlist->findRates( spbrkpts, tpbrkpts, rate );
- if( decompose( initialbin, min(rate[0], rate[1]) ) )
+ if( decompose( initialbin, min(rate[0], rate[1]) ) )
mylongjmp( jumpbuffer, 31 );
}
backend.bgnsurf( renderhints.wiretris, renderhints.wirequads, nuid );
#ifdef PARTITION_TEST
- if( initialbin.isnonempty() && spbrkpts.end-2 == spbrkpts.start &&
+ if( initialbin.isnonempty() && spbrkpts.end-2 == spbrkpts.start &&
tpbrkpts.end-2 == tpbrkpts.start)
{
for(int i=spbrkpts.start; ideleteDegenerateLinesAllPolygons();
+
+ poly=poly->deleteDegenerateLinesAllPolygons();
sampledLine* retSampledLines;
-//printf("before MC_partition\n");
+//printf("before MC_partition\n");
poly = MC_partitionY(poly, &retSampledLines);
-//printf("after MC_partition\n");
+//printf("after MC_partition\n");
}
@@ -326,23 +326,23 @@ Subdivider::drawSurfaces( long nuid )
pta[1] = tpbrkpts.pts[j];
ptb[1] = tpbrkpts.pts[j+1];
qlist->downloadAll(pta, ptb, backend);
-
+
num_u_steps = (int) (domain_distance_u_rate * (ptb[0]-pta[0]));
num_v_steps = (int) (domain_distance_v_rate * (ptb[1]-pta[1]));
if(num_u_steps <= 0) num_u_steps = 1;
if(num_v_steps <= 0) num_v_steps = 1;
- backend.surfgrid(pta[0], ptb[0], num_u_steps,
+ backend.surfgrid(pta[0], ptb[0], num_u_steps,
ptb[1], pta[1], num_v_steps);
backend.surfmesh(0,0,num_u_steps,num_v_steps);
-
+
continue;
/* the following is left for reference purpose, don't delete
{
- Bin* tempSource;
+ Bin* tempSource;
Patchlist patchlist(qlist, pta, ptb);
patchlist.getstepsize();
@@ -410,7 +410,7 @@ Subdivider::splitInS( Bin& source, int start, int end )
splitInT( source, tpbrkpts.start, tpbrkpts.end );
}
}
- }
+ }
}
/*---------------------------------------------------------------------------
@@ -446,7 +446,7 @@ Subdivider::splitInT( Bin& source, int start, int end )
ptb[0] = spbrkpts.pts[s_index];
ptb[1] = tpbrkpts.pts[t_index];
qlist->downloadAll( pta, ptb, backend );
-
+
Patchlist patchlist( qlist, pta, ptb );
/*
printf("-------samplingSplit-----\n");
@@ -457,19 +457,19 @@ source.show("samplingSplit source");
setArcTypeBezier();
}
}
- }
+ }
}
/*--------------------------------------------------------------------------
- * samplingSplit - recursively subdivide patch, cull check each subpatch
+ * samplingSplit - recursively subdivide patch, cull check each subpatch
*--------------------------------------------------------------------------
*/
void
-Subdivider::samplingSplit(
- Bin& source,
- Patchlist& patchlist,
- int subdivisions,
+Subdivider::samplingSplit(
+ Bin& source,
+ Patchlist& patchlist,
+ int subdivisions,
int param )
{
if( ! source.isnonempty() ) return;
@@ -486,7 +486,7 @@ Subdivider::samplingSplit(
outline( source );
freejarcs( source );
return;
- }
+ }
//patchlist.clamp();
@@ -517,10 +517,10 @@ Subdivider::samplingSplit(
}
void
-Subdivider::nonSamplingSplit(
- Bin& source,
- Patchlist& patchlist,
- int subdivisions,
+Subdivider::nonSamplingSplit(
+ Bin& source,
+ Patchlist& patchlist,
+ int subdivisions,
int param )
{
if( patchlist.needsNonSamplingSubdivision() && (subdivisions > 0) ) {
@@ -532,13 +532,13 @@ Subdivider::nonSamplingSplit(
split( source, left, right, param, mid );
Patchlist subpatchlist( patchlist, param, mid );
if( left.isnonempty() ) {
- if( subpatchlist.cullCheck() == CULL_TRIVIAL_REJECT )
+ if( subpatchlist.cullCheck() == CULL_TRIVIAL_REJECT )
freejarcs( left );
else
nonSamplingSplit( left, subpatchlist, subdivisions-1, param );
}
if( right.isnonempty() ) {
- if( patchlist.cullCheck() == CULL_TRIVIAL_REJECT )
+ if( patchlist.cullCheck() == CULL_TRIVIAL_REJECT )
freejarcs( right );
else
nonSamplingSplit( right, patchlist, subdivisions-1, param );
@@ -549,7 +549,7 @@ Subdivider::nonSamplingSplit(
patchlist.bbox();
backend.patch( patchlist.pspec[0].range[0], patchlist.pspec[0].range[1],
patchlist.pspec[1].range[0], patchlist.pspec[1].range[1] );
-
+
if( renderhints.display_method == N_OUTLINE_SUBDIV ) {
outline( source );
freejarcs( source );
@@ -614,7 +614,7 @@ Subdivider::monosplitInS( Bin& source, int start, int end )
monosplitInT( source, tmbrkpts.start, tmbrkpts.end );
}
}
- }
+ }
}
/*---------------------------------------------------------------------------
@@ -645,7 +645,7 @@ source.show("source\n");
freejarcs( source );
}
}
- }
+ }
}
@@ -672,7 +672,7 @@ Subdivider::findIrregularS( Bin& bin )
if((b[1]<=a[1] && b[1] <= c[1]) ||
(b[1]>=a[1] && b[1] >= c[1]))
{
- //each arc (jarc, jarc->prev, jarc->next) is a
+ //each arc (jarc, jarc->prev, jarc->next) is a
//monotone arc consisting of multiple line segements.
//it may happen that jarc->prev and jarc->next are the same,
//that is, jarc->prev and jarc form a closed loop.
@@ -688,7 +688,7 @@ Subdivider::findIrregularS( Bin& bin )
assert(jarc->prev->pwlArc->npts>2);
a = jarc->prev->pwlArc->pts[jarc->prev->pwlArc->npts-2].param;
}
-
+
}
if(area(a,b,c) < 0)
{
@@ -697,7 +697,7 @@ Subdivider::findIrregularS( Bin& bin )
}
- /* old code,
+ /* old code,
if( b[1] <= a[1] && b[1] <= c[1] ) {
if( ! ccwTurn_tr( jarc->prev, jarc ) )
smbrkpts.add( b[0] );
@@ -710,7 +710,7 @@ Subdivider::findIrregularS( Bin& bin )
}
smbrkpts.filter();
-}
+}
/*----------------------------------------------------------------------------
* findIrregularT - determine points of non-monotonicity in t direction
@@ -733,11 +733,11 @@ Subdivider::findIrregularT( Bin& bin )
if( b[0] == a[0] && b[0] == c[0] ) continue;
if( b[0] <= a[0] && b[0] <= c[0] ) {
- if( a[1] != b[1] && b[1] != c[1] ) continue;
+ if( a[1] != b[1] && b[1] != c[1] ) continue;
if( ! ccwTurn_sr( jarc->prev, jarc ) )
tmbrkpts.add( b[1] );
} else if ( b[0] >= a[0] && b[0] >= c[0] ) {
- if( a[1] != b[1] && b[1] != c[1] ) continue;
+ if( a[1] != b[1] && b[1] != c[1] ) continue;
if( ! ccwTurn_sl( jarc->prev, jarc ) )
tmbrkpts.add( b[1] );
}
@@ -746,16 +746,16 @@ Subdivider::findIrregularT( Bin& bin )
}
/*-----------------------------------------------------------------------------
- * makeBorderTrim - if no user input trimming data then create
+ * makeBorderTrim - if no user input trimming data then create
* a trimming curve around the boundaries of the Quilt. The curve consists of
* four Jordan arcs, one for each side of the Quilt, connected, of course,
- * head to tail.
+ * head to tail.
*-----------------------------------------------------------------------------
*/
void
Subdivider::makeBorderTrim( const REAL *from, const REAL *to )
-{
+{
REAL smin = from[0];
REAL smax = to[0];
REAL tmin = from[1];
@@ -816,7 +816,7 @@ Subdivider::render( Bin& bin )
}
/*---------------------------------------------------------------------------
- * outline - render the trimmed patch by outlining the boundary
+ * outline - render the trimmed patch by outlining the boundary
*---------------------------------------------------------------------------
*/
@@ -857,10 +857,10 @@ Subdivider::freejarcs( Bin& bin )
/*----------------------------------------------------------------------------
* tessellate - tessellate all Bezier arcs in a bin
- * 1) only accepts linear Bezier arcs as input
+ * 1) only accepts linear Bezier arcs as input
* 2) the Bezier arcs are stored in the pwlArc structure
* 3) only vertical or horizontal lines work
- * -- should
+ * -- should
* 1) represent Bezier arcs in BezierArc structure
* (this requires a multitude of changes to the code)
* 2) accept high degree Bezier arcs (hard)
@@ -875,15 +875,15 @@ Subdivider::tessellate( Bin& bin, REAL rrate, REAL trate, REAL lrate, REAL brate
{
for( Arc_ptr jarc=bin.firstarc(); jarc; jarc=bin.nextarc() ) {
if( jarc->isbezier( ) ) {
- assert( jarc->pwlArc->npts == 2 );
+ assert( jarc->pwlArc->npts == 2 );
TrimVertex *pts = jarc->pwlArc->pts;
REAL s1 = pts[0].param[0];
REAL t1 = pts[0].param[1];
REAL s2 = pts[1].param[0];
REAL t2 = pts[1].param[1];
-
+
jarc->pwlArc->deleteMe( pwlarcpool ); jarc->pwlArc = 0;
-
+
switch( jarc->getside() ) {
case arc_left:
assert( s1 == s2 );
diff --git a/src/glu/sgi/libnurbs/internals/subdivider.h b/src/glu/sgi/libnurbs/internals/subdivider.h
index 4d53951..0de1b06 100644
--- a/src/glu/sgi/libnurbs/internals/subdivider.h
+++ b/src/glu/sgi/libnurbs/internals/subdivider.h
@@ -181,7 +181,7 @@ class Subdivider {
*GLU_U_STEP: number of u-segments per unit u length of domain
*GLU_V_STEP: number of v-segments per unit v length of domain
*These two numbers are normally stored in mapdesc->maxs(t)rate.
- *I (ZL) put these two numbers here so that I can optimize the untrimmed
+ *I (ZL) put these two numbers here so that I can optimize the untrimmed
*case in the case of domain distance sampling.
*These two numbers are set by set_domain_distance_u_rate() and ..._v_..().
*/
@@ -191,7 +191,7 @@ class Subdivider {
};
inline void
-Subdivider::beginLoop( void )
+Subdivider::beginLoop( void )
{
pjarc = 0;
}
diff --git a/src/glu/sgi/libnurbs/internals/tobezier.cc b/src/glu/sgi/libnurbs/internals/tobezier.cc
index 531f26b..3e2a386 100644
--- a/src/glu/sgi/libnurbs/internals/tobezier.cc
+++ b/src/glu/sgi/libnurbs/internals/tobezier.cc
@@ -32,7 +32,7 @@
** compliant with the OpenGL(R) version 1.2.1 Specification.
*/
-/*
+/*
* tobezier.c++
*
*/
@@ -86,7 +86,7 @@ struct Knotspec { /* knotvector format */
void knots( void );
void transform( REAL * );
void showpts( REAL * );
-
+
void pt_io_copy( REAL *, INREAL * );
void pt_oo_copy( REAL *, REAL * );
void pt_oo_sum( REAL*, REAL*, REAL*, Knot, Knot );
@@ -109,12 +109,12 @@ struct Splinespec { /* a non-uniform tensor element */
};
/*-----------------------------------------------------------------------------
- * Quilt::toBezier - convert from NURBS to rational Bezier
+ * Quilt::toBezier - convert from NURBS to rational Bezier
*-----------------------------------------------------------------------------
*/
void
-Quilt::toBezier(
+Quilt::toBezier(
Knotvector& knotvector, /* a knot vector */
INREAL *ctlpts, /* input contol points */
long ncoords ) /* number of coordinates per control point */
@@ -129,7 +129,7 @@ Quilt::toBezier(
}
void
-Quilt::toBezier(
+Quilt::toBezier(
Knotvector& sknotvector, /* a knot vector */
Knotvector& tknotvector, /* a knot vector */
INREAL *ctlpts, /* input contol points */
@@ -154,13 +154,13 @@ Splinespec::~Splinespec( void )
* is copied in 'cpts' in this file in function Splinespec::setupquilt().
* This block of memory will eventually be deleted in file quilt.c++ in
* function Quilt::deleteMe() through 'cpts' so do NOT delete it here!
- */
- Knotspec *ktrav= kspec; //start at beginning of list
- while (ktrav != 0) { //any items to delete?
- Knotspec *deleteThis= ktrav; //remember to delete this
+ */
+ Knotspec *ktrav= kspec; //start at beginning of list
+ while (ktrav != 0) { //any items to delete?
+ Knotspec *deleteThis= ktrav; //remember to delete this
ktrav= ktrav->next; //go to next item if any
delete deleteThis; //delete it
- }
+ }
} /* ~Splinespec() */
/*-----------------------------------------------------------------------------
@@ -176,7 +176,7 @@ Splinespec::kspecinit( Knotvector& knotvector )
kspec = new Knotspec;
kspec->inkbegin = knotvector.knotlist;
kspec->inkend = knotvector.knotlist + knotvector.knotcount;
- kspec->prestride = (int) knotvector.stride;
+ kspec->prestride = (int) knotvector.stride;
kspec->order = knotvector.order;
kspec->next = NULL;
}
@@ -189,13 +189,13 @@ Splinespec::kspecinit( Knotvector& sknotvector, Knotvector& tknotvector )
kspec->inkbegin = sknotvector.knotlist;
kspec->inkend = sknotvector.knotlist + sknotvector.knotcount;
- kspec->prestride = (int) sknotvector.stride;
+ kspec->prestride = (int) sknotvector.stride;
kspec->order = sknotvector.order;
kspec->next = tkspec;
tkspec->inkbegin = tknotvector.knotlist;
tkspec->inkend = tknotvector.knotlist + tknotvector.knotcount;
- tkspec->prestride = (int) tknotvector.stride;
+ tkspec->prestride = (int) tknotvector.stride;
tkspec->order = tknotvector.order;
tkspec->next = NULL;
}
@@ -204,7 +204,7 @@ Splinespec::kspecinit( Knotvector& sknotvector, Knotvector& tknotvector )
/*-----------------------------------------------------------------------------
* Splinespec::select - select the subsegments to copy
*
- * Client: gl_quilt_to_bezier
+ * Client: gl_quilt_to_bezier
*-----------------------------------------------------------------------------
*/
@@ -218,9 +218,9 @@ Splinespec::select( )
}
/*-----------------------------------------------------------------------------
- * Splinespec::layout -
+ * Splinespec::layout -
*
- * Client: gl_quilt_to_bezier
+ * Client: gl_quilt_to_bezier
*-----------------------------------------------------------------------------
*/
@@ -239,7 +239,7 @@ Splinespec::layout( long ncoords )
knotspec->ncoords = (int) ncoords;
}
outcpts = new REAL[stride];
- assert( outcpts != 0 );
+ assert( outcpts != 0 );
}
/*-----------------------------------------------------------------------------
@@ -256,7 +256,7 @@ Splinespec::copy( INREAL *incpts )
}
/*-----------------------------------------------------------------------------
- * Splinespec::setupquilt - assign all quilt variables from knotspec
+ * Splinespec::setupquilt - assign all quilt variables from knotspec
*
* Client: gl_quilt_to_bezier
*-----------------------------------------------------------------------------
@@ -308,7 +308,7 @@ Splinespec::transform( void )
/*-----------------------------------------------------------------------------
- * Knotspec::Knotspec - constuct a knot spec
+ * Knotspec::Knotspec - constuct a knot spec
*-----------------------------------------------------------------------------
*/
@@ -320,7 +320,7 @@ Knotspec::Knotspec( void )
}
/*-----------------------------------------------------------------------------
- * Knotspec::copy - copy the control points along minor direction
+ * Knotspec::copy - copy the control points along minor direction
*
* Client: Splinespec::copy
*-----------------------------------------------------------------------------
@@ -363,7 +363,7 @@ Knotspec::showpts( REAL *outpt )
}
/*-----------------------------------------------------------------------------
- * Knotspec::factors - precompute scale factors
+ * Knotspec::factors - precompute scale factors
* - overwrites knot vector, actual new knot vector is NOT produced
*
* Client: Knotspec::select
@@ -385,7 +385,7 @@ Knotspec::factors( void )
Knot *kf = (mid-def) + (order-1);
for( Knot *kl = kf + def; kl != kf; kl-- ) {
Knot *kh, *kt;
- for( kt=kl, kh=mid; kt != kf; kh--, kt-- )
+ for( kt=kl, kh=mid; kt != kf; kh--, kt-- )
*(fptr++) = (kv - *kh) / (*kt - *kh);
*kl = kv;
}
@@ -420,9 +420,9 @@ Knotspec::insert( REAL *p )
for( int multi = bpt->multi; multi > 0; multi-- ) {
pt_oo_copy( dstpt, srcpt );
dstpt -= poststride;
- srcpt -= poststride;
+ srcpt -= poststride;
}
-
+
for( REAL *pend = srcpt - poststride*bpt->def; srcpt != pend; pend +=poststride, dstpt-=poststride ) {
pt_oo_copy( dstpt, srcpt );
REAL *p1 = srcpt;
@@ -445,10 +445,10 @@ Knotspec::insert( REAL *p )
void
Knotspec::preselect( void )
{
- Knot kval;
+ Knot kval;
/* position klast after last knot of "last" breakpoint */
- for( klast = inkend - order, kval = *klast; klast != inkend; klast++ )
+ for( klast = inkend - order, kval = *klast; klast != inkend; klast++ )
if( ! identical( *klast, kval ) ) break;
/* position kfirst after last knot of "first" breakpoint */
@@ -457,8 +457,8 @@ Knotspec::preselect( void )
/* compute multiplicity of first breakpoint */
Knot_ptr k;
- for( k = kfirst - 1; k >= inkbegin; k-- )
- if( ! identical( kval, *k ) ) break;
+ for( k = kfirst - 1; k >= inkbegin; k-- )
+ if( ! identical( kval, *k ) ) break;
k++;
/* allocate space for breakpoints -
@@ -487,13 +487,13 @@ Knotspec::select( void )
breakpoints();
knots();
factors();
-
+
preoffset = kleft - (inkbegin + order);
postwidth = (int)((bend - bbegin) * order);
prewidth = (int)((outkend - outkbegin) - order);
postoffset = (bbegin->def > 1) ? (bbegin->def-1) : 0;
}
-
+
/*-----------------------------------------------------------------------------
* Knotspec::breakpoints - compute breakpoints for knotspec
*
@@ -528,7 +528,7 @@ Knotspec::breakpoints( void )
bend = ubpt;
- if( nfactors ) {
+ if( nfactors ) {
sbegin = new Knot[nfactors];
} else {
sbegin = NULL;
@@ -552,7 +552,7 @@ Knotspec::knots( void )
/* allocate space for knots and factors */
outkbegin = new Knot[inkend-inkpt];
Knot_ptr outkpt;
- for( outkpt = outkbegin; inkpt != inkend; inkpt++, outkpt++ )
+ for( outkpt = outkbegin; inkpt != inkend; inkpt++, outkpt++ )
*outkpt = *inkpt;
outkend = outkpt;
@@ -560,7 +560,7 @@ Knotspec::knots( void )
/*-----------------------------------------------------------------------------
- * Knotspec::transform - convert a spline along a given direction
+ * Knotspec::transform - convert a spline along a given direction
*
* Client: Splienspec::transform
*-----------------------------------------------------------------------------
diff --git a/src/glu/sgi/libnurbs/internals/trimline.cc b/src/glu/sgi/libnurbs/internals/trimline.cc
index 61f34cd..13f34dc 100644
--- a/src/glu/sgi/libnurbs/internals/trimline.cc
+++ b/src/glu/sgi/libnurbs/internals/trimline.cc
@@ -46,15 +46,15 @@
Trimline::Trimline()
{
size = 0; pts = 0; numverts = 0;
- tinterp = &t; binterp = &b;
+ tinterp = &t; binterp = &b;
}
Trimline::~Trimline()
{
- if( pts ) delete[] pts;
+ if( pts ) delete[] pts;
}
-void
+void
Trimline::init( TrimVertex *v )
{
reset();
@@ -67,7 +67,7 @@ Trimline::grow( long npts )
{
if( size < npts ) {
size = 2 * npts;
- if( pts ) delete[] pts;
+ if( pts ) delete[] pts;
pts = new TrimVertex_p[size];
}
}
@@ -75,7 +75,7 @@ Trimline::grow( long npts )
inline void
Trimline::append( TrimVertex *v )
{
- assert( numverts != size );
+ assert( numverts != size );
pts[numverts++] = v;
}
@@ -89,18 +89,18 @@ Trimline::init( long npts, Arc_ptr jarc, long last )
inline void
Trimline::swap()
{
- TrimVertex *tmp=tinterp;
- tinterp=binterp;
+ TrimVertex *tmp=tinterp;
+ tinterp=binterp;
binterp=tmp;
}
void
Trimline::getNextPt()
{
- *binterp = *jarcl.getnextpt();
+ *binterp = *jarcl.getnextpt();
}
-void
+void
Trimline::getPrevPt()
{
*binterp = *jarcl.getprevpt();
@@ -119,7 +119,7 @@ Trimline::getNextPts( REAL vval, Backend& backend )
register TrimVertex *p;
for( p=jarcl.getnextpt() ; p->param[1] >= vval; p=jarcl.getnextpt() ) {
- append( p );
+ append( p );
}
/* compute and copy pointer to final point on left hull */
@@ -133,7 +133,7 @@ Trimline::getNextPts( REAL vval, Backend& backend )
jarcl.reverse();
}
-void
+void
Trimline::getPrevPts( REAL vval, Backend& backend )
{
reset(); swap(); append( tinterp );
@@ -198,12 +198,12 @@ Trimline::interpvert( TrimVertex *a, TrimVertex *b, TrimVertex *c, REAL vval )
if(denom != 0) {
if( vval == a->param[1] ) {
- c->param[0] = a->param[0];
+ c->param[0] = a->param[0];
c->param[1] = a->param[1];
c->nuid = a->nuid;
return 0;
} else if( vval == b->param[1] ) {
- c->param[0] = b->param[0];
+ c->param[0] = b->param[0];
c->param[1] = b->param[1];
c->nuid = b->nuid;
return 0;
@@ -214,7 +214,7 @@ Trimline::interpvert( TrimVertex *a, TrimVertex *b, TrimVertex *c, REAL vval )
return 1;
}
} else {
- c->param[0] = a->param[0];
+ c->param[0] = a->param[0];
c->param[1] = a->param[1];
c->nuid = a->nuid;
return 0;
diff --git a/src/glu/sgi/libnurbs/internals/trimline.h b/src/glu/sgi/libnurbs/internals/trimline.h
index ecc8842..4fc769e 100644
--- a/src/glu/sgi/libnurbs/internals/trimline.h
+++ b/src/glu/sgi/libnurbs/internals/trimline.h
@@ -45,7 +45,7 @@ class Backend;
class Trimline {
private:
- TrimVertex** pts;
+ TrimVertex** pts;
long numverts;
long i;
long size;
@@ -72,32 +72,32 @@ class Trimline {
void getNextPts( Arc_ptr );
void getPrevPts( Arc_ptr );
inline TrimVertex * next( void );
- inline TrimVertex * prev( void );
+ inline TrimVertex * prev( void );
inline TrimVertex * first( void );
inline TrimVertex * last( void );
};
inline TrimVertex *
-Trimline::next( void )
+Trimline::next( void )
{
- if( i < numverts) return pts[i++]; else return 0;
-}
+ if( i < numverts) return pts[i++]; else return 0;
+}
inline TrimVertex *
-Trimline::prev( void )
+Trimline::prev( void )
{
- if( i >= 0 ) return pts[i--]; else return 0;
-}
+ if( i >= 0 ) return pts[i--]; else return 0;
+}
inline TrimVertex *
-Trimline::first( void )
+Trimline::first( void )
{
- i = 0; return pts[i];
+ i = 0; return pts[i];
}
inline TrimVertex *
-Trimline::last( void )
+Trimline::last( void )
{
- i = numverts; return pts[--i];
-}
+ i = numverts; return pts[--i];
+}
#endif /* __glutrimline_h_ */
diff --git a/src/glu/sgi/libnurbs/internals/trimregion.cc b/src/glu/sgi/libnurbs/internals/trimregion.cc
index 4aeb5ee..60bd89b 100644
--- a/src/glu/sgi/libnurbs/internals/trimregion.cc
+++ b/src/glu/sgi/libnurbs/internals/trimregion.cc
@@ -55,10 +55,10 @@ TrimRegion::setDu( REAL du )
void
TrimRegion::init( long npts, Arc_ptr extrema )
{
- left.init( npts, extrema, extrema->pwlArc->npts - 1 );
+ left.init( npts, extrema, extrema->pwlArc->npts - 1 );
left.getNextPt();
- right.init( npts, extrema, 0 );
+ right.init( npts, extrema, 0 );
right.getPrevPt();
}
@@ -76,7 +76,7 @@ TrimRegion::getPts( Backend &backend )
right.getPrevPts( bot.vval, backend );
}
-void
+void
TrimRegion::getGridExtent( void )
{
getGridExtent( left.last(), right.last() );
@@ -103,7 +103,7 @@ TrimRegion::canTile( void )
{
TrimVertex *lf = left.first();
TrimVertex *ll = left.last();
- TrimVertex *l = ( ll->param[0] > lf->param[0] ) ? ll : lf;
+ TrimVertex *l = ( ll->param[0] > lf->param[0] ) ? ll : lf;
TrimVertex *rf = right.first();
TrimVertex *rl = right.last();
diff --git a/src/glu/sgi/libnurbs/internals/trimregion.h b/src/glu/sgi/libnurbs/internals/trimregion.h
index ee15d7b..b0a62bc 100644
--- a/src/glu/sgi/libnurbs/internals/trimregion.h
+++ b/src/glu/sgi/libnurbs/internals/trimregion.h
@@ -66,7 +66,7 @@ class TrimRegion {
};
inline void
-TrimRegion::init( REAL vval )
+TrimRegion::init( REAL vval )
{
bot.vval = vval;
}
diff --git a/src/glu/sgi/libnurbs/internals/trimvertex.h b/src/glu/sgi/libnurbs/internals/trimvertex.h
index 2780b76..ab546dc 100644
--- a/src/glu/sgi/libnurbs/internals/trimvertex.h
+++ b/src/glu/sgi/libnurbs/internals/trimvertex.h
@@ -52,11 +52,11 @@ class TrimVertex { /* a vertex on a trim curve */
typedef class TrimVertex *TrimVertex_p;
-inline REAL
-det3( TrimVertex *a, TrimVertex *b, TrimVertex *c )
-{
- return a->param[0] * (b->param[1]-c->param[1]) +
- b->param[0] * (c->param[1]-a->param[1]) +
+inline REAL
+det3( TrimVertex *a, TrimVertex *b, TrimVertex *c )
+{
+ return a->param[0] * (b->param[1]-c->param[1]) +
+ b->param[0] * (c->param[1]-a->param[1]) +
c->param[0] * (a->param[1]-b->param[1]);
}
diff --git a/src/glu/sgi/libnurbs/internals/trimvertpool.cc b/src/glu/sgi/libnurbs/internals/trimvertpool.cc
index 3e5bd70..03a05ae 100644
--- a/src/glu/sgi/libnurbs/internals/trimvertpool.cc
+++ b/src/glu/sgi/libnurbs/internals/trimvertpool.cc
@@ -46,7 +46,7 @@
#include "bufpool.h"
/*----------------------------------------------------------------------------
- * TrimVertexPool::TrimVertexPool
+ * TrimVertexPool::TrimVertexPool
*----------------------------------------------------------------------------
*/
TrimVertexPool::TrimVertexPool( void )
@@ -59,7 +59,7 @@ TrimVertexPool::TrimVertexPool( void )
}
/*----------------------------------------------------------------------------
- * TrimVertexPool::~TrimVertexPool
+ * TrimVertexPool::~TrimVertexPool
*----------------------------------------------------------------------------
*/
TrimVertexPool::~TrimVertexPool( void )
@@ -74,13 +74,13 @@ TrimVertexPool::~TrimVertexPool( void )
}
/*----------------------------------------------------------------------------
- * TrimVertexPool::clear
+ * TrimVertexPool::clear
*----------------------------------------------------------------------------
*/
void
TrimVertexPool::clear( void )
{
- // reinitialize pool of 3 vertex arrays
+ // reinitialize pool of 3 vertex arrays
pool.clear();
// free all arrays of TrimVertices vertices
diff --git a/src/glu/sgi/libnurbs/internals/uarray.cc b/src/glu/sgi/libnurbs/internals/uarray.cc
index 4b3329c..afa42ad 100644
--- a/src/glu/sgi/libnurbs/internals/uarray.cc
+++ b/src/glu/sgi/libnurbs/internals/uarray.cc
@@ -52,7 +52,7 @@ Uarray::Uarray( void )
Uarray::~Uarray( void )
{
- if( uarray ) delete[] uarray;
+ if( uarray ) delete[] uarray;
}
long
@@ -61,7 +61,7 @@ Uarray::init( REAL delta, Arc_ptr lo, Arc_ptr hi )
ulines = (long) ((hi->tail()[0] - lo->tail()[0])/delta) + 3;
if( size < ulines ) {
size = ulines * 2;
- if( uarray ) delete[] uarray;
+ if( uarray ) delete[] uarray;
uarray = new REAL[size];
assert( uarray != 0);
}
diff --git a/src/glu/sgi/libnurbs/internals/uarray.h b/src/glu/sgi/libnurbs/internals/uarray.h
index cc6fae1..764dd8c 100644
--- a/src/glu/sgi/libnurbs/internals/uarray.h
+++ b/src/glu/sgi/libnurbs/internals/uarray.h
@@ -39,7 +39,7 @@
#include "types.h"
class Arc;
-typedef class Arc *Arc_ptr;
+typedef class Arc *Arc_ptr;
class Uarray {
private:
diff --git a/src/glu/sgi/libnurbs/internals/varray.cc b/src/glu/sgi/libnurbs/internals/varray.cc
index 1cb2354..baca8d2 100644
--- a/src/glu/sgi/libnurbs/internals/varray.cc
+++ b/src/glu/sgi/libnurbs/internals/varray.cc
@@ -45,7 +45,7 @@
#include "simplemath.h" // glu_abs()
#define TINY 0.0001
-inline long sgn( REAL x )
+inline long sgn( REAL x )
{
return (x < -TINY) ? -1 : ((x > TINY) ? 1 : 0 );
}
@@ -67,7 +67,7 @@ Varray::Varray( void )
Varray::~Varray( void )
{
- if( varray ) delete[] varray;
+ if( varray ) delete[] varray;
}
inline void
@@ -88,7 +88,7 @@ Varray::grow( long guess )
{
if( size < guess ) {
size = guess * 2;
- if( varray ) delete[] varray;
+ if( varray ) delete[] varray;
varray = new REAL[size];
assert( varray != 0 );
}
@@ -100,7 +100,7 @@ Varray::init( REAL delta, Arc_ptr toparc, Arc_ptr botarc )
Arc_ptr left = toparc->next;
Arc_ptr right = toparc;
long ldir[2], rdir[2];
-
+
ldir[0] = sgn( left->tail()[0] - left->prev->tail()[0] );
ldir[1] = sgn( left->tail()[1] - left->prev->tail()[1] );
rdir[0] = sgn( right->tail()[0] - right->prev->tail()[0] );
@@ -115,7 +115,7 @@ Varray::init( REAL delta, Arc_ptr toparc, Arc_ptr botarc )
left = left->next;
update( left, ldir, left->prev->tail()[1] );
break;
- case -1:
+ case -1:
right = right->prev;
update( right, rdir, right->tail()[1] );
break;
@@ -141,8 +141,8 @@ Varray::init( REAL delta, Arc_ptr toparc, Arc_ptr botarc )
if( dist > delta ) {
long steps = ((long) (dist/delta)) +1;
float deltav = - dist / (REAL) steps;
- for( long j=1; jhead()[0] == temp->tail()[0] &&
temp->head()[1] == temp->tail()[1])
-*/
+*/
if(myequal(temp->head(), temp->tail()))
deleteSingleLine(temp);
- }
+ }
return first;
}
@@ -190,7 +190,7 @@ directedLine* directedLine::deleteDegenerateLinesAllPolygons()
if(ret == NULL)
{
ret = retEnd = temp->deleteDegenerateLines();
-
+
}
else
{
diff --git a/src/glu/sgi/libnurbs/nurbtess/directedLine.h b/src/glu/sgi/libnurbs/nurbtess/directedLine.h
index 4ed0128..36b5e5e 100644
--- a/src/glu/sgi/libnurbs/nurbtess/directedLine.h
+++ b/src/glu/sgi/libnurbs/nurbtess/directedLine.h
@@ -44,10 +44,10 @@ class directedLine {
directedLine* next; /*double linked list*/
directedLine* prev; /*double linked list*/
- /*in case we need a list of polygons each
+ /*in case we need a list of polygons each
*consisting of a double linked list
*/
- directedLine* nextPolygon;
+ directedLine* nextPolygon;
/*optimization make cutoff polygon faster*/
/* directedLine* prevPolygon;*/
@@ -65,7 +65,7 @@ class directedLine {
~directedLine();
void init(short dir, sampledLine* sl);
-
+
Real* head(); /*points[0] if INCREASING, points[n-1] otherwise*/
Real* tail(); /*points[n-1] if INCREASING, points[0] otherwise*/
Real* getVertex(Int i); /*points[i] if INCREASING, points[n-1-i] otherwise*/
@@ -101,13 +101,13 @@ class directedLine {
/*check to see if the list forms a closed polygon
*return 1 if yes
*/
- short isPolygon();
-
+ short isPolygon();
+
Int compInY(directedLine* nl);
Int compInX(directedLine* nl);
/*return an array of pointers.
- *the
+ *the
*/
directedLine** sortAllPolygons();
@@ -115,7 +115,7 @@ class directedLine {
Int numEdgesAllPolygons();
Int numPolygons();
- /*check if the head of this edge is connected to
+ /*check if the head of this edge is connected to
*the tail of the prev
*/
short isConnected();
@@ -126,7 +126,7 @@ class directedLine {
void printList();
void printAllPolygons();
void writeAllPolygons(char* filename);
-
+
/*insert a polygon: using nextPolygon*/
directedLine* insertPolygon(directedLine* newpolygon);
@@ -135,15 +135,15 @@ class directedLine {
Int toArraySinglePolygon(directedLine** array, Int index);
directedLine** toArrayAllPolygons(Int& total_num_edges);
- void connectDiagonal(directedLine* v1, directedLine* v2,
- directedLine** ret_p1,
+ void connectDiagonal(directedLine* v1, directedLine* v2,
+ directedLine** ret_p1,
directedLine** ret_p2,
sampledLine** generatedLine, directedLine* list);
/*generate two slines
*/
- void connectDiagonal_2slines(directedLine* v1, directedLine* v2,
- directedLine** ret_p1,
+ void connectDiagonal_2slines(directedLine* v1, directedLine* v2,
+ directedLine** ret_p1,
directedLine** ret_p2,
directedLine* list);
diff --git a/src/glu/sgi/libnurbs/nurbtess/gridWrap.cc b/src/glu/sgi/libnurbs/nurbtess/gridWrap.cc
index 3c92039..f3799ba 100644
--- a/src/glu/sgi/libnurbs/nurbtess/gridWrap.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/gridWrap.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -67,15 +67,15 @@ gridWrap::gridWrap(Int nUlines, Real* uvals,
u_values = (Real*) malloc(sizeof(Real) * n_ulines);
assert(u_values);
v_values = (Real*) malloc(sizeof(Real) * n_vlines);
- assert(v_values);
-
+ assert(v_values);
+
Int i;
for(i=0; i=2);
assert(nVlines>=2);
@@ -137,9 +137,9 @@ void gridWrap::draw()
void gridWrap::outputFanWithPoint(Int v, Int uleft, Int uright, Real vert[2], primStream* pStream)
{
Int i;
- if(uleft >= uright)
+ if(uleft >= uright)
return; //no triangles to output.
-
+
pStream->begin();
pStream->insert(vert);
@@ -154,30 +154,30 @@ void gridWrap::outputFanWithPoint(Int v, Int uleft, Int uright, Real vert[2], pr
{
for(i=uright; i>= uleft; i--)
pStream->insert(u_values[i], v_values[v]);
- }
-
+ }
+
pStream->end(PRIMITIVE_STREAM_FAN);
}
-/*each chain stores a number of consecutive
- *V-lines within a grid.
+/*each chain stores a number of consecutive
+ *V-lines within a grid.
*There is one grid vertex on each V-line.
* The total number of V-lines is:
* nVlines.
- * with respect to the grid, the index of the first V-line is
+ * with respect to the grid, the index of the first V-line is
* firstVlineIndex.
- * So with respect to the grid, the index of the ith V-line is
+ * So with respect to the grid, the index of the ith V-line is
* firstVlineIndex-i.
* the grid-index of the uline at the ith vline (recall that each vline has one grid point)
* is ulineIndices[i]. The u_value is cached in ulineValues[i], that is,
- * ulineValues[i] = grid->get_u_value(ulineIndices[i])
+ * ulineValues[i] = grid->get_u_value(ulineIndices[i])
*/
gridBoundaryChain::gridBoundaryChain(
- gridWrap* gr,
- Int first_vline_index,
- Int n_vlines,
+ gridWrap* gr,
+ Int first_vline_index,
+ Int n_vlines,
Int* uline_indices,
Int* inner_indices
)
@@ -191,7 +191,7 @@ gridBoundaryChain::gridBoundaryChain(
vertices = (Real2*) malloc(sizeof(Real2) * n_vlines);
assert(vertices);
-
+
Int i;
@@ -199,13 +199,13 @@ gridBoundaryChain::gridBoundaryChain(
ulineIndices[i] = uline_indices[i];
innerIndices[i] = inner_indices[i];
}
-
+
for(i=0; iget_u_value(ulineIndices[i]);
vertices[i][1] = gr->get_v_value(first_vline_index-i);
}
}
-
+
void gridBoundaryChain::draw()
{
Int i;
@@ -228,7 +228,7 @@ void gridBoundaryChain::drawInner()
glEnd();
}
}
-
+
Int gridBoundaryChain::lookfor(Real v, Int i1, Int i2)
{
Int mid;
@@ -267,7 +267,7 @@ void gridBoundaryChain::rightEndFan(Int i, primStream* pStream)
}
//otherside, the two are equal, so there is no fan to output
}
-
+
/*output the fan of the left end between grid line i-1 and grid line i*/
void gridBoundaryChain::leftEndFan(Int i, primStream* pStream)
@@ -289,5 +289,5 @@ void gridBoundaryChain::leftEndFan(Int i, primStream* pStream)
pStream->insert(grid->get_u_value(j), get_v_value(i-1));
pStream->end(PRIMITIVE_STREAM_FAN);
}
- /*otherwisem, the two are equal, so there is no fan to outout*/
+ /*otherwisem, the two are equal, so there is no fan to outout*/
}
diff --git a/src/glu/sgi/libnurbs/nurbtess/gridWrap.h b/src/glu/sgi/libnurbs/nurbtess/gridWrap.h
index b642848..63dba47 100644
--- a/src/glu/sgi/libnurbs/nurbtess/gridWrap.h
+++ b/src/glu/sgi/libnurbs/nurbtess/gridWrap.h
@@ -45,14 +45,14 @@ class gridWrap{
Real u_min, u_max;
Real v_min, v_max;
- /*cache the coordinate values for efficiency.
- *these are redundant information when
+ /*cache the coordinate values for efficiency.
+ *these are redundant information when
*the grid is uniform.
*/
Real* u_values; /*size is n_ulines*/
Real* v_values; /*size is n_vlines*/
- Int is_uniform;
+ Int is_uniform;
public:
//uniform grid constructor
@@ -66,7 +66,7 @@ class gridWrap{
Int nVlines, Real *vvlas
);
~gridWrap();
-
+
void print();
Int get_n_ulines() {return n_ulines;}
Int get_n_vlines() {return n_vlines;}
@@ -75,17 +75,17 @@ class gridWrap{
Real get_v_min() {return v_min;}
Real get_v_max() {return v_max;}
- Real get_u_value(Int i)
+ Real get_u_value(Int i)
{
assert(i=n_ulines){printf("ERROR, n_ulines=%i,i=%i\n",n_ulines,i);exit(0);}*/
+ /*if(i>=n_ulines){printf("ERROR, n_ulines=%i,i=%i\n",n_ulines,i);exit(0);}*/
return u_values[i];}
Real get_v_value(Int j) {return v_values[j];}
Real* get_u_values() {return u_values;}
Real* get_v_values() {return v_values;}
- void outputFanWithPoint(Int v, Int uleft, Int uright,
+ void outputFanWithPoint(Int v, Int uleft, Int uright,
Real vert[2], primStream* pStream);
void draw();
diff --git a/src/glu/sgi/libnurbs/nurbtess/monoChain.cc b/src/glu/sgi/libnurbs/nurbtess/monoChain.cc
index cb28129..19c43a4 100644
--- a/src/glu/sgi/libnurbs/nurbtess/monoChain.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/monoChain.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -93,7 +93,7 @@ monoChain::monoChain(directedLine* cHead, directedLine* cTail)
chainTail = cTail;
next = this;
prev = this;
-
+
nextPolygon = NULL;
//compute bounding box
@@ -119,7 +119,7 @@ monoChain::monoChain(directedLine* cHead, directedLine* cTail)
isIncrease = 1;
else
isIncrease = 0;
-
+
//initilize currrent, this is used for accelerating search
if(isIncrease)
current = chainHead;
@@ -217,7 +217,7 @@ Real monoChain::chainIntersectHoriz(Real y)
}
current = temp->getPrev();
}
- else
+ else
{
for(temp = current; temp != chainHead; temp = temp->getPrev())
{
@@ -261,7 +261,7 @@ monoChain* directedLineLoopToMonoChainLoop(directedLine* loop)
}
else
ret->insert(new monoChain(prevCusp, temp));
- prevCusp = temp;
+ prevCusp = temp;
}
}
assert(ret);
@@ -276,7 +276,7 @@ monoChain* directedLineLoopListToMonoChainLoopList(directedLine* list)
monoChain* mc;
monoChain* mcEnd;
mc = directedLineLoopToMonoChainLoop(list);
- mcEnd = mc;
+ mcEnd = mc;
for(temp = list->getNextPolygon(); temp != NULL; temp = temp->getNextPolygon())
{
monoChain *newLoop = directedLineLoopToMonoChainLoop(temp);
@@ -329,7 +329,7 @@ static Int compEdges(directedLine *e1, directedLine *e2)
e2_Ymin = h21;
}
*/
-
+
if(head1[1]>tail1[1]) {
e1_Ymax= head1[1];
e1_Ymin= tail1[1];
@@ -348,7 +348,7 @@ static Int compEdges(directedLine *e1, directedLine *e2)
e2_Ymin = head2[1];
}
-
+
/*Real e1_Ymax = max(head1[1], tail1[1]);*/ /*max(e1->head()[1], e1->tail()[1]);*/
/*Real e1_Ymin = min(head1[1], tail1[1]);*/ /*min(e1->head()[1], e1->tail()[1]);*/
/*Real e2_Ymax = max(head2[1], tail2[1]);*/ /*max(e2->head()[1], e2->tail()[1]);*/
@@ -356,7 +356,7 @@ static Int compEdges(directedLine *e1, directedLine *e2)
Real Ymax = min(e1_Ymax, e2_Ymax);
Real Ymin = max(e1_Ymin, e2_Ymin);
-
+
Real y = 0.5*(Ymax + Ymin);
/* Real x1 = intersectHoriz(e1->head()[0], e1->head()[1], e1->tail()[0], e1->tail()[1], y);
@@ -416,7 +416,7 @@ directedLine* monoChain::find(Real y)
current = temp->getNext();
ret = temp;
}
- return ret;
+ return ret;
}
void monoChain::printOneChain()
@@ -426,7 +426,7 @@ void monoChain::printOneChain()
{
printf("(%f,%f) ", temp->head()[0], temp->head()[1]);
}
- printf("(%f,%f) \n", chainTail->head()[0], chainTail->head()[1]);
+ printf("(%f,%f) \n", chainTail->head()[0], chainTail->head()[1]);
}
void monoChain::printChainLoop()
@@ -515,7 +515,7 @@ Int MC_sweepY(Int nVertices, monoChain** sortedVertices, sweepRange** ret_ranges
//insert both edges
treeNode* thisNode = TreeNodeMake(vert);
treeNode* prevNode = TreeNodeMake(vert->getPrev());
-
+
vert->isKey = 1;
vert->keyY = keyY;
searchTree = TreeNodeInsert(searchTree, thisNode, (Int (*) (void *, void *))compChains);
@@ -548,11 +548,11 @@ Int MC_sweepY(Int nVertices, monoChain** sortedVertices, sweepRange** ret_ranges
}
}
else
- {
+ {
//printf("%i,%i\n", isAbove(dline, dline), isAbove(dline, dlinePrev));
errOccur = 1;
goto JUMP_HERE;
-
+
fprintf(stderr, "error in MC_sweepY\n");
exit(1);
}
@@ -563,9 +563,9 @@ Int MC_sweepY(Int nVertices, monoChain** sortedVertices, sweepRange** ret_ranges
TreeNodeDeleteWholeTree(searchTree);
return errOccur;
}
-
+
void MC_findDiagonals(Int total_num_edges, monoChain** sortedVertices,
- sweepRange** ranges, Int& num_diagonals,
+ sweepRange** ranges, Int& num_diagonals,
directedLine** diagonal_vertices)
{
Int i,j,k;
@@ -573,7 +573,7 @@ void MC_findDiagonals(Int total_num_edges, monoChain** sortedVertices,
//reset 'current' of all the monoChains
for(i=0; iresetCurrent();
-
+
for(i=0; igetHead();
@@ -586,7 +586,7 @@ void MC_findDiagonals(Int total_num_edges, monoChain** sortedVertices,
directedLine* leftEdge = ranges[i]->left;
directedLine* rightEdge = ranges[i]->right;
-
+
directedLine* leftVert = leftEdge;
directedLine* rightVert = rightEdge->getNext();
assert(leftVert->head()[1] >= vert->head()[1]);
@@ -597,7 +597,7 @@ void MC_findDiagonals(Int total_num_edges, monoChain** sortedVertices,
{
if(sortedVertices[j]->getHead()->head()[1] > minVert->head()[1])
break;
-
+
if(sweepRangeEqual(ranges[i], ranges[j]))
{
found = 1;
@@ -609,7 +609,7 @@ void MC_findDiagonals(Int total_num_edges, monoChain** sortedVertices,
diagonal_vertices[k++] = sortedVertices[j]->getHead();
else
diagonal_vertices[k++] = minVert;
- }
+ }
else if(isAbove(vert, thisEdge) && isAbove(vert, prevEdge) && compEdges(prevEdge, thisEdge)>0)
{
//downward interior cusp
@@ -640,9 +640,9 @@ void MC_findDiagonals(Int total_num_edges, monoChain** sortedVertices,
}
num_diagonals = k/2;
}
-
-
-
+
+
+
directedLine* MC_partitionY(directedLine *polygons, sampledLine **retSampledLines)
{
@@ -654,7 +654,7 @@ directedLine* MC_partitionY(directedLine *polygons, sampledLine **retSampledLine
if(total_num_chains<=2) //there is just one single monotone polygon
{
loopList->deleteLoopList();
- free(array);
+ free(array);
*retSampledLines = NULL;
return polygons;
}
@@ -662,7 +662,7 @@ directedLine* MC_partitionY(directedLine *polygons, sampledLine **retSampledLine
//loopList->printAllLoops();
//printf("total_num_chains=%i\n", total_num_chains);
quicksort( (void**)array, 0, total_num_chains-1, (Int (*)(void*, void*))compChainHeadInY);
-//printf("after quicksort\n");
+//printf("after quicksort\n");
sweepRange** ranges = (sweepRange**)malloc(sizeof(sweepRange*) * (total_num_chains));
assert(ranges);
@@ -670,7 +670,7 @@ directedLine* MC_partitionY(directedLine *polygons, sampledLine **retSampledLine
if(MC_sweepY(total_num_chains, array, ranges))
{
loopList->deleteLoopList();
- free(array);
+ free(array);
*retSampledLines = NULL;
return NULL;
}
@@ -717,14 +717,14 @@ directedLine* MC_partitionY(directedLine *polygons, sampledLine **retSampledLine
directedLine* v2=diagonal_vertices[k+1];
directedLine* ret_p1;
directedLine* ret_p2;
-
+
/*we ahve to determine whether v1 and v2 belong to the same polygon before
*their structure are modified by connectDiagonal().
*/
/*
directedLine *root1 = v1->findRoot();
directedLine *root2 = v2->findRoot();
- assert(root1);
+ assert(root1);
assert(root2);
*/
@@ -762,14 +762,14 @@ root2->rootLinkSet(root1);
ret_p1->rootLinkSet(root1);
ret_p2->rootLinkSet(root1);
- /*now that we have connected the diagonal v1 and v2,
- *we have to check those unprocessed diagonals which
+ /*now that we have connected the diagonal v1 and v2,
+ *we have to check those unprocessed diagonals which
*have v1 or v2 as an end point. Notice that the head of v1
*has the same coodinates as the head of v2->prev, and the head of
- *v2 has the same coordinate as the head of v1->prev.
+ *v2 has the same coordinate as the head of v1->prev.
*Suppose these is a diagonal (v1, x). If (v1,x) is still a valid
- *diagonal, then x should be on the left hand side of the directed line: *v1->prev->head -- v1->head -- v1->tail. Otherwise, (v1,x) should be
- *replaced by (v2->prev, x), that is, x is on the left of
+ *diagonal, then x should be on the left hand side of the directed line: *v1->prev->head -- v1->head -- v1->tail. Otherwise, (v1,x) should be
+ *replaced by (v2->prev, x), that is, x is on the left of
* v2->prev->prev->head, v2->prev->head, v2->prev->tail.
*/
Int ii, kk;
@@ -781,12 +781,12 @@ ret_p2->rootLinkSet(root1);
/*check d1, and replace diagonal_vertices[kk] if necessary*/
if(d1 == v1) {
/*check if d2 is to left of v1->prev->head:v1->head:v1->tail*/
- if(! pointLeft2Lines(v1->getPrev()->head(),
+ if(! pointLeft2Lines(v1->getPrev()->head(),
v1->head(), v1->tail(), d2->head()))
{
/*
assert(pointLeft2Lines(v2->getPrev()->getPrev()->head(),
- v2->getPrev()->head(),
+ v2->getPrev()->head(),
v2->getPrev()->tail(), d2->head()));
*/
diagonal_vertices[kk] = v2->getPrev();
@@ -808,11 +808,11 @@ ret_p2->rootLinkSet(root1);
/*check d2 and replace diagonal_vertices[k+1] if necessary*/
if(d2 == v1) {
/*check if d1 is to left of v1->prev->head:v1->head:v1->tail*/
- if(! pointLeft2Lines(v1->getPrev()->head(),
+ if(! pointLeft2Lines(v1->getPrev()->head(),
v1->head(), v1->tail(), d1->head()))
{
/* assert(pointLeft2Lines(v2->getPrev()->getPrev()->head(),
- v2->getPrev()->head(),
+ v2->getPrev()->head(),
v2->getPrev()->tail(), d1->head()));
*/
diagonal_vertices[kk+1] = v2->getPrev();
@@ -830,7 +830,7 @@ ret_p2->rootLinkSet(root1);
diagonal_vertices[kk+1] = v1->getPrev();
}
}
- }
+ }
}/*end if (root1 not equal to root 2)*/
}
@@ -842,7 +842,7 @@ ret_p2->rootLinkSet(root1);
for(i=0,k=0; irootLinkSet(root1);
- assert(root1);
- assert(root2);
+ assert(root1);
+ assert(root2);
assert(root1 == root2);
- */
+ */
sampledLine* generatedLine;
@@ -882,7 +882,7 @@ ret_p2->rootLinkSet(root1);
- for(Int j=i+1; jrootLinkSet(root1);
if(temp1==v1 || temp1==v2 || temp2==v1 || temp2==v2)
if(! temp1->samePolygon(temp1, temp2))
{
- /*if temp1 and temp2 are in different polygons,
+ /*if temp1 and temp2 are in different polygons,
*then one of them must be v1 or v2.
*/
assert(temp1==v1 || temp1 == v2 || temp2==v1 || temp2 ==v2);
- if(temp1==v1)
+ if(temp1==v1)
{
diagonal_vertices[2*j] = v2->getPrev();
}
@@ -909,7 +909,7 @@ ret_p2->rootLinkSet(root1);
}
if(temp1==v2)
{
- diagonal_vertices[2*j] = v1->getPrev();
+ diagonal_vertices[2*j] = v1->getPrev();
}
if(temp2==v2)
{
@@ -917,7 +917,7 @@ ret_p2->rootLinkSet(root1);
}
}
}
- }
+ }
}
@@ -932,5 +932,5 @@ ret_p2->rootLinkSet(root1);
*retSampledLines = newSampledLines;
return ret_polygons;
}
-
+
diff --git a/src/glu/sgi/libnurbs/nurbtess/monoChain.h b/src/glu/sgi/libnurbs/nurbtess/monoChain.h
index 999f163..9a42ae7 100644
--- a/src/glu/sgi/libnurbs/nurbtess/monoChain.h
+++ b/src/glu/sgi/libnurbs/nurbtess/monoChain.h
@@ -44,20 +44,20 @@ class monoChain{
monoChain* next;
monoChain* prev;
monoChain* nextPolygon; //a list of polygons
-
+
//cached informatin
//bounding box
Real minX, maxX, minY, maxY;
Int isIncrease;
-
+
//for efficiently comparing two chains
directedLine* current;
-
+
public:
monoChain(directedLine* cHead, directedLine* cTail);
~monoChain() {}
-
+
inline void setNext(monoChain* n) {next = n;}
inline void setPrev(monoChain* p) {prev = p;}
inline void setNextPolygon(monoChain* np) {nextPolygon = np;}
@@ -65,7 +65,7 @@ class monoChain{
inline monoChain* getPrev() {return prev;}
inline directedLine* getHead() {return chainHead;}
inline directedLine* getTail() {return chainTail;}
-
+
inline void resetCurrent() { current = ((isIncrease==1)? chainHead:chainTail);}
void deleteLoop();
@@ -80,14 +80,14 @@ class monoChain{
Int toArraySingleLoop(monoChain** array, Int index);
Int isKey;
- Real keyY; //the current horizotal line
+ Real keyY; //the current horizotal line
Real chainIntersectHoriz(Real y); //updates current incrementally for efficiency
directedLine* find(Real y);//find dline so that y intersects dline.
void printOneChain();
void printChainLoop();
void printAllLoops();
-
+
};
monoChain* directedLineLoopToMonoChainLoop(directedLine* loop);
@@ -95,7 +95,7 @@ monoChain* directedLineLoopListToMonoChainLoopList(directedLine* list);
Int MC_sweepY(Int nVertices, monoChain** sortedVertices, sweepRange** ret_ranges);
void MC_findDiagonals(Int total_num_edges, monoChain** sortedVertices,
- sweepRange** ranges, Int& num_diagonals,
+ sweepRange** ranges, Int& num_diagonals,
directedLine** diagonal_vertices);
directedLine* MC_partitionY(directedLine *polygons, sampledLine **retSampledLines);
diff --git a/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.cc b/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.cc
index 8391205..78c8094 100644
--- a/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -50,7 +50,7 @@
#include "directedLine.h"
#include "monoPolyPart.h"
-/*a vertex is u_maximal if both of its two neightbors are to the left of this
+/*a vertex is u_maximal if both of its two neightbors are to the left of this
*vertex
*/
static Int is_u_maximal(directedLine* v)
@@ -62,7 +62,7 @@ static Int is_u_maximal(directedLine* v)
return 0;
}
-/*a vertex is u_minimal if both of its two neightbors are to the right of this
+/*a vertex is u_minimal if both of its two neightbors are to the right of this
*vertex
*/
static Int is_u_minimal(directedLine* v)
@@ -125,7 +125,7 @@ directedLine* monoPolyPart(directedLine* polygon)
if(A->head()[0] < C->head()[0])
C = A;
}
-
+
//find B: the first u_minimal vertex on the right chain
//and D: the right most vertex between top and B
B = NULL;
@@ -157,13 +157,13 @@ directedLine* monoPolyPart(directedLine* polygon)
//find H on the right chain that is right above A
for(tempV=topV; compV2InY(tempV->head(), A->head()) == 1; tempV = tempV->getPrev());
H = tempV->getNext();
-
+
//Main Loop
directedLine* ret = NULL;
directedLine* currentPolygon = polygon;
while(1)
{
- //if both B and D are equal to botV, then this polygon is already
+ //if both B and D are equal to botV, then this polygon is already
//u-monotone
if(A == botV && B == botV)
{
@@ -253,7 +253,7 @@ directedLine* monoPolyPart(directedLine* polygon)
F = G;
//connect FB
- polygon->connectDiagonal_2slines(F, B,
+ polygon->connectDiagonal_2slines(F, B,
&ret_p1,
&ret_p2,
NULL);
@@ -284,14 +284,14 @@ directedLine* monoPolyPart(directedLine* polygon)
}
//update G
if(B == botV)
- G = botV;
+ G = botV;
else
{
for(tempV = G; compV2InY(tempV->head(), B->head()) == 1; tempV = tempV->getNext());
G = tempV->getPrev();
}
} //end of A is below B
- } //end not u-monotone
+ } //end not u-monotone
} //end of main loop
}
diff --git a/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h b/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h
index 6877a59..c14ddf4 100644
--- a/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h
+++ b/src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h
@@ -33,7 +33,7 @@
#ifndef _MONO_POLY_PART_H
#define _MONO_POLY_PART_H
-
+
class directedLine;
directedLine* monoPolyPart(directedLine* polygon);
diff --git a/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc b/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc
index 8e8d49d..d471cfa 100644
--- a/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -78,30 +78,30 @@ void monoTriangulationOpt(directedLine* poly, primStream* pStream)
{
directedLine* ret_p1;
directedLine* ret_p2;
-
- new_polygon->connectDiagonal_2slines(new_polygon, other,
+
+ new_polygon->connectDiagonal_2slines(new_polygon, other,
&ret_p1,
&ret_p2,
new_polygon);
-
+
monoTriangulationFun(ret_p1, compV2InX, pStream);
monoTriangulationFun(ret_p2, compV2InX, pStream);
-
- ret_p1->deleteSinglePolygonWithSline();
- ret_p2->deleteSinglePolygonWithSline();
+
+ ret_p1->deleteSinglePolygonWithSline();
+ ret_p2->deleteSinglePolygonWithSline();
}
}
else
{
//we need a general partitionX funtion (supposed to be in partitionX.C,
//not implemented yet. XXX
- monoTriangulationFun(poly, compV2InY, pStream);
+ monoTriangulationFun(poly, compV2InY, pStream);
}
-
+
free(cusps);
}
-void monoTriangulationRecOpt(Real* topVertex, Real* botVertex,
+void monoTriangulationRecOpt(Real* topVertex, Real* botVertex,
vertexArray* left_chain, Int left_current,
vertexArray* right_chain, Int right_current,
primStream* pStream)
@@ -119,7 +119,7 @@ void monoTriangulationRecOpt(Real* topVertex, Real* botVertex,
//now both left and right have at least two vertices each.
Real left_v = left_chain->getVertex(left_current)[1];
Real right_v = right_chain->getVertex(right_current)[1];
-
+
if(left_v <= right_v) //first left vertex is below right
{
//find the last vertex of right which is above or equal to left
@@ -159,19 +159,19 @@ void monoTriangulationRecOpt(Real* topVertex, Real* botVertex,
}
-void monoTriangulationRecGenTBOpt(Real* topVertex, Real* botVertex,
+void monoTriangulationRecGenTBOpt(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current, Int inc_end,
vertexArray* dec_chain, Int dec_current, Int dec_end,
primStream* pStream)
{
pStream->triangle(topVertex, inc_chain->getVertex(inc_current), dec_chain->getVertex(dec_current));
-
+
/*printf("**(%f,%f)\n", inc_chain->getArray()[0][0],inc_chain->getArray()[0][1]);*/
triangulateXYMonoTB(inc_end-inc_current+1, inc_chain->getArray()+inc_current, dec_end-dec_current+1, dec_chain->getArray()+dec_current, pStream);
pStream->triangle(botVertex, dec_chain->getVertex(dec_end), inc_chain->getVertex(inc_end));
}
-
+
/*n_left>=1
*n_right>=1
@@ -200,7 +200,7 @@ void triangulateXYMonoTB(Int n_left, Real** leftVerts,
j=1;
topMostV = rightVerts[0];
}
-
+
while(1)
{
if(i >= n_left) /*case1: no more in left*/
@@ -210,14 +210,14 @@ void triangulateXYMonoTB(Int n_left, Real** leftVerts,
{
pStream->begin();
pStream->insert(topMostV);
- for(k=n_right-1; k>=j; k--)
+ for(k=n_right-1; k>=j; k--)
pStream->insert(rightVerts[j]);
pStream->end(PRIMITIVE_STREAM_FAN);
-
+
}
- break;
+ break;
}
else if(j>= n_right) /*case2: no more in right*/
{
@@ -230,7 +230,7 @@ void triangulateXYMonoTB(Int n_left, Real** leftVerts,
for(k=i; kinsert(leftVerts[k]);
- pStream->end(PRIMITIVE_STREAM_FAN);
+ pStream->end(PRIMITIVE_STREAM_FAN);
}
break;
@@ -245,7 +245,7 @@ void triangulateXYMonoTB(Int n_left, Real** leftVerts,
pStream->insert(topMostV);
- /*find the last k>=i such that
+ /*find the last k>=i such that
*leftverts[k][1] >= rightverts[j][1]
*/
k=i;
@@ -290,7 +290,7 @@ void triangulateXYMonoTB(Int n_left, Real** leftVerts,
pStream->end(PRIMITIVE_STREAM_FAN);
j=k+1;
topMostV = rightVerts[j-1];
- }
+ }
}
}
}
@@ -320,13 +320,13 @@ static int chainConcave(vertexArray* dec_chain, Int dec_current, Int dec_end)
}
return 1;
}
-
+
void monoTriangulationRecGenInU(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current, Int inc_end,
vertexArray* dec_chain, Int dec_current, Int dec_end,
primStream* pStream)
{
-
+
}
void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
@@ -341,7 +341,7 @@ void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
directedLine* poly;
if(inc_current <= inc_end) //at least one vertex in inc_chain
- {
+ {
sline = new sampledLine(topVertex, inc_chain->getVertex(inc_current));
poly = new directedLine(INCREASING, sline);
for(i=inc_current; i<=inc_end-1; i++)
@@ -360,7 +360,7 @@ void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
dline = new directedLine(INCREASING, sline);
poly = dline;
}
-
+
assert(poly != NULL);
if(dec_current <= dec_end) //at least on vertex in dec_Chain
@@ -376,7 +376,7 @@ void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
}
sline = new sampledLine(dec_chain->getVertex(dec_current), topVertex);
dline = new directedLine(INCREASING, sline);
- poly->insert(dline);
+ poly->insert(dline);
}
else //dec_chain is empty
{
@@ -411,34 +411,34 @@ void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
{
directedLine* ret_p1;
directedLine* ret_p2;
-
- new_polygon->connectDiagonal_2slines(new_polygon, other,
+
+ new_polygon->connectDiagonal_2slines(new_polygon, other,
&ret_p1,
&ret_p2,
new_polygon);
-
+
monoTriangulationFun(ret_p1, compV2InX, pStream);
monoTriangulationFun(ret_p2, compV2InX, pStream);
- ret_p1->deleteSinglePolygonWithSline();
- ret_p2->deleteSinglePolygonWithSline();
+ ret_p1->deleteSinglePolygonWithSline();
+ ret_p2->deleteSinglePolygonWithSline();
}
}
else
{
//we need a general partitionX funtion (supposed to be in partitionX.C,
//not implemented yet. XXX
- //monoTriangulationFun(poly, compV2InY, pStream);
-
+ //monoTriangulationFun(poly, compV2InY, pStream);
+
directedLine* new_polygon = polygonConvert(poly);
directedLine* list = monoPolyPart(new_polygon);
for(directedLine* temp = list; temp != NULL; temp = temp->getNextPolygon())
- {
+ {
monoTriangulationFun(temp, compV2InX, pStream);
}
//clean up
list->deletePolygonListWithSline();
-
+
}
free(cusps);
@@ -446,23 +446,23 @@ void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
if(numInteriorCuspsX(poly) == 0) //is u monotone
monoTriangulationFun(poly, compV2InX, pStream);
else //it is not u motone
- monoTriangulationFun(poly, compV2InY, pStream);
+ monoTriangulationFun(poly, compV2InY, pStream);
*/
//clean up space
poly->deleteSinglePolygonWithSline();
return;
}
-
- //apparently the following code is not reachable,
+
+ //apparently the following code is not reachable,
//it is for test purpose
if(inc_current > inc_end || dec_current>dec_end)
{
monoTriangulationRecGen(topVertex, botVertex, inc_chain, inc_current, inc_end,
dec_chain, dec_current, dec_end,
- pStream);
+ pStream);
return;
}
-
+
if(
area(dec_chain->getVertex(dec_current),
@@ -473,9 +473,9 @@ void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
&& area(inc_chain->getVertex(inc_end), botVertex, dec_chain->getVertex(dec_end)) >=0
)
{
- monoTriangulationRecFunGen(topVertex, botVertex,
+ monoTriangulationRecFunGen(topVertex, botVertex,
inc_chain, inc_current, inc_end,
- dec_chain, dec_current, dec_end,
+ dec_chain, dec_current, dec_end,
compV2InX, pStream);
}
else
@@ -489,7 +489,7 @@ void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
/*if inc_current>inc_end, then inc_chain has no points to be considered
*same for dec_chain
*/
-void monoTriangulationRecGen(Real* topVertex, Real* botVertex,
+void monoTriangulationRecGen(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current, Int inc_end,
vertexArray* dec_chain, Int dec_current, Int dec_end,
primStream* pStream)
@@ -532,7 +532,7 @@ void monoTriangulationRecGen(Real* topVertex, Real* botVertex,
inc_array = inc_chain -> getArray();
dec_array = dec_chain -> getArray();
- /*if top of inc_chain is 'lower' than top of dec_chain, process all the
+ /*if top of inc_chain is 'lower' than top of dec_chain, process all the
*vertices on the dec_chain which are higher than top of inc_chain
*/
if(compV2InY(inc_array[inc_current], dec_array[dec_current]) <= 0)
@@ -544,11 +544,11 @@ void monoTriangulationRecGen(Real* topVertex, Real* botVertex,
{
if(compV2InY(inc_array[inc_current], dec_array[i]) <= 0)
rChain.processNewVertex(dec_array[i], pStream);
- else
+ else
break;
}
rChain.outputFan(inc_array[inc_current], pStream);
- monoTriangulationRecGen(dec_array[i-1], botVertex,
+ monoTriangulationRecGen(dec_array[i-1], botVertex,
inc_chain, inc_current, inc_end,
dec_chain, i, dec_end,
pStream);
@@ -560,13 +560,13 @@ void monoTriangulationRecGen(Real* topVertex, Real* botVertex,
rChain.processNewVertex(topVertex, pStream);
for(i=inc_current; i<=inc_end; i++)
{
- if(compV2InY(inc_array[i], dec_array[dec_current]) >0)
- rChain.processNewVertex(inc_array[i], pStream);
+ if(compV2InY(inc_array[i], dec_array[dec_current]) >0)
+ rChain.processNewVertex(inc_array[i], pStream);
else
break;
}
rChain.outputFan(dec_array[dec_current], pStream);
- monoTriangulationRecGen(inc_array[i-1], botVertex,
+ monoTriangulationRecGen(inc_array[i-1], botVertex,
inc_chain, i, inc_end,
dec_chain, dec_current,dec_end,
pStream);
@@ -605,7 +605,7 @@ void monoTriangulationFun(directedLine* monoPolygon, Int (*compFun)(Real*, Real*
inc_chain.appendVertex(tempV->getVertex(i));
}
}
-
+
vertexArray dec_chain(20);
for(tempV = topV->getPrev(); tempV != botV; tempV = tempV->getPrev())
{
@@ -613,15 +613,15 @@ void monoTriangulationFun(directedLine* monoPolygon, Int (*compFun)(Real*, Real*
dec_chain.appendVertex(tempV->getVertex(i));
}
}
- for(i=botV->get_npoints()-2; i>=1; i--){
+ for(i=botV->get_npoints()-2; i>=1; i--){
dec_chain.appendVertex(tempV->getVertex(i));
}
-
+
if (!(0 == inc_chain.getNumElements() && 0 == dec_chain.getNumElements())) {
monoTriangulationRecFun(topV->head(), botV->head(), &inc_chain, 0,
&dec_chain, 0, compFun, pStream);
}
-}
+}
void monoTriangulation(directedLine* monoPolygon, primStream* pStream)
{
@@ -653,7 +653,7 @@ void monoTriangulation(directedLine* monoPolygon, primStream* pStream)
inc_chain.appendVertex(tempV->getVertex(i));
}
}
-
+
vertexArray dec_chain(20);
for(tempV = topV->getPrev(); tempV != botV; tempV = tempV->getPrev())
{
@@ -661,10 +661,10 @@ void monoTriangulation(directedLine* monoPolygon, primStream* pStream)
dec_chain.appendVertex(tempV->getVertex(i));
}
}
- for(i=botV->get_npoints()-2; i>=1; i--){
+ for(i=botV->get_npoints()-2; i>=1; i--){
dec_chain.appendVertex(tempV->getVertex(i));
}
-
+
monoTriangulationRec(topV->head(), botV->head(), &inc_chain, 0, &dec_chain, 0, pStream);
}
@@ -675,7 +675,7 @@ void monoTriangulation(directedLine* monoPolygon, primStream* pStream)
*is increasing (left chain in V-monotone case) or decreaing (right chain
*in V-monotone case).
*/
-void monoTriangulation2(Real* topVertex, Real* botVertex,
+void monoTriangulation2(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_smallIndex,
Int inc_largeIndex,
Int is_increase_chain,
@@ -685,13 +685,13 @@ void monoTriangulation2(Real* topVertex, Real* botVertex,
Real** inc_array ;
if(inc_smallIndex > inc_largeIndex)
- return; //no triangles
+ return; //no triangles
if(inc_smallIndex == inc_largeIndex)
{
if(is_increase_chain)
pStream->triangle(inc_chain->getVertex(inc_smallIndex), botVertex, topVertex);
else
- pStream->triangle(inc_chain->getVertex(inc_smallIndex), topVertex, botVertex);
+ pStream->triangle(inc_chain->getVertex(inc_smallIndex), topVertex, botVertex);
return;
}
Int i;
@@ -713,7 +713,7 @@ void monoTriangulation2(Real* topVertex, Real* botVertex,
monoTriangulation2(topVertex, botVertex, inc_chain, inc_smallIndex+1,
inc_largeIndex, is_increase_chain, pStream);
return ;
- }
+ }
inc_array = inc_chain->getArray();
@@ -727,11 +727,11 @@ void monoTriangulation2(Real* topVertex, Real* botVertex,
rChain.processNewVertex(botVertex, pStream);
}
-
+
/*if compFun == compV2InY, top to bottom: V-monotone
*if compFun == compV2InX, right to left: U-monotone
*/
-void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex,
+void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current, Int inc_end,
vertexArray* dec_chain, Int dec_current, Int dec_end,
Int (*compFun)(Real*, Real*),
@@ -782,7 +782,7 @@ void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex,
inc_array = inc_chain -> getArray();
dec_array = dec_chain -> getArray();
- /*if top of inc_chain is 'lower' than top of dec_chain, process all the
+ /*if top of inc_chain is 'lower' than top of dec_chain, process all the
*vertices on the dec_chain which are higher than top of inc_chain
*/
if(compFun(inc_array[inc_current], dec_array[dec_current]) <= 0)
@@ -794,11 +794,11 @@ void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex,
{
if(compFun(inc_array[inc_current], dec_array[i]) <= 0)
rChain.processNewVertex(dec_array[i], pStream);
- else
+ else
break;
}
rChain.outputFan(inc_array[inc_current], pStream);
- monoTriangulationRecFunGen(dec_array[i-1], botVertex,
+ monoTriangulationRecFunGen(dec_array[i-1], botVertex,
inc_chain, inc_current, inc_end,
dec_chain, i, dec_end,
compFun,
@@ -811,13 +811,13 @@ void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex,
rChain.processNewVertex(topVertex, pStream);
for(i=inc_current; i<=inc_end; i++)
{
- if(compFun(inc_array[i], dec_array[dec_current]) >0)
- rChain.processNewVertex(inc_array[i], pStream);
+ if(compFun(inc_array[i], dec_array[dec_current]) >0)
+ rChain.processNewVertex(inc_array[i], pStream);
else
break;
}
rChain.outputFan(dec_array[dec_current], pStream);
- monoTriangulationRecFunGen(inc_array[i-1], botVertex,
+ monoTriangulationRecFunGen(inc_array[i-1], botVertex,
inc_chain, i,inc_end,
dec_chain, dec_current,dec_end,
compFun,
@@ -825,11 +825,11 @@ void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex,
}
}/*end case neither is empty*/
}
-
+
/*if compFun == compV2InY, top to bottom: V-monotone
*if compFun == compV2InX, right to left: U-monotone
*/
-void monoTriangulationRecFun(Real* topVertex, Real* botVertex,
+void monoTriangulationRecFun(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current,
vertexArray* dec_chain, Int dec_current,
Int (*compFun)(Real*, Real*),
@@ -849,7 +849,7 @@ void monoTriangulationRecFun(Real* topVertex, Real* botVertex,
{
dec_array = dec_chain->getArray();
- dec_nVertices = dec_chain->getNumElements();
+ dec_nVertices = dec_chain->getNumElements();
reflexChain rChain(20,0);
/*put the top vertex into the reflex chain*/
rChain.processNewVertex(topVertex, pStream);
@@ -881,7 +881,7 @@ void monoTriangulationRecFun(Real* topVertex, Real* botVertex,
dec_array = dec_chain -> getArray();
inc_nVertices= inc_chain->getNumElements();
dec_nVertices= dec_chain->getNumElements();
- /*if top of inc_chain is 'lower' than top of dec_chain, process all the
+ /*if top of inc_chain is 'lower' than top of dec_chain, process all the
*vertices on the dec_chain which are higher than top of inc_chain
*/
if(compFun(inc_array[inc_current], dec_array[dec_current]) <= 0)
@@ -893,11 +893,11 @@ void monoTriangulationRecFun(Real* topVertex, Real* botVertex,
{
if(compFun(inc_array[inc_current], dec_array[i]) <= 0)
rChain.processNewVertex(dec_array[i], pStream);
- else
+ else
break;
}
rChain.outputFan(inc_array[inc_current], pStream);
- monoTriangulationRecFun(dec_array[i-1], botVertex,
+ monoTriangulationRecFun(dec_array[i-1], botVertex,
inc_chain, inc_current,
dec_chain, i,
compFun,
@@ -910,13 +910,13 @@ void monoTriangulationRecFun(Real* topVertex, Real* botVertex,
rChain.processNewVertex(topVertex, pStream);
for(i=inc_current; i0)
- rChain.processNewVertex(inc_array[i], pStream);
+ if(compFun(inc_array[i], dec_array[dec_current]) >0)
+ rChain.processNewVertex(inc_array[i], pStream);
else
break;
}
rChain.outputFan(dec_array[dec_current], pStream);
- monoTriangulationRecFun(inc_array[i-1], botVertex,
+ monoTriangulationRecFun(inc_array[i-1], botVertex,
inc_chain, i,
dec_chain, dec_current,
compFun,
@@ -926,7 +926,7 @@ void monoTriangulationRecFun(Real* topVertex, Real* botVertex,
}
-void monoTriangulationRec(Real* topVertex, Real* botVertex,
+void monoTriangulationRec(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current,
vertexArray* dec_chain, Int dec_current,
primStream* pStream)
@@ -945,7 +945,7 @@ void monoTriangulationRec(Real* topVertex, Real* botVertex,
{
dec_array = dec_chain->getArray();
- dec_nVertices = dec_chain->getNumElements();
+ dec_nVertices = dec_chain->getNumElements();
reflexChain rChain(20,0);
/*put the top vertex into the reflex chain*/
rChain.processNewVertex(topVertex, pStream);
@@ -977,7 +977,7 @@ void monoTriangulationRec(Real* topVertex, Real* botVertex,
dec_array = dec_chain -> getArray();
inc_nVertices= inc_chain->getNumElements();
dec_nVertices= dec_chain->getNumElements();
- /*if top of inc_chain is 'lower' than top of dec_chain, process all the
+ /*if top of inc_chain is 'lower' than top of dec_chain, process all the
*vertices on the dec_chain which are higher than top of inc_chain
*/
if(compV2InY(inc_array[inc_current], dec_array[dec_current]) <= 0)
@@ -989,11 +989,11 @@ void monoTriangulationRec(Real* topVertex, Real* botVertex,
{
if(compV2InY(inc_array[inc_current], dec_array[i]) <= 0)
rChain.processNewVertex(dec_array[i], pStream);
- else
+ else
break;
}
rChain.outputFan(inc_array[inc_current], pStream);
- monoTriangulationRec(dec_array[i-1], botVertex,
+ monoTriangulationRec(dec_array[i-1], botVertex,
inc_chain, inc_current,
dec_chain, i,
pStream);
@@ -1005,23 +1005,23 @@ void monoTriangulationRec(Real* topVertex, Real* botVertex,
rChain.processNewVertex(topVertex, pStream);
for(i=inc_current; i0)
- rChain.processNewVertex(inc_array[i], pStream);
+ if(compV2InY(inc_array[i], dec_array[dec_current]) >0)
+ rChain.processNewVertex(inc_array[i], pStream);
else
break;
}
rChain.outputFan(dec_array[dec_current], pStream);
- monoTriangulationRec(inc_array[i-1], botVertex,
+ monoTriangulationRec(inc_array[i-1], botVertex,
inc_chain, i,
dec_chain, dec_current,
pStream);
}
}/*end case neither is empty*/
}
-
-/* the name here assumes that the polygon is Y-monotone, but
+
+/* the name here assumes that the polygon is Y-monotone, but
*this function also works for X-monotone polygons.
* a monotne polygon consists of two extrem verteices: topVertex and botVertex, and
*two monotone chains: inc_chain, and dec_chain. The edges of the increasing chain (inc_chain)
@@ -1030,8 +1030,8 @@ void monoTriangulationRec(Real* topVertex, Real* botVertex,
* inc_index index the vertex which is the toppest of the inc_chain which we are handling currently.
* dec_index index the vertex which is the toppest of the dec_chain which we are handling currently.
*/
-void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
- directedLine* dec_chain, Int dec_index,
+void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
+ directedLine* dec_chain, Int dec_index,
directedLine* topVertex, Int top_index,
directedLine* botVertex,
primStream* pStream)
@@ -1039,9 +1039,9 @@ void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
Int i;
directedLine *temp, *oldtemp = NULL;
Int tempIndex, oldtempIndex = 0;
-
+
assert(inc_chain != NULL && dec_chain != NULL);
-
+
if(inc_chain == botVertex) {
reflexChain rChain(20, 0);
rChain.processNewVertex(topVertex->getVertex(top_index), pStream);
@@ -1078,7 +1078,7 @@ void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
oldtemp = temp;
oldtempIndex = tempIndex;
rChain.processNewVertex(temp->getVertex(tempIndex), pStream);
-
+
if(tempIndex == temp->get_npoints()-1){
tempIndex = 0;
temp = temp->getPrev();
@@ -1099,7 +1099,7 @@ void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
oldtemp = temp;
oldtempIndex = tempIndex;
rChain.processNewVertex(temp->getVertex(tempIndex), pStream);
-
+
if(tempIndex == temp->get_npoints()-1){
tempIndex = 0;
temp = temp->getNext();
@@ -1109,7 +1109,7 @@ void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
}
}
rChain.outputFan(dec_chain->getVertex(dec_index), pStream);
- monoTriangulationRec(temp, tempIndex, dec_chain, dec_index, oldtemp, oldtempIndex, botVertex, pStream);
+ monoTriangulationRec(temp, tempIndex, dec_chain, dec_index, oldtemp, oldtempIndex, botVertex, pStream);
}
} /*end case neither reached the bottom*/
}
@@ -1175,7 +1175,7 @@ void vertexArray::print()
Int vertexArray::findIndexAbove(Real v)
{
Int i;
- if(index == 0)
+ if(index == 0)
return -1;
else if(array[0][1] < v)
return -1;
@@ -1201,7 +1201,7 @@ Int vertexArray::findIndexAbove(Real v)
Int vertexArray::findIndexBelowGen(Real v, Int startIndex, Int endIndex)
{
Int i;
- if(startIndex > endIndex)
+ if(startIndex > endIndex)
return endIndex+1;
else if(array[endIndex][1] > v)
return endIndex+1;
@@ -1227,7 +1227,7 @@ Int vertexArray::findIndexBelowGen(Real v, Int startIndex, Int endIndex)
Int vertexArray::findIndexStrictBelowGen(Real v, Int startIndex, Int endIndex)
{
Int i;
- if(startIndex > endIndex)
+ if(startIndex > endIndex)
return endIndex+1;
else if(array[endIndex][1] >= v)
return endIndex+1;
@@ -1254,7 +1254,7 @@ Int vertexArray::findIndexFirstAboveEqualGen(Real v, Int startIndex, Int endInde
{
Int i;
- if(startIndex > endIndex)
+ if(startIndex > endIndex)
return startIndex-1;
else if(array[startIndex][1] < v)
return startIndex-1;
@@ -1288,7 +1288,7 @@ Int vertexArray::findIndexFirstAboveEqualGen(Real v, Int startIndex, Int endInde
Int vertexArray::findIndexAboveGen(Real v, Int startIndex, Int endIndex)
{
Int i;
- if(startIndex > endIndex)
+ if(startIndex > endIndex)
return startIndex-1;
else if(array[startIndex][1] < v)
return startIndex-1;
@@ -1327,11 +1327,11 @@ Int vertexArray::skipEqualityFromStart(Real v, Int start, Int end)
return start;
//now array[start][1] == v
for(i=start+1; i<= end; i++)
- if(array[i][1] != v)
+ if(array[i][1] != v)
break;
return i-1;
}
-
+
/***************************vertexArray end****************************************/
@@ -1368,7 +1368,7 @@ void reflexChain::insert(Real u, Real v)
temp[i][0] = queue[i][0];
temp[i][1] = queue[i][1];
}
-
+
free(queue);
queue = temp;
size_queue = 2*size_queue + 1;
@@ -1412,7 +1412,7 @@ void reflexChain::outputFan(Real v[2], primStream* pStream)
}
else {
for(i=index_queue-1; i>=0; i--)
- pStream->insert(queue[i]);
+ pStream->insert(queue[i]);
}
pStream->end(PRIMITIVE_STREAM_FAN);
}
@@ -1427,16 +1427,16 @@ void reflexChain::processNewVertex(Real v[2], primStream* pStream)
insert(v);
return;
}
-
+
/*there are at least two vertices in the queue*/
j=index_queue-1;
-
+
for(i=j; i>=1; i--) {
if(isIncreasing) {
isReflex = (area(queue[i-1], queue[i], v) <= 0.0);
}
else /*decreasing*/{
- isReflex = (area(v, queue[i], queue[i-1]) <= 0.0);
+ isReflex = (area(v, queue[i], queue[i-1]) <= 0.0);
}
if(isReflex) {
break;
@@ -1445,10 +1445,10 @@ void reflexChain::processNewVertex(Real v[2], primStream* pStream)
/*
*if ibegin();
pStream->insert(v);
@@ -1460,7 +1460,7 @@ void reflexChain::processNewVertex(Real v[2], primStream* pStream)
for(k=j; k>=i; k--)
pStream->insert(queue[k]);
}
-
+
pStream->end(PRIMITIVE_STREAM_FAN);
}
diff --git a/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h b/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
index f78b8f4..f9c972a 100644
--- a/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
+++ b/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
@@ -41,23 +41,23 @@
class Backend;
class reflexChain{
- Real2 *queue;
- /*the order of the polygon vertices: either q[0],q[1].., or
+ Real2 *queue;
+ /*the order of the polygon vertices: either q[0],q[1].., or
* q[n-1], q[n-2], ..., q[0]
*this order determines the interior of the polygon, so it
*also used to determines whether a chain is reflex or convex
*/
- Int isIncreasing;
+ Int isIncreasing;
Int index_queue;
Int size_queue; /*allocated size*/
-
+
public:
reflexChain(Int size, Int isIncreasing);
~reflexChain();
-
+
void insert(Real u, Real v);
void insert(Real v[2]);
-
+
void processNewVertex(Real v[2], primStream* pStream);
void outputFan(Real v[2], primStream* pStream);
@@ -70,7 +70,7 @@ class reflexChain{
/*dynamic array of pointers to reals.
*Intended to store an array of (u,v).
*Notice that it doesn't allocate or dealocate the space
- *for the (u,v) themselfs. So it assums that someone else
+ *for the (u,v) themselfs. So it assums that someone else
*is taking care of them, while this class only plays with
*the pointers.
*/
@@ -99,13 +99,13 @@ class vertexArray{
void monoTriangulation(directedLine* monoPolygon, primStream* pStream);
-void monoTriangulationRec(Real* topVertex, Real* botVertex,
+void monoTriangulationRec(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current,
vertexArray* dec_chain, Int dec_current,
primStream* pStream);
-void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
- directedLine* dec_chain, Int dec_index,
+void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
+ directedLine* dec_chain, Int dec_index,
directedLine* topVertex, Int top_index,
directedLine* botVertex,
primStream* pStream);
@@ -116,60 +116,60 @@ void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
*is increasing (left chain in V-monotone case) or decreaing (right chain
*in V-monotone case).
*/
-void monoTriangulation2(Real* topVertex, Real* botVertex,
+void monoTriangulation2(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_smallIndex,
Int inc_largeIndex,
Int is_increase_chain,
primStream* pStream);
-void monoTriangulationRecGen(Real* topVertex, Real* botVertex,
+void monoTriangulationRecGen(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current, Int inc_end,
vertexArray* dec_chain, Int dec_current, Int dec_end,
- primStream* pStream);
+ primStream* pStream);
-void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
+void monoTriangulationRecGenOpt(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current, Int inc_end,
vertexArray* dec_chain, Int dec_current, Int dec_end,
- primStream* pStream);
+ primStream* pStream);
void triangulateXYMonoTB(Int n_left, Real** leftVerts,
Int n_right, Real** rightVerts,
primStream* pStream);
-void monoTriangulationRecGenTBOpt(Real* topVertex, Real* botVertex,
+void monoTriangulationRecGenTBOpt(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current, Int inc_end,
vertexArray* dec_chain, Int dec_current, Int dec_end,
primStream* pStream);
-void monoTriangulationRecOpt(Real* topVertex, Real* botVertex,
+void monoTriangulationRecOpt(Real* topVertex, Real* botVertex,
vertexArray* left_chain, Int left_current,
vertexArray* right_chain, Int right_current,
primStream* pStream);
-void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex,
+void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current, Int inc_end,
vertexArray* dec_chain, Int dec_current, Int dec_end,
Int (*compFun)(Real*, Real*),
primStream* pStream);
-void monoTriangulationRecFun(Real* topVertex, Real* botVertex,
+void monoTriangulationRecFun(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current,
vertexArray* dec_chain, Int dec_current,
Int (*compFun)(Real*, Real*),
primStream* pStream);
-void monoTriangulationFun(directedLine* monoPolygon,
+void monoTriangulationFun(directedLine* monoPolygon,
Int (*compFun)(Real*, Real*), primStream* pStream);
-void monoTriangulationRec(Real* topVertex, Real* botVertex,
+void monoTriangulationRec(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current,
vertexArray* dec_chain, Int dec_current,
Backend* backend);
void monoTriangulationFunBackend(Arc_ptr loop, Int (*compFun)(Real*, Real*), Backend* backend);
-void monoTriangulationRecFunBackend(Real* topVertex, Real* botVertex,
+void monoTriangulationRecFunBackend(Real* topVertex, Real* botVertex,
vertexArray* inc_chain, Int inc_current,
vertexArray* dec_chain, Int dec_current,
Int (*compFun)(Real*, Real*),
diff --git a/src/glu/sgi/libnurbs/nurbtess/partitionX.cc b/src/glu/sgi/libnurbs/nurbtess/partitionX.cc
index e25e30b..11ffb36 100644
--- a/src/glu/sgi/libnurbs/nurbtess/partitionX.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/partitionX.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -40,9 +40,9 @@
#include "partitionX.h"
-#define CONCAVITY_ZERO 1.0e-6 //this number is used to test whether a vertex is concave (refelx)
- //or not. The test needs to compute the area of the three adjacent
- //vertices to see if the are is positive or negative.
+#define CONCAVITY_ZERO 1.0e-6 //this number is used to test whether a vertex is concave (refelx)
+ //or not. The test needs to compute the area of the three adjacent
+ //vertices to see if the are is positive or negative.
Int isCuspX(directedLine *v)
{
@@ -52,10 +52,10 @@ Int isCuspX(directedLine *v)
Real* P = v->getPrev()->head();
Real* N = v->getNext()->head();
if(
- (compV2InX(T,P) != -1 &&
+ (compV2InX(T,P) != -1 &&
compV2InX(T,N) != -1
) ||
- (compV2InX(T,P) != 1 &&
+ (compV2InX(T,P) != 1 &&
compV2InX(T,N) != 1
)
)
@@ -81,7 +81,7 @@ Int isReflexX(directedLine* v)
}
-/*return
+/*return
*0: not-cusp
*1: interior cusp
*2: exterior cusp
@@ -89,10 +89,10 @@ Int isReflexX(directedLine* v)
Int cuspTypeX(directedLine *v)
{
if(! isCuspX(v)) return 0;
- else
+ else
{
//printf("isCusp,%f,%f\n", v->head()[0], v->head()[1]);
- if(isReflexX(v))
+ if(isReflexX(v))
{
// printf("isReflex\n");
return 1;
@@ -116,7 +116,7 @@ Int numInteriorCuspsX(directedLine *polygon)
ret++;
return ret;
}
-
+
void findInteriorCuspsX(directedLine *polygon, Int& ret_n_interior_cusps,
directedLine** ret_interior_cusps)
@@ -127,10 +127,10 @@ void findInteriorCuspsX(directedLine *polygon, Int& ret_n_interior_cusps,
{
ret_interior_cusps[ret_n_interior_cusps++] = polygon;
}
- for(temp = polygon->getNext(); temp != polygon; temp = temp->getNext())
+ for(temp = polygon->getNext(); temp != polygon; temp = temp->getNext())
if(cuspTypeX(temp) == 1)
{
- ret_interior_cusps[ret_n_interior_cusps++] = temp;
+ ret_interior_cusps[ret_n_interior_cusps++] = temp;
}
}
@@ -143,20 +143,20 @@ directedLine* findDiagonal_singleCuspX(directedLine* cusp)
for(temp = cusp->getNext(); temp != cusp; temp = temp->getNext())
{
if(compV2InX(cusp->head(), temp->head()) == 1)
- {
+ {
return temp;
}
}
- else //is maxmal
+ else //is maxmal
for(temp = cusp->getNext(); temp != cusp; temp = temp->getNext())
{
if(compV2InX(cusp->head(), temp->head()) == -1)
- {
+ {
return temp;
}
}
return NULL;
}
-
-
+
+
diff --git a/src/glu/sgi/libnurbs/nurbtess/partitionY.cc b/src/glu/sgi/libnurbs/nurbtess/partitionY.cc
index e097461..a69d34f 100644
--- a/src/glu/sgi/libnurbs/nurbtess/partitionY.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/partitionY.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -50,14 +50,14 @@
#define min(a,b) ((a>b)? b:a)
-/*retrurn
+/*retrurn
*-1: if A < B (YaB
*/
static Int compVertInY(Real A[2], Real B[2])
{
- if( (A[1] < B[1]) || (A[1]==B[1] && A[0]head();
- if( compVertInY(e->head(), vert) != 1
+ if( compVertInY(e->head(), vert) != 1
&& compVertInY(e->tail(), vert) != 1
)
return 1;
@@ -89,7 +89,7 @@ Int isBelow(directedLine *v, directedLine *e)
Int isAbove(directedLine *v, directedLine *e)
{
Real* vert = v->head();
- if( compVertInY(e->head(), vert) != -1
+ if( compVertInY(e->head(), vert) != -1
&& compVertInY(e->tail(), vert) != -1
)
return 1;
@@ -134,7 +134,7 @@ Int isReflex(directedLine *v)
else return 0;
}
- /*return
+ /*return
*0: not-cusp
*1: interior cusp
*2: exterior cusp
@@ -168,10 +168,10 @@ Int sweepRangeEqual(sweepRange* src1, sweepRange* src2)
{
Int leftEqual;
Int rightEqual;
-
-
+
+
/*The case when both are vertices should not happen*/
- assert(! (src1->leftType == 0 && src2->leftType == 0));
+ assert(! (src1->leftType == 0 && src2->leftType == 0));
if(src1->leftType == 0 && src2->leftType == 1){
if(src1->left == src2->left ||
src1->left->getPrev() == src2->left
@@ -191,13 +191,13 @@ Int sweepRangeEqual(sweepRange* src1, sweepRange* src2)
src1->left == src2->left->getPrev()
)
leftEqual = 1;
- else
+ else
leftEqual = 0;
}
/*the same thing for right*/
/*The case when both are vertices should not happen*/
- assert(! (src1->rightType == 0 && src2->rightType == 0));
+ assert(! (src1->rightType == 0 && src2->rightType == 0));
if(src1->rightType == 0 && src2->rightType == 1){
if(src1->right == src2->right ||
src1->right->getPrev() == src2->right
@@ -217,10 +217,10 @@ Int sweepRangeEqual(sweepRange* src1, sweepRange* src2)
src1->right == src2->right->getPrev()
)
rightEqual = 1;
- else
+ else
rightEqual = 0;
}
-
+
return (leftEqual == 1 || rightEqual == 1);
}
@@ -279,7 +279,7 @@ static Int compEdges(directedLine *e1, directedLine *e2)
e2_Ymin = h21;
}
*/
-
+
if(head1[1]>tail1[1]) {
e1_Ymax= head1[1];
e1_Ymin= tail1[1];
@@ -298,7 +298,7 @@ static Int compEdges(directedLine *e1, directedLine *e2)
e2_Ymin = head2[1];
}
-
+
/*Real e1_Ymax = max(head1[1], tail1[1]);*/ /*max(e1->head()[1], e1->tail()[1]);*/
/*Real e1_Ymin = min(head1[1], tail1[1]);*/ /*min(e1->head()[1], e1->tail()[1]);*/
/*Real e2_Ymax = max(head2[1], tail2[1]);*/ /*max(e2->head()[1], e2->tail()[1]);*/
@@ -306,7 +306,7 @@ static Int compEdges(directedLine *e1, directedLine *e2)
Real Ymax = min(e1_Ymax, e2_Ymax);
Real Ymin = max(e1_Ymin, e2_Ymin);
-
+
Real y = Real(0.5)*(Ymax + Ymin);
/* Real x1 = intersectHoriz(e1->head()[0], e1->head()[1], e1->tail()[0], e1->tail()[1], y);
@@ -322,7 +322,7 @@ static Int compEdges(directedLine *e1, directedLine *e2)
if(x1<= x2) return -1;
else return 1;
}
-
+
/*used by sort precedures
*/
static Int compInY(directedLine* v1, directedLine* v2)
@@ -342,7 +342,7 @@ void findDiagonals(Int total_num_edges, directedLine** sortedVertices, sweepRang
directedLine* thisEdge = vert;
directedLine* prevEdge = vert->getPrev();
/*
-printf("find i=%i\n", i);
+printf("find i=%i\n", i);
printf("the vertex is\n");
vert->printSingle();
*/
@@ -398,12 +398,12 @@ Int deleteRepeatDiagonals(Int num_diagonals, directedLine** diagonal_vertices, d
for(j=0,l=0; jfindRoot();
directedLine *root2 = v2->findRoot();
- assert(root1);
+ assert(root1);
assert(root2);
*/
@@ -548,14 +548,14 @@ root2->rootLinkSet(root1);
ret_p1->rootLinkSet(root1);
ret_p2->rootLinkSet(root1);
- /*now that we have connected the diagonal v1 and v2,
- *we have to check those unprocessed diagonals which
+ /*now that we have connected the diagonal v1 and v2,
+ *we have to check those unprocessed diagonals which
*have v1 or v2 as an end point. Notice that the head of v1
*has the same coodinates as the head of v2->prev, and the head of
- *v2 has the same coordinate as the head of v1->prev.
+ *v2 has the same coordinate as the head of v1->prev.
*Suppose these is a diagonal (v1, x). If (v1,x) is still a valid
- *diagonal, then x should be on the left hand side of the directed line: *v1->prev->head -- v1->head -- v1->tail. Otherwise, (v1,x) should be
- *replaced by (v2->prev, x), that is, x is on the left of
+ *diagonal, then x should be on the left hand side of the directed line: *v1->prev->head -- v1->head -- v1->tail. Otherwise, (v1,x) should be
+ *replaced by (v2->prev, x), that is, x is on the left of
* v2->prev->prev->head, v2->prev->head, v2->prev->tail.
*/
Int ii, kk;
@@ -567,12 +567,12 @@ ret_p2->rootLinkSet(root1);
/*check d1, and replace diagonal_vertices[kk] if necessary*/
if(d1 == v1) {
/*check if d2 is to left of v1->prev->head:v1->head:v1->tail*/
- if(! pointLeft2Lines(v1->getPrev()->head(),
+ if(! pointLeft2Lines(v1->getPrev()->head(),
v1->head(), v1->tail(), d2->head()))
{
/*
assert(pointLeft2Lines(v2->getPrev()->getPrev()->head(),
- v2->getPrev()->head(),
+ v2->getPrev()->head(),
v2->getPrev()->tail(), d2->head()));
*/
diagonal_vertices[kk] = v2->getPrev();
@@ -594,11 +594,11 @@ ret_p2->rootLinkSet(root1);
/*check d2 and replace diagonal_vertices[k+1] if necessary*/
if(d2 == v1) {
/*check if d1 is to left of v1->prev->head:v1->head:v1->tail*/
- if(! pointLeft2Lines(v1->getPrev()->head(),
+ if(! pointLeft2Lines(v1->getPrev()->head(),
v1->head(), v1->tail(), d1->head()))
{
/* assert(pointLeft2Lines(v2->getPrev()->getPrev()->head(),
- v2->getPrev()->head(),
+ v2->getPrev()->head(),
v2->getPrev()->tail(), d1->head()));
*/
diagonal_vertices[kk+1] = v2->getPrev();
@@ -616,7 +616,7 @@ ret_p2->rootLinkSet(root1);
diagonal_vertices[kk+1] = v1->getPrev();
}
}
- }
+ }
}/*end if (root1 not equal to root 2)*/
}
@@ -625,7 +625,7 @@ ret_p2->rootLinkSet(root1);
for(i=0,k=0; irootLinkSet(root1);
- assert(root1);
- assert(root2);
+ assert(root1);
+ assert(root2);
assert(root1 == root2);
- */
+ */
sampledLine* generatedLine;
@@ -665,7 +665,7 @@ ret_p2->rootLinkSet(root1);
- for(Int j=i+1; jrootLinkSet(root1);
if(temp1==v1 || temp1==v2 || temp2==v1 || temp2==v2)
if(! temp1->samePolygon(temp1, temp2))
{
- /*if temp1 and temp2 are in different polygons,
+ /*if temp1 and temp2 are in different polygons,
*then one of them must be v1 or v2.
*/
assert(temp1==v1 || temp1 == v2 || temp2==v1 || temp2 ==v2);
- if(temp1==v1)
+ if(temp1==v1)
{
diagonal_vertices[2*j] = v2->getPrev();
}
@@ -692,7 +692,7 @@ ret_p2->rootLinkSet(root1);
}
if(temp1==v2)
{
- diagonal_vertices[2*j] = v1->getPrev();
+ diagonal_vertices[2*j] = v1->getPrev();
}
if(temp2==v2)
{
@@ -700,7 +700,7 @@ ret_p2->rootLinkSet(root1);
}
}
}
- }
+ }
}
@@ -713,12 +713,12 @@ ret_p2->rootLinkSet(root1);
*retSampledLines = newSampledLines;
return ret_polygons;
}
-
-/*given a set of simple polygons where the interior
+
+/*given a set of simple polygons where the interior
*is decided by left-hand principle,
*return a range (sight) for each vertex. This is called
*Trapezoidalization.
- */
+ */
void sweepY(Int nVertices, directedLine** sortedVertices, sweepRange** ret_ranges)
{
Int i;
@@ -733,12 +733,12 @@ void sweepY(Int nVertices, directedLine** sortedVertices, sweepRange** ret_range
directedLine* thisEdge = vert;
directedLine* prevEdge = vert->getPrev();
-
+
if(isBelow(vert, thisEdge) && isAbove(vert, prevEdge))
{
/*case 1: this < v < prev
- *the polygon is going down at v, the interior is to
+ *the polygon is going down at v, the interior is to
*the right hand side.
* find the edge to the right of thisEdge for right range.
* delete thisEdge
@@ -760,12 +760,12 @@ void sweepY(Int nVertices, directedLine** sortedVertices, sweepRange** ret_range
{
/*case 2: this > v > prev
- *the polygon is going up at v, the interior is to
+ *the polygon is going up at v, the interior is to
*the left hand side.
* find the edge to the left of thisEdge for left range.
* delete prevEdge
* insert thisEdge
- */
+ */
treeNode* prevNode = TreeNodeFind(searchTree, prevEdge, ( Int (*) (void *, void *))compEdges);
assert(prevNode);
treeNode* pred = TreeNodePredecessor(prevNode);
@@ -778,15 +778,15 @@ void sweepY(Int nVertices, directedLine** sortedVertices, sweepRange** ret_range
/*case 3: insert both edges*/
treeNode* thisNode = TreeNodeMake(thisEdge);
- treeNode* prevNode = TreeNodeMake(prevEdge);
+ treeNode* prevNode = TreeNodeMake(prevEdge);
searchTree = TreeNodeInsert(searchTree, thisNode, ( Int (*) (void *, void *))compEdges);
- searchTree = TreeNodeInsert(searchTree, prevNode, ( Int (*) (void *, void *))compEdges);
+ searchTree = TreeNodeInsert(searchTree, prevNode, ( Int (*) (void *, void *))compEdges);
if(compEdges(thisEdge, prevEdge)<0) /*interior cusp*/
{
treeNode* leftEdge = TreeNodePredecessor(thisNode);
treeNode* rightEdge = TreeNodeSuccessor(prevNode);
- ret_ranges[i] = sweepRangeMake( (directedLine*) leftEdge->key, 1,
+ ret_ranges[i] = sweepRangeMake( (directedLine*) leftEdge->key, 1,
(directedLine*) rightEdge->key, 1
);
}
@@ -806,7 +806,7 @@ void sweepY(Int nVertices, directedLine** sortedVertices, sweepRange** ret_range
{
treeNode* leftEdge = TreeNodePredecessor(prevNode);
treeNode* rightEdge = TreeNodeSuccessor(thisNode);
- ret_ranges[i] = sweepRangeMake( (directedLine*) leftEdge->key, 1,
+ ret_ranges[i] = sweepRangeMake( (directedLine*) leftEdge->key, 1,
(directedLine*) rightEdge->key, 1
);
}
@@ -826,7 +826,7 @@ void sweepY(Int nVertices, directedLine** sortedVertices, sweepRange** ret_range
thisEdge->printSingle();
printf("prevEdge is\n");
prevEdge->printSingle();
-
+
exit(1);
}
}
diff --git a/src/glu/sgi/libnurbs/nurbtess/partitionY.h b/src/glu/sgi/libnurbs/nurbtess/partitionY.h
index 5570c18..7aee913 100644
--- a/src/glu/sgi/libnurbs/nurbtess/partitionY.h
+++ b/src/glu/sgi/libnurbs/nurbtess/partitionY.h
@@ -34,15 +34,15 @@
*A and B such that each chain is Y-monotonic that is the intersection of any
*horizontal line intersects each chain has at most one connected componenets
* (empty, single point or a single line).
- *
- * A vertex is a cusp if both its ajacent vertices are either at or above v,
+ *
+ * A vertex is a cusp if both its ajacent vertices are either at or above v,
*or both at or below v. In addition, at least one of the ajacent verteces is
- *strictly below or above v.
- * A vertex is a relex vertex if the internals angle is strictly greater than
+ *strictly below or above v.
+ * A vertex is a relex vertex if the internals angle is strictly greater than
*180. In other words, if the signed area is negative:
- *(x1, y1), (x2, y2), (x3, y3) are the three vertices along a polygon, the
+ *(x1, y1), (x2, y2), (x3, y3) are the three vertices along a polygon, the
*order is such that left hand side is inside the polygon. Then (x2,y2) is
- *reflex if:
+ *reflex if:
* (x2-x1, y2-y1) cross (x3-x1, y3-y1) <0.
*A vertex is an interior cusp if it is a cusp and a reflex.
*A vertex is an exterior cusp if it is a cusp but not a reflex.
@@ -71,7 +71,7 @@ typedef struct sweepRange{
directedLine *left;
Int leftType; /*either a vertex (leftType=0) or an edge (leftType =1) */
directedLine *right;
- Int rightType; /*either a vertex (rightType=0) or an edge (rightType =1) */
+ Int rightType; /*either a vertex (rightType=0) or an edge (rightType =1) */
} sweepRange;
sweepRange* sweepRangeMake(directedLine* left, Int leftType,
@@ -80,7 +80,7 @@ sweepRange* sweepRangeMake(directedLine* left, Int leftType,
void sweepRangeDelete(sweepRange* range);
Int sweepRangeEqual(sweepRange* sr1, sweepRange* sr2);
-/*given a set of simple polygons where the interior
+/*given a set of simple polygons where the interior
*is decided by left-hand principle,
*return a range (sight) for each vertex. This is called
*Trapezoidalization.
diff --git a/src/glu/sgi/libnurbs/nurbtess/polyDBG.h b/src/glu/sgi/libnurbs/nurbtess/polyDBG.h
index 74843d8..1a585d9 100644
--- a/src/glu/sgi/libnurbs/nurbtess/polyDBG.h
+++ b/src/glu/sgi/libnurbs/nurbtess/polyDBG.h
@@ -39,7 +39,7 @@
Int DBG_edgesIntersectGen(Real A[2], Real B[2], Real C[2], Real D[2]);
Int DBG_intersectChain(vertexArray* chain, Int start, Int end, Real A[2], Real B[2]);
-
+
Int DBG_edgesIntersect(directedLine* l1, directedLine* l2);
Int DBG_polygonSelfIntersect(directedLine* poly);
diff --git a/src/glu/sgi/libnurbs/nurbtess/polyUtil.cc b/src/glu/sgi/libnurbs/nurbtess/polyUtil.cc
index f9a27f4..39f99d5 100644
--- a/src/glu/sgi/libnurbs/nurbtess/polyUtil.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/polyUtil.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -52,10 +52,10 @@ Real area(Real A[2], Real B[2], Real C[2])
/* return (B[0]-A[0])*(C[1]-A[1]) - (C[0]-A[0])*(B[1]-A[1]);*/
}
-/*given a directed line A->B, and a point P,
+/*given a directed line A->B, and a point P,
*determine whether P is to the left of AB.
- *the line A->B (imagine it has beedn extended both
- *end to the infinity) divides the plan into two
+ *the line A->B (imagine it has beedn extended both
+ *end to the infinity) divides the plan into two
*half planes. When we walk from A to B, one
*half is to the left and the other half is to the right.
*return 1 if P is to the left.
@@ -70,10 +70,10 @@ Int pointLeftLine(Real A[2], Real B[2], Real P[2])
/*given two directed line: A -> B -> C, and another point P.
*determine whether P is to the left hand side of A->B->C.
*Think of BA and BC extended as two rays. So that the plane is
- * divided into two parts. One part is to the left we walk from A
+ * divided into two parts. One part is to the left we walk from A
*to B and to C, the other part is to the right.
- * In order for P to be the left, P must be either to the left
- *of
+ * In order for P to be the left, P must be either to the left
+ *of
*/
Int pointLeft2Lines(Real A[2], Real B[2], Real C[2], Real P[2])
{
diff --git a/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc b/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc
index dfdbd4e..84919ca 100644
--- a/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/primitiveStream.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -39,7 +39,7 @@
#include
#include
#include
-#include
+#include
#include "primitiveStream.h"
@@ -54,9 +54,9 @@ Int primStream::num_triangles()
return ret;
}
-
-/*the begining of inserting a new primitive.
+
+/*the begining of inserting a new primitive.
*reset counter to be 0.
*/
void primStream::begin()
@@ -72,11 +72,11 @@ void primStream::insert(Real u, Real v)
if(index_vertices+1 >= size_vertices) {
Real* temp = (Real*) malloc (sizeof(Real) * (2*size_vertices + 2));
assert(temp);
-
+
/*copy*/
for(Int i=0; i
*/
@@ -52,13 +52,13 @@ class primStream {
Int index_vertices;
Int size_vertices;
- /*the vertex is inserted one by one. counter is used to
- *count the number of vertices which have been inserted so far in
+ /*the vertex is inserted one by one. counter is used to
+ *count the number of vertices which have been inserted so far in
*the current primitive
*/
Int counter;
-public:
+public:
primStream(Int sizeLengths, Int sizeVertices);
~primStream();
@@ -76,16 +76,16 @@ class primStream {
}
Real* get_vertices() {return vertices;}
- /*the begining of inserting a new primitive.
+ /*the begining of inserting a new primitive.
*reset counter to be 0.
*/
void begin();
void insert(Real u, Real v);
void insert(Real v[2]) {insert(v[0], v[1]);}
void end(Int type);
-
+
Int num_triangles();
-
+
void triangle(Real A[2], Real B[2], Real C[2])
{
begin();
@@ -103,7 +103,7 @@ class primStream {
-
+
#endif
diff --git a/src/glu/sgi/libnurbs/nurbtess/quicksort.cc b/src/glu/sgi/libnurbs/nurbtess/quicksort.cc
index 9d0b290..4f2902c 100644
--- a/src/glu/sgi/libnurbs/nurbtess/quicksort.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/quicksort.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -54,7 +54,7 @@ static void swap(void *v[], int i, int j)
* if( *i1 < * i2) return -1;
* else return 1;
*}
- *and an array of pointers to integers:
+ *and an array of pointers to integers:
* int *v[100] (allocate space for where each v[i] points to).
*then you can call:
* quicksort( (void**)v, left, right, (int (*)(void *, void *))comp)
@@ -65,7 +65,7 @@ void quicksort(void *v[], int left, int right,
int i, last;
if(left >= right) /*do nothing if array contains */
return; /*fewer than two elements*/
-
+
swap(v, left, (left+right)/2);
last = left;
for(i=left+1; i<=right; i++)
diff --git a/src/glu/sgi/libnurbs/nurbtess/rectBlock.cc b/src/glu/sgi/libnurbs/nurbtess/rectBlock.cc
index f457b15..8bd5888 100644
--- a/src/glu/sgi/libnurbs/nurbtess/rectBlock.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/rectBlock.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -102,7 +102,7 @@ printf("upGridLineIndex=%i, lowGridLineIndex=%i\n", upGridLineIndex, lowGridLine
glVertex2f(u_values[j], v_values[i-1]);
}
glEnd();
- }
+ }
}
@@ -159,15 +159,15 @@ void rectBlockArray::insert(rectBlock* newBlock)
//initialization
for(i=0; i<2*size+1; i++)
temp[i] = NULL;
-
+
for(i=0; ib)? b:a)
void sampleConnectedComp(Real* topVertex, Real* botVertex,
- vertexArray* leftChain,
+ vertexArray* leftChain,
Int leftStartIndex, Int leftEndIndex,
vertexArray* rightChain,
Int rightStartIndex, Int rightEndIndex,
@@ -97,7 +97,7 @@ void sampleConnectedComp(Real* topVertex, Real* botVertex,
down_rightCornerWhere,
down_rightCornerIndex,
pStream);
-
+
sampleCompTop(topVertex,
leftChain,
@@ -132,10 +132,10 @@ void sampleConnectedComp(Real* topVertex, Real* botVertex,
rbArray->insert(new rectBlock(leftGridChain, rightGridChain, gridIndex1, gridIndex2));
-
+
}
-/*notice that we need rightChain because the
+/*notice that we need rightChain because the
*corners could be on the rightChain.
*here comp means component.
*/
@@ -178,7 +178,7 @@ void sampleCompLeft(Real* topVertex, Real* botVertex,
gridMidIndex1 = leftGridChain->lookfor(leftChain->getVertex(midIndex1)[1],
gridIndex1, gridIndex2);
gridMidIndex2 = 1+leftGridChain->lookfor(leftChain->getVertex(midIndex2)[1],
- gridMidIndex1, gridIndex2);
+ gridMidIndex1, gridIndex2);
}
@@ -207,7 +207,7 @@ void sampleCompLeft(Real* topVertex, Real* botVertex,
cornerLeftStart = leftStartIndex;
cornerRightUpEnd = up_leftCornerIndex;
}
-
+
if(down_leftCornerWhere == 0) /*left corner is on left chain*/
{
cornerBot = leftChain->getVertex(down_leftCornerIndex);
@@ -226,7 +226,7 @@ void sampleCompLeft(Real* topVertex, Real* botVertex,
cornerLeftEnd = leftEndIndex;
cornerRightDownStart = down_leftCornerIndex;
}
-
+
@@ -287,9 +287,9 @@ void sampleCompLeft(Real* topVertex, Real* botVertex,
cornerRightDownStart,
rightEndIndex,
pStream);
- }
+ }
}
-
+
void sampleLeftSingleTrimEdgeRegionGen(Real topVert[2], Real botVert[2],
vertexArray* leftChain,
Int leftStart,
@@ -315,11 +315,11 @@ void sampleLeftSingleTrimEdgeRegionGen(Real topVert[2], Real botVert[2],
vertexArray vArray(gridEndIndex-gridBeginIndex+1 +
max(0,rightUpEnd - rightUpBegin+1)+
max(0,rightDownEnd - rightDownBegin+1));
-
+
/*append the vertices on the up section of thr right chain*/
for(i=rightUpBegin; i<= rightUpEnd; i++)
vArray.appendVertex(rightChain->getVertex(i));
-
+
/*append the vertices of the left extremal grid points,
*and at the same time, perform triangulation for the stair cases
*/
@@ -333,7 +333,7 @@ void sampleLeftSingleTrimEdgeRegionGen(Real topVert[2], Real botVert[2],
*/
if(gridChain->getUlineIndex(i) < gridChain->getUlineIndex(i-1))
{
- pStream->begin();
+ pStream->begin();
pStream->insert(gridChain->get_vertex(i-1));
for(j=gridChain->getUlineIndex(i); j<= gridChain->getUlineIndex(i-1); j++)
pStream->insert(gridChain->getGrid()->get_u_value(j), gridChain->get_v_value(i));
@@ -347,18 +347,18 @@ void sampleLeftSingleTrimEdgeRegionGen(Real topVert[2], Real botVert[2],
pStream->insert(gridChain->getGrid()->get_u_value(j), gridChain->get_v_value(i-1));
pStream->end(PRIMITIVE_STREAM_FAN);
}
- /*otherwisem, the two are equal, so there is no fan to outout*/
+ /*otherwisem, the two are equal, so there is no fan to outout*/
}
/*then append all the vertices on the down section of the right chain*/
for(i=rightDownBegin; i<= rightDownEnd; i++)
- vArray.appendVertex(rightChain->getVertex(i));
+ vArray.appendVertex(rightChain->getVertex(i));
monoTriangulationRecGen(topVert, botVert,
leftChain, leftStart, leftEnd,
&vArray, 0, vArray.getNumElements()-1,
pStream);
-
+
}
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleComp.h b/src/glu/sgi/libnurbs/nurbtess/sampleComp.h
index a3c1790..cd9fa10 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleComp.h
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleComp.h
@@ -37,7 +37,7 @@
#include "rectBlock.h"
void sampleConnectedComp(Real* topVertex, Real* botVertex,
- vertexArray* leftChain,
+ vertexArray* leftChain,
Int leftStartIndex, Int botLeftIndex,
vertexArray* rightChain,
Int rightStartIndex, Int botRightIndex,
@@ -82,5 +82,5 @@ void sampleLeftSingleTrimEdgeRegionGen(Real topVert[2], Real botVert[2],
Int rightDownBegin,
Int rightDownEnd,
primStream* pStream);
-
+
#endif
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc b/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc
index 2e70f83..e1b0bd8 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -49,7 +49,7 @@
// vertex[pass][0] >= u
//if everybost is getVertex(segIndexPass);
else //nothing is to the left of u.
- tempBot = botVertex;
+ tempBot = botVertex;
Real tempTop[2];
tempTop[0] = grid->get_u_value(rightU);
tempTop[1] = grid->get_v_value(gridV);
-
+
monoTriangulation2(tempTop, tempBot,
rightChain,
rightCorner,
@@ -171,7 +171,7 @@ void sampleBotRightWithGridLinePost(Real* botVertex,
midU--;
grid->outputFanWithPoint(gridV, leftU, midU, botVertex, pStream);
- stripOfFanRight(rightChain, segIndexMono, segIndexPass, grid, gridV, midU, rightU, pStream, 1);
+ stripOfFanRight(rightChain, segIndexMono, segIndexPass, grid, gridV, midU, rightU, pStream, 1);
Real tempTop[2];
tempTop[0] = grid->get_u_value(midU);
tempTop[1] = grid->get_v_value(gridV);
@@ -189,8 +189,8 @@ void sampleBotRightWithGridLinePost(Real* botVertex,
else //the botVertex forms a fan witht eh grid points
grid->outputFanWithPoint(gridV, leftU, rightU, botVertex, pStream);
}
-
-void sampleBotRightWithGridLine(Real* botVertex,
+
+void sampleBotRightWithGridLine(Real* botVertex,
vertexArray* rightChain,
Int rightEnd,
Int rightCorner,
@@ -215,7 +215,7 @@ void sampleBotRightWithGridLine(Real* botVertex,
segIndexMono,
segIndexPass);
- sampleBotRightWithGridLinePost(botVertex,
+ sampleBotRightWithGridLinePost(botVertex,
rightChain,
rightEnd,
segIndexMono,
@@ -227,8 +227,8 @@ void sampleBotRightWithGridLine(Real* botVertex,
rightU,
pStream);
}
-
-
+
+
void sampleBotLeftWithGridLinePost(Real* botVertex,
vertexArray* leftChain,
Int leftEnd,
@@ -237,7 +237,7 @@ void sampleBotLeftWithGridLinePost(Real* botVertex,
Int leftCorner,
gridWrap* grid,
Int gridV,
- Int leftU,
+ Int leftU,
Int rightU,
primStream* pStream)
{
@@ -245,7 +245,7 @@ void sampleBotLeftWithGridLinePost(Real* botVertex,
//the possible section which is to the left of leftU
if(segIndexPass > leftCorner) //at least leftCorner is to the left of leftU
{
- Real *tempBot;
+ Real *tempBot;
if(segIndexPass <= leftEnd) //from corner to pass-1 is getVertex(segIndexPass);
else //nothing is to the rigth of u
@@ -265,7 +265,7 @@ void sampleBotLeftWithGridLinePost(Real* botVertex,
tempTop[0] = grid->get_u_value(rightU);
tempTop[1] = grid->get_v_value(gridV);
- monoTriangulation2(tempTop, botVertex, leftChain, segIndexMono, leftEnd,
+ monoTriangulation2(tempTop, botVertex, leftChain, segIndexMono, leftEnd,
1, //increase chain
pStream);
}
@@ -326,7 +326,7 @@ Int findBotSeparator(vertexArray* leftChain,
oldLeftI = leftCorner-1;
oldRightI = rightCorner;
leftMax = leftChain->getVertex(leftCorner)[0] - Real(1.0) ; //initilize to be left of leftCorner
- rightMin = rightChain->getVertex(rightCorner)[0];
+ rightMin = rightChain->getVertex(rightCorner)[0];
}
else //rightlower
{
@@ -437,8 +437,8 @@ Int findBotSeparator(vertexArray* leftChain,
}
}
}//end of while loop
- //now oldLeftI and oldRight I are the desired separator index notice that they are not
- //necessarily valid
+ //now oldLeftI and oldRight I are the desired separator index notice that they are not
+ //necessarily valid
if(oldLeftI < leftCorner || oldRightI < rightCorner)
return 0; //no separator
else
@@ -490,7 +490,7 @@ void sampleCompBot(Real* botVertex,
}
sampleBotRightWithGridLine(tempBot,
- rightChain,
+ rightChain,
tempRightEnd,
down_rightCornerIndex,
rightGridChain->getGrid(),
@@ -511,11 +511,11 @@ void sampleCompBot(Real* botVertex,
else //right corner is on left chain
{
tempLeftEnd = down_rightCornerIndex-1;
- tempBot = leftChain->getVertex(down_rightCornerIndex);
+ tempBot = leftChain->getVertex(down_rightCornerIndex);
}
- sampleBotLeftWithGridLine(tempBot, leftChain, tempLeftEnd, down_leftCornerIndex,
+ sampleBotLeftWithGridLine(tempBot, leftChain, tempLeftEnd, down_leftCornerIndex,
leftGridChain->getGrid(),
leftGridChain->getVlineIndex(gridIndex),
leftGridChain->getUlineIndex(gridIndex),
@@ -525,7 +525,7 @@ void sampleCompBot(Real* botVertex,
}
else //down_leftCornereWhere == 0, down_rightCornerwhere == 2
{
- sampleCompBotSimple(botVertex,
+ sampleCompBotSimple(botVertex,
leftChain,
leftEnd,
rightChain,
@@ -538,7 +538,7 @@ void sampleCompBot(Real* botVertex,
down_rightCornerWhere,
down_rightCornerIndex,
pStream);
-
+
return;
#ifdef NOT_REACHABLE
@@ -573,7 +573,7 @@ void sampleCompBot(Real* botVertex,
while(leftGridChain->getGrid()->get_u_value(gridSep) > leftChain->getVertex(segLeftMono)[0])
gridSep--;
}
- else
+ else
{
gridSep = leftGridChain->getUlineIndex(gridIndex);
while(leftGridChain->getGrid()->get_u_value(gridSep) < rightChain->getVertex(segRightMono)[0])
@@ -611,7 +611,7 @@ void sampleCompBot(Real* botVertex,
pStream);
}//end if both sides have vertices inside the gridboundary points
else if(leftChain->getVertex(sep_left)[0] >= leftGridChain->get_u_value(gridIndex)) //left n right out
-
+
{
Int segLeftMono, segLeftPass;
findBotLeftSegment(leftChain,
@@ -619,7 +619,7 @@ void sampleCompBot(Real* botVertex,
down_leftCornerIndex,
leftGridChain->get_u_value(gridIndex),
segLeftMono,
- segLeftPass);
+ segLeftPass);
assert(segLeftPass <= sep_left); //make sure there is a point to the right of u.
monoTriangulation2(leftGridChain->get_vertex(gridIndex),
leftChain->getVertex(segLeftPass),
@@ -628,7 +628,7 @@ void sampleCompBot(Real* botVertex,
segLeftPass-1,
1, //a increase chain
pStream);
- stripOfFanLeft(leftChain, segLeftMono, segLeftPass,
+ stripOfFanLeft(leftChain, segLeftMono, segLeftPass,
leftGridChain->getGrid(),
leftGridChain->getVlineIndex(gridIndex),
leftGridChain->getUlineIndex(gridIndex),
@@ -645,9 +645,9 @@ void sampleCompBot(Real* botVertex,
leftGridChain->getVlineIndex(gridIndex),
leftGridChain->getUlineIndex(gridIndex),
rightGridChain->getUlineIndex(gridIndex),
- pStream);
+ pStream);
*/
-
+
monoTriangulationRecGen(rightGridChain->get_vertex(gridIndex),
botVertex,
leftChain, segLeftMono, leftEnd,
@@ -655,7 +655,7 @@ void sampleCompBot(Real* botVertex,
pStream);
}//end left in right out
else if(rightChain->getVertex(sep_right)[0] <= rightGridChain->get_u_value(gridIndex))//left out right in
- {
+ {
Int segRightMono, segRightPass;
findBotRightSegment(rightChain, sep_right, down_rightCornerIndex,
rightGridChain->get_u_value(gridIndex),
@@ -671,11 +671,11 @@ void sampleCompBot(Real* botVertex,
0, // a decrease chain
pStream);
- stripOfFanRight(rightChain, segRightMono, segRightPass,
+ stripOfFanRight(rightChain, segRightMono, segRightPass,
rightGridChain->getGrid(),
rightGridChain->getVlineIndex(gridIndex),
leftGridChain->getUlineIndex(gridIndex),
- rightGridChain->getUlineIndex(gridIndex),
+ rightGridChain->getUlineIndex(gridIndex),
pStream, 1);
@@ -683,12 +683,12 @@ void sampleCompBot(Real* botVertex,
botVertex,
leftChain, down_leftCornerIndex, leftEnd,
rightChain, segRightMono, rightEnd,
- pStream);
+ pStream);
}//end left out right in
else //left out, right out
{
- sampleCompBotSimple(botVertex,
+ sampleCompBotSimple(botVertex,
leftChain,
leftEnd,
rightChain,
@@ -701,13 +701,13 @@ void sampleCompBot(Real* botVertex,
down_rightCornerWhere,
down_rightCornerIndex,
pStream);
-
+
}//end leftout right out
}//end if separator exists
else //no separator
{
- sampleCompBotSimple(botVertex,
+ sampleCompBotSimple(botVertex,
leftChain,
leftEnd,
rightChain,
@@ -725,7 +725,7 @@ void sampleCompBot(Real* botVertex,
}//end id 0 2
}//end if the functin
-
+
void sampleCompBotSimple(Real* botVertex,
vertexArray* leftChain,
Int leftEnd,
@@ -738,7 +738,7 @@ void sampleCompBotSimple(Real* botVertex,
Int down_leftCornerIndex,
Int down_rightCornerWhere,
Int down_rightCornerIndex,
- primStream* pStream)
+ primStream* pStream)
{
//the plan is to use monotriangulation algorithm.
Int i,k;
@@ -746,7 +746,7 @@ void sampleCompBotSimple(Real* botVertex,
Real* ActualBot;
Int ActualLeftStart, ActualLeftEnd;
Int ActualRightStart, ActualRightEnd;
-
+
//creat an array to store the points on the grid line
gridWrap* grid = leftGridChain->getGrid();
Int gridV = leftGridChain->getVlineIndex(gridIndex);
@@ -765,39 +765,39 @@ void sampleCompBotSimple(Real* botVertex,
ActualLeftEnd = leftEnd;
else
ActualLeftEnd = down_rightCornerIndex-1; //down_rightCornerIndex will be th actualBot
-
+
if(down_leftCornerWhere != 0) //left corner is not on let chian
ActualLeftStart = leftEnd+1; //meaning that there is no actual left section
else
ActualLeftStart = down_leftCornerIndex;
-
+
vertexArray ActualLeftChain(max(0, ActualLeftEnd - ActualLeftStart +1) + gridRightU - gridLeftU +1);
-
+
for(i=0; igetVertex(i));
-
+
//determine ActualRightStart
if(down_rightCornerWhere != 2) //right is not on right
ActualRightStart = rightEnd +1; //meaning no section on right
else
ActualRightStart = down_rightCornerIndex;
-
+
//determine actualrightEnd
if(down_leftCornerWhere != 2) //left is not on right
{
ActualRightEnd = rightEnd;
}
- else //left corner is on right
+ else //left corner is on right
{
ActualRightEnd = down_leftCornerIndex-1; //down_leftCornerIndex will be the bot
}
//actual bot
- if(down_rightCornerWhere == 2)
+ if(down_rightCornerWhere == 2)
{
if(down_leftCornerWhere == 2)
ActualBot = rightChain->getVertex(down_leftCornerIndex);
@@ -808,7 +808,7 @@ void sampleCompBotSimple(Real* botVertex,
ActualBot = botVertex;
else //down_rightCornerWhere == 0
ActualBot = leftChain->getVertex(down_rightCornerIndex);
-
+
ActualTop = gridPoints[0];
/*
printf("in bot simple, actual leftChain is \n");
@@ -821,14 +821,14 @@ printf("Actual right start = %i, end=%i\n",ActualRightStart, ActualRightEnd);
monoTriangulationRecGenOpt(rightChain->getVertex(ActualRightStart),
ActualBot,
&ActualLeftChain,
- 0,
+ 0,
ActualLeftChain.getNumElements()-1,
rightChain,
ActualRightStart+1,
ActualRightEnd,
pStream);
else
- monoTriangulationRecGenOpt(ActualTop, ActualBot,
+ monoTriangulationRecGenOpt(ActualTop, ActualBot,
&ActualLeftChain,
1, //the first one is the top vertex
ActualLeftChain.getNumElements()-1,
@@ -838,7 +838,7 @@ printf("Actual right start = %i, end=%i\n",ActualRightStart, ActualRightEnd);
pStream);
free(gridPoints);
}
-
-
-
+
+
+
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h b/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h
index 7b98279..8f66da8 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h
@@ -35,14 +35,14 @@
#include "sampleMonoPoly.h"
-void findBotLeftSegment(vertexArray* leftChain,
+void findBotLeftSegment(vertexArray* leftChain,
Int leftEnd,
Int leftCorner,
Real u,
Int& ret_index_mono,
Int& ret_index_pass);
-void findBotRightSegment(vertexArray* rightChain,
+void findBotRightSegment(vertexArray* rightChain,
Int rightEnd,
Int rightCorner,
Real u,
@@ -63,7 +63,7 @@ void sampleBotRightWithGridLinePost(Real* botVertex,
primStream* pStream);
-void sampleBotRightWithGridLine(Real* botVertex,
+void sampleBotRightWithGridLine(Real* botVertex,
vertexArray* rightChain,
Int rightEnd,
Int rightCorner,
@@ -82,7 +82,7 @@ void sampleBotLeftWithGridLinePost(Real* botVertex,
Int leftCorner,
gridWrap* grid,
Int gridV,
- Int leftU,
+ Int leftU,
Int rightU,
primStream* pStream);
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc b/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc
index d01e500..0e89c9f 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -49,7 +49,7 @@
#ifdef NOT_TAKEOUT
-/*notice that we need leftChain because the
+/*notice that we need leftChain because the
*corners could be on the leftChain.
*/
void sampleCompRight(Real* topVertex, Real* botVertex,
@@ -84,8 +84,8 @@ void sampleCompRight(Real* topVertex, Real* botVertex,
midIndex2 = rightChain->findIndexAboveGen(rightGridChain->get_v_value(gridIndex2),
midIndex1, //midIndex1<=midIndex2
rightEndIndex);
- //find gridMidIndex1 so that either it=gridIndex1 when the gridline is
- // at the same height as trim vertex midIndex1, or it is the last one
+ //find gridMidIndex1 so that either it=gridIndex1 when the gridline is
+ // at the same height as trim vertex midIndex1, or it is the last one
//which is strictly above midIndex1.
{
Real temp = rightChain->getVertex(midIndex1)[1];
@@ -99,7 +99,7 @@ void sampleCompRight(Real* topVertex, Real* botVertex,
gridMidIndex1--;
}
}//end of find gridMindIndex1
- //find gridMidIndex2 so that it is the (first one below or equal
+ //find gridMidIndex2 so that it is the (first one below or equal
//midIndex) last one above or equal midIndex2
{
Real temp = rightChain->getVertex(midIndex2)[1];
@@ -112,7 +112,7 @@ void sampleCompRight(Real* topVertex, Real* botVertex,
}
-
+
//to interprete the corner information
Real* cornerTop;
Real* cornerBot;
@@ -138,7 +138,7 @@ void sampleCompRight(Real* topVertex, Real* botVertex,
cornerRightStart = rightStartIndex;
cornerLeftUpEnd = up_rightCornerIndex;
}
-
+
if(down_rightCornerWhere == 2) //right corner is on right chan
{
cornerBot = rightChain->getVertex(down_rightCornerIndex);
@@ -149,7 +149,7 @@ void sampleCompRight(Real* topVertex, Real* botVertex,
{
cornerBot = botVertex;
cornerRightEnd = rightEndIndex;
- cornerLeftDownStart = leftEndIndex+1; //no left
+ cornerLeftDownStart = leftEndIndex+1; //no left
}
else //right corner is on the left chain
{
@@ -245,19 +245,19 @@ void sampleRightSingleTrimEdgeRegionGen(Real topVertex[2], Real botVertex[2],
//append the vertices on the up section of the left chain
for(i=leftUpBegin; i<= leftUpEnd; i++)
vArray.appendVertex(leftChain->getVertex(i));
-
+
//append the vertices of the right extremal grid points,
//and at the same time, perform triangulation for the stair cases
vArray.appendVertex(gridChain->get_vertex(gridBeginIndex));
-
+
for(k=1, i=gridBeginIndex+1; i<= gridEndIndex; i++, k++)
{
vArray.appendVertex(gridChain->get_vertex(i));
-
+
//output the fan of the grid points of the (i)th and (i-1)th grid line.
gridChain->rightEndFan(i, pStream);
}
-
+
//append all the vertices on the down section of the left chain
for(i=leftDownBegin; i<= leftDownEnd; i++)
vArray.appendVertex(leftChain->getVertex(i));
@@ -266,7 +266,7 @@ void sampleRightSingleTrimEdgeRegionGen(Real topVertex[2], Real botVertex[2],
rightChain, rightStart, rightEnd,
pStream);
}
-
+
void sampleRightSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2],
gridBoundaryChain* gridChain,
Int beginIndex,
@@ -282,14 +282,14 @@ void sampleRightSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2],
//output the fan of the grid points of the (i)_th and i-1th gridLine
gridChain->rightEndFan(i, pStream);
}
- monoTriangulation2(upperVert, lowerVert, &vArray, 0, endIndex-beginIndex,
+ monoTriangulation2(upperVert, lowerVert, &vArray, 0, endIndex-beginIndex,
1, //increase chain (to the left)
pStream);
}
-
-/*the gridlines from rightGridChainStartIndex to
- *rightGridChainEndIndex are assumed to form a
+
+/*the gridlines from rightGridChainStartIndex to
+ *rightGridChainEndIndex are assumed to form a
*connected componenet
*the trm vertex of topRightIndex is assumed to be below
*or equal the first gridLine, and the trm vertex of
@@ -297,9 +297,9 @@ void sampleRightSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2],
**there could be multipe trm vertices equal to the last gridline, but
**only one could be equal to top gridline. shape: ____| (recall that
**for left chain recF, we allow shape: |----
- *if botRightIndex= topRightIndex, there is at least one triangles to
+ *Othewise, botRightIndex>= topRightIndex, there is at least one triangles to
*output
*/
void sampleRightStripRecF(vertexArray* rightChain,
@@ -307,7 +307,7 @@ void sampleRightStripRecF(vertexArray* rightChain,
Int botRightIndex,
gridBoundaryChain* rightGridChain,
Int rightGridChainStartIndex,
- Int rightGridChainEndIndex,
+ Int rightGridChainEndIndex,
primStream* pStream
)
{
@@ -315,7 +315,7 @@ void sampleRightStripRecF(vertexArray* rightChain,
//sstop conditionL: if topRightIndex > botRightIndex, then stop
if(topRightIndex > botRightIndex)
return;
-
+
//if there is only one grid line, return
if(rightGridChainStartIndex >= rightGridChainEndIndex)
return;
@@ -325,7 +325,7 @@ void sampleRightStripRecF(vertexArray* rightChain,
rightChain->getVertex(botRightIndex)[1] >= rightGridChain->get_v_value(rightGridChainEndIndex));
//firstfind the first trim vertex which is strictly below the second top
- //grid line: index1.
+ //grid line: index1.
Real secondGridChainV = rightGridChain->get_v_value(rightGridChainStartIndex+1);
Int index1 = topRightIndex;
while(rightChain->getVertex(index1)[1] >= secondGridChainV){
@@ -342,12 +342,12 @@ void sampleRightStripRecF(vertexArray* rightChain,
//rightChain->getVertex(index1+1)[1] < secondGridChainV
sampleRightOneGridStep(rightChain, topRightIndex, index1, rightGridChain, rightGridChainStartIndex, pStream);
- //if rightChain->getVertex(index1)[1] ==secondGridChainV then we can
+ //if rightChain->getVertex(index1)[1] ==secondGridChainV then we can
//recurvesively to the rest
if(rightChain->getVertex(index1)[1] == secondGridChainV)
{
-
+
sampleRightStripRecF(rightChain, index1, botRightIndex, rightGridChain, rightGridChainStartIndex+1, rightGridChainEndIndex, pStream);
}
else if(index1 < botRightIndex)
@@ -368,9 +368,9 @@ void sampleRightStripRecF(vertexArray* rightChain,
break;
}
index2--;
-
+
sampleRightSingleTrimEdgeRegion(uppervert, lowervert, rightGridChain, rightGridChainStartIndex+1, index2, pStream);
-
+
//recursion
sampleRightStripRecF(rightChain, index1+1, botRightIndex, rightGridChain, index2, rightGridChainEndIndex, pStream);
}
@@ -384,7 +384,7 @@ void sampleRightOneGridStepNoMiddle(vertexArray* rightChain,
Int rightGridChainStartIndex,
primStream* pStream)
{
- /*since there is no middle, there is at most one point which is on the
+ /*since there is no middle, there is at most one point which is on the
*second grid line, there could be multiple points on the first (top)
*grid line.
*/
@@ -400,7 +400,7 @@ void sampleRightOneGridStepNoMiddle(vertexArray* rightChain,
//sampling the right area in between two grid lines
//shape: _________|
-void sampleRightOneGridStep(vertexArray* rightChain,
+void sampleRightOneGridStep(vertexArray* rightChain,
Int beginRightIndex,
Int endRightIndex,
gridBoundaryChain* rightGridChain,
@@ -424,13 +424,13 @@ void sampleRightOneGridStep(vertexArray* rightChain,
float vert1[2];
float vert2[2];
Int i;
-
+
Int innerInd = rightGridChain->getInnerIndex(rightGridChainStartIndex+1);
Int upperInd = rightGridChain->getUlineIndex(rightGridChainStartIndex);
Int lowerInd = rightGridChain->getUlineIndex(rightGridChainStartIndex+1);
Real upperV = rightGridChain->get_v_value(rightGridChainStartIndex);
Real lowerV = rightGridChain->get_v_value(rightGridChainStartIndex+1);
-
+
//the upper gridline
vert1[1]=vert2[1]=upperV;
for(i=upperInd;
@@ -446,7 +446,7 @@ void sampleRightOneGridStep(vertexArray* rightChain,
else
poly->insert(dline);
}
-
+
//the vertical grid line segment
vert1[0]=vert2[0] = grid->get_u_value(innerInd);
vert1[1]=upperV;
@@ -457,7 +457,7 @@ void sampleRightOneGridStep(vertexArray* rightChain,
poly = dline;
else
poly->insert(dline);
-
+
//the lower grid line
vert1[1]=vert2[1]=lowerV;
for(i=innerInd; iget_u_value(i+1);
sline = new sampledLine(vert1, vert2);
dline = new directedLine(INCREASING, sline);
- poly->insert(dline);
+ poly->insert(dline);
}
//the edge connecting lower grid to right chain
@@ -474,8 +474,8 @@ void sampleRightOneGridStep(vertexArray* rightChain,
sline = new sampledLine(vert1, rightChain->getVertex(endRightIndex));
dline = new directedLine(INCREASING, sline);
poly->insert(dline);
-
-
+
+
//the right Chain
for(i=endRightIndex; i>beginRightIndex; i--)
{
@@ -489,14 +489,14 @@ void sampleRightOneGridStep(vertexArray* rightChain,
vert2[0]=grid->get_u_value(upperInd);
sline = new sampledLine(rightChain->getVertex(beginRightIndex), vert2);
dline = new directedLine(INCREASING, sline);
- poly->insert(dline);
+ poly->insert(dline);
monoTriangulationOpt(poly, pStream);
//clean up
poly->deleteSinglePolygonWithSline();
return;
}
-
+
//this following code cannot be reached, but leave it for debuggig purpose.
Int i;
//find the maximal U-monotone chain of beginRightIndex, beginRightIndex+1,...
@@ -510,20 +510,20 @@ void sampleRightOneGridStep(vertexArray* rightChain,
break;
}
//from beginRightIndex to i-1 is strictly U-monotne
- //if(i-1==beginRightIndex and the vertex of rightchain is on the first
- //gridline, then we should use 2 vertices on the right chain. Of we only
+ //if(i-1==beginRightIndex and the vertex of rightchain is on the first
+ //gridline, then we should use 2 vertices on the right chain. Of we only
//use one (begin), we would output degenrate triangles.
if(i-1 == beginRightIndex && rightChain->getVertex(beginRightIndex)[1] == rightGridChain->get_v_value(rightGridChainStartIndex))
i++;
-
+
Int j = endRightIndex -1;
if(rightGridChain->getInnerIndex(rightGridChainStartIndex+1) < rightGridChain->getUlineIndex(rightGridChainStartIndex+1))
{
j = rightChain->findDecreaseChainFromEnd(i-1/*beginRightIndex*/, endRightIndex);
Int temp = endRightIndex;
//now from j+1 to end is strictly U-monotone.
- //if j+1 is on the last grid line, then we wat to skip to the vertex
- //whcih is strictly above the second grid line. This vertex must exist
+ //if j+1 is on the last grid line, then we wat to skip to the vertex
+ //whcih is strictly above the second grid line. This vertex must exist
//since there is a middle vertex
if(j+1 == endRightIndex)
{
@@ -567,7 +567,7 @@ void sampleRightOneGridStep(vertexArray* rightChain,
vert[0][1] = rightGridChain->get_v_value(rightGridChainStartIndex);
vert[1][1] = rightGridChain->get_v_value(rightGridChainStartIndex+1);
- monoTriangulation2(&vert[0][0],
+ monoTriangulation2(&vert[0][0],
&vert[1][0],
rightChain,
i-1,
@@ -575,10 +575,10 @@ void sampleRightOneGridStep(vertexArray* rightChain,
0, ///a decreae chain
pStream);
}
-
-#endif
-void stripOfFanRight(vertexArray* rightChain,
+#endif
+
+void stripOfFanRight(vertexArray* rightChain,
Int largeIndex,
Int smallIndex,
gridWrap* grid,
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h b/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h
index 4670b87..50b6af3 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h
@@ -36,7 +36,7 @@
#define NOT_TAKEOUT
#include "sampleMonoPoly.h"
-void stripOfFanRight(vertexArray* rightChain,
+void stripOfFanRight(vertexArray* rightChain,
Int largeIndex,
Int smallIndex,
gridWrap* grid,
@@ -53,7 +53,7 @@ void sampleRightStripRecF(vertexArray* rightChain,
Int botRightIndex,
gridBoundaryChain* rightGridChain,
Int rightGridChainStartIndex,
- Int rightGridChainEndIndex,
+ Int rightGridChainEndIndex,
primStream* pStream
);
//the degenerate case of sampleRightOneGridStep
@@ -65,7 +65,7 @@ void sampleRightOneGridStepNoMiddle(vertexArray* rightChain,
primStream* pStream);
//sampling the right area in between two grid lines
//shape: _________|
-void sampleRightOneGridStep(vertexArray* rightChain,
+void sampleRightOneGridStep(vertexArray* rightChain,
Int beginRightIndex,
Int endRightIndex,
gridBoundaryChain* rightGridChain,
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc b/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc
index 951e937..a975d4a 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -96,7 +96,7 @@ void findTopRightSegment(vertexArray* rightChain,
{
for(i=ret_index_large; i>rightStart;i--)
{
- if(rightChain->getVertex(i-1)[0] >= rightChain->getVertex(i)[0])
+ if(rightChain->getVertex(i-1)[0] >= rightChain->getVertex(i)[0])
break;
}
ret_index_small = i;
@@ -141,7 +141,7 @@ monoTriangulationRecGenOpt(tempTop, tempBot,
*/
}
-
+
//the possible section which is strictly Umonotone
if(segIndexLarge >= rightStart)
{
@@ -266,7 +266,7 @@ void sampleTopLeftWithGridLinePost(Real* topVertex,
Real tempBot[2];
tempBot[0] = grid->get_u_value(midU);
tempBot[1] = grid->get_v_value(gridV);
- monoTriangulation2(topVertex, tempBot, leftChain, leftStart, segIndexSmall, 1, pStream);
+ monoTriangulation2(topVertex, tempBot, leftChain, leftStart, segIndexSmall, 1, pStream);
}
else //not optimize
{
@@ -279,9 +279,9 @@ void sampleTopLeftWithGridLinePost(Real* topVertex,
}
}
else //the topVertex forms a fan with the grid points
- grid->outputFanWithPoint(gridV, leftU, rightU, topVertex, pStream);
-}
-
+ grid->outputFanWithPoint(gridV, leftU, rightU, topVertex, pStream);
+}
+
void sampleTopLeftWithGridLine(Real* topVertex,
vertexArray* leftChain,
@@ -295,7 +295,7 @@ void sampleTopLeftWithGridLine(Real* topVertex,
)
{
Int segIndexSmall = 0, segIndexLarge;
- //if left chain is empty, then there is only one top vertex with one grid
+ //if left chain is empty, then there is only one top vertex with one grid
// line
if(leftEnd < leftStart) {
grid->outputFanWithPoint(gridV, leftU, rightU, topVertex, pStream);
@@ -318,10 +318,10 @@ void sampleTopLeftWithGridLine(Real* topVertex,
gridV,
leftU,
rightU,
- pStream);
+ pStream);
}
-
-
+
+
//return 1 if saprator exits, 0 otherwise
Int findTopSeparator(vertexArray* leftChain,
Int leftStartIndex,
@@ -332,7 +332,7 @@ Int findTopSeparator(vertexArray* leftChain,
Int& ret_sep_left,
Int& ret_sep_right)
{
-
+
Int oldLeftI, oldRightI, newLeftI, newRightI;
Int i,j,k;
Real leftMax /*= leftChain->getVertex(leftEndIndex)[0]*/;
@@ -348,15 +348,15 @@ Int findTopSeparator(vertexArray* leftChain,
{
oldLeftI = leftEndIndex;
oldRightI = rightEndIndex+1;
- leftMax = leftChain->getVertex(leftEndIndex)[0];
- rightMin = rightChain->getVertex(rightEndIndex)[0] + Real(1.0);
+ leftMax = leftChain->getVertex(leftEndIndex)[0];
+ rightMin = rightChain->getVertex(rightEndIndex)[0] + Real(1.0);
}
-
- //i: the current working leftChain index,
+
+ //i: the current working leftChain index,
//j: the current working rightChain index,
//if left(i) is higher than right(j), then the two chains beloew right(j) are separated.
//else the two chains below left(i) are separeated.
- i=leftEndIndex;
+ i=leftEndIndex;
j=rightEndIndex;
while(1)
{
@@ -403,7 +403,7 @@ Int findTopSeparator(vertexArray* leftChain,
{
if(leftChain->getVertex(i)[0] > leftMax) //update leftMax and newLeftI.
{
- leftMax = leftChain->getVertex(i)[0];
+ leftMax = leftChain->getVertex(i)[0];
newLeftI = i;
}
for(k=j-1; k>= rightStartIndex; k--) //update rightMin and newRightI.
@@ -443,7 +443,7 @@ Int findTopSeparator(vertexArray* leftChain,
}
}
i = k; //next working i, since i will be higher than j next loop
-
+
if(leftMax >= rightMin) //there is a conflict
break;
else //still no conflict
@@ -464,7 +464,7 @@ Int findTopSeparator(vertexArray* leftChain,
}
}
-
+
void sampleCompTop(Real* topVertex,
vertexArray* leftChain,
Int leftStartIndex,
@@ -543,7 +543,7 @@ void sampleCompTop(Real* topVertex,
up_leftCornerIndex,
up_rightCornerWhere,
up_rightCornerIndex,
- pStream);
+ pStream);
}
else //up_leftCornerWhere == 0, up_rightCornerWhere == 2.
{
@@ -559,7 +559,7 @@ void sampleCompTop(Real* topVertex,
up_leftCornerIndex,
up_rightCornerWhere,
up_rightCornerIndex,
- pStream);
+ pStream);
return;
#ifdef NOT_REACHABLE //code is not reachable, for test purpose only
//the following code is trying to do some optimization, but not quite working, also see sampleCompBot.C:
@@ -614,8 +614,8 @@ void sampleCompTop(Real* topVertex,
{
valid = 0;
}
- }
-
+ }
+
if(! valid)
{
sampleCompTopSimple(topVertex,
@@ -630,7 +630,7 @@ void sampleCompTop(Real* topVertex,
up_leftCornerIndex,
up_rightCornerWhere,
up_rightCornerIndex,
- pStream);
+ pStream);
}
else
{
@@ -674,8 +674,8 @@ void sampleCompTop(Real* topVertex,
up_leftCornerIndex,
leftGridChain->get_u_value(gridIndex1),
segLeftSmall,
- segLeftLarge);
- assert(segLeftLarge >= sep_left);
+ segLeftLarge);
+ assert(segLeftLarge >= sep_left);
monoTriangulation2(leftChain->getVertex(segLeftLarge),
leftGridChain->get_vertex(gridIndex1),
leftChain,
@@ -684,7 +684,7 @@ void sampleCompTop(Real* topVertex,
1, //a increase chain,
pStream);
- stripOfFanLeft(leftChain, segLeftLarge, segLeftSmall,
+ stripOfFanLeft(leftChain, segLeftLarge, segLeftSmall,
leftGridChain->getGrid(),
leftGridChain->getVlineIndex(gridIndex1),
leftGridChain->getUlineIndex(gridIndex1),
@@ -695,7 +695,7 @@ void sampleCompTop(Real* topVertex,
monoTriangulationRecGen(topVertex, rightGridChain->get_vertex(gridIndex1),
leftChain, leftStartIndex, segLeftSmall,
rightChain, rightStartIndex, up_rightCornerIndex,
- pStream);
+ pStream);
}//end left in right out
else if(rightChain->getVertex(sep_right)[0] <= rightGridChain->get_u_value(gridIndex1))
{
@@ -743,7 +743,7 @@ void sampleCompTop(Real* topVertex,
up_leftCornerIndex,
up_rightCornerWhere,
up_rightCornerIndex,
- pStream);
+ pStream);
}//end leftout, right out
}//end if separator exixts.
else //no separator
@@ -767,7 +767,7 @@ void sampleCompTop(Real* topVertex,
}//end if 0,2
}//end if the function
-
+
static void sampleCompTopSimpleOpt(gridWrap* grid,
Int gridV,
Real* topVertex, Real* botVertex,
@@ -790,15 +790,15 @@ static void sampleCompTopSimpleOpt(gridWrap* grid,
dec_chain, dec_current, dec_end,
pStream);
return;
- }
+ }
Int i,j,k;
Real currentV = grid->get_v_value(gridV+1);
if(inc_chain->getVertex(inc_end)[1] <= currentV &&
dec_chain->getVertex(dec_end)[1] < currentV)
{
- //find i bottom up so that inc_chain[i]<= curentV and inc_chain[i-1] > currentV,
+ //find i bottom up so that inc_chain[i]<= curentV and inc_chain[i-1] > currentV,
//find j botom up so that dec_chain[j] < currentV and dec_chain[j-1] >= currentV
- for(i=inc_end; i >= inc_current; i--)
+ for(i=inc_end; i >= inc_current; i--)
{
if(inc_chain->getVertex(i)[1] > currentV)
break;
@@ -860,7 +860,7 @@ static void sampleCompTopSimpleOpt(gridWrap* grid,
//we know that inc_chain[i] > dec_chain[j]
//we know that inc_chain[k-1][1] > dec_chain[j][1]
//we know that inc_chain[k][1] <= dec_chain[j][1]
- //so we find l between [i,k-1] so that
+ //so we find l between [i,k-1] so that
//inc_chain[l][0] is the closet to dec_chain[j][0]
int tempI = i;
int l;
@@ -872,7 +872,7 @@ static void sampleCompTopSimpleOpt(gridWrap* grid,
tempMin = (Real)fabs(inc_chain->getVertex(l)[0] - dec_chain->getVertex(j)[0]);
tempI = l;
}
- }
+ }
//inc_chain[tempI] and dec_chain[j] are connected
@@ -888,7 +888,7 @@ static void sampleCompTopSimpleOpt(gridWrap* grid,
inc_chain, inc_current, tempI,
dec_chain, dec_current, j-1,
pStream);
- }
+ }
}
else //go to the next higher gridV
{
@@ -900,7 +900,7 @@ static void sampleCompTopSimpleOpt(gridWrap* grid,
pStream);
}
}
-
+
void sampleCompTopSimple(Real* topVertex,
vertexArray* leftChain,
Int leftStartIndex,
@@ -921,7 +921,7 @@ void sampleCompTopSimple(Real* topVertex,
Real* ActualBot;
Int ActualLeftStart, ActualLeftEnd;
Int ActualRightStart, ActualRightEnd;
-
+
//creat an array to store the points on the grid line
gridWrap* grid = leftGridChain->getGrid();
Int gridV = leftGridChain->getVlineIndex(gridIndex1);
@@ -930,7 +930,7 @@ void sampleCompTopSimple(Real* topVertex,
Real2* gridPoints = (Real2*) malloc(sizeof(Real2) * (gridRightU - gridLeftU +1));
assert(gridPoints);
-
+
for(k=0, i=gridRightU; i>= gridLeftU; i--, k++)
{
gridPoints[k][0] = grid->get_u_value(i);
@@ -941,44 +941,44 @@ void sampleCompTopSimple(Real* topVertex,
ActualRightStart = rightStartIndex;
else
ActualRightStart = up_leftCornerIndex+1; //up_leftCornerIndex will be the ActualTop
-
+
if(up_rightCornerWhere != 2) //right corner is not on right chain
ActualRightEnd = rightStartIndex-1; //meaning that there is no actual rigth section
else
ActualRightEnd = up_rightCornerIndex;
-
+
vertexArray ActualRightChain(max(0, ActualRightEnd-ActualRightStart+1) + gridRightU-gridLeftU+1);
for(i=ActualRightStart; i<= ActualRightEnd; i++)
ActualRightChain.appendVertex(rightChain->getVertex(i));
for(i=0; igetVertex(up_rightCornerIndex);
else
ActualTop = topVertex;
}
- else if(up_leftCornerWhere == 1)
+ else if(up_leftCornerWhere == 1)
ActualTop = topVertex;
else //up_leftCornerWhere == 2
ActualTop = rightChain->getVertex(up_leftCornerIndex);
-
+
ActualBot = gridPoints[gridRightU - gridLeftU];
-
+
@@ -993,7 +993,7 @@ void sampleCompTopSimple(Real* topVertex,
ActualRightChain.getNumElements()-1,
pStream);
*/
-
+
sampleCompTopSimpleOpt(grid, gridV,
ActualTop, leftChain->getVertex(ActualLeftEnd),
leftChain,
@@ -1002,7 +1002,7 @@ void sampleCompTopSimple(Real* topVertex,
0,
ActualRightChain.getNumElements()-1,
pStream);
-
+
}
else
{
@@ -1013,7 +1013,7 @@ void sampleCompTopSimple(Real* topVertex,
0, ActualRightChain.getNumElements()-2, //the last is the bot.
pStream);
*/
-
+
sampleCompTopSimpleOpt(grid, gridV,
ActualTop, ActualBot, leftChain,
ActualLeftStart, ActualLeftEnd,
@@ -1021,10 +1021,10 @@ void sampleCompTopSimple(Real* topVertex,
0, ActualRightChain.getNumElements()-2, //the last is the bot.
pStream);
-
+
}
free(gridPoints);
-
-}
-
+
+}
+
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc b/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc
index 051f241..241ee62 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -159,7 +159,7 @@ void triangulateConvexPolyVertical(directedLine* topV, directedLine* botV, primS
free(rightVerts);
free(temp_leftVerts);
free(temp_rightVerts);
-}
+}
void triangulateConvexPolyHoriz(directedLine* leftV, directedLine* rightV, primStream *pStream)
{
@@ -206,7 +206,7 @@ void triangulateConvexPolyHoriz(directedLine* leftV, directedLine* rightV, primS
triangulateXYMono(n_upperVerts, upperVerts, n_lowerVerts, lowerVerts, pStream);
free(lowerVerts);
free(upperVerts);
-}
+}
void triangulateConvexPoly(directedLine* polygon, Int ulinear, Int vlinear, primStream* pStream)
{
/*find left, right, top , bot
@@ -260,11 +260,11 @@ void triangulateConvexPoly(directedLine* polygon, Int ulinear, Int vlinear, prim
else
triangulateConvexPolyVertical(topV, botV, pStream);
}
-}
+}
/*for debug purpose*/
void drawCorners(
- Real* topV, Real* botV,
+ Real* topV, Real* botV,
vertexArray* leftChain,
vertexArray* rightChain,
gridBoundaryChain* leftGridChain,
@@ -319,7 +319,7 @@ void drawCorners(
Real botGridV = leftGridChain->get_v_value(gridIndex2);
Real botGridU1 = leftGridChain->get_u_value(gridIndex2);
Real botGridU2 = rightGridChain->get_u_value(gridIndex2);
-
+
glBegin(GL_LINE_STRIP);
glVertex2fv(leftCornerV);
glVertex2f(topGridU1, topGridV);
@@ -342,9 +342,9 @@ void drawCorners(
}
-
+
void toVertexArrays(directedLine* topV, directedLine* botV, vertexArray& leftChain, vertexArray& rightChain)
-{
+{
Int i;
directedLine* tempV;
for(i=1; i<=topV->get_npoints()-2; i++) { /*the first vertex is the top vertex which doesn't belong to inc_chain*/
@@ -355,7 +355,7 @@ void toVertexArrays(directedLine* topV, directedLine* botV, vertexArray& leftCha
for(i=0; i<=tempV->get_npoints()-2; i++){
leftChain.appendVertex(tempV->getVertex(i));
}
- }
+ }
for(tempV = topV->getPrev(); tempV != botV; tempV = tempV->getPrev())
{
@@ -363,7 +363,7 @@ void toVertexArrays(directedLine* topV, directedLine* botV, vertexArray& leftCha
rightChain.appendVertex(tempV->getVertex(i));
}
}
- for(i=botV->get_npoints()-2; i>=1; i--){
+ for(i=botV->get_npoints()-2; i>=1; i--){
rightChain.appendVertex(tempV->getVertex(i));
}
}
@@ -384,8 +384,8 @@ void findTopAndBot(directedLine* polygon, directedLine*& topV, directedLine*& bo
}
}
}
-
-void findGridChains(directedLine* topV, directedLine* botV,
+
+void findGridChains(directedLine* topV, directedLine* botV,
gridWrap* grid,
gridBoundaryChain*& leftGridChain,
gridBoundaryChain*& rightGridChain)
@@ -427,7 +427,7 @@ void findGridChains(directedLine* topV, directedLine* botV,
free(rightGridInnerIndices);
}
-void findDownCorners(Real *botVertex,
+void findDownCorners(Real *botVertex,
vertexArray *leftChain, Int leftChainStartIndex, Int leftChainEndIndex,
vertexArray *rightChain, Int rightChainStartIndex, Int rightChainEndIndex,
Real v,
@@ -442,7 +442,7 @@ void findDownCorners(Real *botVertex,
#ifdef MYDEBUG
printf("*************enter find donw corner\n");
printf("finddownCorner: v=%f, uleft=%f, uright=%f\n", v, uleft, uright);
-printf("(%i,%i,%i,%i)\n", leftChainStartIndex, leftChainEndIndex,rightChainStartIndex, rightChainEndIndex);
+printf("(%i,%i,%i,%i)\n", leftChainStartIndex, leftChainEndIndex,rightChainStartIndex, rightChainEndIndex);
printf("left chain is\n");
leftChain->print();
printf("right chain is\n");
@@ -490,7 +490,7 @@ rightChain->print();
}
- //we consider whether we can use botVertex as left corner. First check
+ //we consider whether we can use botVertex as left corner. First check
//if (leftGirdPoint, botVertex) interesects right chian or not.
if(DBG_intersectChain(rightChain, rightChainStartIndex,rightChainEndIndex,
leftGridPoint, botVertex))
@@ -510,7 +510,7 @@ rightChain->print();
{
ret_leftCornerWhere = 0; /*left chain*/
ret_leftCornerIndex = index1;
-
+
/*find the vertex on the left chain with the maximum u,
*either this vertex or the botvertex can be used as the right corner
*/
@@ -518,7 +518,7 @@ rightChain->print();
Int tempI;
//skip those points which are equal to v. (avoid degeneratcy)
for(tempI = index1; tempI <= leftChainEndIndex; tempI++)
- if(leftChain->getVertex(tempI)[1] < v)
+ if(leftChain->getVertex(tempI)[1] < v)
break;
if(tempI > leftChainEndIndex)
ret_rightCornerWhere = 1;
@@ -534,7 +534,7 @@ rightChain->print();
- //we consider whether we can use botVertex as a corner. So first we check
+ //we consider whether we can use botVertex as a corner. So first we check
//whether (rightGridPoint, botVertex) interescts the left chain or not.
if(DBG_intersectChain(leftChain, leftChainStartIndex,leftChainEndIndex,
rightGridPoint, botVertex))
@@ -544,7 +544,7 @@ rightChain->print();
}
else if(botVertex[0] > tempMax)
{
-
+
ret_rightCornerWhere = 1;
}
else
@@ -553,7 +553,7 @@ rightChain->print();
ret_rightCornerIndex = tempI;
}
}
-
+
}
else /*index1<=leftChainEndIndex and index2 <=rightChainEndIndex*/
{
@@ -605,13 +605,13 @@ rightChain->print();
{
ret_rightCornerWhere = 2; /*on the right*/
ret_rightCornerIndex = index2;
-
+
Real tempMin;
Int tempI;
-
+
tempI = index2;
tempMin = rightChain->getVertex(index2)[0];
-
+
/*find the minimum u for all the points on the right above the left poitn index1*/
for(i=index2+1; i<= rightChainEndIndex; i++)
{
@@ -624,7 +624,7 @@ rightChain->print();
}
}
- //we consider if we can use leftchain(index1) as left corner.
+ //we consider if we can use leftchain(index1) as left corner.
//we check if (leftChain(index1) intersects right chian or not
if(DBG_intersectChain(rightChain, rightChainStartIndex, rightChainEndIndex, leftGridPoint, leftChain->getVertex(index1)))
{
@@ -632,7 +632,7 @@ rightChain->print();
ret_leftCornerIndex = index2; //should use tempI???
}
else if(tempMin <= leftChain->getVertex(index1)[0] ||
- tempMin <= uleft)
+ tempMin <= uleft)
{
ret_leftCornerWhere = 2; /* on right chain*/
ret_leftCornerIndex = tempI;
@@ -648,7 +648,7 @@ rightChain->print();
}
-void findUpCorners(Real *topVertex,
+void findUpCorners(Real *topVertex,
vertexArray *leftChain, Int leftChainStartIndex, Int leftChainEndIndex,
vertexArray *rightChain, Int rightChainStartIndex, Int rightChainEndIndex,
Real v,
@@ -680,7 +680,7 @@ printf("***********enter findUpCorners\n");
index2 = rightChain->findIndexFirstAboveEqualGen(v, rightChainStartIndex, rightChainEndIndex);
- if(index2>= leftChainStartIndex) //index2 was found above
+ if(index2>= leftChainStartIndex) //index2 was found above
index2 = rightChain->skipEqualityFromStart(v, index2, rightChainEndIndex);
if(index1=leftChainStartIndex*/
{
ret_leftCornerWhere = 0; /*left chain*/
ret_leftCornerIndex = index1;
-
+
//find the maximum u on the left top section. either that or topvertex, or left[index1] is the right corner
Real tempMax = leftChain->getVertex(index1)[0];
Int tempI = index1;
@@ -803,13 +803,13 @@ printf("***********enter findUpCorners\n");
{
ret_rightCornerWhere = 2; /*on the right*/
ret_rightCornerIndex = index2;
-
+
Real tempMin;
Int tempI;
-
+
tempI = index2;
tempMin = rightChain->getVertex(index2)[0];
-
+
/*find the minimum u for all the points on the right below the left poitn index1*/
for(i=index2-1; i>= rightChainStartIndex; i--)
{
@@ -821,7 +821,7 @@ printf("***********enter findUpCorners\n");
tempMin = rightChain->getVertex(i)[0];
}
}
- //check whether (leftGRidPoint,left(index1)) interesect right chain
+ //check whether (leftGRidPoint,left(index1)) interesect right chain
if(DBG_intersectChain(rightChain, rightChainStartIndex, rightChainEndIndex,
leftGridPoint, leftChain->getVertex(index1)))
{
@@ -852,7 +852,7 @@ Int findNeckF(vertexArray *leftChain, Int botLeftIndex,
gridBoundaryChain* leftGridChain,
gridBoundaryChain* rightGridChain,
Int gridStartIndex,
- Int& neckLeft,
+ Int& neckLeft,
Int& neckRight)
{
/*
@@ -870,26 +870,26 @@ rightChain->print();
if(botLeftIndex >= leftChain->getNumElements() ||
botRightIndex >= rightChain->getNumElements())
return 0; //no neck exists
-
- v=min(leftChain->getVertex(botLeftIndex)[1], rightChain->getVertex(botRightIndex)[1]);
-
+ v=min(leftChain->getVertex(botLeftIndex)[1], rightChain->getVertex(botRightIndex)[1]);
+
+
for(i=gridStartIndex; iget_v_value(i) <= v &&
+ if(leftGridChain->get_v_value(i) <= v &&
leftGridChain->getUlineIndex(i)<= rightGridChain->getUlineIndex(i))
break;
-
+
lowerGridIndex = i;
if(lowerGridIndex == n_vlines) //the two trm vertex are higher than all gridlines
return 0;
- else
+ else
{
Int botLeft2, botRight2;
/*
-printf("leftGridChain->get_v_)value=%f\n",leftGridChain->get_v_value(lowerGridIndex), botLeftIndex);
+printf("leftGridChain->get_v_)value=%f\n",leftGridChain->get_v_value(lowerGridIndex), botLeftIndex);
printf("leftChain->get_vertex(0)=(%f,%f)\n", leftChain->getVertex(0)[0],leftChain->getVertex(0)[1]);
printf("leftChain->get_vertex(1)=(%f,%f)\n", leftChain->getVertex(1)[0],leftChain->getVertex(1)[1]);
printf("leftChain->get_vertex(2)=(%f,%f)\n", leftChain->getVertex(2)[0],leftChain->getVertex(2)[1]);
@@ -932,44 +932,44 @@ printf("leftChain->getNumElements=%i\n", leftChain->getNumElements());
return 1;
}
}
-
-
-
+
+
+
/*find i>=botLeftIndex,j>=botRightIndex so that
*(leftChain[i], rightChain[j]) is a neck.
*/
-void findNeck(vertexArray *leftChain, Int botLeftIndex,
- vertexArray *rightChain, Int botRightIndex,
+void findNeck(vertexArray *leftChain, Int botLeftIndex,
+ vertexArray *rightChain, Int botRightIndex,
Int& leftLastIndex, /*left point of the neck*/
Int& rightLastIndex /*right point of the neck*/
)
{
assert(botLeftIndex < leftChain->getNumElements() &&
botRightIndex < rightChain->getNumElements());
-
+
/*now the neck exists for sure*/
if(leftChain->getVertex(botLeftIndex)[1] <= rightChain->getVertex(botRightIndex)[1]) //left below right
{
leftLastIndex = botLeftIndex;
-
+
/*find i so that rightChain[i][1] >= leftchainbotverte[1], and i+1<
*/
- rightLastIndex=rightChain->findIndexAboveGen(leftChain->getVertex(botLeftIndex)[1], botRightIndex+1, rightChain->getNumElements()-1);
+ rightLastIndex=rightChain->findIndexAboveGen(leftChain->getVertex(botLeftIndex)[1], botRightIndex+1, rightChain->getNumElements()-1);
}
else //left above right
{
rightLastIndex = botRightIndex;
-
- leftLastIndex = leftChain->findIndexAboveGen(rightChain->getVertex(botRightIndex)[1],
+
+ leftLastIndex = leftChain->findIndexAboveGen(rightChain->getVertex(botRightIndex)[1],
botLeftIndex+1,
leftChain->getNumElements()-1);
}
}
-
-
+
+
void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_innerIndices)
{
@@ -993,7 +993,7 @@ void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGrid
/*initialization to make vtail bigger than grid->...*/
directedLine* dLine = topEdge;
- Real vtail = grid->get_v_value(firstGridIndex) + 1.0;
+ Real vtail = grid->get_v_value(firstGridIndex) + 1.0;
Real tempMaxU = grid->get_u_min();
@@ -1006,7 +1006,7 @@ void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGrid
/*check whether this grid line is below the current trim edge.*/
if(vtail > grid_v_value)
{
- /*since the grid line is below the trim edge, we
+ /*since the grid line is below the trim edge, we
*find the trim edge which will contain the trim line
*/
while( (vtail=dLine->tail()[1]) > grid_v_value){
@@ -1032,7 +1032,7 @@ void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGrid
{
uinterc = slop * (grid_v_value - vtail) + dLine->tail()[0];
}
-
+
tempMaxU = max(tempMaxU, uinterc);
if(uinterc < uMin && uinterc >= uMin - ZERO)
@@ -1059,7 +1059,7 @@ void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGrid
tempMaxU = uinterc;
}
#ifdef SHORTEN_GRID_LINE
- //for each grid line, compare the left grid point with the
+ //for each grid line, compare the left grid point with the
//intersection point. If the two points are too close, then
//we should move the grid point one grid to the right
//and accordingly we should update the inner index.
@@ -1124,7 +1124,7 @@ void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGri
/*check whether this grid line is below the current trim edge.*/
if(vhead >= grid_v_value)
{
- /*since the grid line is below the tail of the trim edge, we
+ /*since the grid line is below the tail of the trim edge, we
*find the trim edge which will contain the trim line
*/
while( (vhead=dLine->head()[1]) > grid_v_value){
@@ -1135,7 +1135,7 @@ void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGri
/*skip the equality in the case of degenerat case: horizontal */
while(dLine->head()[1] == grid_v_value)
dLine = dLine->getPrev();
-
+
assert( dLine->tail()[1] != dLine->head()[1]);
slop = (dLine->tail()[0] - dLine->head()[0]) / (dLine->tail()[1]-dLine->head()[1]);
/*
@@ -1158,11 +1158,11 @@ void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGri
#ifdef SHORTEN_GRID_LINE
uintercBuf[k] = uinterc;
-#endif
+#endif
tempMinU = min(tempMinU, uinterc);
- assert(uinterc >= uMin && uinterc <= uMax);
+ assert(uinterc >= uMin && uinterc <= uMax);
if(uinterc == uMin)
ret_indices[k] = 0;
@@ -1174,7 +1174,7 @@ if(ret_indices[k] >= grid->get_n_ulines())
printf("ERROR3\n");
exit(0);
}
-if(ret_indices[k] < 0)
+if(ret_indices[k] < 0)
{
printf("ERROR4\n");
exit(0);
@@ -1185,7 +1185,7 @@ if(ret_indices[k] < 0)
tempMinU = uinterc;
}
#ifdef SHORTEN_GRID_LINE
- //for each grid line, compare the left grid point with the
+ //for each grid line, compare the left grid point with the
//intersection point. If the two points are too close, then
//we should move the grid point one grid to the right
//and accordingly we should update the inner index.
@@ -1228,10 +1228,10 @@ exit(0);
if(grid->get_n_ulines() == 2 ||
grid->get_n_vlines() == 2)
-{
+{
if(ulinear && grid->get_n_ulines() == 2)
{
- monoTriangulationFun(polygon, compV2InY, pStream);
+ monoTriangulationFun(polygon, compV2InY, pStream);
return;
}
else if(DBG_isConvex(polygon) && polygon->numEdges() >=4)
@@ -1253,7 +1253,7 @@ if(grid->get_n_ulines() == 2 ||
monoTriangulationFun(polygon, compV2InX, pStream);
free(cusps);
- return;
+ return;
}
else if(n_cusps == 1) //one interior cusp
{
@@ -1277,7 +1277,7 @@ if(grid->get_n_ulines() == 2 ||
directedLine* ret_p1;
directedLine* ret_p2;
- new_polygon->connectDiagonal_2slines(new_polygon, other,
+ new_polygon->connectDiagonal_2slines(new_polygon, other,
&ret_p1,
&ret_p2,
new_polygon);
@@ -1285,8 +1285,8 @@ if(grid->get_n_ulines() == 2 ||
monoTriangulationFun(ret_p1, compV2InX, pStream);
monoTriangulationFun(ret_p2, compV2InX, pStream);
- ret_p1->deleteSinglePolygonWithSline();
- ret_p2->deleteSinglePolygonWithSline();
+ ret_p1->deleteSinglePolygonWithSline();
+ ret_p2->deleteSinglePolygonWithSline();
free(cusps);
return;
@@ -1315,7 +1315,7 @@ if(grid->get_n_ulines() == 2 ||
botV = tempV;
}
}
-
+
/*find the first(top) and the last (bottom) grid line which intersect the
*this polygon
*/
@@ -1366,7 +1366,7 @@ if(grid->get_n_ulines() == 2 ||
leftChain.appendVertex(tempV->getVertex(i));
}
}
-
+
vertexArray rightChain(20);
for(tempV = topV->getPrev(); tempV != botV; tempV = tempV->getPrev())
{
@@ -1374,7 +1374,7 @@ if(grid->get_n_ulines() == 2 ||
rightChain.appendVertex(tempV->getVertex(i));
}
}
- for(i=botV->get_npoints()-2; i>=1; i--){
+ for(i=botV->get_npoints()-2; i>=1; i--){
rightChain.appendVertex(tempV->getVertex(i));
}
@@ -1401,12 +1401,12 @@ if(grid->get_n_ulines() == 2 ||
void sampleMonoPolyRec(
Real* topVertex,
Real* botVertex,
- vertexArray* leftChain,
+ vertexArray* leftChain,
Int leftStartIndex,
vertexArray* rightChain,
Int rightStartIndex,
- gridBoundaryChain* leftGridChain,
- gridBoundaryChain* rightGridChain,
+ gridBoundaryChain* leftGridChain,
+ gridBoundaryChain* rightGridChain,
Int gridStartIndex,
primStream* pStream,
rectBlockArray* rbArray)
@@ -1418,7 +1418,7 @@ void sampleMonoPolyRec(
if(topVertex[1] <= botVertex[1])
return;
-
+
/*find i so that the grid line is below the top vertex*/
Int i=gridStartIndex;
while (i < leftGridChain->get_nVlines())
@@ -1448,7 +1448,7 @@ void sampleMonoPolyRec(
{
/*stop recursion, ...*/
/*monotone triangulate it...*/
-// printf("no grid line exists\n");
+// printf("no grid line exists\n");
/*
monoTriangulationRecOpt(topVertex, botVertex, leftChain, leftStartIndex,
rightChain, rightStartIndex, pStream);
@@ -1458,7 +1458,7 @@ if(num_skipped_grid_lines <2)
{
monoTriangulationRecGenOpt(topVertex, botVertex, leftChain, leftStartIndex,
leftChain->getNumElements()-1,
- rightChain, rightStartIndex,
+ rightChain, rightStartIndex,
rightChain->getNumElements()-1,
pStream);
}
@@ -1475,11 +1475,11 @@ else
rightChain, rightStartIndex, pStream);
*/
-/* monoTriangulationRecGenTBOpt(topVertex, botVertex,
+/* monoTriangulationRecGenTBOpt(topVertex, botVertex,
leftChain, leftStartIndex, leftChain->getNumElements()-1,
- rightChain, rightStartIndex, rightChain->getNumElements()-1,
+ rightChain, rightStartIndex, rightChain->getNumElements()-1,
pStream);*/
-
+
}
@@ -1495,11 +1495,11 @@ else
if(index2 >= leftGridChain->get_nVlines())
break;
}
-
+
index2--;
-
-
+
+
/*the neck*/
Int neckLeftIndex;
Int neckRightIndex;
@@ -1530,7 +1530,7 @@ else
rightChain->getNumElements()-1);
/*if either botLeftIndex>= numelements,
* or botRightIndex >= numelemnet,
- *then there is no neck exists. the bottom vertex is botVertex,
+ *then there is no neck exists. the bottom vertex is botVertex,
*/
if(! findNeckF(leftChain, botLeftIndex, rightChain, botRightIndex,
leftGridChain, rightGridChain, index2, neckLeftIndex, neckRightIndex))
@@ -1581,7 +1581,7 @@ glEnd();
{
tempBotVertex = rightChain->getVertex(neckRightIndex);
botLeftIndex = neckLeftIndex;
- botRightIndex = neckRightIndex-1;
+ botRightIndex = neckRightIndex-1;
nextTopVertex = leftChain->getVertex(neckLeftIndex);
nextLeftStartIndex = neckLeftIndex+1;
nextRightStartIndex = neckRightIndex;
@@ -1612,7 +1612,7 @@ glEnd();
down_leftCornerWhere,
down_leftCornerIndex,
down_rightCornerWhere,
- down_rightCornerIndex);
+ down_rightCornerIndex);
#ifdef MYDEBUG
printf("find corners done, down_leftwhere=%i, down_righwhere=%i,\n",down_leftCornerWhere, down_rightCornerWhere );
printf("find corners done, up_leftwhere=%i, up_righwhere=%i,\n",up_leftCornerWhere, up_rightCornerWhere );
@@ -1641,7 +1641,7 @@ glEnd();
sampleConnectedComp(topVertex, tempBotVertex,
- leftChain,
+ leftChain,
leftStartIndex, botLeftIndex,
rightChain,
rightStartIndex, botRightIndex,
@@ -1665,15 +1665,15 @@ glEnd();
sampleMonoPolyRec(
nextTopVertex,
botVertex,
- leftChain,
+ leftChain,
nextLeftStartIndex,
rightChain,
nextRightStartIndex,
- leftGridChain,
- rightGridChain,
+ leftGridChain,
+ rightGridChain,
index2+1,
pStream, rbArray);
-
+
}
@@ -1695,21 +1695,21 @@ void sampleLeftStrip(vertexArray* leftChain,
/*
*(1)find the last grid line which doesn'; pass below
- * this first edge, sample this region: one trim edge and
+ * this first edge, sample this region: one trim edge and
* possily multiple grid lines.
*/
Real *upperVert, *lowerVert; /*the end points of the first trim edge*/
upperVert = leftChain->getVertex(topLeftIndex);
lowerVert = leftChain->getVertex(topLeftIndex+1);
-
+
Int index = leftGridChainStartIndex;
while(leftGridChain->get_v_value(index) >= lowerVert[1]){
index++;
- if(index > leftGridChainEndIndex)
+ if(index > leftGridChainEndIndex)
break;
}
index--;
-
+
sampleLeftSingleTrimEdgeRegion(upperVert, lowerVert,
leftGridChain,
leftGridChainStartIndex,
@@ -1734,7 +1734,7 @@ void sampleLeftStripRec(vertexArray* leftChain,
*/
/*stop condition: if topLeftIndex >= botLeftIndex, then stop.
*/
- if(topLeftIndex >= botLeftIndex)
+ if(topLeftIndex >= botLeftIndex)
return;
/*find the last trim vertex which is above the second top grid line:
@@ -1749,15 +1749,15 @@ void sampleLeftStripRec(vertexArray* leftChain,
while(leftChain->getVertex(index1)[1] > secondGridChainV)
index1++;
index1--;
-
+
sampleLeftOneGridStep(leftChain, topLeftIndex, index1, leftGridChain, leftGridChainStartIndex, pStream);
- /*
- * Let the next trim vertex be nextTrimVertIndex (which should be
+ /*
+ * Let the next trim vertex be nextTrimVertIndex (which should be
* below the second grid line).
* Find the last grid line index2 which is above nextTrimVert.
- * sampleLeftSingleTrimEdgeRegion(uppervert[2], lowervert[2],
+ * sampleLeftSingleTrimEdgeRegion(uppervert[2], lowervert[2],
* leftGridChain, leftGridChainStartIndex+1, index2).
*/
Real *uppervert, *lowervert;
@@ -1774,7 +1774,7 @@ void sampleLeftStripRec(vertexArray* leftChain,
index2--;
sampleLeftSingleTrimEdgeRegion(uppervert, lowervert, leftGridChain, leftGridChainStartIndex+1, index2, pStream);
- /* sampleLeftStripRec(leftChain,
+ /* sampleLeftStripRec(leftChain,
nextTrimVertIndex,
botLeftIndex,
leftGridChain,
@@ -1784,12 +1784,12 @@ void sampleLeftStripRec(vertexArray* leftChain,
*
*/
sampleLeftStripRec(leftChain, index1+1, botLeftIndex, leftGridChain, index2, leftGridChainEndIndex, pStream);
-
+
}
/***************begin RecF***********************/
-/* the gridlines from leftGridChainStartIndex to
+/* the gridlines from leftGridChainStartIndex to
* leftGridChainEndIndex are assumed to form a
* connected component.
* the trim vertex of topLeftIndex is assumed to
@@ -1813,7 +1813,7 @@ void sampleLeftStripRecF(vertexArray* leftChain,
*/
/*stop condition: if topLeftIndex > botLeftIndex, then stop.
*/
- if(topLeftIndex > botLeftIndex)
+ if(topLeftIndex > botLeftIndex)
return;
/*if there is only one grid Line, return.*/
@@ -1844,12 +1844,12 @@ void sampleLeftStripRecF(vertexArray* leftChain,
*If equality holds, then we should include the vertex index1, otherwise we include only index1-1, to
*perform sampleOneGridStep.
*/
- if(index1>botLeftIndex)
+ if(index1>botLeftIndex)
index1--;
else if(leftChain->getVertex(index1)[1] < secondGridChainV)
index1--;
- /*now we have leftChain->getVertex(index1)[1] >= secondGridChainV, and
+ /*now we have leftChain->getVertex(index1)[1] >= secondGridChainV, and
* leftChain->getVertex(index1+1)[1] <= secondGridChainV
*/
@@ -1871,7 +1871,7 @@ void sampleLeftStripRecF(vertexArray* leftChain,
* let the next trim vertex be nextTrimVertIndex (which should be strictly
* below the second grid line).
* Find the last grid line index2 which is above nextTrimVert.
- * sampleLeftSingleTrimEdgeRegion(uppervert[2], lowervert[2],
+ * sampleLeftSingleTrimEdgeRegion(uppervert[2], lowervert[2],
* leftGridChain, leftGridChainStartIndex+1, index2).
*/
Real *uppervert, *lowervert;
@@ -1879,7 +1879,7 @@ void sampleLeftStripRecF(vertexArray* leftChain,
lowervert = leftChain->getVertex(index1+1); //okay since index1get_v_value(index2) >= lowervert[1])
{
index2++;
@@ -1888,14 +1888,14 @@ void sampleLeftStripRecF(vertexArray* leftChain,
}
index2--;
-
+
sampleLeftSingleTrimEdgeRegion(uppervert, lowervert, leftGridChain, leftGridChainStartIndex+1, index2, pStream);
-
+
/*recursion*/
sampleLeftStripRecF(leftChain, index1+1, botLeftIndex, leftGridChain, index2, leftGridChainEndIndex, pStream);
}
-
+
}
/***************End RecF***********************/
@@ -1912,7 +1912,7 @@ void sampleLeftSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2],
{
Int i,j,k;
- vertexArray vArray(endIndex-beginIndex+1);
+ vertexArray vArray(endIndex-beginIndex+1);
vArray.appendVertex(gridChain->get_vertex(beginIndex));
for(k=1, i=beginIndex+1; i<=endIndex; i++, k++)
@@ -1923,7 +1923,7 @@ void sampleLeftSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2],
*/
if(gridChain->getUlineIndex(i) < gridChain->getUlineIndex(i-1))
{
- pStream->begin();
+ pStream->begin();
pStream->insert(gridChain->get_vertex(i-1));
for(j=gridChain->getUlineIndex(i); j<= gridChain->getUlineIndex(i-1); j++)
pStream->insert(gridChain->getGrid()->get_u_value(j), gridChain->get_v_value(i));
@@ -1937,16 +1937,16 @@ void sampleLeftSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2],
pStream->insert(gridChain->getGrid()->get_u_value(j), gridChain->get_v_value(i-1));
pStream->end(PRIMITIVE_STREAM_FAN);
}
- /*otherwisem, the two are equal, so there is no fan to outout*/
+ /*otherwisem, the two are equal, so there is no fan to outout*/
}
-
- monoTriangulation2(upperVert, lowerVert, &vArray, 0, endIndex-beginIndex,
+
+ monoTriangulation2(upperVert, lowerVert, &vArray, 0, endIndex-beginIndex,
0, /*decreasing chain*/
pStream);
}
-
-/*return i, such that from begin to i-1 the chain is strictly u-monotone.
- */
+
+/*return i, such that from begin to i-1 the chain is strictly u-monotone.
+ */
Int findIncreaseChainFromBegin(vertexArray* chain, Int begin ,Int end)
{
Int i=begin;
@@ -1963,12 +1963,12 @@ Int findIncreaseChainFromBegin(vertexArray* chain, Int begin ,Int end)
}
return i;
}
-
-/*check whether there is a vertex whose v value is strictly
+
+/*check whether there is a vertex whose v value is strictly
*inbetween vup vbelow
*if no middle exists return -1, else return the idnex.
*/
-Int checkMiddle(vertexArray* chain, Int begin, Int end,
+Int checkMiddle(vertexArray* chain, Int begin, Int end,
Real vup, Real vbelow)
{
Int i;
@@ -1979,7 +1979,7 @@ Int checkMiddle(vertexArray* chain, Int begin, Int end,
}
return -1;
}
-
+
/*the degenerat case of sampleLeftOneGridStep*/
void sampleLeftOneGridStepNoMiddle(vertexArray* leftChain,
Int beginLeftIndex,
@@ -1988,7 +1988,7 @@ void sampleLeftOneGridStepNoMiddle(vertexArray* leftChain,
Int leftGridChainStartIndex,
primStream* pStream)
{
- /*since there is no middle, there is at most one point which is on the
+ /*since there is no middle, there is at most one point which is on the
*second grid line, there could be multiple points on the first (top)
*grid line.
*/
@@ -2016,16 +2016,16 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
primStream* pStream
)
{
- if(checkMiddle(leftChain, beginLeftIndex, endLeftIndex,
+ if(checkMiddle(leftChain, beginLeftIndex, endLeftIndex,
leftGridChain->get_v_value(leftGridChainStartIndex),
leftGridChain->get_v_value(leftGridChainStartIndex+1))<0)
-
+
{
-
+
sampleLeftOneGridStepNoMiddle(leftChain, beginLeftIndex, endLeftIndex, leftGridChain, leftGridChainStartIndex, pStream);
return;
}
-
+
//copy into a polygon
{
directedLine* poly = NULL;
@@ -2035,7 +2035,7 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
Real vert1[2];
Real vert2[2];
Int i;
-
+
Int innerInd = leftGridChain->getInnerIndex(leftGridChainStartIndex+1);
Int upperInd = leftGridChain->getUlineIndex(leftGridChainStartIndex);
Int lowerInd = leftGridChain->getUlineIndex(leftGridChainStartIndex+1);
@@ -2064,8 +2064,8 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
if(poly == NULL)
poly = dline;
else
- poly->insert(dline);
-
+ poly->insert(dline);
+
//the left chain
for(i=beginLeftIndex; iget_u_value(i+1);
sline = new sampledLine(vert1, vert2);
dline = new directedLine(INCREASING, sline);
- poly->insert(dline);
+ poly->insert(dline);
}
//the vertical grid line segement
@@ -2104,18 +2104,18 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
poly->deleteSinglePolygonWithSline();
return;
}
-
-
+
+
Int i;
- if(1/*leftGridChain->getUlineIndex(leftGridChainStartIndex) >=
+ if(1/*leftGridChain->getUlineIndex(leftGridChainStartIndex) >=
leftGridChain->getUlineIndex(leftGridChainStartIndex+1)*/
) /*the second grid line is beyond the first one to the left*/
{
- /*find the maximal U-monotone chain
- * of endLeftIndex, endLeftIndex-1, ...,
+ /*find the maximal U-monotone chain
+ * of endLeftIndex, endLeftIndex-1, ...,
*/
i=endLeftIndex;
Real prevU = leftChain->getVertex(i)[0];
@@ -2124,7 +2124,7 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
if( prevU < thisU){
prevU = thisU;
}
- else
+ else
break;
}
/*from endLeftIndex to i+1 is strictly U- monotone */
@@ -2150,7 +2150,7 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
if(j-1 == beginLeftIndex)
{
while(leftChain->getVertex(j-1)[1] == leftGridChain->get_v_value(leftGridChainStartIndex))
- j++;
+ j++;
Real vert[2];
vert[0] = leftGridChain->get_u_value(leftGridChainStartIndex);
@@ -2165,10 +2165,10 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
1,
pStream //increase chain
);
-
+
temp = j-1;
}
-
+
stripOfFanLeft(leftChain, j-1, temp/*beginLeftIndex*/, leftGridChain->getGrid(),
leftGridChain->getVlineIndex(leftGridChainStartIndex),
leftGridChain->getUlineIndex(leftGridChainStartIndex),
@@ -2177,21 +2177,21 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
1 /*the grid line is above the trim line*/
);
}
-
- stripOfFanLeft(leftChain, endLeftIndex, i+1, leftGridChain->getGrid(),
+
+ stripOfFanLeft(leftChain, endLeftIndex, i+1, leftGridChain->getGrid(),
leftGridChain->getVlineIndex(leftGridChainStartIndex+1),
leftGridChain->getUlineIndex(leftGridChainStartIndex+1),
leftGridChain->getInnerIndex(leftGridChainStartIndex+1),
pStream,
0 /*the grid line is below the trim lines*/
);
-
+
/*monotone triangulate the remaining left chain togther with the
*two vertices on the two grid v-lines.
*/
Real vert[2][2];
vert[0][0]=vert[1][0] = leftGridChain->getInner_u_value(leftGridChainStartIndex+1);
- vert[0][1] = leftGridChain->get_v_value(leftGridChainStartIndex);
+ vert[0][1] = leftGridChain->get_v_value(leftGridChainStartIndex);
vert[1][1] = leftGridChain->get_v_value(leftGridChainStartIndex+1);
// vertexArray right(vert, 2);
@@ -2199,7 +2199,7 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
monoTriangulation2(
&vert[0][0], /*top vertex */
&vert[1][0], /*bottom vertex*/
- leftChain,
+ leftChain,
/*beginLeftIndex*/j-1,
i+1,
1, /*an increasing chain*/
@@ -2230,20 +2230,20 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
pStream,
1 /*the grid line is above the trim lines*/
);
- /*monotone triangulate the remaining left chain together with the
+ /*monotone triangulate the remaining left chain together with the
*two vertices on the two grid v-lines.
*/
Real vert[2][2];
vert[0][0]=vert[1][0] = leftGridChain->get_u_value(leftGridChainStartIndex+1);
- vert[0][1] = leftGridChain->get_v_value(leftGridChainStartIndex);
+ vert[0][1] = leftGridChain->get_v_value(leftGridChainStartIndex);
vert[1][1] = leftGridChain->get_v_value(leftGridChainStartIndex+1);
vertexArray right(vert, 2);
monoTriangulation2(
- &vert[0][0], //top vertex
+ &vert[0][0], //top vertex
&vert[1][0], //bottom vertex
- leftChain,
+ leftChain,
i-1,
endLeftIndex,
1, /*an increase chain*/
@@ -2251,7 +2251,7 @@ void sampleLeftOneGridStep(vertexArray* leftChain,
}
}
-
+
/*n_upper>=1
*n_lower>=1
*/
@@ -2275,7 +2275,7 @@ void triangulateXYMono(Int n_upper, Real upperVerts[][2],
j=1;
leftMostV = lowerVerts[0];
}
-
+
while(1)
{
if(i >= n_upper) /*case1: no more in upper*/
@@ -2292,7 +2292,7 @@ void triangulateXYMono(Int n_upper, Real upperVerts[][2],
pStream->end(PRIMITIVE_STREAM_FAN);
}
- break;
+ break;
}
else if(j>= n_lower) /*case2: no more in lower*/
{
@@ -2318,7 +2318,7 @@ void triangulateXYMono(Int n_upper, Real upperVerts[][2],
pStream->begin();
pStream->insert(lowerVerts[j]); /*the origin of this fan*/
- /*find the last k>=i such that
+ /*find the last k>=i such that
*upperverts[k][0] <= lowerverts[j][0]
*/
k=i;
@@ -2359,13 +2359,13 @@ void triangulateXYMono(Int n_upper, Real upperVerts[][2],
pStream->end(PRIMITIVE_STREAM_FAN);
j=k;
leftMostV = lowerVerts[j-1];
- }
+ }
}
}
}
-
-void stripOfFanLeft(vertexArray* leftChain,
+
+void stripOfFanLeft(vertexArray* leftChain,
Int largeIndex,
Int smallIndex,
gridWrap* grid,
@@ -2421,7 +2421,7 @@ void stripOfFanLeft(vertexArray* leftChain,
free(gridVerts);
}
-
+
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h b/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h
index 3a5fa6c..7bff604 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h
+++ b/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h
@@ -42,7 +42,7 @@ void triangulateXYMono(Int n_upper, Real upperVerts[][2],
Int n_lower, Real lowerVerts[][2],
primStream* pStream);
-void stripOfFanLeft(vertexArray* leftChain,
+void stripOfFanLeft(vertexArray* leftChain,
Int largeIndex,
Int smallIndex,
gridWrap* grid,
@@ -93,12 +93,12 @@ void sampleMonoPoly(directedLine* polygon, gridWrap* grid, Int ulinear, Int vlin
void sampleMonoPolyRec(
Real* topVertex,
Real* botVertex,
- vertexArray* leftChain,
+ vertexArray* leftChain,
Int leftStartIndex,
vertexArray* rightChain,
Int rightStartIndex,
- gridBoundaryChain* leftGridChain,
- gridBoundaryChain* rightGridChain,
+ gridBoundaryChain* leftGridChain,
+ gridBoundaryChain* rightGridChain,
Int gridStartIndex,
primStream* pStream,
rectBlockArray* rbArray
@@ -113,20 +113,20 @@ void sampleLeftStripRecF(vertexArray* leftChain,
primStream* pStream
);
-void findUpCorners(Real *topVertex,
- vertexArray *leftChain,
+void findUpCorners(Real *topVertex,
+ vertexArray *leftChain,
Int leftChainStartIndex, Int leftChainEndIndex,
- vertexArray *rightChain,
+ vertexArray *rightChain,
Int rightChainStartIndex, Int rightChainEndIndex,
Real v,
Real uleft,
Real uright,
- Int& ret_leftCornerWhere,
+ Int& ret_leftCornerWhere,
Int& ret_leftCornerIndex,
Int& ret_rightCornerWhere,
Int& ret_rightCornerIndex
);
-void findDownCorners(Real *botVertex,
+void findDownCorners(Real *botVertex,
vertexArray *leftChain, Int leftChainStartIndex, Int leftChainEndIndex,
vertexArray *rightChain, Int rightChainStartIndex, Int rightChainEndIndex,
Real v,
@@ -137,8 +137,8 @@ void findDownCorners(Real *botVertex,
Int& ret_rightCornerWhere,
Int& ret_rightCornerIndex
);
-void findNeck(vertexArray *leftChain, Int botLeftIndex,
- vertexArray *rightChain, Int botRightIndex,
+void findNeck(vertexArray *leftChain, Int botLeftIndex,
+ vertexArray *rightChain, Int botRightIndex,
Int& leftLastIndex, /*left point of the neck*/
Int& rightLastIndex /*right point of the neck*/
);
@@ -148,20 +148,20 @@ Int findNeckF(vertexArray *leftChain, Int botLeftIndex,
gridBoundaryChain* leftGridChain,
gridBoundaryChain* rightGridChain,
Int gridStartIndex,
- Int& neckLeft,
+ Int& neckLeft,
Int& neckRight);
-void findTopAndBot(directedLine* polygon,
- directedLine*& topV,
+void findTopAndBot(directedLine* polygon,
+ directedLine*& topV,
directedLine*& botV);
-void findGridChains(directedLine* top, directedLine* bot,
+void findGridChains(directedLine* top, directedLine* bot,
gridWrap* grid,
gridBoundaryChain*& leftGridChain,
gridBoundaryChain*& rightGridChain);
void toVertexArrays(directedLine* topV, directedLine* botV, vertexArray& leftChain, vertexArray& rightChain);
void drawCorners(
- Real* topV, Real* botV,
+ Real* topV, Real* botV,
vertexArray* leftChain,
vertexArray* rightChain,
gridBoundaryChain* leftGridChain,
@@ -177,7 +177,7 @@ void drawCorners(
Int bot_rightCornerWhere,
Int bot_rightCornerIndex);
-Int checkMiddle(vertexArray* chain, Int begin, Int end,
+Int checkMiddle(vertexArray* chain, Int begin, Int end,
Real vup, Real vbelow);
#endif
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc b/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc
index 89f6c6e..0b70dfb 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/sampledLine.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -42,9 +42,9 @@
#include "zlassert.h"
#include "sampledLine.h"
-void sampledLine::setPoint(Int i, Real p[2])
+void sampledLine::setPoint(Int i, Real p[2])
{
- points[i][0]=p[0];
+ points[i][0]=p[0];
points[i][1]=p[1];
}
@@ -65,7 +65,7 @@ void sampledLine::deleteList()
delete temp;
}
}
-
+
/*space of points[][2] is allocated*/
sampledLine::sampledLine(Int n_points)
@@ -76,7 +76,7 @@ sampledLine::sampledLine(Int n_points)
next = NULL;
}
-/*space of points[][2] is allocated and
+/*space of points[][2] is allocated and
*points are copied
*/
sampledLine::sampledLine(Int n_points, Real2 pts[])
@@ -146,11 +146,11 @@ void sampledLine::tessellate(Real u_reso, Real v_reso)
nv = 1+(Int) (fabs((points[npoints-1][1] - points[0][1])) * v_reso);
if(nu > nv) n = nu;
- else
+ else
n = nv;
if(n<1)
n = 1;
- //du dv could be negative
+ //du dv could be negative
Real du = (points[npoints-1][0] - points[0][0])/n;
Real dv = (points[npoints-1][1] - points[0][1])/n;
Real2 *temp = (Real2*) malloc(sizeof(Real2) * (n+1));
diff --git a/src/glu/sgi/libnurbs/nurbtess/sampledLine.h b/src/glu/sgi/libnurbs/nurbtess/sampledLine.h
index 2cc7269..aa4fb4e 100644
--- a/src/glu/sgi/libnurbs/nurbtess/sampledLine.h
+++ b/src/glu/sgi/libnurbs/nurbtess/sampledLine.h
@@ -61,7 +61,7 @@ class sampledLine{
void tessellateAll(Real u_reso, Real v_reso);
void print();
-
+
sampledLine* next;
};
diff --git a/src/glu/sgi/libnurbs/nurbtess/searchTree.cc b/src/glu/sgi/libnurbs/nurbtess/searchTree.cc
index 1865755..0fe3515 100644
--- a/src/glu/sgi/libnurbs/nurbtess/searchTree.cc
+++ b/src/glu/sgi/libnurbs/nurbtess/searchTree.cc
@@ -6,21 +6,21 @@
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-**
+**
** http://oss.sgi.com/projects/FreeB
-**
+**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-**
+**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
-**
+**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
@@ -67,13 +67,13 @@ void TreeNodeDeleteWholeTree(treeNode* node)
TreeNodeDeleteSingleNode(node);
}
-void TreeNodePrint(treeNode* node,
+void TreeNodePrint(treeNode* node,
void (*keyPrint) (void*))
{
if(node ==NULL) return;
TreeNodePrint(node->left, keyPrint);
keyPrint(node->key);
- TreeNodePrint(node->right, keyPrint);
+ TreeNodePrint(node->right, keyPrint);
}
int TreeNodeDepth(treeNode* root)
@@ -81,7 +81,7 @@ int TreeNodeDepth(treeNode* root)
if(root == NULL) return 0;
else{
int leftdepth = TreeNodeDepth(root->left);
- int rightdepth = TreeNodeDepth(root->right);
+ int rightdepth = TreeNodeDepth(root->right);
return 1 + max(leftdepth, rightdepth);
}
}
@@ -90,16 +90,16 @@ int TreeNodeDepth(treeNode* root)
*NULL is returned if not found
*/
treeNode* TreeNodeFind(treeNode* tree, void* key,
- int (*compkey) (void*, void*))
+ int (*compkey) (void*, void*))
{
- if(tree == NULL)
+ if(tree == NULL)
return NULL;
if(key == tree->key)
return tree;
else if(compkey(key, tree->key) < 0)
return TreeNodeFind(tree->left, key, compkey);
- else
- return TreeNodeFind(tree->right, key, compkey);
+ else
+ return TreeNodeFind(tree->right, key, compkey);
}
@@ -115,17 +115,17 @@ treeNode* TreeNodeInsert(treeNode* root, treeNode* newnode,
y = x;
if(compkey(newnode->key,x->key) < 0) /*if newnode < x*/
x = x->left;
- else
+ else
x = x->right;
}
- /*now y has the property that
+ /*now y has the property that
* if newnode < y, then y->left is NULL
* if newnode > y, then y->right is NULL.
*So we want to isnert newnode to be the child of y
*/
newnode->parent = y;
- if(y == NULL)
+ if(y == NULL)
return newnode;
else if( compkey(newnode->key, y->key) <0)
{
@@ -138,7 +138,7 @@ treeNode* TreeNodeInsert(treeNode* root, treeNode* newnode,
return root;
}
-
+
treeNode* TreeNodeDeleteSingleNode(treeNode* tree, treeNode* node)
{
treeNode* y;
@@ -149,7 +149,7 @@ treeNode* TreeNodeDeleteSingleNode(treeNode* tree, treeNode* node)
if(node->left == NULL || node->right == NULL) {
y = node;
- if(y->left != NULL)
+ if(y->left != NULL)
x = y->left;
else
x = y->right;
@@ -161,7 +161,7 @@ treeNode* TreeNodeDeleteSingleNode(treeNode* tree, treeNode* node)
ret = x;
else /*y is not the root*/
{
- if(y == y->parent->left)
+ if(y == y->parent->left)
y->parent->left = x;
else
y->parent->right = x;
@@ -178,7 +178,7 @@ treeNode* TreeNodeDeleteSingleNode(treeNode* tree, treeNode* node)
y->parent = node->parent;
y->left = node->left;
node->left->parent = y;
-
+
}
else /*y != node->right*/
{
@@ -187,7 +187,7 @@ treeNode* TreeNodeDeleteSingleNode(treeNode* tree, treeNode* node)
x->parent = y->parent;
assert(y->parent != NULL);
- if(y == y->parent->left)
+ if(y == y->parent->left)
y->parent->left = x;
else
y->parent->right = x;
@@ -206,14 +206,14 @@ treeNode* TreeNodeDeleteSingleNode(treeNode* tree, treeNode* node)
ret = tree; /*the root if the tree doesn't change*/
}
else /*node->parent is NULL: node is the root*/
- ret = y;
+ ret = y;
}
/*finally free the node, and return the new root*/
TreeNodeDeleteSingleNode(node);
return ret;
}
-
+
/*the minimum node in the tree rooted by node
*/
diff --git a/src/glu/sgi/libnurbs/nurbtess/searchTree.h b/src/glu/sgi/libnurbs/nurbtess/searchTree.h
index d5e3331..cdd7fdb 100644
--- a/src/glu/sgi/libnurbs/nurbtess/searchTree.h
+++ b/src/glu/sgi/libnurbs/nurbtess/searchTree.h
@@ -37,13 +37,13 @@ typedef struct treeNode{
void *key;
struct treeNode* parent;
struct treeNode* left; /*children*/
- struct treeNode* right;
+ struct treeNode* right;
} treeNode;
treeNode* TreeNodeMake(void *key);
void TreeNodeDeleteSingleNode(treeNode* node);
void TreeNodeDeleteWholeTree(treeNode* node);
-void TreeNodePrint(treeNode* node,
+void TreeNodePrint(treeNode* node,
void (*keyPrint) (void*));
int TreeNodeDepth(treeNode* root);
treeNode* TreeNodeMinimum(treeNode* node);
diff --git a/src/glu/sgi/libtess/README b/src/glu/sgi/libtess/README
index 66a6011..5bc91b5 100644
--- a/src/glu/sgi/libtess/README
+++ b/src/glu/sgi/libtess/README
@@ -10,20 +10,20 @@ General Polygon Tesselation
a summary of the major differences:
- input contours can be intersecting, self-intersecting, or degenerate.
-
+
- supports a choice of several winding rules for determining which parts
of the polygon are on the "interior". This makes it possible to do
CSG operations on polygons.
-
+
- boundary extraction: instead of tesselating the polygon, returns a
set of closed contours which separate the interior from the exterior.
-
+
- returns the output as a small number of triangle fans and strips,
rather than a list of independent triangles (when possible).
-
+
- output is available as an explicit mesh (a quad-edge structure),
in addition to the normal callback interface.
-
+
- the algorithm used is extremely robust.
@@ -40,7 +40,7 @@ The interface
Inputs
------
-
+
The input contours are specified with the following routines:
void gluTessBeginPolygon( GLUtesselator *tess );
@@ -81,7 +81,7 @@ The interface
void gluTessCallback( GLUtesselator *tess, GLenum which, void (*fn)());
If "fn" is NULL, any previously defined callback is discarded.
-
+
The callbacks used to provide output are: /* which == */
void begin( GLenum type ); /* GLU_TESS_BEGIN */
@@ -95,7 +95,7 @@ The interface
The "begin" callback indicates the start of a primitive; type is one
of GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, or GL_TRIANGLES (but see the
notes on "boundary extraction" below).
-
+
It is followed by any number of "vertex" callbacks, which supply the
vertices in the same order as expected by the corresponding glBegin()
call. After the last vertex of a given primitive, there is a callback
@@ -142,7 +142,7 @@ The interface
The first four are obvious. The interface recovers from these
errors by inserting the missing call(s).
-
+
GLU_TESS_COORD_TOO_LARGE says that some vertex coordinate exceeded
the predefined constant GLU_TESS_MAX_COORD in absolute value, and
that the value has been clamped. (Coordinate values must be small
@@ -170,12 +170,12 @@ The interface
For example, if the polygon lies in an arbitrary plane in 3-space,
and we associate a color with each vertex, the combine callback might
look like this:
-
+
void myCombine( GLUcoord coords[3], VERTEX *d[4],
GLUcoord w[4], VERTEX **dataOut )
{
VERTEX *new = new_vertex();
-
+
new->x = coords[0];
new->y = coords[1];
new->z = coords[2];
@@ -195,7 +195,7 @@ The interface
Control over Tesselation
------------------------
-
+
void gluTessProperty( GLUtesselator *tess, GLenum which, GLUcoord value );
Properties defined:
@@ -210,7 +210,7 @@ The interface
The input contours parition the plane into regions. A winding
rule determines which of these regions are inside the polygon.
-
+
For a single contour C, the winding number of a point x is simply
the signed number of revolutions we make around x as we travel
once around C (where CCW is positive). When there are several
@@ -233,7 +233,7 @@ The interface
Exterior contours are oriented CCW with respect to the normal,
interior contours are oriented CW. The GLU_TESS_BEGIN callback
uses the type GL_LINE_LOOP for each contour.
-
+
- GLU_TESS_TOLERANCE. Value: a real number between 0.0 and 1.0.
This specifies a tolerance for merging features to reduce the size
@@ -247,7 +247,7 @@ The interface
Feature merging is completely optional; the tolerance is only a hint.
The implementation is free to merge in some cases and not in others,
or to never merge features at all. The default tolerance is zero.
-
+
The current implementation merges vertices only if they are exactly
coincident, regardless of the current tolerance. A vertex is
spliced into an edge only if the implementation is unable to
@@ -265,7 +265,7 @@ The interface
reversing the sign of the supplied normal). For example, if
you know that all polygons lie in the x-y plane, call
"gluTessNormal(tess, 0.0, 0.0, 1.0)" before rendering any polygons.
-
+
- If the supplied normal is (0,0,0) (the default value), the
normal is determined as follows. The direction of the normal,
up to its sign, is found by fitting a plane to the vertices,
@@ -275,7 +275,7 @@ The interface
substantially change the geometry. The sign of the normal is
chosen so that the sum of the signed areas of all input contours
is non-negative (where a CCW contour has positive area).
-
+
- The supplied normal persists until it is changed by another
call to gluTessNormal.
@@ -291,10 +291,10 @@ The interface
void gluBeginPolygon( GLUtesselator *tess );
void gluNextContour( GLUtesselator *tess, GLenum type );
void gluEndPolygon( GLUtesselator *tess );
-
+
"type" is one of GLU_EXTERIOR, GLU_INTERIOR, GLU_CCW, GLU_CW, or
GLU_UNKNOWN. It is ignored by the current GLU tesselator.
-
+
GLU_BEGIN, GLU_VERTEX, GLU_END, GLU_ERROR, and GLU_EDGE_FLAG are defined
as synonyms for GLU_TESS_BEGIN, GLU_TESS_VERTEX, GLU_TESS_END,
GLU_TESS_ERROR, and GLU_TESS_EDGE_FLAG.
@@ -337,18 +337,18 @@ Polygon CSG operations
orientations does not change the result.)
Difference
-
+
Suppose we want to compute A \ (B union C union D). Draw a single
polygon consisting of the unmodified contours from A, followed by
the contours of B,C,D with the vertex order reversed (this changes
the winding number of the interior regions to -1). To extract the
result, use the GLU_TESS_WINDING_POSITIVE rule.
-
+
If B,C,D are the result of a GLU_TESS_BOUNDARY_ONLY call, an
alternative to reversing the vertex order is to reverse the sign of
the supplied normal. For example in the x-y plane, call
gluTessNormal( tess, 0.0, 0.0, -1.0 ).
-
+
Performance
-----------
diff --git a/src/glu/sgi/libtess/alg-outline b/src/glu/sgi/libtess/alg-outline
index 33fd697..19e72b1 100644
--- a/src/glu/sgi/libtess/alg-outline
+++ b/src/glu/sgi/libtess/alg-outline
@@ -55,7 +55,7 @@ our purpose the accuracy of the normal is not important. Instead we
find three vertices which are widely separated, and compute the normal
to the triangle they form. The vertices are chosen so that the
triangle has an area at least 1/sqrt(3) times the largest area of any
-triangle formed using the input vertices.
+triangle formed using the input vertices.
The contours do affect the orientation of the normal; after computing
the normal, we check that the sum of the signed contour areas is
@@ -173,7 +173,7 @@ Invariants for the Edge Dictionary.
where "event" is the current sweep line event.
- No edge e has zero length.
- No two edges have identical left and right endpoints.
-
+
Invariants for the Mesh (the processed portion).
- The portion of the mesh left of the sweep line is a planar graph,
@@ -204,16 +204,16 @@ dictionary. We achieve this by:
1. Writing the numerical computations for maximum precision rather
than maximum speed.
-
+
2. Making no assumptions at all about the results of the edge
intersection calculations -- for sufficiently degenerate inputs,
the computed location is not much better than a random number.
-
+
3. When numerical errors violate the invariants, restore them
by making *topological* changes when necessary (ie. relinking
the mesh structure).
-
-
+
+
Triangulation and Grouping
--------------------------
diff --git a/src/glu/sgi/libtess/dict-list.h b/src/glu/sgi/libtess/dict-list.h
index 11331a7..11656e3 100644
--- a/src/glu/sgi/libtess/dict-list.h
+++ b/src/glu/sgi/libtess/dict-list.h
@@ -64,7 +64,7 @@ typedef struct DictNode DictNode;
Dict *dictNewDict(
void *frame,
int (*leq)(void *frame, DictKey key1, DictKey key2) );
-
+
void dictDeleteDict( Dict *dict );
/* Search returns the node with the smallest key greater than or equal
diff --git a/src/glu/sgi/libtess/dict.h b/src/glu/sgi/libtess/dict.h
index 11331a7..11656e3 100644
--- a/src/glu/sgi/libtess/dict.h
+++ b/src/glu/sgi/libtess/dict.h
@@ -64,7 +64,7 @@ typedef struct DictNode DictNode;
Dict *dictNewDict(
void *frame,
int (*leq)(void *frame, DictKey key1, DictKey key2) );
-
+
void dictDeleteDict( Dict *dict );
/* Search returns the node with the smallest key greater than or equal
diff --git a/src/glu/sgi/libtess/geom.c b/src/glu/sgi/libtess/geom.c
index 35b36a3..ed7f9e0 100644
--- a/src/glu/sgi/libtess/geom.c
+++ b/src/glu/sgi/libtess/geom.c
@@ -59,7 +59,7 @@ GLdouble __gl_edgeEval( GLUvertex *u, GLUvertex *v, GLUvertex *w )
GLdouble gapL, gapR;
assert( VertLeq( u, v ) && VertLeq( v, w ));
-
+
gapL = v->s - u->s;
gapR = w->s - v->s;
@@ -83,7 +83,7 @@ GLdouble __gl_edgeSign( GLUvertex *u, GLUvertex *v, GLUvertex *w )
GLdouble gapL, gapR;
assert( VertLeq( u, v ) && VertLeq( v, w ));
-
+
gapL = v->s - u->s;
gapR = w->s - v->s;
@@ -114,7 +114,7 @@ GLdouble __gl_transEval( GLUvertex *u, GLUvertex *v, GLUvertex *w )
GLdouble gapL, gapR;
assert( TransLeq( u, v ) && TransLeq( v, w ));
-
+
gapL = v->t - u->t;
gapR = w->t - v->t;
@@ -138,7 +138,7 @@ GLdouble __gl_transSign( GLUvertex *u, GLUvertex *v, GLUvertex *w )
GLdouble gapL, gapR;
assert( TransLeq( u, v ) && TransLeq( v, w ));
-
+
gapL = v->t - u->t;
gapR = w->t - v->t;
diff --git a/src/glu/sgi/libtess/mesh.c b/src/glu/sgi/libtess/mesh.c
index 36cb3a7..ed78ef6 100644
--- a/src/glu/sgi/libtess/mesh.c
+++ b/src/glu/sgi/libtess/mesh.c
@@ -131,7 +131,7 @@ static void Splice( GLUhalfEdge *a, GLUhalfEdge *b )
* the new vertex *before* vNext so that algorithms which walk the vertex
* list will not see the newly created vertices.
*/
-static void MakeVertex( GLUvertex *newVertex,
+static void MakeVertex( GLUvertex *newVertex,
GLUhalfEdge *eOrig, GLUvertex *vNext )
{
GLUhalfEdge *e;
@@ -171,7 +171,7 @@ static void MakeFace( GLUface *newFace, GLUhalfEdge *eOrig, GLUface *fNext )
GLUface *fPrev;
GLUface *fNew = newFace;
- assert(fNew != NULL);
+ assert(fNew != NULL);
/* insert in circular doubly-linked list before fNext */
fPrev = fNext->prev;
@@ -283,9 +283,9 @@ GLUhalfEdge *__gl_meshMakeEdge( GLUmesh *mesh )
if (newVertex1 == NULL || newVertex2 == NULL || newFace == NULL) {
if (newVertex1 != NULL) memFree(newVertex1);
if (newVertex2 != NULL) memFree(newVertex2);
- if (newFace != NULL) memFree(newFace);
+ if (newFace != NULL) memFree(newFace);
return NULL;
- }
+ }
e = MakeEdge( &mesh->eHead );
if (e == NULL) {
@@ -300,7 +300,7 @@ GLUhalfEdge *__gl_meshMakeEdge( GLUmesh *mesh )
MakeFace( newFace, e, &mesh->fHead );
return e;
}
-
+
/* __gl_meshSplice( eOrg, eDst ) is the basic operation for changing the
* mesh connectivity and topology. It changes the mesh so that
@@ -357,7 +357,7 @@ int __gl_meshSplice( GLUhalfEdge *eOrg, GLUhalfEdge *eDst )
eOrg->Org->anEdge = eOrg;
}
if( ! joiningLoops ) {
- GLUface *newFace= allocFace();
+ GLUface *newFace= allocFace();
if (newFace == NULL) return 0;
/* We split one loop into two -- the new loop is eDst->Lface.
@@ -405,7 +405,7 @@ int __gl_meshDelete( GLUhalfEdge *eDel )
Splice( eDel, eDel->Oprev );
if( ! joiningLoops ) {
GLUface *newFace= allocFace();
- if (newFace == NULL) return 0;
+ if (newFace == NULL) return 0;
/* We are splitting one loop into two -- create a new loop for eDel. */
MakeFace( newFace, eDel, eDel->Lface );
@@ -508,7 +508,7 @@ GLUhalfEdge *__gl_meshSplitEdge( GLUhalfEdge *eOrg )
GLUhalfEdge *__gl_meshConnect( GLUhalfEdge *eOrg, GLUhalfEdge *eDst )
{
GLUhalfEdge *eNewSym;
- int joiningLoops = FALSE;
+ int joiningLoops = FALSE;
GLUhalfEdge *eNew = MakeEdge( eOrg );
if (eNew == NULL) return NULL;
@@ -610,7 +610,7 @@ GLUmesh *__gl_meshNewMesh( void )
if (mesh == NULL) {
return NULL;
}
-
+
v = &mesh->vHead;
f = &mesh->fHead;
e = &mesh->eHead;
diff --git a/src/glu/sgi/libtess/mesh.h b/src/glu/sgi/libtess/mesh.h
index 690c5f2..a3db984 100644
--- a/src/glu/sgi/libtess/mesh.h
+++ b/src/glu/sgi/libtess/mesh.h
@@ -37,7 +37,7 @@
#include
-typedef struct GLUmesh GLUmesh;
+typedef struct GLUmesh GLUmesh;
typedef struct GLUvertex GLUvertex;
typedef struct GLUface GLUface;
diff --git a/src/glu/sgi/libtess/priorityq-heap.c b/src/glu/sgi/libtess/priorityq-heap.c
index 52698b5..9662a56 100644
--- a/src/glu/sgi/libtess/priorityq-heap.c
+++ b/src/glu/sgi/libtess/priorityq-heap.c
@@ -172,8 +172,8 @@ PQhandle pqInsert( PriorityQ *pq, PQkey keyNew )
/* If the heap overflows, double its size. */
pq->max <<= 1;
- pq->nodes = (PQnode *)memRealloc( pq->nodes,
- (size_t)
+ pq->nodes = (PQnode *)memRealloc( pq->nodes,
+ (size_t)
((pq->max + 1) * sizeof( pq->nodes[0] )));
if (pq->nodes == NULL) {
pq->nodes = saveNodes; /* restore ptr to free upon return */
@@ -181,7 +181,7 @@ PQhandle pqInsert( PriorityQ *pq, PQkey keyNew )
}
pq->handles = (PQhandleElem *)memRealloc( pq->handles,
(size_t)
- ((pq->max + 1) *
+ ((pq->max + 1) *
sizeof( pq->handles[0] )));
if (pq->handles == NULL) {
pq->handles = saveHandles; /* restore ptr to free upon return */
diff --git a/src/glu/sgi/libtess/priorityq-heap.h b/src/glu/sgi/libtess/priorityq-heap.h
index dc9aaef..c7aa576 100644
--- a/src/glu/sgi/libtess/priorityq-heap.h
+++ b/src/glu/sgi/libtess/priorityq-heap.h
@@ -91,7 +91,7 @@ struct PriorityQ {
int initialized;
int (*leq)(PQkey key1, PQkey key2);
};
-
+
PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) );
void pqDeletePriorityQ( PriorityQ *pq );
diff --git a/src/glu/sgi/libtess/priorityq-sort.h b/src/glu/sgi/libtess/priorityq-sort.h
index 746cf5f..28186f4 100644
--- a/src/glu/sgi/libtess/priorityq-sort.h
+++ b/src/glu/sgi/libtess/priorityq-sort.h
@@ -102,7 +102,7 @@ struct PriorityQ {
int initialized;
int (*leq)(PQkey key1, PQkey key2);
};
-
+
PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) );
void pqDeletePriorityQ( PriorityQ *pq );
diff --git a/src/glu/sgi/libtess/priorityq.c b/src/glu/sgi/libtess/priorityq.c
index c6b99cc..4783ea1 100644
--- a/src/glu/sgi/libtess/priorityq.c
+++ b/src/glu/sgi/libtess/priorityq.c
@@ -75,7 +75,7 @@ PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) )
/* really __gl_pqSortDeletePriorityQ */
void pqDeletePriorityQ( PriorityQ *pq )
{
- assert(pq != NULL);
+ assert(pq != NULL);
if (pq->heap != NULL) __gl_pqHeapDeletePriorityQ( pq->heap );
if (pq->order != NULL) memFree( pq->order );
if (pq->keys != NULL) memFree( pq->keys );
@@ -169,7 +169,7 @@ int pqInit( PriorityQ *pq )
}
/* really __gl_pqSortInsert */
-/* returns LONG_MAX iff out of memory */
+/* returns LONG_MAX iff out of memory */
PQhandle pqInsert( PriorityQ *pq, PQkey keyNew )
{
long curr;
@@ -183,15 +183,15 @@ PQhandle pqInsert( PriorityQ *pq, PQkey keyNew )
/* If the heap overflows, double its size. */
pq->max <<= 1;
- pq->keys = (PQHeapKey *)memRealloc( pq->keys,
+ pq->keys = (PQHeapKey *)memRealloc( pq->keys,
(size_t)
(pq->max * sizeof( pq->keys[0] )));
- if (pq->keys == NULL) {
+ if (pq->keys == NULL) {
pq->keys = saveKey; /* restore ptr to free upon return */
return LONG_MAX;
}
}
- assert(curr != LONG_MAX);
+ assert(curr != LONG_MAX);
pq->keys[curr] = keyNew;
/* Negative handles index the sorted array. */
diff --git a/src/glu/sgi/libtess/priorityq.h b/src/glu/sgi/libtess/priorityq.h
index 746cf5f..28186f4 100644
--- a/src/glu/sgi/libtess/priorityq.h
+++ b/src/glu/sgi/libtess/priorityq.h
@@ -102,7 +102,7 @@ struct PriorityQ {
int initialized;
int (*leq)(PQkey key1, PQkey key2);
};
-
+
PriorityQ *pqNewPriorityQ( int (*leq)(PQkey key1, PQkey key2) );
void pqDeletePriorityQ( PriorityQ *pq );
diff --git a/src/glu/sgi/libtess/render.c b/src/glu/sgi/libtess/render.c
index bca836f..81b667b 100644
--- a/src/glu/sgi/libtess/render.c
+++ b/src/glu/sgi/libtess/render.c
@@ -286,15 +286,15 @@ static void RenderFan( GLUtesselator *tess, GLUhalfEdge *e, long size )
* edge "e". The fan *should* contain exactly "size" triangles
* (otherwise we've goofed up somewhere).
*/
- CALL_BEGIN_OR_BEGIN_DATA( GL_TRIANGLE_FAN );
- CALL_VERTEX_OR_VERTEX_DATA( e->Org->data );
- CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data );
+ CALL_BEGIN_OR_BEGIN_DATA( GL_TRIANGLE_FAN );
+ CALL_VERTEX_OR_VERTEX_DATA( e->Org->data );
+ CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data );
while( ! Marked( e->Lface )) {
e->Lface->marked = TRUE;
--size;
e = e->Onext;
- CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data );
+ CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data );
}
assert( size == 0 );
@@ -309,20 +309,20 @@ static void RenderStrip( GLUtesselator *tess, GLUhalfEdge *e, long size )
* (otherwise we've goofed up somewhere).
*/
CALL_BEGIN_OR_BEGIN_DATA( GL_TRIANGLE_STRIP );
- CALL_VERTEX_OR_VERTEX_DATA( e->Org->data );
- CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data );
+ CALL_VERTEX_OR_VERTEX_DATA( e->Org->data );
+ CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data );
while( ! Marked( e->Lface )) {
e->Lface->marked = TRUE;
--size;
e = e->Dprev;
- CALL_VERTEX_OR_VERTEX_DATA( e->Org->data );
+ CALL_VERTEX_OR_VERTEX_DATA( e->Org->data );
if( Marked( e->Lface )) break;
e->Lface->marked = TRUE;
--size;
e = e->Onext;
- CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data );
+ CALL_VERTEX_OR_VERTEX_DATA( e->Dst->data );
}
assert( size == 0 );
@@ -346,7 +346,7 @@ void __gl_renderBoundary( GLUtesselator *tess, GLUmesh *mesh )
CALL_BEGIN_OR_BEGIN_DATA( GL_LINE_LOOP );
e = f->anEdge;
do {
- CALL_VERTEX_OR_VERTEX_DATA( e->Org->data );
+ CALL_VERTEX_OR_VERTEX_DATA( e->Org->data );
e = e->Lnext;
} while( e != f->anEdge );
CALL_END_OR_END_DATA();
@@ -487,14 +487,14 @@ GLboolean __gl_renderCache( GLUtesselator *tess )
: (tess->cacheCount > 3) ? GL_TRIANGLE_FAN
: GL_TRIANGLES );
- CALL_VERTEX_OR_VERTEX_DATA( v0->data );
+ CALL_VERTEX_OR_VERTEX_DATA( v0->data );
if( sign > 0 ) {
for( vc = v0+1; vc < vn; ++vc ) {
- CALL_VERTEX_OR_VERTEX_DATA( vc->data );
+ CALL_VERTEX_OR_VERTEX_DATA( vc->data );
}
} else {
for( vc = vn-1; vc > v0; --vc ) {
- CALL_VERTEX_OR_VERTEX_DATA( vc->data );
+ CALL_VERTEX_OR_VERTEX_DATA( vc->data );
}
}
CALL_END_OR_END_DATA();
diff --git a/src/glu/sgi/libtess/tess.c b/src/glu/sgi/libtess/tess.c
index 4a0e8de..026d7f8 100644
--- a/src/glu/sgi/libtess/tess.c
+++ b/src/glu/sgi/libtess/tess.c
@@ -501,7 +501,7 @@ gluTessEndPolygon( GLUtesselator *tess )
{
GLUmesh *mesh;
- if (setjmp(tess->env) != 0) {
+ if (setjmp(tess->env) != 0) {
/* come back here if out of memory */
CALL_ERROR_OR_ERROR_DATA( GLU_OUT_OF_MEMORY );
return;
diff --git a/src/glu/sgi/libtess/tess.h b/src/glu/sgi/libtess/tess.h
index 1624960..4c43f96 100644
--- a/src/glu/sgi/libtess/tess.h
+++ b/src/glu/sgi/libtess/tess.h
@@ -107,9 +107,9 @@ struct GLUtesselator {
int cacheCount; /* number of cached vertices */
CachedVertex cache[TESS_MAX_CACHE]; /* the vertex data */
- /*** rendering callbacks that also pass polygon data ***/
+ /*** rendering callbacks that also pass polygon data ***/
void (GLAPIENTRY *callBeginData)( GLenum type, void *polygonData );
- void (GLAPIENTRY *callEdgeFlagData)( GLboolean boundaryEdge,
+ void (GLAPIENTRY *callEdgeFlagData)( GLboolean boundaryEdge,
void *polygonData );
void (GLAPIENTRY *callVertexData)( void *data, void *polygonData );
void (GLAPIENTRY *callEndData)( void *polygonData );
diff --git a/src/glu/sgi/libtess/tessmono.c b/src/glu/sgi/libtess/tessmono.c
index 4d08440..6d2700a 100644
--- a/src/glu/sgi/libtess/tessmono.c
+++ b/src/glu/sgi/libtess/tessmono.c
@@ -46,7 +46,7 @@
* (what else would it do??) The region must consist of a single
* loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this
* case means that any vertical line intersects the interior of the
- * region in a single interval.
+ * region in a single interval.
*
* Tessellation consists of adding interior edges (actually pairs of
* half-edges), to split the region into non-overlapping triangles.
diff --git a/src/glu/sgi/libtess/tessmono.h b/src/glu/sgi/libtess/tessmono.h
index 8ee1b2f..af1b2f3 100644
--- a/src/glu/sgi/libtess/tessmono.h
+++ b/src/glu/sgi/libtess/tessmono.h
@@ -39,7 +39,7 @@
* (what else would it do??) The region must consist of a single
* loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this
* case means that any vertical line intersects the interior of the
- * region in a single interval.
+ * region in a single interval.
*
* Tessellation consists of adding interior edges (actually pairs of
* half-edges), to split the region into non-overlapping triangles.
diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c
index 026ab84..6668d37 100644
--- a/src/glu/sgi/libutil/mipmap.c
+++ b/src/glu/sgi/libutil/mipmap.c
@@ -1690,7 +1690,7 @@ static void scale_internal_byte(GLint components, GLint widthin,
totals[k] += (GLbyte)(*(temp_index)) * percent;
}
- /* calculate the value for pixels in the last row */
+ /* calculate the value for pixels in the last row */
y_percent = highy_float;
percent = y_percent * (1-lowx_float);
temp = (const char *)datain + xindex + highy_int * ysize;
@@ -1920,7 +1920,7 @@ static void scale_internal_ushort(GLint components, GLint widthin,
}
}
- /* calculate the value for pixels in the last row */
+ /* calculate the value for pixels in the last row */
y_percent = highy_float;
percent = y_percent * (1-lowx_float);
temp = (const char *)datain + xindex + highy_int * ysize;
@@ -3318,7 +3318,7 @@ static GLboolean legalType(GLenum type)
case GL_UNSIGNED_INT:
case GL_FLOAT:
case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
case GL_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_5_6_5_REV:
case GL_UNSIGNED_SHORT_4_4_4_4:
@@ -3415,7 +3415,7 @@ static void closestFit(GLenum target, GLint width, GLint height,
if ( (strtod((const char *)glGetString(GL_VERSION),NULL) >= 1.1)
) {
GLint widthPowerOf2= nearestPower(width);
- GLint heightPowerOf2= nearestPower(height);
+ GLint heightPowerOf2= nearestPower(height);
GLint proxyWidth;
do {
@@ -3931,7 +3931,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
case GL_UNSIGNED_INT_8_8_8_8_REV:
case GL_UNSIGNED_INT_10_10_10_2:
case GL_UNSIGNED_INT_2_10_10_10_REV:
- dstImage = (GLuint *)malloc(memreq);
+ dstImage = (GLuint *)malloc(memreq);
break;
default:
return GLU_INVALID_ENUM;
@@ -4296,7 +4296,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
int nextWidth= newwidth/2;
int nextHeight= newheight/2;
if (nextWidth < 1) nextWidth= 1;
- if (nextHeight < 1) nextHeight= 1;
+ if (nextHeight < 1) nextHeight= 1;
memreq = image_size(nextWidth, nextHeight, format, type);
}
@@ -4438,13 +4438,13 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
srcImage,dstImage,element_size,rowsize,
myswap_bytes);
break;
- case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
halveImagePackedPixel(4,extract5551,shove5551,
newwidth,newheight,
srcImage,dstImage,element_size,rowsize,
myswap_bytes);
break;
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
halveImagePackedPixel(4,extract1555rev,shove1555rev,
newwidth,newheight,
srcImage,dstImage,element_size,rowsize,
@@ -4825,7 +4825,7 @@ static GLfloat bytes_per_element(GLenum type)
case GL_FLOAT:
return(sizeof(GLfloat));
case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
return(sizeof(GLubyte));
case GL_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_5_6_5_REV:
@@ -4990,31 +4990,31 @@ static void fill_image(const PixelStorageModes *psm,
*iter2++ = (*((const GLbyte *) iter)) * 516;
}
break;
- case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5:
extract565(myswap_bytes,iter,extractComponents);
for (k = 0; k < 3; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
extract565rev(myswap_bytes,iter,extractComponents);
for (k = 0; k < 3; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
extract4444(myswap_bytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
extract4444rev(myswap_bytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
extract5551(myswap_bytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
@@ -5046,19 +5046,19 @@ static void fill_image(const PixelStorageModes *psm,
*iter2++ = widget.us[0];
}
break;
- case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8:
extract8888(myswap_bytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
extract8888rev(myswap_bytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_10_10_10_2:
extract1010102(myswap_bytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
@@ -5112,7 +5112,7 @@ static void fill_image(const PixelStorageModes *psm,
/* want 'iter' pointing at start, not within, row for assertion
* purposes
*/
- iter= start;
+ iter= start;
#endif
} /* for i */
@@ -5262,7 +5262,7 @@ static void empty_image(const PixelStorageModes *psm,
*((GLbyte *) iter) = *iter2++ >> 9;
}
break;
- case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5:
for (k = 0; k < 3; k++) {
shoveComponents[k]= *iter2++ / 65535.0;
}
@@ -5275,7 +5275,7 @@ static void empty_image(const PixelStorageModes *psm,
*(GLushort *)iter = widget.us[0];
}
break;
- case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
for (k = 0; k < 3; k++) {
shoveComponents[k]= *iter2++ / 65535.0;
}
@@ -5454,7 +5454,7 @@ static void empty_image(const PixelStorageModes *psm,
/* want 'iter' pointing at start, not within, row for assertion
* purposes
*/
- iter= start;
+ iter= start;
#endif
} /* for i */
@@ -5494,7 +5494,7 @@ static void extract332(int isSwap,
} /* extract332() */
static void shove332(const GLfloat shoveComponents[],
- int index, void *packedPixel)
+ int index, void *packedPixel)
{
/* 11100000 == 0xe0 */
/* 00011100 == 0x1c */
@@ -5530,7 +5530,7 @@ static void extract233rev(int isSwap,
} /* extract233rev() */
static void shove233rev(const GLfloat shoveComponents[],
- int index, void *packedPixel)
+ int index, void *packedPixel)
{
/* 0000,0111 == 0x07 */
/* 0011,1000 == 0x38 */
@@ -6140,7 +6140,7 @@ static void scaleInternalPackedPixel(int components,
#endif
/* calculate the value for pixels in the last row */
-
+
y_percent = highy_float;
percent = y_percent * (1-lowx_float);
temp = (const char *)dataIn + xindex + highy_int * rowSizeInBytes;
@@ -6536,7 +6536,7 @@ static void halve1DimagePackedPixel(int components,
(*extractPackedPixel)(isSwap,src,
&extractTotals[0][0]);
(*extractPackedPixel)(isSwap,(src+pixelSizeInBytes),
- &extractTotals[1][0]);
+ &extractTotals[1][0]);
for (cc = 0; cc < components; cc++) {
int kk;
@@ -6582,7 +6582,7 @@ static void halve1DimagePackedPixel(int components,
(*extractPackedPixel)(isSwap,src,
&extractTotals[0][0]);
(*extractPackedPixel)(isSwap,(src+rowSizeInBytes),
- &extractTotals[1][0]);
+ &extractTotals[1][0]);
for (cc = 0; cc < components; cc++) {
int kk;
@@ -6773,31 +6773,31 @@ static void fillImage3D(const PixelStorageModes *psm,
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5:
extract565(myswapBytes,iter,extractComponents);
for (k = 0; k < 3; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
extract565rev(myswapBytes,iter,extractComponents);
for (k = 0; k < 3; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
extract4444(myswapBytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
extract4444rev(myswapBytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
extract5551(myswapBytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
@@ -6829,19 +6829,19 @@ static void fillImage3D(const PixelStorageModes *psm,
*iter2++ = widget.us[0];
}
break;
- case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8:
extract8888(myswapBytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
extract8888rev(myswapBytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
}
break;
- case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_10_10_10_2:
extract1010102(myswapBytes,iter,extractComponents);
for (k = 0; k < 4; k++) {
*iter2++ = (GLushort)(extractComponents[k]*65535);
@@ -7139,7 +7139,7 @@ static void emptyImage3D(const PixelStorageModes *psm,
}
shove233rev(shoveComponents,0,(void *)iter);
break;
- case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5:
for (k = 0; k < 3; k++) {
shoveComponents[k]= *iter2++ / 65535.0;
}
@@ -7152,7 +7152,7 @@ static void emptyImage3D(const PixelStorageModes *psm,
*(GLushort *)iter = widget.us[0];
}
break;
- case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
for (k = 0; k < 3; k++) {
shoveComponents[k]= *iter2++ / 65535.0;
}
@@ -7412,7 +7412,7 @@ static void closestFit3D(GLenum target, GLint width, GLint height, GLint depth,
GLint *newWidth, GLint *newHeight, GLint *newDepth)
{
GLint widthPowerOf2= nearestPower(width);
- GLint heightPowerOf2= nearestPower(height);
+ GLint heightPowerOf2= nearestPower(height);
GLint depthPowerOf2= nearestPower(depth);
GLint proxyWidth;
@@ -7507,7 +7507,7 @@ static void halveImagePackedPixelSlice(int components,
}
totals[cc]/= (float)BOX2;
} /* for cc */
-
+
(*shovePackedPixel)(totals,outIndex,dataOut);
outIndex++;
/* skip over to next group of 2 */
@@ -7827,7 +7827,7 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat,
/* clamp to 1 */
if (nextWidth < 1) nextWidth= 1;
if (nextHeight < 1) nextHeight= 1;
- if (nextDepth < 1) nextDepth= 1;
+ if (nextDepth < 1) nextDepth= 1;
memReq = imageSize3D(nextWidth, nextHeight, nextDepth, format, type);
}
switch(type) {
@@ -7868,7 +7868,7 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat,
case GL_UNSIGNED_INT_8_8_8_8_REV:
case GL_UNSIGNED_INT_10_10_10_2:
case GL_UNSIGNED_INT_2_10_10_10_REV:
- dstImage = (GLuint *)malloc(memReq);
+ dstImage = (GLuint *)malloc(memReq);
break;
default:
return GLU_INVALID_ENUM; /* assertion */
@@ -8179,8 +8179,8 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat,
int nextHeight= newHeight/2;
int nextDepth= newDepth/2;
if (nextWidth < 1) nextWidth= 1;
- if (nextHeight < 1) nextHeight= 1;
- if (nextDepth < 1) nextDepth= 1;
+ if (nextHeight < 1) nextHeight= 1;
+ if (nextDepth < 1) nextDepth= 1;
memReq = imageSize3D(nextWidth, nextHeight, nextDepth, format, type);
}
@@ -8240,7 +8240,7 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat,
}
}
/* level userLevel is in srcImage; nothing saved yet */
- level = userLevel;
+ level = userLevel;
}
glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
@@ -8371,13 +8371,13 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat,
srcImage,dstImage,elementSize,rowSize,
imageSize,myswapBytes);
break;
- case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
halveImagePackedPixel3D(4,extract5551,shove5551,
newWidth,newHeight,newDepth,
srcImage,dstImage,elementSize,rowSize,
imageSize,myswapBytes);
break;
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
halveImagePackedPixel3D(4,extract1555rev,shove1555rev,
newWidth,newHeight,newDepth,
srcImage,dstImage,elementSize,rowSize,
diff --git a/src/glu/sgi/libutil/project.c b/src/glu/sgi/libutil/project.c
index f4bf883..010c2e9 100644
--- a/src/glu/sgi/libutil/project.c
+++ b/src/glu/sgi/libutil/project.c
@@ -152,7 +152,7 @@ static void __gluMultMatrixVecd(const GLdouble matrix[16], const GLdouble in[4],
int i;
for (i=0; i<4; i++) {
- out[i] =
+ out[i] =
in[0] * matrix[0*4+i] +
in[1] * matrix[1*4+i] +
in[2] * matrix[2*4+i] +
@@ -221,7 +221,7 @@ static void __gluMultMatricesd(const GLdouble a[16], const GLdouble b[16],
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
- r[i*4+j] =
+ r[i*4+j] =
a[i*4+0]*b[0*4+j] +
a[i*4+1]*b[1*4+j] +
a[i*4+2]*b[2*4+j] +
@@ -231,8 +231,8 @@ static void __gluMultMatricesd(const GLdouble a[16], const GLdouble b[16],
}
GLint GLAPIENTRY
-gluProject(GLdouble objx, GLdouble objy, GLdouble objz,
- const GLdouble modelMatrix[16],
+gluProject(GLdouble objx, GLdouble objy, GLdouble objz,
+ const GLdouble modelMatrix[16],
const GLdouble projMatrix[16],
const GLint viewport[4],
GLdouble *winx, GLdouble *winy, GLdouble *winz)
@@ -267,7 +267,7 @@ gluProject(GLdouble objx, GLdouble objy, GLdouble objz,
GLint GLAPIENTRY
gluUnProject(GLdouble winx, GLdouble winy, GLdouble winz,
- const GLdouble modelMatrix[16],
+ const GLdouble modelMatrix[16],
const GLdouble projMatrix[16],
const GLint viewport[4],
GLdouble *objx, GLdouble *objy, GLdouble *objz)
@@ -306,10 +306,10 @@ gluUnProject(GLdouble winx, GLdouble winy, GLdouble winz,
GLint GLAPIENTRY
gluUnProject4(GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw,
- const GLdouble modelMatrix[16],
+ const GLdouble modelMatrix[16],
const GLdouble projMatrix[16],
const GLint viewport[4],
- GLclampd nearVal, GLclampd farVal,
+ GLclampd nearVal, GLclampd farVal,
GLdouble *objx, GLdouble *objy, GLdouble *objz,
GLdouble *objw)
{
@@ -348,7 +348,7 @@ void GLAPIENTRY
gluPickMatrix(GLdouble x, GLdouble y, GLdouble deltax, GLdouble deltay,
GLint viewport[4])
{
- if (deltax <= 0 || deltay <= 0) {
+ if (deltax <= 0 || deltay <= 0) {
return;
}
diff --git a/src/glu/sgi/libutil/registry.c b/src/glu/sgi/libutil/registry.c
index 2e3b574..53f163c 100644
--- a/src/glu/sgi/libutil/registry.c
+++ b/src/glu/sgi/libutil/registry.c
@@ -53,7 +53,7 @@ gluGetString(GLenum name)
}
/* extName is an extension name.
- * extString is a string of extensions separated by blank(s). There may or
+ * extString is a string of extensions separated by blank(s). There may or
* may not be leading or trailing blank(s) in extString.
* This works in cases of extensions being prefixes of another like
* GL_EXT_texture and GL_EXT_texture3D.
@@ -69,7 +69,7 @@ gluCheckExtension(const GLubyte *extName, const GLubyte *extString)
if (extString == NULL) return GL_FALSE;
- deleteThis = lookHere = (char *)malloc(strlen((const char *)extString)+1);
+ deleteThis = lookHere = (char *)malloc(strlen((const char *)extString)+1);
if (lookHere == NULL)
return GL_FALSE;
/* strtok() will modify string, so copy it somewhere */
@@ -79,7 +79,7 @@ gluCheckExtension(const GLubyte *extName, const GLubyte *extString)
if (strcmp(word,(const char *)extName) == 0) {
flag = GL_TRUE;
break;
- }
+ }
lookHere = NULL; /* get next token */
}
free((void *)deleteThis);
diff --git a/src/glu/sgi/mesaglu.opt b/src/glu/sgi/mesaglu.opt
index 9bac432..aa83efa 100644
--- a/src/glu/sgi/mesaglu.opt
+++ b/src/glu/sgi/mesaglu.opt
@@ -1,67 +1,67 @@
-!
-! ### UNIVERSAL procedures and global definitions extracted from MESAGL.MAP
-!
-case_sensitive=YES
-symbol_vector = (gluErrorString = PROCEDURE)
-symbol_vector = (__gluNURBSErrorString = PROCEDURE)
-symbol_vector = (__gluTessErrorString = PROCEDURE)
-symbol_vector = (gluBuild3DMipmaps = PROCEDURE)
-symbol_vector = (gluBuild3DMipmapLevels = PROCEDURE)
-symbol_vector = (gluBuild2DMipmaps = PROCEDURE)
-symbol_vector = (gluBuild2DMipmapLevels = PROCEDURE)
-symbol_vector = (gluBuild1DMipmaps = PROCEDURE)
-symbol_vector = (gluBuild1DMipmapLevels = PROCEDURE)
-symbol_vector = (gluScaleImage = PROCEDURE)
-symbol_vector = (gluPickMatrix = PROCEDURE)
-symbol_vector = (gluUnProject4 = PROCEDURE)
-symbol_vector = (gluUnProject = PROCEDURE)
-symbol_vector = (gluProject = PROCEDURE)
-symbol_vector = (gluLookAt = PROCEDURE)
-symbol_vector = (gluPerspective = PROCEDURE)
-symbol_vector = (gluOrtho2D = PROCEDURE)
-symbol_vector = (gluNewQuadric = PROCEDURE)
-symbol_vector = (gluSphere = PROCEDURE)
-symbol_vector = (gluPartialDisk = PROCEDURE)
-symbol_vector = (gluDisk = PROCEDURE)
-symbol_vector = (gluCylinder = PROCEDURE)
-symbol_vector = (gluQuadricDrawStyle = PROCEDURE)
-symbol_vector = (gluQuadricOrientation = PROCEDURE)
-symbol_vector = (gluQuadricTexture = PROCEDURE)
-symbol_vector = (gluQuadricNormals = PROCEDURE)
-symbol_vector = (gluQuadricCallback = PROCEDURE)
-symbol_vector = (gluDeleteQuadric = PROCEDURE)
-symbol_vector = (gluGetString = PROCEDURE)
-symbol_vector = (gluCheckExtension = PROCEDURE)
-symbol_vector = (gluTessEndContour = PROCEDURE)
-symbol_vector = (gluTessBeginContour = PROCEDURE)
-symbol_vector = (gluTessBeginPolygon = PROCEDURE)
-symbol_vector = (gluTessEndPolygon = PROCEDURE)
-symbol_vector = (gluEndPolygon = PROCEDURE)
-symbol_vector = (gluNextContour = PROCEDURE)
-symbol_vector = (gluBeginPolygon = PROCEDURE)
-symbol_vector = (gluTessVertex = PROCEDURE)
-symbol_vector = (gluTessCallback = PROCEDURE)
-symbol_vector = (gluTessNormal = PROCEDURE)
-symbol_vector = (gluGetTessProperty = PROCEDURE)
-symbol_vector = (gluTessProperty = PROCEDURE)
-symbol_vector = (gluDeleteTess = PROCEDURE)
-symbol_vector = (gluNewTess = PROCEDURE)
-symbol_vector = (gluNurbsCallbackDataEXT = PROCEDURE)
-symbol_vector = (gluNurbsCallbackData = PROCEDURE)
-symbol_vector = (gluNurbsCallback = PROCEDURE)
-symbol_vector = (gluGetNurbsProperty = PROCEDURE)
-symbol_vector = (gluNurbsProperty = PROCEDURE)
-symbol_vector = (gluLoadSamplingMatrices = PROCEDURE)
-symbol_vector = (gluNurbsSurface = PROCEDURE)
-symbol_vector = (gluNurbsCurve = PROCEDURE)
-symbol_vector = (gluPwlCurve = PROCEDURE)
-symbol_vector = (gluEndTrim = PROCEDURE)
-symbol_vector = (gluBeginTrim = PROCEDURE)
-symbol_vector = (gluEndSurface = PROCEDURE)
-symbol_vector = (gluEndCurve = PROCEDURE)
-symbol_vector = (gluBeginCurve = PROCEDURE)
-symbol_vector = (gluBeginSurface = PROCEDURE)
-symbol_vector = (gluDeleteNurbsTessellatorEXT = PROCEDURE)
-symbol_vector = (gluDeleteNurbsRenderer = PROCEDURE)
-symbol_vector = (gluNewNurbsRenderer = PROCEDURE)
-symbol_vector = (glu_LOD_eval_list = PROCEDURE)
+!
+! ### UNIVERSAL procedures and global definitions extracted from MESAGL.MAP
+!
+case_sensitive=YES
+symbol_vector = (gluErrorString = PROCEDURE)
+symbol_vector = (__gluNURBSErrorString = PROCEDURE)
+symbol_vector = (__gluTessErrorString = PROCEDURE)
+symbol_vector = (gluBuild3DMipmaps = PROCEDURE)
+symbol_vector = (gluBuild3DMipmapLevels = PROCEDURE)
+symbol_vector = (gluBuild2DMipmaps = PROCEDURE)
+symbol_vector = (gluBuild2DMipmapLevels = PROCEDURE)
+symbol_vector = (gluBuild1DMipmaps = PROCEDURE)
+symbol_vector = (gluBuild1DMipmapLevels = PROCEDURE)
+symbol_vector = (gluScaleImage = PROCEDURE)
+symbol_vector = (gluPickMatrix = PROCEDURE)
+symbol_vector = (gluUnProject4 = PROCEDURE)
+symbol_vector = (gluUnProject = PROCEDURE)
+symbol_vector = (gluProject = PROCEDURE)
+symbol_vector = (gluLookAt = PROCEDURE)
+symbol_vector = (gluPerspective = PROCEDURE)
+symbol_vector = (gluOrtho2D = PROCEDURE)
+symbol_vector = (gluNewQuadric = PROCEDURE)
+symbol_vector = (gluSphere = PROCEDURE)
+symbol_vector = (gluPartialDisk = PROCEDURE)
+symbol_vector = (gluDisk = PROCEDURE)
+symbol_vector = (gluCylinder = PROCEDURE)
+symbol_vector = (gluQuadricDrawStyle = PROCEDURE)
+symbol_vector = (gluQuadricOrientation = PROCEDURE)
+symbol_vector = (gluQuadricTexture = PROCEDURE)
+symbol_vector = (gluQuadricNormals = PROCEDURE)
+symbol_vector = (gluQuadricCallback = PROCEDURE)
+symbol_vector = (gluDeleteQuadric = PROCEDURE)
+symbol_vector = (gluGetString = PROCEDURE)
+symbol_vector = (gluCheckExtension = PROCEDURE)
+symbol_vector = (gluTessEndContour = PROCEDURE)
+symbol_vector = (gluTessBeginContour = PROCEDURE)
+symbol_vector = (gluTessBeginPolygon = PROCEDURE)
+symbol_vector = (gluTessEndPolygon = PROCEDURE)
+symbol_vector = (gluEndPolygon = PROCEDURE)
+symbol_vector = (gluNextContour = PROCEDURE)
+symbol_vector = (gluBeginPolygon = PROCEDURE)
+symbol_vector = (gluTessVertex = PROCEDURE)
+symbol_vector = (gluTessCallback = PROCEDURE)
+symbol_vector = (gluTessNormal = PROCEDURE)
+symbol_vector = (gluGetTessProperty = PROCEDURE)
+symbol_vector = (gluTessProperty = PROCEDURE)
+symbol_vector = (gluDeleteTess = PROCEDURE)
+symbol_vector = (gluNewTess = PROCEDURE)
+symbol_vector = (gluNurbsCallbackDataEXT = PROCEDURE)
+symbol_vector = (gluNurbsCallbackData = PROCEDURE)
+symbol_vector = (gluNurbsCallback = PROCEDURE)
+symbol_vector = (gluGetNurbsProperty = PROCEDURE)
+symbol_vector = (gluNurbsProperty = PROCEDURE)
+symbol_vector = (gluLoadSamplingMatrices = PROCEDURE)
+symbol_vector = (gluNurbsSurface = PROCEDURE)
+symbol_vector = (gluNurbsCurve = PROCEDURE)
+symbol_vector = (gluPwlCurve = PROCEDURE)
+symbol_vector = (gluEndTrim = PROCEDURE)
+symbol_vector = (gluBeginTrim = PROCEDURE)
+symbol_vector = (gluEndSurface = PROCEDURE)
+symbol_vector = (gluEndCurve = PROCEDURE)
+symbol_vector = (gluBeginCurve = PROCEDURE)
+symbol_vector = (gluBeginSurface = PROCEDURE)
+symbol_vector = (gluDeleteNurbsTessellatorEXT = PROCEDURE)
+symbol_vector = (gluDeleteNurbsRenderer = PROCEDURE)
+symbol_vector = (gluNewNurbsRenderer = PROCEDURE)
+symbol_vector = (glu_LOD_eval_list = PROCEDURE)
diff --git a/src/glw/GLwDrawA.c b/src/glw/GLwDrawA.c
index 30304a4..cb47251 100644
--- a/src/glw/GLwDrawA.c
+++ b/src/glw/GLwDrawA.c
@@ -1,13 +1,13 @@
/*
* (c) Copyright 1993, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED
- * Permission to use, copy, modify, and distribute this software for
+ * ALL RIGHTS RESERVED
+ * Permission to use, copy, modify, and distribute this software for
* any purpose and without fee is hereby granted, provided that the above
* copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that
+ * and this permission notice appear in supporting documentation, and that
* the name of Silicon Graphics, Inc. not be used in advertising
* or publicity pertaining to distribution of the software without specific,
- * written prior permission.
+ * written prior permission.
*
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
@@ -21,9 +21,9 @@
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- *
- * US Government Users Restricted Rights
+ *
+ *
+ * US Government Users Restricted Rights
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
@@ -52,9 +52,9 @@
#ifdef __GLX_MOTIF
#include
#include "GLwMDrawAP.h"
-#else
+#else
#include "GLwDrawAP.h"
-#endif
+#endif
#include
#include
@@ -64,7 +64,7 @@
#define glwDrawingAreaClassRec glwMDrawingAreaClassRec
#define glwDrawingAreaWidgetClass glwMDrawingAreaWidgetClass
#define GLwDrawingAreaRec GLwMDrawingAreaRec
-#endif
+#endif
#define ATTRIBLIST_SIZE 32
@@ -119,52 +119,52 @@ static XtResource resources[] = {
{GLwNbufferSize, GLwCBufferSize, XtRInt, sizeof (int),
offset(bufferSize), XtRImmediate, (XtPointer) 0},
-
+
{GLwNlevel, GLwCLevel, XtRInt, sizeof (int),
offset(level), XtRImmediate, (XtPointer) 0},
-
+
{GLwNrgba, GLwCRgba, XtRBoolean, sizeof (Boolean),
offset(rgba), XtRImmediate, (XtPointer) FALSE},
-
+
{GLwNdoublebuffer, GLwCDoublebuffer, XtRBoolean, sizeof (Boolean),
offset(doublebuffer), XtRImmediate, (XtPointer) FALSE},
-
+
{GLwNstereo, GLwCStereo, XtRBoolean, sizeof (Boolean),
offset(stereo), XtRImmediate, (XtPointer) FALSE},
-
+
{GLwNauxBuffers, GLwCAuxBuffers, XtRInt, sizeof (int),
offset(auxBuffers), XtRImmediate, (XtPointer) 0},
-
+
{GLwNredSize, GLwCColorSize, XtRInt, sizeof (int),
offset(redSize), XtRImmediate, (XtPointer) 1},
-
+
{GLwNgreenSize, GLwCColorSize, XtRInt, sizeof (int),
offset(greenSize), XtRImmediate, (XtPointer) 1},
-
+
{GLwNblueSize, GLwCColorSize, XtRInt, sizeof (int),
offset(blueSize), XtRImmediate, (XtPointer) 1},
-
+
{GLwNalphaSize, GLwCAlphaSize, XtRInt, sizeof (int),
offset(alphaSize), XtRImmediate, (XtPointer) 0},
-
+
{GLwNdepthSize, GLwCDepthSize, XtRInt, sizeof (int),
offset(depthSize), XtRImmediate, (XtPointer) 0},
-
+
{GLwNstencilSize, GLwCStencilSize, XtRInt, sizeof (int),
offset(stencilSize), XtRImmediate, (XtPointer) 0},
-
+
{GLwNaccumRedSize, GLwCAccumColorSize, XtRInt, sizeof (int),
offset(accumRedSize), XtRImmediate, (XtPointer) 0},
-
+
{GLwNaccumGreenSize, GLwCAccumColorSize, XtRInt, sizeof (int),
offset(accumGreenSize), XtRImmediate, (XtPointer) 0},
-
+
{GLwNaccumBlueSize, GLwCAccumColorSize, XtRInt, sizeof (int),
offset(accumBlueSize), XtRImmediate, (XtPointer) 0},
-
+
{GLwNaccumAlphaSize, GLwCAccumAlphaSize, XtRInt, sizeof (int),
offset(accumAlphaSize), XtRImmediate, (XtPointer) 0},
-
+
/* the attribute list */
{GLwNattribList, GLwCAttribList, XtRPointer, sizeof(int *),
offset(attribList), XtRImmediate, (XtPointer) NULL},
@@ -203,7 +203,7 @@ static XtResource resources[] = {
{XmNtraversalOn, XmCTraversalOn, XmRBoolean, sizeof (Boolean),
XtOffset (GLwDrawingAreaWidget, primitive.traversal_on), XmRImmediate,
(XtPointer)FALSE},
-
+
/* highlighting is normally disabled, as when Motif tries to disable
* highlighting, it tries to reset the color back to the parent's
* background (usually Motif blue). Unfortunately, that is in a
@@ -212,12 +212,12 @@ static XtResource resources[] = {
{XmNhighlightOnEnter, XmCHighlightOnEnter, XmRBoolean, sizeof (Boolean),
XtOffset (GLwDrawingAreaWidget, primitive.highlight_on_enter),
XmRImmediate, (XtPointer) FALSE},
-
+
{XmNhighlightThickness, XmCHighlightThickness, XmRHorizontalDimension,
sizeof (Dimension),
XtOffset (GLwDrawingAreaWidget, primitive.highlight_thickness),
XmRImmediate, (XtPointer) 0},
-#endif
+#endif
};
@@ -236,16 +236,16 @@ static XtResource initializeResources[] = {
/* reallocate any colors we need in the new colormap */
-
+
/* The background is obtained only if the allocateBackground resource is TRUE*/
static XtResource backgroundResources[] = {
#ifdef __GLX_MOTIF
- {XmNbackground, XmCBackground,XmRPixel,
+ {XmNbackground, XmCBackground,XmRPixel,
sizeof(Pixel),XtOffset(GLwDrawingAreaWidget,core.background_pixel),
XmRString,(XtPointer)"lightgrey"},
/*XmRCallProc,(XtPointer)_XmBackgroundColorDefault},*/
- {XmNbackgroundPixmap,XmCPixmap,XmRXmBackgroundPixmap,
+ {XmNbackgroundPixmap,XmCPixmap,XmRXmBackgroundPixmap,
sizeof(Pixmap),XtOffset(GLwDrawingAreaWidget,core.background_pixmap),
XmRImmediate,(XtPointer)XmUNSPECIFIED_PIXMAP},
@@ -258,7 +258,7 @@ static XtResource backgroundResources[] = {
{XtNbackgroundPixmap, XtCPixmap, XtRPixmap, sizeof(Pixmap),
XtOffset(GLwDrawingAreaWidget,core.background_pixmap),
XtRImmediate,(XtPointer)XtUnspecifiedPixmap},
-#endif
+#endif
};
@@ -268,7 +268,7 @@ static XtResource backgroundResources[] = {
*/
#ifdef __GLX_MOTIF
static XtResource otherColorResources[] = {
- {XmNforeground,XmCForeground,XmRPixel,
+ {XmNforeground,XmCForeground,XmRPixel,
sizeof(Pixel),XtOffset(GLwDrawingAreaWidget,primitive.foreground),
XmRString,(XtPointer)"lighgrey"},
/*XmRCallProc, (XtPointer) _XmForegroundColorDefault},*/
@@ -338,9 +338,9 @@ GLwDrawingAreaClassRec glwDrawingAreaClassRec = {
/* arm_and_activate */ NULL,
/* get_resources */ NULL,
/* num get_resources */ 0,
- /* extension */ NULL,
+ /* extension */ NULL,
}
-#endif
+#endif
};
WidgetClass glwDrawingAreaWidgetClass=(WidgetClass)&glwDrawingAreaClassRec;
@@ -432,7 +432,7 @@ static void createColormap(GLwDrawingAreaWidget w,int offset,XrmValue *value){
static int cacheEntries=0;
static int cacheMalloced=0;
register int i;
-
+
assert(w->glwDrawingArea.visualInfo);
/* see if we can find it in the cache */
@@ -458,7 +458,7 @@ static void createColormap(GLwDrawingAreaWidget w,int offset,XrmValue *value){
cmapCache=(struct cmapCache*)XtRealloc((char*)cmapCache,sizeof(struct cmapCache)*cacheMalloced);
}
}
-
+
cmapCache[cacheEntries].cmap=XCreateColormap(XtDisplay(w),
RootWindow(XtDisplay(w),
w->glwDrawingArea.visualInfo->screen),
@@ -510,7 +510,7 @@ static void Initialize(GLwDrawingAreaWidget req,GLwDrawingAreaWidget neww,ArgLis
if(req->glwDrawingArea.allocateOtherColors){
XtGetApplicationResources((Widget)neww,neww,otherColorResources,XtNumber(otherColorResources),args,*num_args);
}
-#endif
+#endif
}
@@ -522,14 +522,14 @@ static void Realize(Widget w,Mask *valueMask,XSetWindowAttributes *attributes){
Status status;
Window windows[2],*windowsReturn,*windowList;
int countReturn,i;
-
+
/* if we haven't requested that the background be both installed and
* allocated, don't install it.
*/
if(!(glw->glwDrawingArea.installBackground && glw->glwDrawingArea.allocateBackground)){
*valueMask&=~CWBackPixel;
}
-
+
XtCreateWindow(w,(unsigned int)InputOutput,glw->glwDrawingArea.visualInfo->visual,*valueMask,attributes);
/* if appropriate, call XSetWMColormapWindows to install the colormap */
@@ -542,7 +542,7 @@ static void Realize(Widget w,Mask *valueMask,XSetWindowAttributes *attributes){
/* check to see if there is already a property */
status=XGetWMColormapWindows(XtDisplay(parentShell),XtWindow(parentShell),&windowsReturn,&countReturn);
-
+
/* if no property, just create one */
if(!status){
windows[0]=XtWindow(w);
@@ -624,7 +624,7 @@ static void Destroy(GLwDrawingAreaWidget glw){
/* make sure there is a property */
status=XGetWMColormapWindows(XtDisplay(parentShell),XtWindow(parentShell),&windowsReturn,&countReturn);
-
+
/* if no property, just return. If there was a property, continue */
if(status){
@@ -636,7 +636,7 @@ static void Destroy(GLwDrawingAreaWidget glw){
for(i++; ido_destroy = False;
/* TODO: darwin: Integrate with above to do indirect */
- if(apple_glx_create_context(&gc->driContext, dpy, screen, fbconfig,
+ if(apple_glx_create_context(&gc->driContext, dpy, screen, fbconfig,
shareList ? shareList->driContext : NULL,
&errorcode, &x11error)) {
__glXSendError(dpy, errorcode, 0, X_GLXCreateContext, x11error);
diff --git a/src/glx/dri2.c b/src/glx/dri2.c
index adfd3d1..5e99c73 100644
--- a/src/glx/dri2.c
+++ b/src/glx/dri2.c
@@ -235,7 +235,7 @@ DRI2QueryVersion(Display * dpy, int *major, int *minor)
nevents = 2;
break;
}
-
+
for (i = 0; i < nevents; i++) {
XESetWireToEvent (dpy, info->codes->first_event + i, DRI2WireToEvent);
XESetEventToWire (dpy, info->codes->first_event + i, DRI2EventToWire);
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index b0559b2..51502ef 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -832,7 +832,7 @@ dri2CreateScreen(int screen, struct glx_display * priv)
goto handle_error;
}
-
+
/* If the server does not support the protocol for
* DRI2GetBuffersWithFormat, don't supply that interface to the driver.
*/
@@ -962,7 +962,7 @@ dri2CreateDisplay(Display * dpy)
pdp->loader_extensions[i++] = &dri2LoaderExtension_old.base;
else
pdp->loader_extensions[i++] = &dri2LoaderExtension.base;
-
+
pdp->loader_extensions[i++] = &systemTimeExtension.base;
#ifdef __DRI_USE_INVALIDATE
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index 42b263c..6751a6d 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -304,7 +304,7 @@ static const __DRIextension *loader_extensions[] = {
/**
* Perform the required libGL-side initialization and call the client-side
* driver's \c __driCreateNewScreen function.
- *
+ *
* \param dpy Display pointer.
* \param scrn Screen number on the display.
* \param psc DRI screen information.
@@ -715,7 +715,7 @@ driDrawableGetMSC(struct glx_screen *base, __GLXDRIdrawable *pdraw,
if (pdp && psc->sbc && psc->msc)
return ( (*psc->msc->getMSC)(psc->driScreen, msc) == 0 &&
- (*psc->sbc->getSBC)(pdp->driDrawable, sbc) == 0 &&
+ (*psc->sbc->getSBC)(pdp->driDrawable, sbc) == 0 &&
__glXGetUST(ust) == 0 );
}
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
index 5f91bc6..7cf2344 100644
--- a/src/glx/glx_pbuffer.c
+++ b/src/glx/glx_pbuffer.c
@@ -659,9 +659,9 @@ glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list)
if (apple_glx_pbuffer_create(dpy, config, width, height, &errorcode,
&result)) {
- /*
+ /*
* apple_glx_pbuffer_create only sets the errorcode to core X11
- * errors.
+ * errors.
*/
__glXSendError(dpy, errorcode, 0, X_GLXCreatePbuffer, true);
@@ -728,7 +728,7 @@ glXQueryDrawable(Display * dpy, GLXDrawable drawable,
* use XSetErrorHandler(), which is known to not be thread safe.
* If we use a round-trip call to validate the drawable, there could
* be a race, so instead we just opt in favor of letting the
- * XGetGeometry request fail with a GetGeometry request X error
+ * XGetGeometry request fail with a GetGeometry request X error
* rather than GLXBadDrawable, in what is hoped to be a rare
* case of an invalid drawable. In practice most and possibly all
* X11 apps using GLX shouldn't notice a difference.
@@ -775,7 +775,7 @@ glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask)
if (apple_glx_pbuffer_set_event_mask(drawable, mask))
return; /*done */
- /*
+ /*
* The spec allows a window, but currently there are no valid
* events for a window, so do nothing.
*/
@@ -808,7 +808,7 @@ glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask)
if (apple_glx_pbuffer_get_event_mask(drawable, mask))
return; /*done */
- /*
+ /*
* The spec allows a window, but currently there are no valid
* events for a window, so do nothing, but set the mask to 0.
*/
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h
index 36a0808..5cffc39 100644
--- a/src/glx/glxclient.h
+++ b/src/glx/glxclient.h
@@ -223,7 +223,7 @@ struct glx_context_vtable {
GLXDrawable drawable,
int buffer, const int *attrib_list);
void (*release_tex_image)(Display * dpy, GLXDrawable drawable, int buffer);
-
+
};
extern void
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index d9ca3f5..ab7982f 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -482,7 +482,7 @@ glXCopyContext(Display * dpy, GLXContext source_user,
mask, &errorcode, &x11error)) {
__glXSendError(dpy, errorcode, 0, X_GLXCopyContext, x11error);
}
-
+
#else
xGLXCopyContextReq *req;
struct glx_context *gc = __glXGetCurrentContext();
@@ -607,10 +607,10 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
const struct glx_config *config;
config = _gl_context_modes_find_visual(psc->visuals, vis->visualid);
-
+
if(apple_glx_pixmap_create(dpy, vis->screen, pixmap, config))
return None;
-
+
return pixmap;
#else
xGLXCreateGLXPixmapReq *req;
@@ -1786,7 +1786,7 @@ __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
/*
** GLX_SGIX_fbconfig
-** Many of these functions are aliased to GLX 1.3 entry points in the
+** Many of these functions are aliased to GLX 1.3 entry points in the
** GLX_functions table.
*/
diff --git a/src/glx/glxconfig.c b/src/glx/glxconfig.c
index 1d9678f..4da6759 100644
--- a/src/glx/glxconfig.c
+++ b/src/glx/glxconfig.c
@@ -42,7 +42,7 @@
/**
* Get data from a GLX config
- *
+ *
* \param mode GL context mode whose data is to be returned.
* \param attribute Attribute of \c mode that is to be returned.
* \param value_return Location to store the data member of \c mode.
@@ -207,7 +207,7 @@ glx_config_get(struct glx_config * mode, int attribute, int *value_return)
* zero or \c GLX_DONT_CARE (which is -1). As support for additional
* extensions is added, the new values will be initialized to appropriate
* values from the extension specification.
- *
+ *
* \param count Number of structures to allocate.
* \param minimum_size Minimum size of a structure to allocate. This allows
* for differences in the version of the
diff --git a/src/glx/glxconfig.h b/src/glx/glxconfig.h
index f7ee958..efb5297 100644
--- a/src/glx/glxconfig.h
+++ b/src/glx/glxconfig.h
@@ -56,7 +56,7 @@ struct glx_config {
/* GLX */
GLint visualID;
- GLint visualType; /**< One of the GLX X visual types. (i.e.,
+ GLint visualType; /**< One of the GLX X visual types. (i.e.,
* \c GLX_TRUE_COLOR, etc.)
*/
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index c75c9bf..fc59fcb 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -86,7 +86,7 @@ static /* const */ char *error_list[] = {
};
#ifdef GLX_USE_APPLEGL
-static char *__glXErrorString(Display *dpy, int code, XExtCodes *codes,
+static char *__glXErrorString(Display *dpy, int code, XExtCodes *codes,
char *buf, int n);
#endif
@@ -329,8 +329,8 @@ QueryVersion(Display * dpy, int opcode, int *major, int *minor)
#endif /* USE_XCB */
}
-/*
- * We don't want to enable this GLX_OML_swap_method in glxext.h,
+/*
+ * We don't want to enable this GLX_OML_swap_method in glxext.h,
* because we can't support it. The X server writes it out though,
* so we should handle it somehow, to avoid false warnings.
*/
@@ -412,7 +412,7 @@ __glXInitializeVisualConfigFromTags(struct glx_config * config, int count,
for (i = 0; i < count; i += 2) {
long int tag = *bp++;
-
+
switch (tag) {
case GLX_RGBA:
FETCH_OR_SET(rgbMode);
@@ -493,7 +493,7 @@ __glXInitializeVisualConfigFromTags(struct glx_config * config, int count,
config->drawableType = *bp++;
#ifdef GLX_USE_APPLEGL
/* AppleSGLX supports pixmap and pbuffers with all config. */
- config->drawableType |= GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT;
+ config->drawableType |= GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT;
#endif
break;
case GLX_RENDER_TYPE:
@@ -617,7 +617,7 @@ createConfigsFromProperties(Display * dpy, int nvisuals, int nprops,
/* Older X servers don't send this so we default it here. */
m->drawableType = GLX_WINDOW_BIT;
#else
- /*
+ /*
* The XQuartz 2.3.2.1 X server doesn't set this properly, so
* set the proper bits here.
* AppleSGLX supports windows, pixmaps, and pbuffers with all config.
diff --git a/src/glx/glxextensions.h b/src/glx/glxextensions.h
index 7877661..d625f13 100644
--- a/src/glx/glxextensions.h
+++ b/src/glx/glxextensions.h
@@ -260,7 +260,7 @@ extern void
__glXEnableDirectExtension(struct glx_screen *psc, const char *name);
/* Source-level backwards compatibility with old drivers. They won't
- * find the respective functions, though.
+ * find the respective functions, though.
*/
typedef void (*PFNGLXENABLEEXTENSIONPROC) (const char *name,
GLboolean force_client);
diff --git a/src/glx/indirect.c b/src/glx/indirect.c
index 49938a1..0fd4165 100644
--- a/src/glx/indirect.c
+++ b/src/glx/indirect.c
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2004, 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/glx/indirect.h b/src/glx/indirect.h
index f322207..6d064c9 100644
--- a/src/glx/indirect.h
+++ b/src/glx/indirect.h
@@ -4,18 +4,18 @@
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/glx/indirect_glx.c b/src/glx/indirect_glx.c
index 1870ede..f321121 100644
--- a/src/glx/indirect_glx.c
+++ b/src/glx/indirect_glx.c
@@ -170,7 +170,7 @@ indirect_unbind_context(struct glx_context *gc, struct glx_context *new)
if (gc == new)
return;
-
+
/* We are either switching to no context, away from a indirect
* context to a direct context or from one dpy to another and have
* to send a request to the dpy to unbind the previous context.
@@ -436,7 +436,7 @@ indirect_create_context(struct glx_screen *psc,
bufSize = __GLX_MAX_RENDER_CMD_SIZE;
}
gc->maxSmallRenderCommandSize = bufSize;
-
+
return gc;
}
diff --git a/src/glx/indirect_init.c b/src/glx/indirect_init.c
index 9f1ee59..aebbba6 100644
--- a/src/glx/indirect_init.c
+++ b/src/glx/indirect_init.c
@@ -4,18 +4,18 @@
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/glx/indirect_size.c b/src/glx/indirect_size.c
index 411a0e4..ad5c623 100644
--- a/src/glx/indirect_size.c
+++ b/src/glx/indirect_size.c
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/glx/indirect_size.h b/src/glx/indirect_size.h
index 79b849b..7b1910c 100644
--- a/src/glx/indirect_size.h
+++ b/src/glx/indirect_size.h
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/glx/indirect_vertex_array.h b/src/glx/indirect_vertex_array.h
index 3738032..937ebc3 100644
--- a/src/glx/indirect_vertex_array.h
+++ b/src/glx/indirect_vertex_array.h
@@ -1,18 +1,18 @@
/*
* (C) Copyright IBM Corporation 2004, 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/glx/indirect_vertex_array_priv.h b/src/glx/indirect_vertex_array_priv.h
index 56dac37..ac7764a 100644
--- a/src/glx/indirect_vertex_array_priv.h
+++ b/src/glx/indirect_vertex_array_priv.h
@@ -1,18 +1,18 @@
/*
* (C) Copyright IBM Corporation 2004, 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
@@ -196,14 +196,14 @@ struct array_state_vector
struct array_state *arrays;
/**
- * Number of currently enabled client-side arrays. The value of this
+ * Number of currently enabled client-side arrays. The value of this
* field is only valid if \c array_info_cache_valid is true.
*/
size_t enabled_client_array_count;
/**
* \name ARRAY_INFO cache.
- *
+ *
* These fields track the state of the ARRAY_INFO cache. The
* \c array_info_cache_size is the size of the actual data stored in
* \c array_info_cache. \c array_info_cache_buffer_size is the size of
@@ -238,7 +238,7 @@ struct array_state_vector
* of this protocol is disabled with really old servers (i.e., servers
* that don't support GL 1.1 or EXT_vertex_arrays) or when an environment
* variable is set.
- *
+ *
* \todo
* GL 1.1 and EXT_vertex_arrays use identical protocol, but have different
* opcodes for \c glDrawArrays. For servers that advertise one or the
@@ -249,7 +249,7 @@ struct array_state_vector
/**
* Is it possible to use the new GL X.X / ARB_vertex_buffer_object
* protocol?
- *
+ *
* \todo
* This protocol has not yet been defined by the ARB, but is currently a
* work in progress. This field is a place-holder.
@@ -258,7 +258,7 @@ struct array_state_vector
/**
* Active texture unit set by \c glClientActiveTexture.
- *
+ *
* \sa __glXGetActiveTextureUnit
*/
unsigned active_texture_unit;
@@ -268,7 +268,7 @@ struct array_state_vector
* GL 1.3 are not supported, this will be at least 1. When multitexture
* is supported, this will be the value queried by calling
* \c glGetIntegerv with \c GL_MAX_TEXTURE_UNITS.
- *
+ *
* \todo
* Investigate if this should be the value of \c GL_MAX_TEXTURE_COORDS
* instead (if GL 2.0 / ARB_fragment_shader / ARB_fragment_program /
@@ -286,14 +286,14 @@ struct array_state_vector
/**
* \n Methods for implementing various GL functions.
- *
+ *
* These method pointers are only valid \c array_info_cache_valid is set.
* When each function starts, it much check \c array_info_cache_valid.
* If it is not set, it must call \c fill_array_info_cache and call
* the new method.
- *
+ *
* \sa fill_array_info_cache
- *
+ *
* \todo
* Write code to plug these functions directly into the dispatch table.
*/
diff --git a/src/glx/indirect_vertex_program.c b/src/glx/indirect_vertex_program.c
index d955fdf..0809f2a 100644
--- a/src/glx/indirect_vertex_program.c
+++ b/src/glx/indirect_vertex_program.c
@@ -1,18 +1,18 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
@@ -138,7 +138,7 @@ __indirect_glGetVertexAttribPointervNV(GLuint index, GLenum pname,
/**
* Get the selected attribute from the vertex array state vector.
- *
+ *
* \returns
* On success \c GL_TRUE is returned. Otherwise, \c GL_FALSE is returned.
*/
diff --git a/src/glx/indirect_window_pos.c b/src/glx/indirect_window_pos.c
index e97be35..0d2e640 100644
--- a/src/glx/indirect_window_pos.c
+++ b/src/glx/indirect_window_pos.c
@@ -2,18 +2,18 @@
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/glx/pixel.c b/src/glx/pixel.c
index d508d62..6692e03 100644
--- a/src/glx/pixel.c
+++ b/src/glx/pixel.c
@@ -157,7 +157,7 @@ FillBitmap(struct glx_context * gc, GLint width, GLint height,
/*
** Extract array from user's data applying all pixel store modes.
-** The internal packed array format used has LSB_FIRST = FALSE and
+** The internal packed array format used has LSB_FIRST = FALSE and
** ALIGNMENT = 1.
*/
void
diff --git a/src/glx/pixelstore.c b/src/glx/pixelstore.c
index 1d776b8..33ca00e 100644
--- a/src/glx/pixelstore.c
+++ b/src/glx/pixelstore.c
@@ -37,7 +37,7 @@
/**
* Send glPixelStore command to the server
- *
+ *
* \param gc Current GLX context
* \param sop Either \c X_GLsop_PixelStoref or \c X_GLsop_PixelStorei
* \param pname Selector of which pixel parameter is to be set.
diff --git a/src/glx/renderpix.c b/src/glx/renderpix.c
index 8234bbe..6ac7e7a 100644
--- a/src/glx/renderpix.c
+++ b/src/glx/renderpix.c
@@ -31,18 +31,18 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
@@ -59,7 +59,7 @@
/**
* Send a large image to the server. If necessary, a buffer is allocated
* to hold the unpacked data that is copied from the clients memory.
- *
+ *
* \param gc Current GLX context
* \param compsize Size, in bytes, of the image portion
* \param dim Number of dimensions of the image
diff --git a/src/mapi/glapi/SConscript b/src/mapi/glapi/SConscript
index 4ef855f..3251b8f 100644
--- a/src/mapi/glapi/SConscript
+++ b/src/mapi/glapi/SConscript
@@ -7,7 +7,7 @@ Import('*')
if env['platform'] != 'winddk':
env = env.Clone()
-
+
env.Append(CPPDEFINES = [
'MAPI_GLAPI_CURRENT',
])
@@ -22,7 +22,7 @@ if env['platform'] != 'winddk':
'#/src/mapi',
'#/src/mesa',
])
-
+
glapi_sources = [
'glapi_dispatch.c',
'glapi_entrypoint.c',
@@ -30,7 +30,7 @@ if env['platform'] != 'winddk':
'glapi_nop.c',
'glthread.c',
]
-
+
mapi_sources = [
'u_current.c',
'u_execmem.c',
@@ -46,7 +46,7 @@ if env['platform'] != 'winddk':
if env['gcc'] and env['platform'] != 'windows':
if env['machine'] == 'x86':
env.Append(CPPDEFINES = [
- 'USE_X86_ASM',
+ 'USE_X86_ASM',
'USE_MMX_ASM',
'USE_3DNOW_ASM',
'USE_SSE_ASM',
@@ -56,15 +56,15 @@ if env['platform'] != 'winddk':
]
elif env['machine'] == 'x86_64':
env.Append(CPPDEFINES = [
- 'USE_X86_64_ASM',
+ 'USE_X86_64_ASM',
])
glapi_sources += [
'glapi_x86-64.S'
]
elif env['machine'] == 'ppc':
env.Append(CPPDEFINES = [
- 'USE_PPC_ASM',
- 'USE_VMX_ASM',
+ 'USE_PPC_ASM',
+ 'USE_VMX_ASM',
])
glapi_sources += [
]
@@ -74,7 +74,7 @@ if env['platform'] != 'winddk':
]
else:
pass
-
+
glapi = env.ConvenienceLibrary(
target = 'glapi',
source = glapi_sources,
diff --git a/src/mapi/glapi/gen/gl_API.dtd b/src/mapi/glapi/gen/gl_API.dtd
index 30c646c..22a8d7f 100644
--- a/src/mapi/glapi/gen/gl_API.dtd
+++ b/src/mapi/glapi/gen/gl_API.dtd
@@ -124,13 +124,13 @@ glx:
reply) commands
large - set to "true" of the render command can use RenderLarge protocol.
doubles_in_order - older commands always put GLdouble data at the
- start of the render packet. Newer commands (e.g.,
+ start of the render packet. Newer commands (e.g.,
ProgramEnvParameter4dvARB) put the in the order that they appear
in the parameter list.
always_array - some single commands take reply data as an array or as
return value data (e.g., glGetLightfv). Other single commands take
reply data only as an array (e.g., glGetClipPlane).
- handcode - some functions are just too complicated to generate
+ handcode - some functions are just too complicated to generate
(e.g., glSeperableFilter2D) or operate only on client-side data
(e.g., glVertexPointer) and must be handcoded.
ignore - some functions have an entry in the dispatch table, but aren't
diff --git a/src/mapi/glapi/glapi_entrypoint.c b/src/mapi/glapi/glapi_entrypoint.c
index 993ccb9..5abc7d8 100644
--- a/src/mapi/glapi/glapi_entrypoint.c
+++ b/src/mapi/glapi/glapi_entrypoint.c
@@ -95,7 +95,7 @@ generate_entrypoint(unsigned int functionOffset)
* at offset 32 is the first one where the offset in the
* "jmp OFFSET*4(%eax)" can't be encoded in a single byte.
*/
- const GLubyte * const template_func = gl_dispatch_functions_start
+ const GLubyte * const template_func = gl_dispatch_functions_start
+ (DISPATCH_FUNCTION_SIZE * 32);
GLubyte * const code = (GLubyte *) u_execmem_alloc(DISPATCH_FUNCTION_SIZE);
diff --git a/src/mapi/glapi/glapi_getproc.c b/src/mapi/glapi/glapi_getproc.c
index 0a6ff77..e3ce450 100644
--- a/src/mapi/glapi/glapi_getproc.c
+++ b/src/mapi/glapi/glapi_getproc.c
@@ -42,7 +42,7 @@
*/
-#if !defined(DISPATCH_FUNCTION_SIZE)
+#if !defined(DISPATCH_FUNCTION_SIZE)
# define NEED_FUNCTION_POINTER
#endif
#include "glapi/glprocs.h"
@@ -169,7 +169,7 @@ struct _glapi_function {
/**
* Pointer to the dispatch stub for the named function.
- *
+ *
* \todo
* The semantic of this field should be changed slightly. Currently, it
* is always expected to be non-\c NULL. However, it would be better to
@@ -259,9 +259,9 @@ str_dup(const char *str)
* calls \c _glapi_add_dispatch we'll put in the proper offset. If that
* never happens, and the user calls this function, he'll segfault. That's
* what you get when you try calling a GL function that doesn't really exist.
- *
+ *
* \param funcName Name of the function to create an entry-point for.
- *
+ *
* \sa _glapi_add_entrypoint
*/
@@ -324,7 +324,7 @@ set_entry_info( struct _glapi_function * entry, const char * signature, unsigned
/**
* Fill-in the dispatch stub for the named function.
- *
+ *
* This function is intended to be called by a hardware driver. When called,
* a dispatch stub may be created created for the function. A pointer to this
* dispatch function will be returned by glXGetProcAddress.
@@ -362,7 +362,7 @@ set_entry_info( struct _glapi_function * entry, const char * signature, unsigned
* \todo
* Determine if code should be added to reject function names that start with
* 'glX'.
- *
+ *
* \bug
* Add code to compare \c parameter_signature with the parameter signature of
* a static function. In order to do that, we need to find a way to \b get
diff --git a/src/mapi/glapi/glapi_sparc.S b/src/mapi/glapi/glapi_sparc.S
index b919c28..eb40216 100644
--- a/src/mapi/glapi/glapi_sparc.S
+++ b/src/mapi/glapi/glapi_sparc.S
@@ -4,18 +4,18 @@
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/mapi/glapi/glapi_x86-64.S b/src/mapi/glapi/glapi_x86-64.S
index 486cf73..e62915f 100644
--- a/src/mapi/glapi/glapi_x86-64.S
+++ b/src/mapi/glapi/glapi_x86-64.S
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/mapi/glapi/glapi_x86.S b/src/mapi/glapi/glapi_x86.S
index 605bebc..ab55e14 100644
--- a/src/mapi/glapi/glapi_x86.S
+++ b/src/mapi/glapi/glapi_x86.S
@@ -4,18 +4,18 @@
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
* (C) Copyright IBM Corporation 2004, 2005
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/mapi/glapi/glapitable.h b/src/mapi/glapi/glapitable.h
index ff662dc..77d74db 100644
--- a/src/mapi/glapi/glapitable.h
+++ b/src/mapi/glapi/glapitable.h
@@ -4,18 +4,18 @@
* Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/mapi/glapi/glapitemp.h b/src/mapi/glapi/glapitemp.h
index 2ccb299..66b2936 100644
--- a/src/mapi/glapi/glapitemp.h
+++ b/src/mapi/glapi/glapitemp.h
@@ -4,18 +4,18 @@
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/mapi/glapi/glprocs.h b/src/mapi/glapi/glprocs.h
index 315847e..4048bc4 100644
--- a/src/mapi/glapi/glprocs.h
+++ b/src/mapi/glapi/glprocs.h
@@ -4,18 +4,18 @@
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
* (C) Copyright IBM Corporation 2004, 2006
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
diff --git a/src/mapi/mapi/entry.c b/src/mapi/mapi/entry.c
index fdf2a89..30886b8 100644
--- a/src/mapi/mapi/entry.c
+++ b/src/mapi/mapi/entry.c
@@ -31,7 +31,7 @@
#if defined(USE_X86_ASM) && defined(__GNUC__)
# ifdef GLX_USE_TLS
# include "entry_x86_tls.h"
-# else
+# else
# include "entry_x86_tsd.h"
# endif
#elif defined(USE_X86_64_ASM) && defined(__GNUC__) && defined(GLX_USE_TLS)
diff --git a/src/mapi/mapi/stub.c b/src/mapi/mapi/stub.c
index 3594eac..31eb68d 100644
--- a/src/mapi/mapi/stub.c
+++ b/src/mapi/mapi/stub.c
@@ -125,7 +125,7 @@ stub_find_dynamic(const char *name, int generate)
u_mutex_declare_static(dynamic_mutex);
struct mapi_stub *stub = NULL;
int count, i;
-
+
u_mutex_lock(dynamic_mutex);
if (generate)
diff --git a/src/mapi/mapi/table.c b/src/mapi/mapi/table.c
index 8f4f700..6d8933f 100644
--- a/src/mapi/mapi/table.c
+++ b/src/mapi/mapi/table.c
@@ -36,7 +36,7 @@ static void
noop_warn(const char *name)
{
static int debug = -1;
-
+
if (debug < 0)
debug = (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG"));
diff --git a/src/mapi/mapi/u_current.c b/src/mapi/mapi/u_current.c
index 77a593b..ed114f4 100644
--- a/src/mapi/mapi/u_current.c
+++ b/src/mapi/mapi/u_current.c
@@ -89,7 +89,7 @@ extern void (*__glapi_noop_table[])(void);
* thread, perhaps running on a different processor, is clearing it. Because
* of that, \c ThreadSafe, which can only ever be changed to \c GL_TRUE, is
* used to determine whether or not the application is multithreaded.
- *
+ *
* In the TLS case, the variables \c _glapi_Dispatch and \c _glapi_Context are
* hardcoded to \c NULL. Instead the TLS variables \c _glapi_tls_Dispatch and
* \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and
diff --git a/src/mapi/mapi/u_thread.h b/src/mapi/mapi/u_thread.h
index 92a0a39..a99fb1b 100644
--- a/src/mapi/mapi/u_thread.h
+++ b/src/mapi/mapi/u_thread.h
@@ -169,7 +169,7 @@ typedef benaphore u_mutex;
#ifndef THREADS
struct u_tsd {
- int initMagic;
+ int initMagic;
};
typedef unsigned u_mutex;
diff --git a/src/mapi/vgapi/vgapi.csv b/src/mapi/vgapi/vgapi.csv
index 5b11d06..717f1c8 100644
--- a/src/mapi/vgapi/vgapi.csv
+++ b/src/mapi/vgapi/vgapi.csv
@@ -33,7 +33,7 @@ VGfloat, GetParameterf, VGHandle object, VGint paramT
void, GetParameterfv, VGHandle object, VGint paramType, VGint count, VGfloat *values
VGint, GetParameteri, VGHandle object, VGint paramType
void, GetParameteriv, VGHandle object, VGint paramType, VGint count, VGint *values
-VGImage, GetParent, VGImage image
+VGImage, GetParent, VGImage image
VGbitfield, GetPathCapabilities, VGPath path
void, GetPixels, VGImage dst, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
const VGubyte *, GetString, VGStringID name
diff --git a/src/mesa/Makefile.mgw b/src/mesa/Makefile.mgw
index fc0ff28..9abb4ce 100644
--- a/src/mesa/Makefile.mgw
+++ b/src/mesa/Makefile.mgw
@@ -1,18 +1,18 @@
# Mesa 3-D graphics library
# Version: 7.0
-#
+#
# Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
-#
+#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
-#
+#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
-#
+#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -30,10 +30,10 @@
#
# updated : by Heromyth, on 2007-7-21
# Email : zxpmyth@yahoo.com.cn
-# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
+# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
# The others havn't been tested yet.
# 2) The generated DLLs are *not* compatible with the ones built
-# with the other compilers like VC8, especially for GLUT.
+# with the other compilers like VC8, especially for GLUT.
# 3) Although more tests are needed, it can be used individually!
@@ -109,7 +109,7 @@ else
ifeq ($(ICD),1)
CFLAGS += -DUSE_MGL_NAMESPACE
GL_DEF = drivers/windows/icd/mesa.def
- else
+ else
GL_DEF = $(LIB_NAME).def
endif
endif
@@ -126,7 +126,7 @@ endif
include sources.mak
-CFLAGS += $(INCLUDE_DIRS)
+CFLAGS += $(INCLUDE_DIRS)
ifeq ($(X86),1)
CFLAGS += -DUSE_X86_ASM
diff --git a/src/mesa/drivers/beos/GLView.cpp b/src/mesa/drivers/beos/GLView.cpp
index ee3415b..1e5cbbe 100644
--- a/src/mesa/drivers/beos/GLView.cpp
+++ b/src/mesa/drivers/beos/GLView.cpp
@@ -1,19 +1,19 @@
/*
* Mesa 3-D graphics library
* Version: 6.1
- *
+ *
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -88,7 +88,7 @@ extern "C" {
(color[BCOMP] << 24) | 0xFF000000)
#endif
-#define FLIP(coord) (LIBGGI_MODE(ggi_ctx->ggi_visual)->visible.y-(coord) - 1)
+#define FLIP(coord) (LIBGGI_MODE(ggi_ctx->ggi_visual)->visible.y-(coord) - 1)
const char * color_space_name(color_space space);
@@ -104,7 +104,7 @@ friend class BGLView;
public:
MesaDriver();
~MesaDriver();
-
+
void Init(BGLView * bglview, struct gl_context * c, struct gl_config * v, struct gl_framebuffer * b);
void LockGL();
@@ -132,7 +132,7 @@ friend class BGLView;
GLint m_bottom; // used for flipping Y coords
GLuint m_width;
GLuint m_height;
-
+
// Mesa Device Driver callback functions
static void UpdateState(struct gl_context *ctx, GLuint new_state);
static void ClearIndex(struct gl_context *ctx, GLuint index);
@@ -288,7 +288,7 @@ BGLView::BGLView(BRect rect, char *name,
m_options = options | BGL_INDIRECT;
struct dd_function_table functions;
-
+
if (!rgbFlag) {
fprintf(stderr, "Mesa Warning: color index mode not supported\n");
}
@@ -531,33 +531,33 @@ status_t BGLView::GetSupportedSuites(BMessage *data)
void BGLView::DirectConnected( direct_buffer_info *info )
{
#if 0
- if (! m_direct_connected && m_direct_connection_disabled)
- return;
+ if (! m_direct_connected && m_direct_connection_disabled)
+ return;
- direct_info_locker->Lock();
- switch(info->buffer_state & B_DIRECT_MODE_MASK) {
- case B_DIRECT_START:
+ direct_info_locker->Lock();
+ switch(info->buffer_state & B_DIRECT_MODE_MASK) {
+ case B_DIRECT_START:
m_direct_connected = true;
- case B_DIRECT_MODIFY:
- // Get clipping information
+ case B_DIRECT_MODIFY:
+ // Get clipping information
if (m_clip_list)
- free(m_clip_list);
- m_clip_list_count = info->clip_list_count;
- m_clip_list = (clipping_rect *) malloc(m_clip_list_count*sizeof(clipping_rect));
- if (m_clip_list) {
+ free(m_clip_list);
+ m_clip_list_count = info->clip_list_count;
+ m_clip_list = (clipping_rect *) malloc(m_clip_list_count*sizeof(clipping_rect));
+ if (m_clip_list) {
memcpy(m_clip_list, info->clip_list, m_clip_list_count*sizeof(clipping_rect));
- fBits = (uint8 *) info->bits;
- fRowBytes = info->bytes_per_row;
- fFormat = info->pixel_format;
- fBounds = info->window_bounds;
- fDirty = true;
- }
- break;
- case B_DIRECT_STOP:
- fConnected = false;
- break;
- }
- direct_info_locker->Unlock();
+ fBits = (uint8 *) info->bits;
+ fRowBytes = info->bytes_per_row;
+ fFormat = info->pixel_format;
+ fBounds = info->window_bounds;
+ fDirty = true;
+ }
+ break;
+ case B_DIRECT_STOP:
+ fConnected = false;
+ break;
+ }
+ direct_info_locker->Unlock();
#endif
}
@@ -663,7 +663,7 @@ MesaDriver::~MesaDriver()
_mesa_destroy_visual(m_glvisual);
_mesa_destroy_framebuffer(m_glframebuffer);
_mesa_destroy_context(m_glcontext);
-
+
delete m_bitmap;
}
@@ -685,7 +685,7 @@ void MesaDriver::Init(BGLView * bglview, struct gl_context * ctx, struct gl_conf
// Use default TCL pipeline
tnl->Driver.RunPipeline = _tnl_run_pipeline;
-
+
swdd->SetBuffer = this->SetBuffer;
}
@@ -746,15 +746,15 @@ status_t MesaDriver::CopyPixelsOut(BPoint location, BBitmap *bitmap)
color_space_name(dcs));
return B_BAD_TYPE;
}
-
+
// debugger("CopyPixelsOut()");
-
+
BRect sr = m_bitmap->Bounds();
BRect dr = bitmap->Bounds();
sr = sr & dr.OffsetBySelf(location);
- dr = sr.OffsetByCopy(-location.x, -location.y);
-
+ dr = sr.OffsetByCopy(-location.x, -location.y);
+
uint8 *ps = (uint8 *) m_bitmap->Bits();
uint8 *pd = (uint8 *) bitmap->Bits();
uint32 *s, *d;
@@ -762,10 +762,10 @@ status_t MesaDriver::CopyPixelsOut(BPoint location, BBitmap *bitmap)
for (y = (uint32) sr.top; y <= (uint32) sr.bottom; y++) {
s = (uint32 *) (ps + y * m_bitmap->BytesPerRow());
s += (uint32) sr.left;
-
+
d = (uint32 *) (pd + (y + (uint32) (dr.top - sr.top)) * bitmap->BytesPerRow());
d += (uint32) dr.left;
-
+
memcpy(d, s, dr.IntegerWidth() * 4);
}
return B_OK;
@@ -782,15 +782,15 @@ status_t MesaDriver::CopyPixelsIn(BBitmap *bitmap, BPoint location)
color_space_name(dcs));
return B_BAD_TYPE;
}
-
+
// debugger("CopyPixelsIn()");
BRect sr = bitmap->Bounds();
BRect dr = m_bitmap->Bounds();
sr = sr & dr.OffsetBySelf(location);
- dr = sr.OffsetByCopy(-location.x, -location.y);
-
+ dr = sr.OffsetByCopy(-location.x, -location.y);
+
uint8 *ps = (uint8 *) bitmap->Bits();
uint8 *pd = (uint8 *) m_bitmap->Bits();
uint32 *s, *d;
@@ -798,10 +798,10 @@ status_t MesaDriver::CopyPixelsIn(BBitmap *bitmap, BPoint location)
for (y = (uint32) sr.top; y <= (uint32) sr.bottom; y++) {
s = (uint32 *) (ps + y * bitmap->BytesPerRow());
s += (uint32) sr.left;
-
+
d = (uint32 *) (pd + (y + (uint32) (dr.top - sr.top)) * m_bitmap->BytesPerRow());
d += (uint32) dr.left;
-
+
memcpy(d, s, dr.IntegerWidth() * 4);
}
return B_OK;
@@ -881,7 +881,7 @@ void MesaDriver::ClearColor(struct gl_context *ctx, const GLfloat color[4])
CLAMPED_FLOAT_TO_CHAN(md->m_clear_color[BE_RCOMP], color[0]);
CLAMPED_FLOAT_TO_CHAN(md->m_clear_color[BE_GCOMP], color[1]);
CLAMPED_FLOAT_TO_CHAN(md->m_clear_color[BE_BCOMP], color[2]);
- CLAMPED_FLOAT_TO_CHAN(md->m_clear_color[BE_ACOMP], color[3]);
+ CLAMPED_FLOAT_TO_CHAN(md->m_clear_color[BE_ACOMP], color[3]);
assert(md->m_bglview);
}
@@ -1270,7 +1270,7 @@ void MesaDriver::WriteRGBASpanBack(const struct gl_context *ctx, GLuint n,
int row = md->m_bottom - y;
uint8 * ptr = (uint8 *) bitmap->Bits() + (row * bitmap->BytesPerRow()) + x * 4;
uint32 * pixel = (uint32 *) ptr;
-
+
if (mask) {
while(n--) {
if (*mask++)
@@ -1300,7 +1300,7 @@ void MesaDriver::WriteRGBSpanBack(const struct gl_context *ctx, GLuint n,
int row = md->m_bottom - y;
uint8 * ptr = (uint8 *) bitmap->Bits() + (row * bitmap->BytesPerRow()) + x * 4;
uint32 * pixel = (uint32 *) ptr;
-
+
if (mask) {
while(n--) {
if (*mask++)
@@ -1332,7 +1332,7 @@ void MesaDriver::WriteMonoRGBASpanBack(const struct gl_context *ctx, GLuint n,
uint8 * ptr = (uint8 *) bitmap->Bits() + (row * bitmap->BytesPerRow()) + x * 4;
uint32 * pixel = (uint32 *) ptr;
uint32 pixel_color = PACK_B_RGBA32(color);
-
+
if (mask) {
while(n--) {
if (*mask++)
@@ -1405,7 +1405,7 @@ void MesaDriver::WriteMonoRGBAPixelsBack(const struct gl_context *ctx, GLuint n,
assert(bitmap);
uint32 pixel_color = PACK_B_RGBA32(color);
-#if 0
+#if 0
while(n--) {
if (*mask++) {
int row = md->m_bottom - *y;
diff --git a/src/mesa/drivers/beos/Makefile b/src/mesa/drivers/beos/Makefile
index c79dd24..70fbd18 100644
--- a/src/mesa/drivers/beos/Makefile
+++ b/src/mesa/drivers/beos/Makefile
@@ -147,7 +147,7 @@ ifeq ($(CPU), x86)
DRIVER_SOURCES += $(addprefix ../../, $(X86_API))
else
# No GL API PPC optimization yet
-endif
+endif
DRIVER_OBJECTS = $(DRIVER_SOURCES:.c=.o)
DRIVER_OBJECTS := $(DRIVER_OBJECTS:.S=.o)
@@ -191,7 +191,7 @@ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
depend: $(DRIVER_SOURCES) $(GLU_SOURCES)
touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(DRIVER_SOURCES) $(GLU_SOURCES) > /dev/null
+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(DRIVER_SOURCES) $(GLU_SOURCES) > /dev/null
clean:
-rm -f depend depend.bak $(OBJECTS)
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index fc67bee..4075d44 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -112,7 +112,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->NewTextureObject = _mesa_new_texture_object;
driver->DeleteTexture = _mesa_delete_texture_object;
driver->NewTextureImage = _mesa_new_texture_image;
- driver->FreeTexImageData = _mesa_free_texture_image_data;
+ driver->FreeTexImageData = _mesa_free_texture_image_data;
driver->MapTexture = NULL;
driver->UnmapTexture = NULL;
driver->TextureMemCpy = memcpy;
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index cdb2500..39c6e1d 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -676,7 +676,7 @@ _mesa_meta_end(struct gl_context *ctx)
if (ctx->Extensions.ARB_vertex_program) {
_mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB,
save->VertexProgramEnabled);
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
save->VertexProgram);
_mesa_reference_vertprog(ctx, &save->VertexProgram, NULL);
}
@@ -1935,7 +1935,7 @@ _mesa_meta_DrawPixels(struct gl_context *ctx,
_mesa_StencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
_mesa_StencilFunc(GL_ALWAYS, 0, 255);
_mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4);
-
+
/* set stencil bits to 1 where needed */
_mesa_StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
@@ -2417,7 +2417,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
verts[2].y = 1.0F;
verts[3].x = 0.0F;
verts[3].y = 1.0F;
-
+
/* upload new vertex data */
_mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);
}
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index 4ecddbc..b0b5e8a 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -18,7 +18,7 @@ INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES)
OBJECTS = $(C_SOURCES:.c=.o) \
$(CXX_SOURCES:.cpp=.o) \
- $(ASM_SOURCES:.S=.o)
+ $(ASM_SOURCES:.S=.o)
### Include directories
@@ -67,7 +67,7 @@ $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) Makefile \
$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
- $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)
+ $(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR)
# If the Makefile defined SUBDIRS, run make in each
diff --git a/src/mesa/drivers/dri/common/dri_metaops.h b/src/mesa/drivers/dri/common/dri_metaops.h
index aa7d4ba..d847153 100644
--- a/src/mesa/drivers/dri/common/dri_metaops.h
+++ b/src/mesa/drivers/dri/common/dri_metaops.h
@@ -36,14 +36,14 @@ struct dri_metaops {
struct gl_fragment_program *bitmap_fp;
struct gl_vertex_program *passthrough_vp;
struct gl_buffer_object *texcoord_vbo;
-
+
struct gl_fragment_program *saved_fp;
GLboolean saved_fp_enable;
struct gl_vertex_program *saved_vp;
GLboolean saved_vp_enable;
struct gl_fragment_program *tex2d_fp;
-
+
GLboolean saved_texcoord_enable;
struct gl_buffer_object *saved_array_vbo, *saved_texcoord_vbo;
GLenum saved_texcoord_type;
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index bf8cf6e..bce97fb 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -6,7 +6,7 @@
* driver doesn't really \e have to use any of this - it's optional. But, some
* useful stuff is done here that otherwise would have to be duplicated in most
* drivers.
- *
+ *
* Basically, these utility functions take care of some of the dirty details of
* screen initialization, context creation, context binding, DRM setup, etc.
*
@@ -78,19 +78,19 @@ driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 )
/**
* Unbind context.
- *
+ *
* \param scrn the screen.
* \param gc context.
*
* \return \c GL_TRUE on success, or \c GL_FALSE on failure.
- *
+ *
* \internal
* This function calls __DriverAPIRec::UnbindContext, and then decrements
* __DRIdrawableRec::refcount which must be non-zero for a successful
* return.
- *
+ *
* While casting the opaque private pointers associated with the parameters
- * into their respective real types it also assures they are not \c NULL.
+ * into their respective real types it also assures they are not \c NULL.
*/
static int driUnbindContext(__DRIcontext *pcp)
{
@@ -208,7 +208,7 @@ static int driBindContext(__DRIcontext *pcp,
* Update private drawable information.
*
* \param pdp pointer to the private drawable information to update.
- *
+ *
* This function basically updates the __DRIdrawable struct's
* cliprect information by calling \c __DRIinterfaceMethods::getDrawableInfo.
* This is usually called by the DRI_VALIDATE_DRAWABLE_INFO macro which
@@ -221,22 +221,22 @@ __driUtilUpdateDrawableInfo(__DRIdrawable *pdp)
{
__DRIscreen *psp = pdp->driScreenPriv;
__DRIcontext *pcp = pdp->driContextPriv;
-
- if (!pcp
+
+ if (!pcp
|| ((pdp != pcp->driDrawablePriv) && (pdp != pcp->driReadablePriv))) {
- /* ERROR!!!
+ /* ERROR!!!
* ...but we must ignore it. There can be many contexts bound to a
* drawable.
*/
}
if (pdp->pClipRects) {
- free(pdp->pClipRects);
+ free(pdp->pClipRects);
pdp->pClipRects = NULL;
}
if (pdp->pBackClipRects) {
- free(pdp->pBackClipRects);
+ free(pdp->pBackClipRects);
pdp->pBackClipRects = NULL;
}
@@ -296,10 +296,10 @@ static void driReportDamage(__DRIdrawable *pdp,
* Swap buffers.
*
* \param drawablePrivate opaque pointer to the per-drawable private info.
- *
+ *
* \internal
* This function calls __DRIdrawable::swapBuffers.
- *
+ *
* Is called directly from glXSwapBuffers().
*/
static void driSwapBuffers(__DRIdrawable *dPriv)
@@ -453,7 +453,7 @@ driCreateNewDrawable(__DRIscreen *psp, const __DRIconfig *config,
/* This special default value is replaced with the configured
* default value when the drawable is first bound to a direct
- * rendering context.
+ * rendering context.
*/
pdp->swap_interval = (unsigned)-1;
@@ -520,7 +520,7 @@ static void dri_get_drawable(__DRIdrawable *pdp)
{
pdp->refcount++;
}
-
+
static void dri_put_drawable(__DRIdrawable *pdp)
{
__DRIscreen *psp;
@@ -560,7 +560,7 @@ driDestroyDrawable(__DRIdrawable *pdp)
/**
* Destroy the per-context private information.
- *
+ *
* \internal
* This function calls __DriverAPIRec::DestroyContext on \p contextPrivate, calls
* drmDestroyContext(), and finally frees \p contextPrivate.
@@ -577,14 +577,14 @@ driDestroyContext(__DRIcontext *pcp)
/**
* Create the per-drawable private driver information.
- *
+ *
* \param render_type Type of rendering target. \c GLX_RGBA is the only
* type likely to ever be supported for direct-rendering.
* \param shared Context with which to share textures, etc. or NULL
*
* \returns An opaque pointer to the per-context private information on
* success, or \c NULL on failure.
- *
+ *
* \internal
* This function allocates and fills a __DRIcontextRec structure. It
* performs some device independent initialization and passes all the
@@ -594,7 +594,7 @@ driDestroyContext(__DRIcontext *pcp)
*/
static __DRIcontext *
driCreateNewContext(__DRIscreen *psp, const __DRIconfig *config,
- int render_type, __DRIcontext *shared,
+ int render_type, __DRIcontext *shared,
drm_context_t hwContext, void *data)
{
__DRIcontext *pcp;
@@ -607,7 +607,7 @@ driCreateNewContext(__DRIscreen *psp, const __DRIconfig *config,
pcp->driScreenPriv = psp;
pcp->driDrawablePriv = NULL;
pcp->loaderPrivate = data;
-
+
pcp->dri2.draw_stamp = 0;
pcp->dri2.read_stamp = 0;
@@ -662,7 +662,7 @@ dri2CreateNewContextForAPI(__DRIscreen *screen, int api,
context->driScreenPriv = screen;
context->driDrawablePriv = NULL;
context->loaderPrivate = data;
-
+
if (!(*screen->DriverAPI.CreateContext)(mesa_api, modes,
context, shareCtx) ) {
free(context);
@@ -697,7 +697,7 @@ driCopyContext(__DRIcontext *dest, __DRIcontext *src, unsigned long mask)
/**
* Destroy the per-screen private information.
- *
+ *
* \internal
* This function calls __DriverAPIRec::DestroyScreen on \p screenPrivate, calls
* drmClose(), and finally frees \p screenPrivate.
@@ -758,7 +758,7 @@ setupLoaderExtensions(__DRIscreen *psp,
* pbuffers.
*
* For legacy DRI.
- *
+ *
* \param scrn Index of the screen
* \param ddx_version Version of the 2D DDX. This may not be meaningful for
* all drivers.
@@ -771,7 +771,7 @@ setupLoaderExtensions(__DRIscreen *psp,
* \param extensions ??
* \param driver_modes Returns modes suppoted by the driver
* \param loaderPrivate ??
- *
+ *
* \note There is no need to check the minimum API version in this
* function. Since the name of this function is versioned, it is
* impossible for a loader that is too old to even load this driver.
@@ -782,7 +782,7 @@ driCreateNewScreen(int scrn,
const __DRIversion *dri_version,
const __DRIversion *drm_version,
const __DRIframebuffer *frame_buffer,
- drmAddress pSAREA, int fd,
+ drmAddress pSAREA, int fd,
const __DRIextension **extensions,
const __DRIconfig ***driver_modes,
void *loaderPrivate)
@@ -942,17 +942,17 @@ const __DRI2configQueryExtension dri2ConfigQueryExtension = {
/**
* Calculate amount of swap interval used between GLX buffer swaps.
- *
+ *
* The usage value, on the range [0,max], is the fraction of total swap
* interval time used between GLX buffer swaps is calculated.
*
* \f$p = t_d / (i * t_r)\f$
- *
+ *
* Where \f$t_d\f$ is the time since the last GLX buffer swap, \f$i\f$ is the
* swap interval (as set by \c glXSwapIntervalSGI), and \f$t_r\f$ time
* required for a single vertical refresh period (as returned by \c
* glXGetMscRateOML).
- *
+ *
* See the documentation for the GLX_MESA_swap_frame_usage extension for more
* details.
*
@@ -964,7 +964,7 @@ const __DRI2configQueryExtension dri2ConfigQueryExtension = {
* a number greater than 1.0 will be returned.
*
* \sa glXSwapIntervalSGI glXGetMscRateOML
- *
+ *
* \todo Instead of caching the \c glXGetMscRateOML function pointer, would it
* be possible to cache the sync rate?
*/
@@ -999,7 +999,7 @@ driCalculateSwapUsage( __DRIdrawable *dPriv, int64_t last_swap_ust,
usage /= (interval * d);
usage /= 1000000.0;
}
-
+
return usage;
}
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index ffffb99..cc3a80e 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -1,7 +1,7 @@
/*
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -9,11 +9,11 @@
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -31,7 +31,7 @@
* driver doesn't really \e have to use any of this - it's optional. But, some
* useful stuff is done here that otherwise would have to be duplicated in most
* drivers.
- *
+ *
* Basically, these utility functions take care of some of the dirty details of
* screen initialization, context creation, context binding, DRM setup, etc.
*
@@ -39,7 +39,7 @@
* about them.
*
* \sa dri_util.c.
- *
+ *
* \author Kevin E. Martin
* \author Brian Paul
*/
@@ -131,7 +131,7 @@ do { \
*
* Each DRI driver must have one of these structures with all the pointers set
* to appropriate functions within the driver.
- *
+ *
* When glXCreateContext() is called, for example, it'll call a helper function
* dri_util.c which in turn will jump through the \a CreateContext pointer in
* this structure.
@@ -146,7 +146,7 @@ struct __DriverAPIRec {
/**
* Context creation callback
- */
+ */
GLboolean (*CreateContext)(gl_api api,
const struct gl_config *glVis,
__DRIcontext *driContextPriv,
@@ -164,14 +164,14 @@ struct __DriverAPIRec {
__DRIdrawable *driDrawPriv,
const struct gl_config *glVis,
GLboolean pixmapBuffer);
-
+
/**
* Buffer (drawable) destruction callback
*/
void (*DestroyBuffer)(__DRIdrawable *driDrawPriv);
/**
- * Buffer swapping callback
+ * Buffer swapping callback
*/
void (*SwapBuffers)(__DRIdrawable *driDrawPriv);
@@ -186,7 +186,7 @@ struct __DriverAPIRec {
* Context unbinding callback
*/
GLboolean (*UnbindContext)(__DRIcontext *driContextPriv);
-
+
/**
* Retrieves statistics about buffer swap operations. Required if
* GLX_OML_sync_control or GLX_MESA_swap_frame_usage is supported.
@@ -198,7 +198,7 @@ struct __DriverAPIRec {
* These are required if GLX_OML_sync_control is supported.
*/
/*@{*/
- int (*WaitForMSC)( __DRIdrawable *priv, int64_t target_msc,
+ int (*WaitForMSC)( __DRIdrawable *priv, int64_t target_msc,
int64_t divisor, int64_t remainder,
int64_t * msc );
int (*WaitForSBC)( __DRIdrawable *priv, int64_t target_sbc,
@@ -229,8 +229,8 @@ extern const struct __DriverAPIRec driDriverAPI;
struct __DRIswapInfoRec {
- /**
- * Number of swapBuffers operations that have been *completed*.
+ /**
+ * Number of swapBuffers operations that have been *completed*.
*/
uint64_t swap_count;
@@ -250,7 +250,7 @@ struct __DRIswapInfoRec {
/**
* Amount of time used by the last swap that missed its deadline. This
- * is calculated as (__glXGetUST() - swap_ust) / (swap_interval *
+ * is calculated as (__glXGetUST() - swap_ust) / (swap_interval *
* time_for_single_vrefresh)). If the actual value of swap_interval is
* 0, then 1 is used instead. If swap_missed_count is non-zero, this
* should be greater-than 1.0.
@@ -269,7 +269,7 @@ struct __DRIdrawableRec {
drm_drawable_t hHWDrawable;
/**
- * Driver's private drawable information.
+ * Driver's private drawable information.
*
* This structure is opaque.
*/
@@ -283,7 +283,7 @@ struct __DRIdrawableRec {
/**
* Reference count for number of context's currently bound to this
- * drawable.
+ * drawable.
*
* Once it reaches zero, the drawable can be destroyed.
*
@@ -312,7 +312,7 @@ struct __DRIdrawableRec {
unsigned int lastStamp;
/**
- * \name Drawable
+ * \name Drawable
*
* Drawable information used in software fallbacks.
*/
@@ -466,7 +466,7 @@ struct __DRIscreenRec {
/**
* File descriptor returned when the kernel device driver is opened.
- *
+ *
* Used to:
* - authenticate client to kernel
* - map the frame buffer, SAREA, etc.
@@ -475,7 +475,7 @@ struct __DRIscreenRec {
int fd;
/**
- * SAREA pointer
+ * SAREA pointer
*
* Used to access:
* - the device lock
@@ -484,7 +484,7 @@ struct __DRIscreenRec {
drm_sarea_t *pSAREA;
/**
- * \name Direct frame buffer access information
+ * \name Direct frame buffer access information
* Used for software fallbacks.
*/
/*@{*/
@@ -509,7 +509,7 @@ struct __DRIscreenRec {
/**
* Device-dependent private information (not stored in the SAREA).
- *
+ *
* This pointer is never touched by the DRI layer.
*/
#ifdef __cplusplus
diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.h b/src/mesa/drivers/dri/common/drirenderbuffer.h
index 0cae730..c51d2ad 100644
--- a/src/mesa/drivers/dri/common/drirenderbuffer.h
+++ b/src/mesa/drivers/dri/common/drirenderbuffer.h
@@ -55,7 +55,7 @@ typedef struct {
/**
* A handy flag to know if this is the back color buffer.
- *
+ *
* \note
* This is currently only used by tdfx.
*/
diff --git a/src/mesa/drivers/dri/common/spantmp.h b/src/mesa/drivers/dri/common/spantmp.h
index f0af5b1..df31250 100644
--- a/src/mesa/drivers/dri/common/spantmp.h
+++ b/src/mesa/drivers/dri/common/spantmp.h
@@ -170,9 +170,9 @@ static void TAG(WriteRGBAPixels)( struct gl_context *ctx,
}
-static void TAG(WriteMonoRGBASpan)( struct gl_context *ctx,
+static void TAG(WriteMonoRGBASpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
- GLuint n, GLint x, GLint y,
+ GLuint n, GLint x, GLint y,
const void *value,
const GLubyte mask[] )
{
@@ -215,7 +215,7 @@ static void TAG(WriteMonoRGBAPixels)( struct gl_context *ctx,
GLuint n,
const GLint x[], const GLint y[],
const void *value,
- const GLubyte mask[] )
+ const GLubyte mask[] )
{
HW_WRITE_LOCK()
{
diff --git a/src/mesa/drivers/dri/common/spantmp2.h b/src/mesa/drivers/dri/common/spantmp2.h
index f436d13..c903be1 100644
--- a/src/mesa/drivers/dri/common/spantmp2.h
+++ b/src/mesa/drivers/dri/common/spantmp2.h
@@ -271,7 +271,7 @@
#endif /* GET_VALUE */
# define INIT_MONO_PIXEL(p, color) \
- p = PACK_COLOR_8888(color[3], color[0], color[1], color[2])
+ p = PACK_COLOR_8888(color[3], color[0], color[1], color[2])
# define WRITE_RGBA(_x, _y, r, g, b, a) \
PUT_VALUE(_x, _y, ((r << 16) | \
@@ -326,7 +326,7 @@
#endif /* GET_VALUE */
# define INIT_MONO_PIXEL(p, color) \
- p = PACK_COLOR_8888(color[2], color[1], color[0], color[3])
+ p = PACK_COLOR_8888(color[2], color[1], color[0], color[3])
# define WRITE_RGBA(_x, _y, r, g, b, a) \
PUT_VALUE(_x, _y, ((r << 8) | \
@@ -709,9 +709,9 @@ static void TAG(WriteRGBAPixels)( struct gl_context *ctx,
}
-static void TAG(WriteMonoRGBASpan)( struct gl_context *ctx,
+static void TAG(WriteMonoRGBASpan)( struct gl_context *ctx,
struct gl_renderbuffer *rb,
- GLuint n, GLint x, GLint y,
+ GLuint n, GLint x, GLint y,
const void *value, const GLubyte mask[] )
{
HW_WRITE_LOCK()
@@ -753,7 +753,7 @@ static void TAG(WriteMonoRGBAPixels)( struct gl_context *ctx,
GLuint n,
const GLint x[], const GLint y[],
const void *value,
- const GLubyte mask[] )
+ const GLubyte mask[] )
{
HW_WRITE_LOCK()
{
diff --git a/src/mesa/drivers/dri/common/stenciltmp.h b/src/mesa/drivers/dri/common/stenciltmp.h
index fef0972..55a3f65 100644
--- a/src/mesa/drivers/dri/common/stenciltmp.h
+++ b/src/mesa/drivers/dri/common/stenciltmp.h
@@ -35,7 +35,7 @@ static void TAG(WriteStencilSpan)( struct gl_context *ctx,
WRITE_STENCIL_SPAN();
#else /* HAVE_HW_STENCIL_SPANS */
- HW_CLIPLOOP()
+ HW_CLIPLOOP()
{
GLint i = 0;
CLIPSPAN(x,y,n,x1,n1,i);
@@ -91,7 +91,7 @@ static void TAG(WriteMonoStencilSpan)( struct gl_context *ctx,
y = Y_FLIP(y);
- HW_CLIPLOOP()
+ HW_CLIPLOOP()
{
GLint i = 0;
CLIPSPAN(x,y,n,x1,n1,i);
@@ -177,7 +177,7 @@ static void TAG(ReadStencilSpan)( struct gl_context *ctx,
READ_STENCIL_SPAN();
#else /* HAVE_HW_STENCIL_SPANS */
- HW_CLIPLOOP()
+ HW_CLIPLOOP()
{
GLint i = 0;
CLIPSPAN(x,y,n,x1,n1,i);
@@ -202,7 +202,7 @@ static void TAG(ReadStencilPixels)( struct gl_context *ctx,
LOCAL_STENCIL_VARS;
if (DBG) fprintf(stderr, "ReadStencilPixels\n");
-
+
#if HAVE_HW_STENCIL_PIXELS
(void) i;
diff --git a/src/mesa/drivers/dri/common/texmem.c b/src/mesa/drivers/dri/common/texmem.c
index 8eec07d..5dd0d2a 100644
--- a/src/mesa/drivers/dri/common/texmem.c
+++ b/src/mesa/drivers/dri/common/texmem.c
@@ -31,7 +31,7 @@
/** \file texmem.c
* Implements all of the device-independent texture memory management.
- *
+ *
* Currently, only a simple LRU texture memory management policy is
* implemented. In the (hopefully very near) future, better policies will be
* implemented. The idea is that the DRI should be able to run in one of two
@@ -56,7 +56,7 @@ static unsigned dummy_swap_counter;
* implementation of this function. However, since system performance is in
* no way dependent on this function, the slowness of the implementation is
* irrelevent.
- *
+ *
* \param n Value whose \f$\log_2\f$ is to be calculated
*/
@@ -80,16 +80,16 @@ driLog2( GLuint n )
* the driver, this may or may not be on-card memory. It could be AGP memory
* or anyother type of memory from which the hardware can directly read
* texels.
- *
+ *
* This function is intended to be used as the \c IsTextureResident function
* in the device's \c dd_function_table.
- *
+ *
* \param ctx GL context pointer (currently unused)
* \param texObj Texture object to be tested
*/
GLboolean
-driIsTextureResident( struct gl_context * ctx,
+driIsTextureResident( struct gl_context * ctx,
struct gl_texture_object * texObj )
{
driTextureObject * t;
@@ -108,7 +108,7 @@ driIsTextureResident( struct gl_context * ctx,
* at the end of the array allows the other elements of the array
* to be addressed rationally when looking up objects at a particular
* location in texture memory.
- *
+ *
* \param heap Texture heap to be reset
*/
@@ -144,7 +144,7 @@ static void printLocalLRU( driTexHeap * heap, const char *callername )
driTextureObject *t;
unsigned sz = 1U << heap->logGranularity;
- fprintf( stderr, "%s in %s:\nLocal LRU, heap %d:\n",
+ fprintf( stderr, "%s in %s:\nLocal LRU, heap %d:\n",
__FUNCTION__, callername, heap->heapId );
foreach ( t, &heap->texture_objects ) {
@@ -185,7 +185,7 @@ static void printGlobalLRU( driTexHeap * heap, const char *callername )
drmTextureRegionPtr list = heap->global_regions;
unsigned int i, j;
- fprintf( stderr, "%s in %s:\nGlobal LRU, heap %d list %p:\n",
+ fprintf( stderr, "%s in %s:\nGlobal LRU, heap %d list %p:\n",
__FUNCTION__, callername, heap->heapId, (void *)list );
for ( i = 0, j = heap->nrRegions ; i < heap->nrRegions ; i++ ) {
@@ -209,7 +209,7 @@ static void printGlobalLRU( driTexHeap * heap, const char *callername )
/**
* Called by the client whenever it touches a local texture.
- *
+ *
* \param t Texture object that the client has accessed
*/
@@ -234,7 +234,7 @@ void driUpdateTextureLRU( driTextureObject * t )
list = heap->global_regions;
- /* Update the context's local LRU
+ /* Update the context's local LRU
*/
move_to_head( & heap->texture_objects, t );
@@ -268,7 +268,7 @@ void driUpdateTextureLRU( driTextureObject * t )
/**
* Keep track of swapped out texture objects.
- *
+ *
* \param t Texture object to be "swapped" out of its texture heap
*/
@@ -306,7 +306,7 @@ void driSwapOutTextureObject( driTextureObject * t )
* Destroy hardware state associated with texture \a t. Calls the
* \a destroy_texture_object method associated with the heap from which
* \a t was allocated.
- *
+ *
* \param t Texture object to be destroyed
*/
@@ -364,14 +364,14 @@ void driDestroyTextureObject( driTextureObject * t )
* textures and the textures belonging to other clients. Keep track of other
* client's textures by pushing a placeholder texture onto the LRU list --
* these are denoted by \a tObj being \a NULL.
- *
+ *
* \param heap Heap whose state is to be updated
* \param offset Byte offset in the heap that has been stolen
* \param size Size, in bytes, of the stolen block
* \param in_use Non-zero if the block is pinned/reserved by the kernel
*/
-static void driTexturesGone( driTexHeap * heap, int offset, int size,
+static void driTexturesGone( driTexHeap * heap, int offset, int size,
int in_use )
{
driTextureObject * t;
@@ -409,8 +409,8 @@ static void driTexturesGone( driTexHeap * heap, int offset, int size,
return;
}
t->heap = heap;
- if (in_use)
- t->reserved = 1;
+ if (in_use)
+ t->reserved = 1;
insert_at_head( & heap->texture_objects, t );
}
}
@@ -423,7 +423,7 @@ static void driTexturesGone( driTexHeap * heap, int offset, int size,
* been stolen. If another client has modified a region in which we have
* textures, then we need to figure out which of our textures have been
* removed and update our global LRU.
- *
+ *
* \param heap Texture heap to be updated
*/
@@ -438,8 +438,8 @@ void driAgeTextures( driTexHeap * heap )
* LRU in the local list... Fix with a cursor pointer.
*/
- for (i = list[heap->nrRegions].prev ;
- i != heap->nrRegions && nr < heap->nrRegions ;
+ for (i = list[heap->nrRegions].prev ;
+ i != heap->nrRegions && nr < heap->nrRegions ;
i = list[i].prev, nr++) {
/* If switching texturing schemes, then the SAREA might not have been
* properly cleared, so we need to reset the global texture LRU.
@@ -450,8 +450,8 @@ void driAgeTextures( driTexHeap * heap )
break;
}
- if (list[i].age > heap->local_age)
- driTexturesGone( heap, i * sz, sz, list[i].in_use);
+ if (list[i].age > heap->local_age)
+ driTexturesGone( heap, i * sz, sz, list[i].in_use);
}
/* Loop or uninitialized heap detected. Reset.
@@ -516,7 +516,7 @@ driAllocateTexture( driTexHeap * const * heap_array, unsigned nr_heaps,
for ( id = 0 ; (t->memBlock == NULL) && (id < nr_heaps) ; id++ ) {
heap = heap_array[ id ];
if ( heap != NULL ) {
- t->memBlock = mmAllocMem( heap->memory_heap, t->totalSize,
+ t->memBlock = mmAllocMem( heap->memory_heap, t->totalSize,
heap->alignmentShift, 0 );
}
}
@@ -562,9 +562,9 @@ driAllocateTexture( driTexHeap * const * heap_array, unsigned nr_heaps,
heap = heap_array[ index[ id ] ];
for ( cursor = heap->texture_objects.prev, temp = cursor->prev;
- cursor != &heap->texture_objects ;
+ cursor != &heap->texture_objects ;
cursor = temp, temp = cursor->prev ) {
-
+
/* The the LRU element. If the texture is bound to one of
* the texture units, then we cannot kick it out.
*/
@@ -581,7 +581,7 @@ driAllocateTexture( driTexHeap * const * heap_array, unsigned nr_heaps,
else
driDestroyTextureObject( cursor );
- t->memBlock = mmAllocMem( heap->memory_heap, t->totalSize,
+ t->memBlock = mmAllocMem( heap->memory_heap, t->totalSize,
heap->alignmentShift, 0 );
if (t->memBlock)
@@ -653,7 +653,7 @@ driSetTextureSwapCounterLocation( driTexHeap * heap, unsigned * counter )
/**
* Create a new heap for texture data.
- *
+ *
* \param heap_id Device-dependent heap identifier. This value
* will returned by driAllocateTexture when memory
* is allocated from this heap.
@@ -661,7 +661,7 @@ driSetTextureSwapCounterLocation( driTexHeap * heap, unsigned * counter )
* supplied as the first parameter to the
* \c destroy_tex_obj function.
* \param size Size, in bytes, of the texture region
- * \param alignmentShift Alignment requirement for textures. If textures
+ * \param alignmentShift Alignment requirement for textures. If textures
* must be allocated on a 4096 byte boundry, this
* would be 12.
* \param nr_regions Number of regions into which this texture space
@@ -683,15 +683,15 @@ driTexHeap *
driCreateTextureHeap( unsigned heap_id, void * context, unsigned size,
unsigned alignmentShift, unsigned nr_regions,
drmTextureRegionPtr global_regions, unsigned * global_age,
- driTextureObject * swapped_objects,
+ driTextureObject * swapped_objects,
unsigned texture_object_size,
destroy_texture_object_t * destroy_tex_obj
)
{
driTexHeap * heap;
unsigned l;
-
-
+
+
if ( 0 )
fprintf( stderr, "%s( %u, %p, %u, %u, %u )\n",
__FUNCTION__,
@@ -750,7 +750,7 @@ driCreateTextureHeap( unsigned heap_id, void * context, unsigned size,
/** Destroys a texture heap
- *
+ *
* \param heap Texture heap to be destroyed
*/
@@ -838,7 +838,7 @@ fill_in_maximums( driTexHeap * const * heaps, unsigned nr_heaps,
for ( heap = 0 ; heap < nr_heaps ; heap++ ) {
if ( heaps[ heap ] == NULL ) {
- (void) memset( max_textures[ heap ].c, 0,
+ (void) memset( max_textures[ heap ].c, 0,
sizeof( max_textures[ heap ].c ) );
continue;
}
@@ -948,7 +948,7 @@ get_max_size( unsigned nr_heaps,
* Given the amount of texture memory, the number of texture units, and the
* maximum size of a texel, calculate the maximum texture size the driver can
* advertise.
- *
+ *
* \param heaps Texture heaps for this card
* \param nr_heap Number of texture heaps
* \param limits OpenGL contants. MaxTextureUnits must be set.
@@ -1097,7 +1097,7 @@ void driInitTextureObjects( struct gl_context *ctx, driTextureObject * swapped,
/**
* Verify that the specified texture is in the specificed heap.
- *
+ *
* \param tex Texture to be tested.
* \param heap Texture memory heap to be tested.
* \return True if the texture is in the heap, false otherwise.
@@ -1144,7 +1144,7 @@ driValidateTextureHeaps( driTexHeap * const * texture_heaps,
const struct mem_block *p = heap->memory_heap;
/* Check each texture object has a MemBlock, and is linked into
- * the correct heap.
+ * the correct heap.
*
* Check the texobj base address corresponds to the MemBlock
* range. Check the texobj size (recalculate?) fits within
@@ -1201,13 +1201,13 @@ driValidateTextureHeaps( driTexHeap * const * texture_heaps,
if (textures_in_heap != blocks_in_mempool) {
fprintf( stderr, "%s: Different number of textures objects (%u) and "
- "inuse memory blocks (%u)\n",
+ "inuse memory blocks (%u)\n",
__FUNCTION__, textures_in_heap, blocks_in_mempool );
return GL_FALSE;
}
#if 0
- fprintf( stderr, "%s: textures_in_heap = %u\n",
+ fprintf( stderr, "%s: textures_in_heap = %u\n",
__FUNCTION__, textures_in_heap );
#endif
}
diff --git a/src/mesa/drivers/dri/common/texmem.h b/src/mesa/drivers/dri/common/texmem.h
index 6dd07b8..1fe2ed1 100644
--- a/src/mesa/drivers/dri/common/texmem.h
+++ b/src/mesa/drivers/dri/common/texmem.h
@@ -31,7 +31,7 @@
/** \file texmem.h
* Public interface to the DRI texture memory management routines.
- *
+ *
* \sa texmem.c
*/
@@ -76,7 +76,7 @@ struct dri_texture_object {
*/
unsigned totalSize; /**< Total size of the texture,
- * including all mipmap levels
+ * including all mipmap levels
*/
unsigned dirty_images[6]; /**< Flags for whether or not images
@@ -92,7 +92,7 @@ struct dri_texture_object {
* synchronize with 3d engine
* in hardware where textures
* are uploaded directly to
- * the framebuffer.
+ * the framebuffer.
*/
unsigned firstLevel; /**< Image in \c tObj->Image[0] that
@@ -100,7 +100,7 @@ struct dri_texture_object {
* this texture object.
*/
- unsigned lastLevel; /**< Last image in \c tObj->Image[0]
+ unsigned lastLevel; /**< Last image in \c tObj->Image[0]
* used by the
* current LOD settings of
* this texture object. This
@@ -122,11 +122,11 @@ typedef void (destroy_texture_object_t)( void * driverContext,
struct dri_tex_heap {
- /** Client-supplied heap identifier
+ /** Client-supplied heap identifier
*/
- unsigned heapId;
+ unsigned heapId;
- /** Pointer to the client's private context
+ /** Pointer to the client's private context
*/
void *driverContext;
@@ -146,7 +146,7 @@ struct dri_tex_heap {
unsigned logGranularity;
/** \brief Required alignment of allocations in this heap
- *
+ *
* The alignment shift is supplied to \a mmAllocMem when memory is
* allocated from this heap. The value of \a alignmentShift will
* typically reflect some require of the hardware. This value has
@@ -159,7 +159,7 @@ struct dri_tex_heap {
/** Number of elements in global list (the SAREA).
*/
- unsigned nrRegions;
+ unsigned nrRegions;
/** Pointer to SAREA \a driTexRegion array
*/
@@ -182,7 +182,7 @@ struct dri_tex_heap {
* memory.
*/
driTextureObject texture_objects;
-
+
/** Pointer to the list of texture objects that are not in
* texture memory.
*/
@@ -195,7 +195,7 @@ struct dri_tex_heap {
/**
* \brief Function to destroy driver-specific texture object data.
- *
+ *
* This function is supplied by the driver so that the texture manager
* can release all resources associated with a texture object. This
* function should only release driver-specific data. That is,
@@ -219,7 +219,7 @@ struct dri_tex_heap {
/**
* Timestamp used to synchronize with 3d engine in hardware
* where textures are uploaded directly to the
- * framebuffer.
+ * framebuffer.
*/
unsigned timestamp;
@@ -249,7 +249,7 @@ struct dri_tex_heap {
* been stolen. If another client has modified a region in which we have
* textures, then we need to figure out which of our textures have been
* removed and update our global LRU.
- *
+ *
* \param heap Texture heap to be updated
* \hideinitializer
*/
@@ -277,7 +277,7 @@ void driDestroyTextureObject( driTextureObject * t );
int driAllocateTexture( driTexHeap * const * heap_array, unsigned nr_heaps,
driTextureObject * t );
-GLboolean driIsTextureResident( struct gl_context * ctx,
+GLboolean driIsTextureResident( struct gl_context * ctx,
struct gl_texture_object * texObj );
driTexHeap * driCreateTextureHeap( unsigned heap_id, void * context,
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 42be77f..bfc19ea 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -39,10 +39,10 @@
/**
* Print message to \c stderr if the \c LIBGL_DEBUG environment variable
- * is set.
- *
+ * is set.
+ *
* Is called from the drivers.
- *
+ *
* \param f \c printf like format string.
*/
void
@@ -61,7 +61,7 @@ __driUtilMessage(const char *f, ...)
unsigned
-driParseDebugString( const char * debug,
+driParseDebugString( const char * debug,
const struct dri_debug_control * control )
{
unsigned flag;
@@ -86,19 +86,19 @@ driParseDebugString( const char * debug,
/**
* Create the \c GL_RENDERER string for DRI drivers.
- *
+ *
* Almost all DRI drivers use a \c GL_RENDERER string of the form:
*
* "Mesa DRI "
*
* Using the supplied chip name, driver data, and AGP speed, this function
* creates the string.
- *
+ *
* \param buffer Buffer to hold the \c GL_RENDERER string.
* \param hardware_name Name of the hardware.
* \param driver_date Driver date.
* \param agp_mode AGP mode (speed).
- *
+ *
* \returns
* The length of the string stored in \c buffer. This does \b not include
* the terminating \c NUL character.
@@ -121,7 +121,7 @@ driGetRendererString( char * buffer, const char * hardware_name,
case 8:
offset += sprintf( & buffer[ offset ], " AGP %ux", agp_mode );
break;
-
+
default:
break;
}
@@ -187,7 +187,7 @@ static const struct dri_extension all_mesa_extensions[] = {
/**
* Enable and map extensions supported by the driver.
- *
+ *
* When ctx is NULL, extensions are not enabled, but their functions
* are still mapped. When extensions_to_enable is NULL, all static
* functions known to mesa core are mapped.
@@ -233,10 +233,10 @@ void driInitExtensions( struct gl_context * ctx,
/**
* Enable and map functions for a single extension
- *
+ *
* \param ctx Context where extension is to be enabled.
* \param ext Extension that is to be enabled.
- *
+ *
* \sa driInitExtensions, _mesa_enable_extension, _mesa_map_function_array
*/
void driInitSingleExtension( struct gl_context * ctx,
@@ -262,10 +262,10 @@ void driInitSingleExtension( struct gl_context * ctx,
* \param ddxExpected Minimum DDX minor and range of DDX major version required by the driver.
* \param drmActual Actual DRM version supplied __driCreateNewScreen.
* \param drmExpected Minimum DRM version required by the driver.
- *
+ *
* \returns \c GL_TRUE if all version requirements are met. Otherwise,
* \c GL_FALSE is returned.
- *
+ *
* \sa __driCreateNewScreen, driCheckDriDdxDrmVersions2
*
* \todo
@@ -305,7 +305,7 @@ driCheckDriDdxDrmVersions3(const char * driver_name,
ddxActual->major, ddxActual->minor, ddxActual->patch);
return GL_FALSE;
}
-
+
/* Check that the DRM driver version is compatible */
if ( (drmActual->major != drmExpected->major)
|| (drmActual->minor < drmExpected->minor) ) {
@@ -372,11 +372,11 @@ GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer,
/**
* Creates a set of \c struct gl_config that a driver will expose.
- *
+ *
* A set of \c struct gl_config will be created based on the supplied
* parameters. The number of modes processed will be 2 *
* \c num_depth_stencil_bits * \c num_db_modes.
- *
+ *
* For the most part, data is just copied from \c depth_bits, \c stencil_bits,
* \c db_modes, and \c visType into each \c struct gl_config element.
* However, the meanings of \c fb_format and \c fb_type require further
@@ -388,7 +388,7 @@ GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer,
* \c GL_UNSIGNED_SHORT_5_6_5_REV is specified with \c GL_RGB, bits [15:11]
* are the blue value, bits [10:5] are the green value, and bits [4:0] are
* the red value.
- *
+ *
* One sublte issue is the combination of \c GL_RGB or \c GL_BGR and either
* of the \c GL_UNSIGNED_INT_8_8_8_8 modes. The resulting mask values in the
* \c struct gl_config structure is \b identical to the \c GL_RGBA or
@@ -397,7 +397,7 @@ GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer,
* still uses 32-bits.
*
* If in doubt, look at the tables used in the function.
- *
+ *
* \param ptr_to_modes Pointer to a pointer to a linked list of
* \c struct gl_config. Upon completion, a pointer to
* the next element to be process will be stored here.
@@ -407,7 +407,7 @@ GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer,
* \param fb_format Format of the framebuffer. Currently only \c GL_RGB,
* \c GL_RGBA, \c GL_BGR, and \c GL_BGRA are supported.
* \param fb_type Type of the pixels in the framebuffer. Currently only
- * \c GL_UNSIGNED_SHORT_5_6_5,
+ * \c GL_UNSIGNED_SHORT_5_6_5,
* \c GL_UNSIGNED_SHORT_5_6_5_REV,
* \c GL_UNSIGNED_INT_8_8_8_8, and
* \c GL_UNSIGNED_INT_8_8_8_8_REV are supported.
@@ -427,17 +427,17 @@ GLboolean driClipRectToFramebuffer( const struct gl_framebuffer *buffer,
* \param num_msaa_modes Number of entries in \c msaa_samples.
* \param visType GLX visual type. Usually either \c GLX_TRUE_COLOR or
* \c GLX_DIRECT_COLOR.
- *
+ *
* \returns
* \c GL_TRUE on success or \c GL_FALSE on failure. Currently the only
* cause of failure is a bad parameter (i.e., unsupported \c fb_format or
* \c fb_type).
- *
+ *
* \todo
* There is currently no way to support packed RGB modes (i.e., modes with
* exactly 3 bytes per pixel) or floating-point modes. This could probably
* be done by creating some new, private enums with clever names likes
- * \c GL_UNSIGNED_3BYTE_8_8_8, \c GL_4FLOAT_32_32_32_32,
+ * \c GL_UNSIGNED_3BYTE_8_8_8, \c GL_4FLOAT_32_32_32_32,
* \c GL_4HALF_16_16_16_16, etc. We can cross that bridge when we come to it.
*/
__DRIconfig **
@@ -669,7 +669,7 @@ __DRIconfig **driConcatConfigs(__DRIconfig **a,
j = 0;
while (b[j] != NULL)
j++;
-
+
all = malloc((i + j + 1) * sizeof *all);
index = 0;
for (i = 0; a[i] != NULL; i++)
@@ -773,7 +773,7 @@ driGetConfigAttribIndex(const __DRIconfig *config,
/* any other int-sized field */
*value = *(unsigned int *)
((char *) &config->modes + attribMap[index].offset);
-
+
break;
}
diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h
index 6349fb4..4a36cee 100644
--- a/src/mesa/drivers/dri/common/utils.h
+++ b/src/mesa/drivers/dri/common/utils.h
@@ -48,7 +48,7 @@ struct dri_extension {
* Name of the extension.
*/
const char * name;
-
+
/**
* Pointer to a list of \c dri_extension_function structures. The list
@@ -78,7 +78,7 @@ extern unsigned driParseDebugString( const char * debug,
extern unsigned driGetRendererString( char * buffer,
const char * hardware_name, const char * driver_date, GLuint agp_mode );
-extern void driInitExtensions( struct gl_context * ctx,
+extern void driInitExtensions( struct gl_context * ctx,
const struct dri_extension * card_extensions, GLboolean enable_imaging );
extern void driInitSingleExtension( struct gl_context * ctx,
diff --git a/src/mesa/drivers/dri/common/vblank.c b/src/mesa/drivers/dri/common/vblank.c
index cb98dd0..f709016 100644
--- a/src/mesa/drivers/dri/common/vblank.c
+++ b/src/mesa/drivers/dri/common/vblank.c
@@ -54,8 +54,8 @@ static int64_t vblank_to_msc(__DRIdrawable * dPriv, unsigned int vblank)
* may, it will never decrease for a given drawable.
*
* \warning This function is called from \c glXGetVideoSyncSGI, which expects
- * a \c count of type \c unsigned (32-bit), and \c glXGetSyncValuesOML, which
- * expects a \c count of type \c int64_t (signed 64-bit). The kernel ioctl
+ * a \c count of type \c unsigned (32-bit), and \c glXGetSyncValuesOML, which
+ * expects a \c count of type \c int64_t (signed 64-bit). The kernel ioctl
* currently always returns a \c sequence of type \c unsigned.
*
* \param priv Pointer to the DRI screen private struct.
@@ -95,10 +95,10 @@ int driDrawableGetMSC32( __DRIscreen * priv,
* Wait for a specified refresh count. This implements most of the
* functionality of \c glXWaitForMscOML from the GLX_OML_sync_control spec.
* Waits for the \c target_msc refresh. If that has already passed, it
- * waits until \f$(MSC \bmod divisor)\f$ is equal to \c remainder. If
+ * waits until \f$(MSC \bmod divisor)\f$ is equal to \c remainder. If
* \c target_msc is 0, use the behavior of glXWaitVideoSyncSGI(), which
* omits the initial check against a target MSC value.
- *
+ *
* This function is actually something of a hack. The problem is that, at
* the time of this writing, none of the existing DRM modules support an
* ioctl that returns a 64-bit count (at least not on 32-bit platforms).
@@ -136,7 +136,7 @@ int driWaitForMSC32( __DRIdrawable *priv,
do {
/* dont_wait means we're using the glXWaitVideoSyncSGI() behavior.
- * The first time around, just get the current count and proceed
+ * The first time around, just get the current count and proceed
* to the test for (MSC % divisor) == remainder.
*/
vbl.request.type = dont_wait ? DRM_VBLANK_RELATIVE :
@@ -159,9 +159,9 @@ int driWaitForMSC32( __DRIdrawable *priv,
/* Assuming the wait-done test fails, the next refresh to wait for
* will be one that satisfies (MSC % divisor) == remainder. The
- * value (MSC - (MSC % divisor) + remainder) is the refresh value
- * closest to the current value that would satisfy the equation.
- * If this refresh has already happened, we add divisor to obtain
+ * value (MSC - (MSC % divisor) + remainder) is the refresh value
+ * closest to the current value that would satisfy the equation.
+ * If this refresh has already happened, we add divisor to obtain
* the next refresh after the current one that will satisfy it.
*/
r = ((uint64_t)*msc % divisor);
@@ -257,7 +257,7 @@ static int do_wait( drmVBlank * vbl, GLuint * vbl_seq, int fd )
static GLboolean first_time = GL_TRUE;
if ( first_time ) {
- fprintf(stderr,
+ fprintf(stderr,
"%s: drmWaitVBlank returned %d, IRQs don't seem to be"
" working correctly.\nTry adjusting the vblank_mode"
" configuration parameter.\n", __FUNCTION__, ret);
@@ -301,7 +301,7 @@ void driDrawableInitVBlank( __DRIdrawable *priv )
!( priv->vblFlags & VBLANK_FLAG_NO_IRQ ) ) {
/* Get current vertical blank sequence */
drmVBlank vbl;
-
+
vbl.request.type = DRM_VBLANK_RELATIVE;
if ( priv->vblFlags & VBLANK_FLAG_SECONDARY )
vbl.request.type |= DRM_VBLANK_SECONDARY;
@@ -329,7 +329,7 @@ driGetVBlankInterval( const __DRIdrawable *priv )
return priv->swap_interval;
}
- else
+ else
return driGetDefaultVBlankInterval( priv );
}
@@ -357,7 +357,7 @@ driGetCurrentVBlank( __DRIdrawable *priv )
/****************************************************************************/
/**
* Waits for the vertical blank for use with glXSwapBuffers.
- *
+ *
* \param missed_deadline Set to \c GL_TRUE if the MSC after waiting is later
* than the "target" based on \c priv->vblFlags. The idea is
* that if \c missed_deadline is set, then the application is
diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c
index 0312c07..6a90d1d 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/src/mesa/drivers/dri/common/xmlconfig.c
@@ -15,11 +15,11 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
*/
/**
* \file xmlconfig.c
@@ -172,7 +172,7 @@ static GLint strToI (const XML_Char *string, const XML_Char **tail, int base) {
} else if (*string == '+')
string++;
if (base == 0 && *string == '0') {
- numberFound = GL_TRUE;
+ numberFound = GL_TRUE;
if (*(string+1) == 'x' || *(string+1) == 'X') {
radix = 16;
string += 2;
diff --git a/src/mesa/drivers/dri/common/xmlconfig.h b/src/mesa/drivers/dri/common/xmlconfig.h
index c363af7..83f678b 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.h
+++ b/src/mesa/drivers/dri/common/xmlconfig.h
@@ -15,11 +15,11 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
*/
/**
* \file xmlconfig.h
@@ -67,11 +67,11 @@ typedef struct driOptionCache {
/**< \brief Array of option infos
*
* Points to the same array in the screen and all contexts */
- driOptionValue *values;
+ driOptionValue *values;
/**< \brief Array of option values
*
* \li Default values in screen
- * \li Actual values in contexts
+ * \li Actual values in contexts
*/
GLuint tableSize;
/**< \brief Size of the arrays
@@ -83,7 +83,7 @@ typedef struct driOptionCache {
/** \brief Parse XML option info from configOptions
*
- * To be called in CreateScreen
+ * To be called in CreateScreen
*
* \param info pointer to a driOptionCache that will store the option info
* \param configOptions XML document describing available configuration opts
diff --git a/src/mesa/drivers/dri/common/xmlpool.h b/src/mesa/drivers/dri/common/xmlpool.h
index 587517e..159878b 100644
--- a/src/mesa/drivers/dri/common/xmlpool.h
+++ b/src/mesa/drivers/dri/common/xmlpool.h
@@ -15,11 +15,11 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
*/
/**
* \file xmlpool.h
diff --git a/src/mesa/drivers/dri/common/xmlpool/Makefile b/src/mesa/drivers/dri/common/xmlpool/Makefile
index b71629e..28ae203 100644
--- a/src/mesa/drivers/dri/common/xmlpool/Makefile
+++ b/src/mesa/drivers/dri/common/xmlpool/Makefile
@@ -55,7 +55,7 @@ POT=xmlpool.pot
all: options.h
# Only intermediate files are cleaned up. options.h is not deleted because
-# it's in CVS.
+# it's in CVS.
clean:
-rm -f $(POT) *~
-rm -rf $(LANGS)
diff --git a/src/mesa/drivers/dri/common/xmlpool/options.h b/src/mesa/drivers/dri/common/xmlpool/options.h
index d765955..09129be 100644
--- a/src/mesa/drivers/dri/common/xmlpool/options.h
+++ b/src/mesa/drivers/dri/common/xmlpool/options.h
@@ -18,11 +18,11 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
*/
/**
* \file t_options.h
diff --git a/src/mesa/drivers/dri/common/xmlpool/t_options.h b/src/mesa/drivers/dri/common/xmlpool/t_options.h
index 5fd6ec6..3956e2b 100644
--- a/src/mesa/drivers/dri/common/xmlpool/t_options.h
+++ b/src/mesa/drivers/dri/common/xmlpool/t_options.h
@@ -15,11 +15,11 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * FELIX KUEHLING, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
*/
/**
* \file t_options.h
diff --git a/src/mesa/drivers/dri/i810/Makefile b/src/mesa/drivers/dri/i810/Makefile
index 54a837d..e96faf2 100644
--- a/src/mesa/drivers/dri/i810/Makefile
+++ b/src/mesa/drivers/dri/i810/Makefile
@@ -22,7 +22,7 @@ C_SOURCES = \
$(COMMON_SOURCES) \
$(DRIVER_SOURCES)
-ASM_SOURCES =
+ASM_SOURCES =
include ../Makefile.template
diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c
index dc58e91..3d15799 100644
--- a/src/mesa/drivers/dri/i810/i810context.c
+++ b/src/mesa/drivers/dri/i810/i810context.c
@@ -79,7 +79,7 @@ static const GLubyte *i810GetString( struct gl_context *ctx, GLenum name )
case GL_RENDERER: {
i810ContextPtr imesa = I810_CONTEXT(ctx);
const char * chipset;
-
+
switch (imesa->i810Screen->deviceID) {
case PCI_CHIP_I810: chipset = "i810"; break;
case PCI_CHIP_I810_DC100: chipset = "i810 DC-100"; break;
@@ -213,7 +213,7 @@ i810CreateContext( gl_api api,
(void) memset( imesa->texture_heaps, 0, sizeof( imesa->texture_heaps ) );
make_empty_list( & imesa->swapped );
-
+
imesa->nr_heaps = 1;
imesa->texture_heaps[0] = driCreateTextureHeap( 0, imesa,
i810Screen->textureSize,
@@ -485,11 +485,11 @@ i810UpdatePageFlipping( i810ContextPtr imesa )
return;
}
- if ( imesa->sarea->pf_current_page == 1 )
+ if ( imesa->sarea->pf_current_page == 1 )
front ^= 1;
driFlipRenderbuffers(ctx->WinSysDrawBuffer, front);
-
+
if (front) {
imesa->BufferSetup[I810_DESTREG_DI1] = imesa->i810Screen->fbOffset | imesa->i810Screen->backPitchBits;
} else {
@@ -534,7 +534,7 @@ void i810GetLock( i810ContextPtr imesa, GLuint flags )
/* Shared texture managment - if another client has played with
* texture space, figure out which if any of our textures have been
* ejected, and update our global LRU.
- */
+ */
for ( i = 0 ; i < imesa->nr_heaps ; i++ ) {
DRI_AGE_TEXTURES( imesa->texture_heaps[ i ] );
}
diff --git a/src/mesa/drivers/dri/i810/i810context.h b/src/mesa/drivers/dri/i810/i810context.h
index 93c7eda..fa0bd03 100644
--- a/src/mesa/drivers/dri/i810/i810context.h
+++ b/src/mesa/drivers/dri/i810/i810context.h
@@ -15,9 +15,9 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
@@ -37,13 +37,13 @@ typedef struct i810_texture_object_t *i810TextureObjectPtr;
#include "i810tex.h"
-/* Reasons to disable hardware rasterization.
+/* Reasons to disable hardware rasterization.
*/
#define I810_FALLBACK_TEXTURE 0x1
#define I810_FALLBACK_DRAW_BUFFER 0x2
#define I810_FALLBACK_READ_BUFFER 0x4
-#define I810_FALLBACK_COLORMASK 0x8
-#define I810_FALLBACK_SPECULAR 0x20
+#define I810_FALLBACK_COLORMASK 0x8
+#define I810_FALLBACK_SPECULAR 0x20
#define I810_FALLBACK_LOGICOP 0x40
#define I810_FALLBACK_RENDERMODE 0x80
#define I810_FALLBACK_STENCIL 0x100
@@ -51,11 +51,11 @@ typedef struct i810_texture_object_t *i810TextureObjectPtr;
#define I810_FALLBACK_BLEND_FUNC 0x400
-#ifndef PCI_CHIP_I810
+#ifndef PCI_CHIP_I810
#define PCI_CHIP_I810 0x7121
#define PCI_CHIP_I810_DC100 0x7123
-#define PCI_CHIP_I810_E 0x7125
-#define PCI_CHIP_I815 0x1132
+#define PCI_CHIP_I810_E 0x7125
+#define PCI_CHIP_I815 0x1132
#endif
#define IS_I810(imesa) (imesa->i810Screen->deviceID == PCI_CHIP_I810 || \
@@ -78,7 +78,7 @@ typedef void (*i810_line_func)( i810ContextPtr, i810Vertex *, i810Vertex * );
typedef void (*i810_point_func)( i810ContextPtr, i810Vertex * );
struct i810_context_t {
- GLint refcount;
+ GLint refcount;
struct gl_context *glCtx;
/* Texture object bookkeeping
@@ -111,17 +111,17 @@ struct i810_context_t {
GLuint vertex_low;
GLuint vertex_high;
GLuint vertex_last_prim;
-
+
GLboolean upload_cliprects;
- /* Fallback rasterization functions
+ /* Fallback rasterization functions
*/
i810_point_func draw_point;
i810_line_func draw_line;
i810_tri_func draw_tri;
- /* Hardware state
+ /* Hardware state
*/
GLuint dirty; /* I810_UPLOAD_* */
GLuint Setup[I810_CTX_SETUP_SIZE];
@@ -160,8 +160,8 @@ struct i810_context_t {
int texAge;
int ctxAge;
int dirtyAge;
-
-
+
+
GLboolean scissor;
drm_clip_rect_t draw_rect;
drm_clip_rect_t scissor_rect;
@@ -172,7 +172,7 @@ struct i810_context_t {
__DRIdrawable *driDrawable;
__DRIscreen *driScreen;
- i810ScreenPrivate *i810Screen;
+ i810ScreenPrivate *i810Screen;
I810SAREAPtr sarea;
};
@@ -183,7 +183,7 @@ struct i810_context_t {
#define GET_ENQUEUE_AGE( imesa ) imesa->sarea->last_enqueue
-/* Lock the hardware and validate our state.
+/* Lock the hardware and validate our state.
*/
#define LOCK_HARDWARE( imesa ) \
do { \
@@ -199,12 +199,12 @@ struct i810_context_t {
/* Release the kernel lock.
*/
#define UNLOCK_HARDWARE(imesa) \
- DRM_UNLOCK(imesa->driFd, imesa->driHwLock, imesa->hHWContext);
+ DRM_UNLOCK(imesa->driFd, imesa->driHwLock, imesa->hHWContext);
/* This is the wrong way to do it, I'm sure. Otherwise the drm
* bitches that I've already got the heavyweight lock. At worst,
- * this is 3 ioctls. The best solution probably only gets me down
+ * this is 3 ioctls. The best solution probably only gets me down
* to 2 ioctls in the worst case.
*/
#define LOCK_HARDWARE_QUIESCENT( imesa ) do { \
diff --git a/src/mesa/drivers/dri/i810/i810ioctl.c b/src/mesa/drivers/dri/i810/i810ioctl.c
index 4b004d5..41f1914 100644
--- a/src/mesa/drivers/dri/i810/i810ioctl.c
+++ b/src/mesa/drivers/dri/i810/i810ioctl.c
@@ -20,14 +20,14 @@ static drmBufPtr i810_get_buffer_ioctl( i810ContextPtr imesa )
drmI810DMA dma;
drmBufPtr buf;
int retcode, i = 0;
-
+
while (1) {
retcode = drmCommandWriteRead(imesa->driFd, DRM_I810_GETBUF,
&dma, sizeof(drmI810DMA));
- if (dma.granted == 1 && retcode == 0)
+ if (dma.granted == 1 && retcode == 0)
break;
-
+
if (++i > 1000) {
drmCommandNone(imesa->driFd, DRM_I810_FLUSH);
i = 0;
@@ -60,7 +60,7 @@ static void i810Clear( struct gl_context *ctx, GLbitfield mask )
clear.clear_depth = (GLuint) (ctx->Depth.Clear * DEPTH_SCALE);
I810_FIREVERTICES( imesa );
-
+
if ((mask & BUFFER_BIT_FRONT_LEFT) && colorMask == ~0U) {
clear.flags |= I810_FRONT;
mask &= ~BUFFER_BIT_FRONT_LEFT;
@@ -72,7 +72,7 @@ static void i810Clear( struct gl_context *ctx, GLbitfield mask )
}
if (mask & BUFFER_BIT_DEPTH) {
- if (ctx->Depth.Mask)
+ if (ctx->Depth.Mask)
clear.flags |= I810_DEPTH;
mask &= ~BUFFER_BIT_DEPTH;
}
@@ -93,10 +93,10 @@ static void i810Clear( struct gl_context *ctx, GLbitfield mask )
cx += imesa->drawX;
cy += imesa->drawY;
- for (i = 0 ; i < imesa->numClipRects ; )
- {
+ for (i = 0 ; i < imesa->numClipRects ; )
+ {
unsigned int nr = MIN2(i + I810_NR_SAREA_CLIPRECTS, imesa->numClipRects);
- drm_clip_rect_t *box = imesa->pClipRects;
+ drm_clip_rect_t *box = imesa->pClipRects;
drm_clip_rect_t *b = (drm_clip_rect_t *)imesa->sarea->boxes;
int n = 0;
@@ -108,7 +108,7 @@ static void i810Clear( struct gl_context *ctx, GLbitfield mask )
GLint w = box[i].x2 - x;
GLint h = box[i].y2 - y;
- if (x < cx) w -= cx - x, x = cx;
+ if (x < cx) w -= cx - x, x = cx;
if (y < cy) h -= cy - y, y = cy;
if (x + w > cx + cw) w = cx + cw - x;
if (y + h > cy + ch) h = cy + ch - y;
@@ -139,7 +139,7 @@ static void i810Clear( struct gl_context *ctx, GLbitfield mask )
imesa->upload_cliprects = GL_TRUE;
}
- if (mask)
+ if (mask)
_swrast_Clear( ctx, mask );
}
@@ -147,9 +147,9 @@ static void i810Clear( struct gl_context *ctx, GLbitfield mask )
/*
- * Copy the back buffer to the front buffer.
+ * Copy the back buffer to the front buffer.
*/
-void i810CopyBuffer( const __DRIdrawable *dPriv )
+void i810CopyBuffer( const __DRIdrawable *dPriv )
{
i810ContextPtr imesa;
drm_clip_rect_t *pbox;
@@ -163,7 +163,7 @@ void i810CopyBuffer( const __DRIdrawable *dPriv )
I810_FIREVERTICES( imesa );
LOCK_HARDWARE( imesa );
-
+
pbox = (drm_clip_rect_t *)dPriv->pClipRects;
nbox = dPriv->numClipRects;
@@ -174,7 +174,7 @@ void i810CopyBuffer( const __DRIdrawable *dPriv )
imesa->sarea->nbox = nr - i;
- for ( ; i < nr ; i++)
+ for ( ; i < nr ; i++)
*b++ = pbox[i];
drmCommandNone(imesa->driFd, DRM_I810_SWAP);
@@ -197,7 +197,7 @@ void i810CopyBuffer( const __DRIdrawable *dPriv )
/*
* XXX implement when full-screen extension is done.
*/
-void i810PageFlip( const __DRIdrawable *dPriv )
+void i810PageFlip( const __DRIdrawable *dPriv )
{
i810ContextPtr imesa;
int tmp, ret;
@@ -205,12 +205,12 @@ void i810PageFlip( const __DRIdrawable *dPriv )
assert(dPriv);
assert(dPriv->driContextPriv);
assert(dPriv->driContextPriv->driverPrivate);
-
+
imesa = (i810ContextPtr) dPriv->driContextPriv->driverPrivate;
I810_FIREVERTICES( imesa );
LOCK_HARDWARE( imesa );
-
+
if (dPriv->pClipRects) {
memcpy(&(imesa->sarea->boxes[0]), &(dPriv->pClipRects[0]),
sizeof(drm_clip_rect_t));
@@ -225,7 +225,7 @@ void i810PageFlip( const __DRIdrawable *dPriv )
tmp = GET_ENQUEUE_AGE(imesa);
UNLOCK_HARDWARE( imesa );
-
+
/* multiarb will suck the life out of the server without this throttle:
*/
if (GET_DISPATCH_AGE(imesa) < imesa->lastSwap) {
@@ -242,7 +242,7 @@ void i810PageFlip( const __DRIdrawable *dPriv )
/* This waits for *everybody* to finish rendering -- overkill.
*/
-void i810DmaFinish( i810ContextPtr imesa )
+void i810DmaFinish( i810ContextPtr imesa )
{
I810_FIREVERTICES( imesa );
@@ -252,13 +252,13 @@ void i810DmaFinish( i810ContextPtr imesa )
}
-void i810RegetLockQuiescent( i810ContextPtr imesa )
+void i810RegetLockQuiescent( i810ContextPtr imesa )
{
drmUnlock(imesa->driFd, imesa->hHWContext);
- i810GetLock( imesa, DRM_LOCK_QUIESCENT );
+ i810GetLock( imesa, DRM_LOCK_QUIESCENT );
}
-void i810WaitAgeLocked( i810ContextPtr imesa, int age )
+void i810WaitAgeLocked( i810ContextPtr imesa, int age )
{
int i = 0, j;
@@ -274,7 +274,7 @@ void i810WaitAgeLocked( i810ContextPtr imesa, int age )
}
-void i810WaitAge( i810ContextPtr imesa, int age )
+void i810WaitAge( i810ContextPtr imesa, int age )
{
int i = 0, j;
@@ -320,21 +320,21 @@ static int intersect_rect( drm_clip_rect_t *out,
static void emit_state( i810ContextPtr imesa )
{
- GLuint dirty = imesa->dirty;
+ GLuint dirty = imesa->dirty;
I810SAREAPtr sarea = imesa->sarea;
if (dirty & I810_UPLOAD_BUFFERS) {
- memcpy( sarea->BufferState, imesa->BufferSetup,
+ memcpy( sarea->BufferState, imesa->BufferSetup,
sizeof(imesa->BufferSetup) );
- }
+ }
if (dirty & I810_UPLOAD_CTX) {
- memcpy( sarea->ContextState, imesa->Setup,
+ memcpy( sarea->ContextState, imesa->Setup,
sizeof(imesa->Setup) );
}
if (dirty & I810_UPLOAD_TEX0) {
- memcpy(sarea->TexState[0],
+ memcpy(sarea->TexState[0],
imesa->CurrentTexObj[0]->Setup,
sizeof(imesa->CurrentTexObj[0]->Setup));
}
@@ -347,7 +347,7 @@ static void emit_state( i810ContextPtr imesa )
sizeof(imesa->CurrentTexObj[1]->Setup));
/* Need this for the case where both units are bound to the same
- * texobj.
+ * texobj.
*/
setup[I810_TEXREG_MI1] ^= (MI1_MAP_0 ^ MI1_MAP_1);
setup[I810_TEXREG_MLC] ^= (MLC_MAP_0 ^ MLC_MAP_1);
@@ -355,7 +355,7 @@ static void emit_state( i810ContextPtr imesa )
setup[I810_TEXREG_MCS] ^= (MCS_COORD_0 ^ MCS_COORD_1);
setup[I810_TEXREG_MF] ^= (MF_MAP_0 ^ MF_MAP_1);
}
-
+
sarea->dirty = dirty;
imesa->dirty = 0;
}
@@ -376,10 +376,10 @@ void i810FlushPrimsLocked( i810ContextPtr imesa )
I810SAREAPtr sarea = imesa->sarea;
drmI810Vertex vertex;
int i;
-
+
if (I810_DEBUG & DEBUG_STATE)
i810PrintDirty( __FUNCTION__, imesa->dirty );
-
+
if (imesa->dirty)
emit_state( imesa );
@@ -391,23 +391,23 @@ void i810FlushPrimsLocked( i810ContextPtr imesa )
if (!nbox) {
vertex.used = 0;
}
- else if (nbox > I810_NR_SAREA_CLIPRECTS) {
+ else if (nbox > I810_NR_SAREA_CLIPRECTS) {
imesa->upload_cliprects = GL_TRUE;
}
- if (!nbox || !imesa->upload_cliprects)
+ if (!nbox || !imesa->upload_cliprects)
{
- if (nbox == 1)
+ if (nbox == 1)
sarea->nbox = 0;
else
sarea->nbox = nbox;
- vertex.discard = 1;
+ vertex.discard = 1;
drmCommandWrite(imesa->driFd, DRM_I810_VERTEX,
&vertex, sizeof(drmI810Vertex));
age_imesa(imesa, sarea->last_enqueue);
- }
- else
+ }
+ else
{
for (i = 0 ; i < nbox ; )
{
@@ -416,7 +416,7 @@ void i810FlushPrimsLocked( i810ContextPtr imesa )
if (imesa->scissor) {
sarea->nbox = 0;
-
+
for ( ; i < nr ; i++) {
b->x1 = pbox[i].x1 - imesa->drawX;
b->y1 = pbox[i].y1 - imesa->drawY;
@@ -444,10 +444,10 @@ void i810FlushPrimsLocked( i810ContextPtr imesa )
b->y2 = pbox[i].y2 - imesa->drawY;
}
}
-
+
/* Finished with the buffer?
*/
- if (nr == nbox)
+ if (nr == nbox)
vertex.discard = 1;
drmCommandWrite(imesa->driFd, DRM_I810_VERTEX,
@@ -471,8 +471,8 @@ void i810FlushPrimsGetBuffer( i810ContextPtr imesa )
{
LOCK_HARDWARE(imesa);
- if (imesa->vertex_buffer)
- i810FlushPrimsLocked( imesa );
+ if (imesa->vertex_buffer)
+ i810FlushPrimsLocked( imesa );
imesa->vertex_buffer = i810_get_buffer_ioctl( imesa );
imesa->vertex_high = imesa->vertex_buffer->total;
@@ -483,7 +483,7 @@ void i810FlushPrimsGetBuffer( i810ContextPtr imesa )
}
-void i810FlushPrims( i810ContextPtr imesa )
+void i810FlushPrims( i810ContextPtr imesa )
{
if (imesa->vertex_buffer) {
LOCK_HARDWARE( imesa );
@@ -505,7 +505,7 @@ static void i810Flush( struct gl_context *ctx )
I810_FIREVERTICES( imesa );
}
-static void i810Finish( struct gl_context *ctx )
+static void i810Finish( struct gl_context *ctx )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
i810DmaFinish( imesa );
diff --git a/src/mesa/drivers/dri/i810/i810ioctl.h b/src/mesa/drivers/dri/i810/i810ioctl.h
index 926e38c..dc37f2a 100644
--- a/src/mesa/drivers/dri/i810/i810ioctl.h
+++ b/src/mesa/drivers/dri/i810/i810ioctl.h
@@ -5,7 +5,7 @@
#include "i810context.h"
void i810EmitPrim( i810ContextPtr imesa );
-void i810FlushPrims( i810ContextPtr mmesa );
+void i810FlushPrims( i810ContextPtr mmesa );
void i810FlushPrimsLocked( i810ContextPtr mmesa );
void i810FlushPrimsGetBuffer( i810ContextPtr imesa );
@@ -35,7 +35,7 @@ do { \
static INLINE GLuint *i810AllocDmaLow( i810ContextPtr imesa, int bytes )
{
- if (imesa->vertex_low + bytes > imesa->vertex_high)
+ if (imesa->vertex_low + bytes > imesa->vertex_high)
i810FlushPrimsGetBuffer( imesa );
{
diff --git a/src/mesa/drivers/dri/i810/i810render.c b/src/mesa/drivers/dri/i810/i810render.c
index 45f0954..6421225 100644
--- a/src/mesa/drivers/dri/i810/i810render.c
+++ b/src/mesa/drivers/dri/i810/i810render.c
@@ -134,7 +134,7 @@ static GLboolean i810_run_render( struct gl_context *ctx,
/* Don't handle clipping or indexed vertices.
*/
- if (imesa->RenderIndex != 0 ||
+ if (imesa->RenderIndex != 0 ||
!i810_validate_render( ctx, VB )) {
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c
index fc56b61..5d83906 100644
--- a/src/mesa/drivers/dri/i810/i810screen.c
+++ b/src/mesa/drivers/dri/i810/i810screen.c
@@ -111,7 +111,7 @@ i810FillInModes( __DRIscreen *psp,
return (const __DRIconfig **) configs;
}
-
+
/* static int i810_malloc_proxy_buf(drmBufMapPtr buffers) */
/* { */
/* char *buffer; */
diff --git a/src/mesa/drivers/dri/i810/i810span.c b/src/mesa/drivers/dri/i810/i810span.c
index dddab8b..e964ca5 100644
--- a/src/mesa/drivers/dri/i810/i810span.c
+++ b/src/mesa/drivers/dri/i810/i810span.c
@@ -100,7 +100,7 @@ void i810InitSpanFuncs( struct gl_context *ctx )
{
struct swrast_device_driver *swdd = _swrast_GetDeviceDriverReference(ctx);
swdd->SpanRenderStart = i810SpanRenderStart;
- swdd->SpanRenderFinish = i810SpanRenderFinish;
+ swdd->SpanRenderFinish = i810SpanRenderFinish;
}
diff --git a/src/mesa/drivers/dri/i810/i810state.c b/src/mesa/drivers/dri/i810/i810state.c
index 7c3fbb1..795ff9a 100644
--- a/src/mesa/drivers/dri/i810/i810state.c
+++ b/src/mesa/drivers/dri/i810/i810state.c
@@ -76,7 +76,7 @@ static void i810BlendEquationSeparate(struct gl_context *ctx,
assert( modeRGB == modeA );
/* Can only do GL_ADD equation in hardware */
- FALLBACK( I810_CONTEXT(ctx), I810_FALLBACK_BLEND_EQ,
+ FALLBACK( I810_CONTEXT(ctx), I810_FALLBACK_BLEND_EQ,
modeRGB != GL_FUNC_ADD);
/* BlendEquation sets ColorLogicOpEnabled in an unexpected
@@ -287,7 +287,7 @@ void i810DrawBuffer(struct gl_context *ctx, GLenum mode )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
int front = 0;
-
+
if (ctx->DrawBuffer->_NumColorDrawBuffers != 1) {
/* GL_NONE or GL_FRONT_AND_BACK or stereo left&right, etc */
FALLBACK( imesa, I810_FALLBACK_DRAW_BUFFER, GL_TRUE );
@@ -306,9 +306,9 @@ void i810DrawBuffer(struct gl_context *ctx, GLenum mode )
return;
}
- if ( imesa->sarea->pf_current_page == 1 )
+ if ( imesa->sarea->pf_current_page == 1 )
front ^= 1;
-
+
FALLBACK( imesa, I810_FALLBACK_DRAW_BUFFER, GL_FALSE );
I810_FIREVERTICES(imesa);
I810_STATECHANGE(imesa, I810_UPLOAD_BUFFERS);
diff --git a/src/mesa/drivers/dri/i810/i810tex.c b/src/mesa/drivers/dri/i810/i810tex.c
index 49364ae..1ee64bc 100644
--- a/src/mesa/drivers/dri/i810/i810tex.c
+++ b/src/mesa/drivers/dri/i810/i810tex.c
@@ -15,9 +15,9 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
@@ -94,8 +94,8 @@ static void i810SetTexWrapping(i810TextureObjectPtr tex,
}
-static void i810SetTexFilter(i810ContextPtr imesa,
- i810TextureObjectPtr t,
+static void i810SetTexFilter(i810ContextPtr imesa,
+ i810TextureObjectPtr t,
GLenum minf, GLenum magf,
GLfloat bias)
{
@@ -121,9 +121,9 @@ static void i810SetTexFilter(i810ContextPtr imesa,
t->Setup[I810_TEXREG_MF] |= MF_MIN_LINEAR | MF_MIP_NEAREST;
break;
case GL_NEAREST_MIPMAP_LINEAR:
- if (IS_I815(imesa))
+ if (IS_I815(imesa))
t->Setup[I810_TEXREG_MF] |= MF_MIN_NEAREST | MF_MIP_LINEAR;
- else
+ else
t->Setup[I810_TEXREG_MF] |= MF_MIN_NEAREST | MF_MIP_DITHER;
/*
if (magf == GL_LINEAR) {
@@ -135,7 +135,7 @@ static void i810SetTexFilter(i810ContextPtr imesa,
case GL_LINEAR_MIPMAP_LINEAR:
if (IS_I815(imesa))
t->Setup[I810_TEXREG_MF] |= MF_MIN_LINEAR | MF_MIP_LINEAR;
- else
+ else
t->Setup[I810_TEXREG_MF] |= MF_MIN_LINEAR | MF_MIP_DITHER;
break;
default:
@@ -143,13 +143,13 @@ static void i810SetTexFilter(i810ContextPtr imesa,
}
switch (magf) {
- case GL_NEAREST:
- t->Setup[I810_TEXREG_MF] |= MF_MAG_NEAREST;
+ case GL_NEAREST:
+ t->Setup[I810_TEXREG_MF] |= MF_MAG_NEAREST;
break;
- case GL_LINEAR:
- t->Setup[I810_TEXREG_MF] |= MF_MAG_LINEAR;
+ case GL_LINEAR:
+ t->Setup[I810_TEXREG_MF] |= MF_MAG_LINEAR;
break;
- default:
+ default:
return;
}
@@ -179,9 +179,9 @@ i810AllocTexObj( struct gl_context *ctx, struct gl_texture_object *texObj )
*/
t->base.tObj = texObj;
t->Setup[I810_TEXREG_MI0] = GFX_OP_MAP_INFO;
- t->Setup[I810_TEXREG_MI1] = MI1_MAP_0;
+ t->Setup[I810_TEXREG_MI1] = MI1_MAP_0;
t->Setup[I810_TEXREG_MI2] = MI2_DIMENSIONS_ARE_LOG2;
- t->Setup[I810_TEXREG_MLC] = (GFX_OP_MAP_LOD_CTL |
+ t->Setup[I810_TEXREG_MLC] = (GFX_OP_MAP_LOD_CTL |
MLC_MAP_0 |
/*MLC_DITHER_WEIGHT_FULL |*/
MLC_DITHER_WEIGHT_12 |
@@ -201,7 +201,7 @@ i810AllocTexObj( struct gl_context *ctx, struct gl_texture_object *texObj )
MF_UPDATE_MIP_FILTER |
MF_UPDATE_MAG_FILTER |
MF_UPDATE_MIN_FILTER);
-
+
make_empty_list( & t->base );
i810SetTexWrapping( t, texObj->WrapS, texObj->WrapT );
@@ -231,7 +231,7 @@ static void i810TexParameter( struct gl_context *ctx, GLenum target,
* vertices or not. Setting imesa->new_state means that
* i810UpdateTextureState() will be called before any triangles are
* rendered. If a statechange has occurred, it will be detected at
- * that point, and buffered vertices flushed.
+ * that point, and buffered vertices flushed.
*/
switch (pname) {
case GL_TEXTURE_MIN_FILTER:
@@ -246,7 +246,7 @@ static void i810TexParameter( struct gl_context *ctx, GLenum target,
case GL_TEXTURE_WRAP_T:
i810SetTexWrapping( t, tObj->WrapS, tObj->WrapT );
break;
-
+
case GL_TEXTURE_BORDER_COLOR:
i810SetTexBorderColor( t, tObj->BorderColor.f );
break;
@@ -280,12 +280,12 @@ static void i810TexParameter( struct gl_context *ctx, GLenum target,
/**
* Setup hardware bits for new texture environment settings.
- *
+ *
* \todo
* Determine whether or not \c param can be used instead of
* \c texUnit->EnvColor in the \c GL_TEXTURE_ENV_COLOR case.
*/
-static void i810TexEnv( struct gl_context *ctx, GLenum target,
+static void i810TexEnv( struct gl_context *ctx, GLenum target,
GLenum pname, const GLfloat *param )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
@@ -293,7 +293,7 @@ static void i810TexEnv( struct gl_context *ctx, GLenum target,
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
/* Only one env color. Need a fallback if env colors are different
- * and texture setup references env color in both units.
+ * and texture setup references env color in both units.
*/
switch (pname) {
case GL_TEXTURE_ENV_COLOR: {
@@ -328,7 +328,7 @@ static void i810TexEnv( struct gl_context *ctx, GLenum target,
default:
break;
}
-}
+}
@@ -336,7 +336,7 @@ static void i810TexEnv( struct gl_context *ctx, GLenum target,
static void i810TexImage1D( struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
- GLenum format, GLenum type,
+ GLenum format, GLenum type,
const GLvoid *pixels,
const struct gl_pixelstore_attrib *pack,
struct gl_texture_object *texObj,
@@ -348,9 +348,9 @@ static void i810TexImage1D( struct gl_context *ctx, GLenum target, GLint level,
}
}
-static void i810TexSubImage1D( struct gl_context *ctx,
+static void i810TexSubImage1D( struct gl_context *ctx,
GLenum target,
- GLint level,
+ GLint level,
GLint xoffset,
GLsizei width,
GLenum format, GLenum type,
@@ -388,9 +388,9 @@ static void i810TexImage2D( struct gl_context *ctx, GLenum target, GLint level,
pixels, packing, texObj, texImage );
}
-static void i810TexSubImage2D( struct gl_context *ctx,
+static void i810TexSubImage2D( struct gl_context *ctx,
GLenum target,
- GLint level,
+ GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
@@ -404,7 +404,7 @@ static void i810TexSubImage2D( struct gl_context *ctx,
I810_FIREVERTICES( I810_CONTEXT(ctx) );
driSwapOutTextureObject( t );
}
- _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width,
+ _mesa_store_texsubimage2d(ctx, target, level, xoffset, yoffset, width,
height, format, type, pixels, packing, texObj,
texImage);
}
@@ -432,7 +432,7 @@ static void i810DeleteTexture( struct gl_context *ctx, struct gl_texture_object
/**
* Choose a Mesa texture format to match the requested format.
- *
+ *
* The i810 only supports 5 texture modes that are useful to Mesa. That
* makes this routine pretty simple.
*/
diff --git a/src/mesa/drivers/dri/i810/i810tex.h b/src/mesa/drivers/dri/i810/i810tex.h
index b396848..8a51030 100644
--- a/src/mesa/drivers/dri/i810/i810tex.h
+++ b/src/mesa/drivers/dri/i810/i810tex.h
@@ -15,9 +15,9 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
@@ -44,19 +44,19 @@
*
* Non-local texture objects have a valid MemBlock to describe the
* region managed by the other client, and can be identified by
- * 't->globj == 0'
+ * 't->globj == 0'
*/
struct i810_texture_object_t {
driTextureObject base;
-
+
int Pitch;
int Height;
int texelBytes;
char *BufAddr;
-
+
GLuint max_level;
- struct {
+ struct {
const struct gl_texture_image *image;
int offset; /* into BufAddr */
int height;
@@ -66,7 +66,7 @@ struct i810_texture_object_t {
GLuint Setup[I810_TEX_SETUP_SIZE];
GLuint dirty;
-};
+};
void i810UpdateTextureState( struct gl_context *ctx );
void i810InitTextureFuncs( struct dd_function_table *functions );
diff --git a/src/mesa/drivers/dri/i810/i810texmem.c b/src/mesa/drivers/dri/i810/i810texmem.c
index 6e6b21c..36cf8d6 100644
--- a/src/mesa/drivers/dri/i810/i810texmem.c
+++ b/src/mesa/drivers/dri/i810/i810texmem.c
@@ -42,12 +42,12 @@ void i810DestroyTexObj(i810ContextPtr imesa, i810TextureObjectPtr t)
{
/* See if it was the driver's current object.
*/
- if ( imesa != NULL ) {
+ if ( imesa != NULL ) {
if (imesa->CurrentTexObj[0] == t) {
imesa->CurrentTexObj[0] = 0;
imesa->dirty &= ~I810_UPLOAD_TEX0;
}
-
+
if (imesa->CurrentTexObj[1] == t) {
imesa->CurrentTexObj[1] = 0;
imesa->dirty &= ~I810_UPLOAD_TEX1;
@@ -100,7 +100,7 @@ static void i810UploadTexLevel( i810ContextPtr imesa,
if (image->Width * texelBytes == t->Pitch) {
GLubyte *dst = (GLubyte *)(t->BufAddr + t->image[hwlevel].offset);
GLubyte *src = (GLubyte *)image->Data;
-
+
memcpy( dst, src, t->Pitch * image->Height );
}
else {
@@ -147,29 +147,29 @@ int i810UploadTexImagesLocked( i810ContextPtr imesa, i810TextureObjectPtr t )
*/
if (!t->base.memBlock) {
int heap;
-
+
heap = driAllocateTexture( imesa->texture_heaps, imesa->nr_heaps,
(driTextureObject *) t);
-
+
if ( heap == -1 ) {
return -1;
}
-
+
assert(t->base.memBlock);
ofs = t->base.memBlock->ofs;
t->BufAddr = imesa->i810Screen->tex.map + ofs;
t->Setup[I810_TEXREG_MI3] = imesa->i810Screen->textureOffset + ofs;
-
+
if (t == imesa->CurrentTexObj[0])
I810_STATECHANGE(imesa, I810_UPLOAD_TEX0);
-
+
if (t == imesa->CurrentTexObj[1])
I810_STATECHANGE(imesa, I810_UPLOAD_TEX1);
-
+
/* i810UpdateTexLRU( imesa, t );*/
}
driUpdateTextureLRU( (driTextureObject *) t );
-
+
if (imesa->texture_heaps[0]->timestamp >= GET_DISPATCH_AGE(imesa))
i810WaitAgeLocked( imesa, imesa->texture_heaps[0]->timestamp );
@@ -181,4 +181,4 @@ int i810UploadTexImagesLocked( i810ContextPtr imesa, i810TextureObjectPtr t )
t->base.dirty_images[0] = 0;
return 0;
-}
+}
diff --git a/src/mesa/drivers/dri/i810/i810texstate.c b/src/mesa/drivers/dri/i810/i810texstate.c
index 5b505e7..377566d 100644
--- a/src/mesa/drivers/dri/i810/i810texstate.c
+++ b/src/mesa/drivers/dri/i810/i810texstate.c
@@ -15,9 +15,9 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+ * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
@@ -40,7 +40,7 @@
-static void i810SetTexImages( i810ContextPtr imesa,
+static void i810SetTexImages( i810ContextPtr imesa,
struct gl_texture_object *tObj )
{
GLuint height, width, pitch, i, textureFormat, log_pitch;
@@ -97,7 +97,7 @@ static void i810SetTexImages( i810ContextPtr imesa,
width = tObj->Image[0][t->base.firstLevel]->Width * t->texelBytes;
for (pitch = 32, log_pitch=2 ; pitch < width ; pitch *= 2 )
log_pitch++;
-
+
/* All images must be loaded at this pitch. Count the number of
* lines required:
*/
@@ -111,11 +111,11 @@ static void i810SetTexImages( i810ContextPtr imesa,
t->Pitch = pitch;
t->base.totalSize = height*pitch;
t->max_level = i-1;
- t->dirty = I810_UPLOAD_TEX0 | I810_UPLOAD_TEX1;
- t->Setup[I810_TEXREG_MI1] = (MI1_MAP_0 | textureFormat | log_pitch);
+ t->dirty = I810_UPLOAD_TEX0 | I810_UPLOAD_TEX1;
+ t->Setup[I810_TEXREG_MI1] = (MI1_MAP_0 | textureFormat | log_pitch);
t->Setup[I810_TEXREG_MLL] = (GFX_OP_MAP_LOD_LIMITS |
MLL_MAP_0 |
- MLL_UPDATE_MAX_MIP |
+ MLL_UPDATE_MAX_MIP |
MLL_UPDATE_MIN_MIP |
((numLevels - 1) << MLL_MIN_MIP_SHIFT));
@@ -191,7 +191,7 @@ static const unsigned operand_modifiers[] = {
* a reasonable place to make note of it.
*/
static GLboolean
-i810UpdateTexEnvCombine( struct gl_context *ctx, GLuint unit,
+i810UpdateTexEnvCombine( struct gl_context *ctx, GLuint unit,
int * color_stage, int * alpha_stage )
{
i810ContextPtr imesa = I810_CONTEXT(ctx);
@@ -214,7 +214,7 @@ i810UpdateTexEnvCombine( struct gl_context *ctx, GLuint unit,
return GL_TRUE;
}
-
+
if ((*color_stage >= 3) || (*alpha_stage >= 3)) {
return GL_FALSE;
}
@@ -236,7 +236,7 @@ i810UpdateTexEnvCombine( struct gl_context *ctx, GLuint unit,
color_arg[i] = MC_ARG_TEX1_COLOR;
break;
case GL_TEXTURE:
- color_arg[i] = (unit == 0)
+ color_arg[i] = (unit == 0)
? MC_ARG_TEX0_COLOR : MC_ARG_TEX1_COLOR;
break;
case GL_CONSTANT:
@@ -347,13 +347,13 @@ i810UpdateTexEnvCombine( struct gl_context *ctx, GLuint unit,
* done in stage zero and writes to MC_DEST_ACCUMULATOR. The
* (arg1*(1-arg2)) portion is done in stage 1, and the final stage is
* (MC_ARG1_ACCUMULATOR | MC_ARG2_CURRENT_COLOR | MC_OP_ADD).
- *
+ *
* It can also be done without using the accumulator by rearranging
* the equation as (arg1 + (arg2 * (arg0 - arg1))). Too bad the i810
* doesn't support the MODULATE_AND_ADD mode that the i830 supports.
* If it did, the interpolate could be done in only two stages.
*/
-
+
if ( (color_arg[2] & MC_ARG_INVERT) != 0 ) {
unsigned temp = color_arg[0];
@@ -412,7 +412,7 @@ i810UpdateTexEnvCombine( struct gl_context *ctx, GLuint unit,
return GL_FALSE;
}
-
+
switch ( texUnit->_CurrentCombine->ModeA ) {
case GL_REPLACE:
alpha_combine = MA_OP_ARG1;
@@ -514,7 +514,7 @@ i810UpdateTexEnvCombine( struct gl_context *ctx, GLuint unit,
(*color_stage)++;
}
-
+
if ( Ashift != 0 ) {
const unsigned alpha_scale = GFX_OP_MAP_ALPHA_STAGES
| (*alpha_stage << MA_STAGE_SHIFT)
@@ -553,7 +553,7 @@ static GLboolean enable_tex_common( struct gl_context *ctx, GLuint unit )
return GL_FALSE;
}
}
-
+
/* Update state if this is a different texture object to last
* time.
*/
@@ -561,11 +561,11 @@ static GLboolean enable_tex_common( struct gl_context *ctx, GLuint unit )
I810_STATECHANGE(imesa, (I810_UPLOAD_TEX0<CurrentTexObj[unit] = t;
t->base.bound |= (1U << unit);
-
+
/* XXX: should be locked */
driUpdateTextureLRU( (driTextureObject *) t );
}
-
+
imesa->TexEnvImageFmt[unit] = tObj->Image[0][tObj->BaseLevel]->_BaseFormat;
return GL_TRUE;
}
@@ -583,10 +583,10 @@ static GLboolean enable_tex_rect( struct gl_context *ctx, GLuint unit )
I810_STATECHANGE(imesa, (I810_UPLOAD_TEX0<Setup[I810_TEXREG_MCS] &= ~MCS_NORMALIZED_COORDS;
- t->Setup[I810_TEXREG_MCS] |= MCS_UPDATE_NORMALIZED;
+ t->Setup[I810_TEXREG_MCS] |= MCS_UPDATE_NORMALIZED;
t->Setup[I810_TEXREG_MI2] = (MI2_DIMENSIONS_ARE_EXACT |
(Height << MI2_HEIGHT_SHIFT) | Width);
-
+
return GL_TRUE;
}
@@ -603,10 +603,10 @@ static GLboolean enable_tex_2d( struct gl_context *ctx, GLuint unit )
log2Height = tObj->Image[0][t->base.firstLevel]->HeightLog2;
I810_STATECHANGE(imesa, (I810_UPLOAD_TEX0<