i965: Fix gen6,gen7 when used with a non-HiZ capable DDX
authorChad Versace <chad.versace@linux.intel.com>
Tue, 27 Dec 2011 18:52:44 +0000 (10:52 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Tue, 17 Jan 2012 00:38:36 +0000 (16:38 -0800)
commit7e08bf08d13228001f6306800b5bd69b89b1bb6f
tree05c7b7d82657ddd2741cd6980b8b78e74fa514c2
parent8e543cc09862abb57e9d4dafe12e20a49972987b
i965: Fix gen6,gen7 when used with a non-HiZ capable DDX

Nothing works if HiZ is enabled and the DDX is incapable of HiZ (that is,
the DDX version is < 2.16).

The problem is that the refactoring that eliminated
intel_renderbuffer::stencil_rb broke the recovery path in
intel_verify_dri2_has_hiz().  Specifically, it broke line
intel_context.c:1445, which allocates the region for
DRI_BUFFER_DEPTH_STENCIL. That allocation was creating a separate stencil
miptree, despite the buffer being a packed depthstencil buffer. Havoc
ensued.

This patch introduces a bool flag that prevents allocation of that stencil
miptree.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44103
Tested-by: Ian Romanick <idr@freedesktop.org>
Note: This is a candidate for the 8.0 branch.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/intel/intel_mipmap_tree.c