ilo: disable HiZ for misaligned levels

Graphics / Mesa 3D Graphics Library / Mesa - Chia-I Wu [gmail.com] - 14 January 2014 01:43 UTC

We need to disable HiZ for non-8x4 aligned levels, except for level 0, layer 0. For the very first layer we can adjust Width and Height fields of 3DSTATE_DEPTH_BUFFER to make it aligned.

Specifically, add ILO_TEXTURE_HIZ and set the flag only for properly aligned levels. ilo_texture_can_enable_hiz() is updated to check for the flag.

In tex_layout_validate(), align the depth bo to 8x4 so that we can adjust Width/Height of 3DSTATE_DEPTH_BUFFER without introducing out-of-bound access.

Finally in rectlist blitter, add the ability to adjust 3DSTATE_DEPTH_BUFFER.

7fdab3b ilo: disable HiZ for misaligned levels
src/gallium/drivers/ilo/ilo_blitter_rectlist.c | 153 ++++++++++++------------
src/gallium/drivers/ilo/ilo_gpe_gen6.h | 35 ++++++
src/gallium/drivers/ilo/ilo_resource.c | 85 ++++++++++++-
src/gallium/drivers/ilo/ilo_resource.h | 24 +++-
4 files changed, 215 insertions(+), 82 deletions(-)

Upstream: cgit.freedesktop.org


  • Share