diff options
author | Chad Versace <[email protected]> | 2011-11-15 22:51:35 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2011-11-22 10:50:51 -0800 |
commit | 293e9a7ccfeb64efd54464658518e4ded054a13c (patch) | |
tree | 43920075ce8bff443d73ba9ff50628822cb3d776 /src/mesa | |
parent | b264698d30d3c789bbe1fc64fd72c731f342877a (diff) |
intel: Enable HiZ for texture renderbuffers
When a depth texture is first attached to framebuffer, allocate a HiZ
miptree for it.
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | 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 4930999cdb2..c96430d41bd 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -1047,6 +1047,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; + } } return true; |