[Mesa-dev] [PATCH 35/41] intel: Enable HiZ for texture renderbuffers
Eric Anholt
eric at anholt.net
Fri Nov 18 17:36:07 PST 2011
On Thu, 17 Nov 2011 19:59:02 -0800, Chad Versace <chad.versace at linux.intel.com> wrote:
> When a depth texture is first attached to framebuffer, allocate a HiZ
> miptree for it.
>
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
> ---
> src/mesa/drivers/dri/intel/intel_fbo.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
> index 0b6b227..1842925 100644
> --- a/src/mesa/drivers/dri/intel/intel_fbo.c
> +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
> @@ -1040,6 +1040,13 @@ intel_renderbuffer_update_wrapper(struct intel_context *intel,
> } else {
> intel_miptree_reference(&irb->mt, mt);
> intel_renderbuffer_set_draw_offset(irb);
> +
> + if (mt->hiz_mt == NULL &&
> + intel->vtbl.is_hiz_depth_format(intel, rb->Format)) {
> + intel_miptree_alloc_hiz(intel, mt);
> + if (!mt->hiz_mt)
> + return false;
> + }
Aha! Here's the reason you needed that "initialize the hiz resolves"
patch in intel_miptree_alloc_hiz. Now that one makes sense to me --
previously, intel_miptree_alloc_hiz was only called on uninitialized
storage. We can separate that out later, since it's just optimization.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111118/688b1dad/attachment.pgp>
More information about the mesa-dev
mailing list