i965: Get rid of intel_renderbuffer_resolve_*
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 25 May 2017 04:55:59 +0000 (21:55 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 8 Jun 2017 05:18:53 +0000 (22:18 -0700)
There is exactly one caller so it's a bit pointless to have all of this
plumbing.  Just inline it at the one place it's used.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_fbo.c
src/mesa/drivers/dri/i965/intel_fbo.h

index 205103993f984af00f694fe9c37c6a32003ffdfe..fe9124cfc6ea2544f0c0a75d7183fc614b3eb53b 100644 (file)
@@ -239,8 +239,11 @@ intel_update_state(struct gl_context * ctx, GLuint new_state)
 
    /* Resolve the depth buffer's HiZ buffer. */
    depth_irb = intel_get_renderbuffer(ctx->DrawBuffer, BUFFER_DEPTH);
-   if (depth_irb)
-      intel_renderbuffer_resolve_hiz(brw, depth_irb);
+   if (depth_irb && depth_irb->mt) {
+      intel_miptree_slice_resolve_hiz(brw, depth_irb->mt,
+                                      depth_irb->mt_level,
+                                      depth_irb->mt_layer);
+   }
 
    memset(brw->draw_aux_buffer_disabled, 0,
           sizeof(brw->draw_aux_buffer_disabled));
index a24ddd0d88e26a8c657729fed02740dd38321e86..c3c919c24faa7e254845f4410404d93f4abc5841 100644 (file)
@@ -937,19 +937,6 @@ intel_renderbuffer_has_hiz(struct intel_renderbuffer *irb)
    return intel_miptree_level_has_hiz(irb->mt, irb->mt_level);
 }
 
-bool
-intel_renderbuffer_resolve_hiz(struct brw_context *brw,
-                              struct intel_renderbuffer *irb)
-{
-   if (irb->mt)
-      return intel_miptree_slice_resolve_hiz(brw,
-                                             irb->mt,
-                                             irb->mt_level,
-                                             irb->mt_layer);
-
-   return false;
-}
-
 void
 intel_renderbuffer_att_set_needs_depth_resolve(struct gl_renderbuffer_attachment *att)
 {
@@ -965,19 +952,6 @@ intel_renderbuffer_att_set_needs_depth_resolve(struct gl_renderbuffer_attachment
    }
 }
 
-bool
-intel_renderbuffer_resolve_depth(struct brw_context *brw,
-                                struct intel_renderbuffer *irb)
-{
-   if (irb->mt)
-      return intel_miptree_slice_resolve_depth(brw,
-                                               irb->mt,
-                                               irb->mt_level,
-                                               irb->mt_layer);
-
-   return false;
-}
-
 void
 intel_renderbuffer_move_to_temp(struct brw_context *brw,
                                 struct intel_renderbuffer *irb,
index 2d2ef1ebc62f56a7ae202cb2c1483f918ab7d215..40c4f27a3417ab0040570c5ef362df14d9c6c66e 100644 (file)
@@ -199,30 +199,6 @@ void
 intel_renderbuffer_att_set_needs_depth_resolve(struct gl_renderbuffer_attachment *att);
 
 
-/**
- * \brief Perform a HiZ resolve on the renderbuffer.
- *
- * It is safe to call this function on a renderbuffer without HiZ. In that
- * case, the function is a no-op.
- *
- * \return false if no resolve was needed
- */
-bool
-intel_renderbuffer_resolve_hiz(struct brw_context *brw,
-                              struct intel_renderbuffer *irb);
-
-/**
- * \brief Perform a depth resolve on the renderbuffer.
- *
- * It is safe to call this function on a renderbuffer without HiZ. In that
- * case, the function is a no-op.
- *
- * \return false if no resolve was needed
- */
-bool
-intel_renderbuffer_resolve_depth(struct brw_context *brw,
-                                struct intel_renderbuffer *irb);
-
 void intel_renderbuffer_move_to_temp(struct brw_context *brw,
                                      struct intel_renderbuffer *irb,
                                      bool invalidate);