diff options
author | Jason Ekstrand <[email protected]> | 2016-07-24 01:13:49 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-08-17 14:46:22 -0700 |
commit | a6c2091da6d8ba1dd237fadde60804a37a88a3d8 (patch) | |
tree | fb55d0e726aa30d9dab6d18d4b5697805275364e /src/mesa/drivers | |
parent | f748e157352bba0b46db52b5f2e21e68e04391d0 (diff) |
i965/meta_util: Only modify the input parameters in get_fast_clear_rect
We had another inline copy of brw_meta_get_buffer_rect embedded in
get_fast_clear_rect for no good reason. This lets us get rid of the
gl_frameuffer parameter to get_fast_clear_rect.
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_meta_util.c | 14 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_meta_util.h | 1 |
3 files changed, 4 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index 26daa3d09ae..617cf4b7c6b 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp @@ -172,7 +172,7 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb, memset(¶ms.wm_inputs, 0xff, 4*sizeof(float)); params.fast_clear_op = GEN7_PS_RENDER_TARGET_FAST_CLEAR_ENABLE; - brw_get_fast_clear_rect(brw, fb, irb->mt, ¶ms.x0, ¶ms.y0, + brw_get_fast_clear_rect(brw, irb->mt, ¶ms.x0, ¶ms.y0, ¶ms.x1, ¶ms.y1); } diff --git a/src/mesa/drivers/dri/i965/brw_meta_util.c b/src/mesa/drivers/dri/i965/brw_meta_util.c index 59c9af818b4..d2803752af6 100644 --- a/src/mesa/drivers/dri/i965/brw_meta_util.c +++ b/src/mesa/drivers/dri/i965/brw_meta_util.c @@ -441,9 +441,11 @@ brw_meta_set_fast_clear_color(struct brw_context *brw, return updated; } +/* The x0, y0, x1, and y1 parameters must already be populated with the render + * area of the framebuffer to be cleared. + */ void brw_get_fast_clear_rect(const struct brw_context *brw, - const struct gl_framebuffer *fb, const struct intel_mipmap_tree* mt, unsigned *x0, unsigned *y0, unsigned *x1, unsigned *y1) @@ -552,16 +554,6 @@ brw_get_fast_clear_rect(const struct brw_context *brw, y_align = y_scaledown * 2; } - *x0 = fb->_Xmin; - *x1 = fb->_Xmax; - if (fb->Name != 0) { - *y0 = fb->_Ymin; - *y1 = fb->_Ymax; - } else { - *y0 = fb->Height - fb->_Ymax; - *y1 = fb->Height - fb->_Ymin; - } - *x0 = ROUND_DOWN_TO(*x0, x_align) / x_scaledown; *y0 = ROUND_DOWN_TO(*y0, y_align) / y_scaledown; *x1 = ALIGN(*x1, x_align) / x_scaledown; diff --git a/src/mesa/drivers/dri/i965/brw_meta_util.h b/src/mesa/drivers/dri/i965/brw_meta_util.h index 198ffe58129..35c06a88ced 100644 --- a/src/mesa/drivers/dri/i965/brw_meta_util.h +++ b/src/mesa/drivers/dri/i965/brw_meta_util.h @@ -44,7 +44,6 @@ brw_meta_mirror_clip_and_scissor(const struct gl_context *ctx, void brw_get_fast_clear_rect(const struct brw_context *brw, - const struct gl_framebuffer *fb, const struct intel_mipmap_tree* mt, unsigned *x0, unsigned *y0, unsigned *x1, unsigned *y1); |