i965: add intel_renderbuffer_att_set_needs_depth_resolve
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 29 Jul 2013 20:51:31 +0000 (13:51 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Sun, 4 Aug 2013 18:52:38 +0000 (11:52 -0700)
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 <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/intel_fbo.c
src/mesa/drivers/dri/i965/intel_fbo.h

index 5d5d8b57cb4c0d68ec3572315ee11650711d2023..ea3768200459dbbf96edaafbb12e2f560b5ce6e6 100644 (file)
@@ -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)
index 2a8a462b18e2cca6e06295ce16f0d358e225f68e..05e96aad7b363688b9f261f055977e49e73dbe5a 100644 (file)
@@ -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.