OSDN Git Service

r300g: add fallback for back stencil reference value and masks for r3xx-r4xx
authorMarek Olšák <maraeo@gmail.com>
Mon, 5 Apr 2010 04:26:11 +0000 (06:26 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 5 Apr 2010 05:09:46 +0000 (07:09 +0200)
commita955f86b31304a1a0f35faa0e0861e920354e23b
treeac1fc496b191fc20da8983bfe95d029e819ebe48
parentb71bfc4400e1d7c15a2bebbbd3b26a8770fbf546
r300g: add fallback for back stencil reference value and masks for r3xx-r4xx

This splits rendering into two passes when front and back stencil
reference value, value mask, or write mask don't match.

The advantages of doing it in the driver instead of in st are:
* SWTCL is executed just once and the resulting vertex buffer is reused
  in the second pass.
* Lower driver overhead due to the fallback being very close to
  the actual draw emission with minimum state change.
src/gallium/drivers/r300/r300_context.c
src/gallium/drivers/r300/r300_context.h
src/gallium/drivers/r300/r300_render.c
src/gallium/drivers/r300/r300_render.h
src/gallium/drivers/r300/r300_state.c