From d44be9ed2fc72a0c0047286762a9740c41e02ef3 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 29 Jul 2013 13:51:31 -0700 Subject: [PATCH] i965: add intel_renderbuffer_att_set_needs_depth_resolve This function is needed to support layered rendering. With layered rendering, the attachment stores the state of whether layered rendering is being used. Signed-off-by: Jordan Justen Reviewed-by: Paul Berry Reviewed-by: Chad Versace --- src/mesa/drivers/dri/i965/intel_fbo.c | 15 +++++++++++++++ src/mesa/drivers/dri/i965/intel_fbo.h | 3 +++ 2 files changed, 18 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c index 5d5d8b57cb4..ea376820045 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.c +++ b/src/mesa/drivers/dri/i965/intel_fbo.c @@ -854,6 +854,21 @@ intel_renderbuffer_resolve_hiz(struct brw_context *brw, return false; } +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); + } + } +} + bool intel_renderbuffer_resolve_depth(struct brw_context *brw, struct intel_renderbuffer *irb) diff --git a/src/mesa/drivers/dri/i965/intel_fbo.h b/src/mesa/drivers/dri/i965/intel_fbo.h index 2a8a462b18e..05e96aad7b3 100644 --- a/src/mesa/drivers/dri/i965/intel_fbo.h +++ b/src/mesa/drivers/dri/i965/intel_fbo.h @@ -164,6 +164,9 @@ intel_renderbuffer_set_needs_hiz_resolve(struct intel_renderbuffer *irb); void intel_renderbuffer_set_needs_depth_resolve(struct intel_renderbuffer *irb); +void +intel_renderbuffer_att_set_needs_depth_resolve(struct gl_renderbuffer_attachment *att); + /** * \brief Perform a HiZ resolve on the renderbuffer. -- 2.30.2