diff options
author | Chad Versace <[email protected]> | 2011-11-16 23:14:39 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2011-11-22 10:50:49 -0800 |
commit | a2e44b0813e956440c451c107cf5564b56cbe98e (patch) | |
tree | 4aad4a2c5bef3b8c1ccb3e8d34f5ee8d6d60f79c /src/mesa/drivers/dri/intel/intel_mipmap_tree.h | |
parent | 3eb12dfaeed03f77e31943eea164acb03e86bbc9 (diff) |
intel: Replace intel_mipmap_tree::hiz_region with a miptree [v2]
This is required to correctly implement HiZ for mipmapped and
multi-layered textures.
v2: Accomodate refcount fixes in intel_process_dri2_buffer_*() that were
introduced in v2 of commit
intel: Replace intel_renderbuffer::region with a miptree [v2]
Reviewed-by: Eric Anholt <eric@anholt>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel/intel_mipmap_tree.h')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h index f22e6852197..2b20d061412 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h @@ -139,18 +139,13 @@ struct intel_mipmap_tree struct intel_region *region; /** - * This points to an auxillary hiz region if all of the following hold: - * 1. The texture has been attached to an FBO as a depthbuffer. - * 2. The texture format is hiz compatible. - * 3. The intel context supports hiz. + * \brief HiZ miptree * - * When a texture is attached to multiple FBO's, a separate renderbuffer - * wrapper is created for each attachment. This necessitates storing the - * hiz region in the texture itself instead of the renderbuffer wrapper. + * This is non-null only if HiZ is enabled for this miptree. * - * \see intel_fbo.c:intel_wrap_texture() + * \see intel_miptree_alloc_hiz() */ - struct intel_region *hiz_region; + struct intel_mipmap_tree *hiz_mt; /** * \brief Stencil miptree for depthstencil textures. @@ -276,6 +271,15 @@ intel_miptree_s8z24_gather(struct intel_context *intel, uint32_t level, uint32_t layer); +/** + * \brief Allocate the miptree's embedded HiZ miptree. + * \see intel_mipmap_tree:hiz_mt + * \return false if allocation failed + */ +bool +intel_miptree_alloc_hiz(struct intel_context *intel, + struct intel_mipmap_tree *mt); + /* i915_mipmap_tree.c: */ void i915_miptree_layout(struct intel_mipmap_tree *mt); |