[Mesa-dev] [PATCH 07/30] i965: Get rid of intel_renderbuffer_resolve_*
Jason Ekstrand
jason at jlekstrand.net
Fri May 26 23:30:11 UTC 2017
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.
---
src/mesa/drivers/dri/i965/brw_context.c | 7 +++++--
src/mesa/drivers/dri/i965/intel_fbo.c | 26 --------------------------
src/mesa/drivers/dri/i965/intel_fbo.h | 24 ------------------------
3 files changed, 5 insertions(+), 52 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 10cd5f5..ebd1b06 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -238,8 +238,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));
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index 60a6d0f..b200417 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -943,19 +943,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)
{
@@ -971,19 +958,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,
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.h b/src/mesa/drivers/dri/i965/intel_fbo.h
index 08b82e8..7f2e3b3 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.h
+++ b/src/mesa/drivers/dri/i965/intel_fbo.h
@@ -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);
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list