From: Jordan Justen Date: Mon, 29 Jul 2013 20:54:47 +0000 (-0700) Subject: i965: add intel_miptree_set_all_slices_need_depth_resolve X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=814a0405048f96f0427f29316a86bfdfb6c8f1ce;p=mesa.git i965: add intel_miptree_set_all_slices_need_depth_resolve This function marks all slices of a renderbuffer at a particular level as needing a depth resolve. Signed-off-by: Jordan Justen Reviewed-by: Paul Berry Reviewed-by: Chad Versace --- diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 900e1c2a063..d6643ca4d72 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -1341,6 +1341,18 @@ intel_miptree_slice_set_needs_depth_resolve(struct intel_mipmap_tree *mt, level, layer, GEN6_HIZ_OP_DEPTH_RESOLVE); } +void +intel_miptree_set_all_slices_need_depth_resolve(struct intel_mipmap_tree *mt, + uint32_t level) +{ + uint32_t layer; + uint32_t end_layer = mt->level[level].depth; + + for (layer = 0; layer < end_layer; layer++) { + intel_miptree_slice_set_needs_depth_resolve(mt, level, layer); + } +} + static bool intel_miptree_slice_resolve(struct brw_context *brw, struct intel_mipmap_tree *mt, diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index 8face46433c..d7181255edb 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -630,6 +630,10 @@ intel_miptree_slice_set_needs_depth_resolve(struct intel_mipmap_tree *mt, uint32_t level, uint32_t depth); +void +intel_miptree_set_all_slices_need_depth_resolve(struct intel_mipmap_tree *mt, + uint32_t level); + /** * \return false if no resolve was needed */