summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2013-04-05 15:18:00 -0700
committerPaul Berry <stereotype441@gmail.com>2013-05-14 11:24:49 -0700
commit496996010561463bf0f2e2a7632978c548065b98 (patch)
tree8c6c7e3f83703c3237839b352401b4d2238744c5
parent22f7bcd44f92b93fad40b5a78fe476dc3715b640 (diff)
intel: Allocate hiz in intel_renderbuffer_move_to_temp()
When moving the renderbuffer to a new miptree, we neglected to allocate the hiz buffer for the new miptree. Oops. Fixes all Piglit depthstencil-render-miplevels tests from crash to pass on Sandybridge. Note: This is a candidate for the 9.1 branch. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Paul Berry <stereotype441@gmail.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com> (cherry picked from commit aa391976dfa12479185d9eeed1f2a0b4dce6c49b)
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 37ecbd1701d..41412eeada5 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -999,6 +999,10 @@ intel_renderbuffer_move_to_temp(struct intel_context *intel,
irb->mt->num_samples,
false /* force_y_tiling */);
+ if (intel->vtbl.is_hiz_depth_format(intel, new_mt->format)) {
+ intel_miptree_alloc_hiz(intel, new_mt, irb->mt->num_samples);
+ }
+
intel_miptree_copy_teximage(intel, intel_image, new_mt);
intel_miptree_reference(&irb->mt, intel_image->mt);
intel_renderbuffer_set_draw_offset(irb);