Mesa (master): r300g: implement hyper-z support. (v4)

Dave Airlie airlied at kemper.freedesktop.org
Thu Aug 5 10:36:07 UTC 2010


Module: Mesa
Branch: master
Commit: 6eb2a7fbafd49e75b6cbbee57f23dda63eff73ef
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6eb2a7fbafd49e75b6cbbee57f23dda63eff73ef

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Jul  7 15:20:19 2010 +0200

r300g: implement hyper-z support. (v4)

This implements fast Z clear, Z compression, and HiZ support for r300->r500
GPUs.

It also allows cbzb clears when fast Z clears are being used for the ZB.

It requires a kernel with hyper-z support.

Thanks to Marek Olšák <maraeo at gmail.com>, who started this off, and Alex Deucher at AMD for providing lots of hints.

v2:
squashed zmask ram size fix]
squashed r300g/blitter: fix Z readback when compressed]

v3:
rebase around texture changes in master - .1 fix more bits

v4:
migrated to using u_mm in r300_texture to manage hiz/zmask rams consistently
disabled HiZ when using OQ
flush z-cache before turning hyper-z off
update hyper-z state on dsa state change
store depthclearvalue across cbzb clears and replace it afterwards.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/auxiliary/util/u_blitter.c        |   44 +++++
 src/gallium/auxiliary/util/u_blitter.h        |    2 +
 src/gallium/drivers/r300/r300_blit.c          |   69 +++++++-
 src/gallium/drivers/r300/r300_chipset.c       |   54 +++++-
 src/gallium/drivers/r300/r300_chipset.h       |   14 ++-
 src/gallium/drivers/r300/r300_context.c       |   38 ++++-
 src/gallium/drivers/r300/r300_context.h       |   31 +++-
 src/gallium/drivers/r300/r300_debug.c         |    1 +
 src/gallium/drivers/r300/r300_emit.c          |  142 ++++++++++++++-
 src/gallium/drivers/r300/r300_emit.h          |    3 +
 src/gallium/drivers/r300/r300_flush.c         |    3 +-
 src/gallium/drivers/r300/r300_hyperz.c        |  237 ++++++++++++++++++++++++-
 src/gallium/drivers/r300/r300_hyperz.h        |    5 +
 src/gallium/drivers/r300/r300_reg.h           |    1 +
 src/gallium/drivers/r300/r300_render.c        |    3 +-
 src/gallium/drivers/r300/r300_screen.h        |    1 +
 src/gallium/drivers/r300/r300_state.c         |   71 ++++++--
 src/gallium/drivers/r300/r300_state_derived.c |    4 +-
 src/gallium/drivers/r300/r300_texture.c       |    9 +
 src/gallium/drivers/r300/r300_winsys.h        |    1 +
 src/gallium/winsys/radeon/drm/radeon_drm.c    |   10 +
 src/gallium/winsys/radeon/drm/radeon_r300.c   |    2 +
 src/gallium/winsys/radeon/drm/radeon_winsys.h |    3 +
 23 files changed, 701 insertions(+), 47 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=6eb2a7fbafd49e75b6cbbee57f23dda63eff73ef



More information about the mesa-commit mailing list