OSDN Git Service

CELL: finish fragment ops blending (except for unusual D3D modes)
authorRobert Ellison <papillo@tungstengraphics.com>
Thu, 18 Sep 2008 07:29:41 +0000 (01:29 -0600)
committerRobert Ellison <papillo@tungstengraphics.com>
Thu, 18 Sep 2008 07:29:41 +0000 (01:29 -0600)
commitf8bba34d4e12ef4c620cac881a4b697a1e668377
tree5bc0c7927202e26b5566bdbd479f51ff573e4c37
parentf631093ce76ad14dee63293761d7da7b7b42fc6d
CELL: finish fragment ops blending (except for unusual D3D modes)

- Added new "macro" functions spe_float_min() and spe_float_max()
  to rtasm_ppc_spe.{ch}.  These emit instructions that cause
  the minimum or maximum of each element in a vector of floats
  to be saved in the destination register.

- Major changes to cell_gen_fragment.c to implement all the blending
  modes (except for the mysterious D3D-based PIPE_BLENDFACTOR_SRC1_COLOR,
  PIPE_BLENDFACTOR_SRC1_ALPHA, PIPE_BLENDFACTOR_INV_SRC1_COLOR, and
  PIPE_BLENDFACTOR_INV_SRC1_ALPHA).

- Some revamping of code in cell_gen_fragment.c: use the new spe_float_min()
  and spe_float_max() functions (instead of expanding these calculations
  inline via macros); create and use an inline utility function for handling
  "optional" register allocation (for the {1,1,1,1} vector, and the
  blend color vectors) instead of expanding with macros; use the Float
  Multiply and Subtract (fnms) instruction to simplify and optimize many
  blending calculations.
src/gallium/auxiliary/rtasm/rtasm_ppc_spe.c
src/gallium/auxiliary/rtasm/rtasm_ppc_spe.h
src/gallium/drivers/cell/ppu/cell_gen_fragment.c