diff options
author | Chad Versace <[email protected]> | 2012-08-06 16:10:50 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2012-08-07 09:30:33 -0700 |
commit | 6cc9df331b4799715b31d7ec606ad09fa914e260 (patch) | |
tree | cd87809f0be159a86b3890cf7a8799bbfc598fd4 /src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | |
parent | f4873babdc27f697df9f4642209eca21a02ac476 (diff) |
i965: Add function brw_blorp_blit_miptrees
Define a function, brw_blorp_blit_miptrees, that simply wraps
brw_blorp_blit_params + brw_blorp_exec with C calling conventions. This
enables intel_miptree.c, in a following commit, to perform blits with
blorp for the purpose of downsampling multisample miptrees.
Reviewed-by: Eric Anholt <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_blorp_blit.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 24 |
1 files changed, 20 insertions, 4 deletions
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)); |