OSDN Git Service

[965] Replace various alignment code with a shared ALIGN() macro.
authorEric Anholt <eric@anholt.net>
Thu, 4 Oct 2007 19:07:25 +0000 (12:07 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 4 Oct 2007 19:28:49 +0000 (12:28 -0700)
commit77e0523fb7769df4bf43747e136b1653b2421b97
tree27337de5a5460aad8428969a504621c98e95fb16
parent0fc9efd8f0b1b6c4e3525a50e3478e5aef72531a
[965] Replace various alignment code with a shared ALIGN() macro.

In the process, fix some alignment issues:
- Scratch space allocation was aligned into units of 1KB, while the allocation
  wanted units of bytes, so we never allocated enough space for scratch.
- GRF register count was programmed as ALIGN(val - 1, 16) / 16 instead of
  ALIGN(val, 16) / 16 - 1, which overcounted for val != 16n+1.
18 files changed:
src/mesa/drivers/dri/i915/intel_context.h
src/mesa/drivers/dri/i965/brw_clip_state.c
src/mesa/drivers/dri/i965/brw_curbe.c
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/i965/brw_gs_state.c
src/mesa/drivers/dri/i965/brw_sf_state.c
src/mesa/drivers/dri/i965/brw_state_cache.c
src/mesa/drivers/dri/i965/brw_state_pool.c
src/mesa/drivers/dri/i965/brw_tex_layout.c
src/mesa/drivers/dri/i965/brw_vs_state.c
src/mesa/drivers/dri/i965/brw_wm_state.c
src/mesa/drivers/dri/i965/bufmgr_fake.c
src/mesa/drivers/dri/i965/intel_batchbuffer.c
src/mesa/drivers/dri/i965/intel_blit.c
src/mesa/drivers/dri/i965/intel_context.h
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
src/mesa/drivers/dri/intel/intel_tex_layout.c