diff options
author | Chad Versace <[email protected]> | 2013-04-05 15:18:00 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2013-04-08 16:09:26 -0700 |
commit | aa391976dfa12479185d9eeed1f2a0b4dce6c49b (patch) | |
tree | ca8804a56a34961062c160e5bf9208dcc86271ac | |
parent | d0bf48f8e99ccb4a6ab2b963e6a88e104e7ae5d8 (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 <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 4 |
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 b91d6e0b8d5..29775687cc9 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -1010,6 +1010,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, invalidate); intel_miptree_reference(&irb->mt, intel_image->mt); |