mt->fast_clear_color.f32[0] = ctx->Depth.Clear;
}
- if (fb->MaxNumLayers > 0) {
+ if (depth_att->Layered) {
intel_hiz_exec(brw, mt, depth_irb->mt_level,
depth_irb->mt_layer, depth_irb->layer_count,
BLORP_HIZ_OP_DEPTH_CLEAR);
/* Now, the HiZ buffer contains data that needs to be resolved to the depth
* buffer.
*/
- intel_renderbuffer_att_set_needs_depth_resolve(depth_att);
+ if (depth_att->Layered) {
+ for (unsigned layer = 0; layer < depth_irb->layer_count; layer++) {
+ intel_miptree_slice_set_needs_depth_resolve(mt, depth_irb->mt_level,
+ depth_irb->mt_layer + layer);
+ }
+ } else {
+ intel_miptree_slice_set_needs_depth_resolve(mt, depth_irb->mt_level,
+ depth_irb->mt_layer);
+ }
return true;
}
if (back_irb)
back_irb->need_downsample = true;
if (depth_irb && brw_depth_writes_enabled(brw)) {
- intel_renderbuffer_att_set_needs_depth_resolve(depth_att);
+ if (depth_att->Layered) {
+ for (unsigned layer = 0; layer < depth_irb->layer_count; layer++) {
+ intel_miptree_slice_set_needs_depth_resolve(depth_irb->mt,
+ depth_irb->mt_level,
+ depth_irb->mt_layer + layer);
+ }
+ } else {
+ intel_miptree_slice_set_needs_depth_resolve(depth_irb->mt,
+ depth_irb->mt_level,
+ depth_irb->mt_layer);
+ }
brw_render_cache_set_add_bo(brw, depth_irb->mt->bo);
}
return intel_miptree_level_has_hiz(irb->mt, irb->mt_level);
}
-void
-intel_renderbuffer_att_set_needs_depth_resolve(struct gl_renderbuffer_attachment *att)
-{
- struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer);
- if (irb->mt) {
- if (att->Layered) {
- intel_miptree_set_all_slices_need_depth_resolve(irb->mt, irb->mt_level);
- } else {
- intel_miptree_slice_set_needs_depth_resolve(irb->mt,
- irb->mt_level,
- irb->mt_layer);
- }
- }
-}
-
void
intel_renderbuffer_move_to_temp(struct brw_context *brw,
struct intel_renderbuffer *irb,
bool
intel_renderbuffer_has_hiz(struct intel_renderbuffer *irb);
-void
-intel_renderbuffer_att_set_needs_depth_resolve(struct gl_renderbuffer_attachment *att);
-
void intel_renderbuffer_move_to_temp(struct brw_context *brw,
struct intel_renderbuffer *irb,