diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.h | 17 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 24 |
2 files changed, 37 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.h b/src/mesa/drivers/dri/i965/brw_blorp.h index 9af492d08bf..8d05543f201 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.h +++ b/src/mesa/drivers/dri/i965/brw_blorp.h @@ -30,6 +30,21 @@ struct brw_context; +#ifdef __cplusplus +extern "C" { +#endif + +void +brw_blorp_blit_miptrees(struct intel_context *intel, + struct intel_mipmap_tree *src_mt, + struct intel_mipmap_tree *dst_mt, + int src_x0, int src_y0, + int dst_x0, int dst_y0, + int dst_x1, int dst_y1, + bool mirror_x, bool mirror_y); + +#ifdef __cplusplus +} /* end extern "C" */ /** * Binding table indices used by BLORP. @@ -340,3 +355,5 @@ void gen6_blorp_emit_drawing_rectangle(struct brw_context *brw, const brw_blorp_params *params); /** \} */ + +#endif /* __cplusplus */ diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index 1206237a71b..700b0cfcf8a 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp @@ -121,6 +121,23 @@ find_miptree(GLbitfield buffer_bit, struct gl_renderbuffer *rb) return mt; } +void +brw_blorp_blit_miptrees(struct intel_context *intel, + struct intel_mipmap_tree *src_mt, + struct intel_mipmap_tree *dst_mt, + int src_x0, int src_y0, + int dst_x0, int dst_y0, + int dst_x1, int dst_y1, + bool mirror_x, bool mirror_y) +{ + brw_blorp_blit_params params(brw_context(&intel->ctx), + src_mt, dst_mt, + src_x0, src_y0, + dst_x0, dst_y0, + dst_x1, dst_y1, + mirror_x, mirror_y); + brw_blorp_exec(intel, ¶ms); +} static void do_blorp_blit(struct intel_context *intel, GLbitfield buffer_bit, @@ -142,10 +159,9 @@ do_blorp_blit(struct intel_context *intel, GLbitfield buffer_bit, intel_renderbuffer_resolve_depth(intel, intel_renderbuffer(dst_rb)); /* Do the blit */ - brw_blorp_blit_params params(brw_context(ctx), src_mt, dst_mt, - srcX0, srcY0, dstX0, dstY0, dstX1, dstY1, - mirror_x, mirror_y); - brw_blorp_exec(intel, ¶ms); + brw_blorp_blit_miptrees(intel, src_mt, dst_mt, + srcX0, srcY0, dstX0, dstY0, dstX1, dstY1, + mirror_x, mirror_y); /* Mark the dst buffer as needing a HiZ resolve if necessary. */ intel_renderbuffer_set_needs_hiz_resolve(intel_renderbuffer(dst_rb)); |