summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2014-09-05 10:53:48 -0700
committerKristian Høgsberg <[email protected]>2014-09-05 20:47:03 -0700
commit2d6d3461d307636b61d0f483677aaad11d1fd42a (patch)
treecb52f32f24874ada9a262a80e892a8bdaa5e7aad /src
parentca9ab05d45ebf407485af2daa3742b897ff99162 (diff)
i965: Adjust fast-clear resolve rect for BDW
The scale factors for the resolve rectangle change for BDW and we have to look at brw->gen now to figure out how big it should be. Fixes: https://bugs.freedesktop.org/attachment.cgi?id=105777 Cc: "10.3" <[email protected]> Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_meta_fast_clear.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
index 168e5b11d2c..b4e75a76bd1 100644
--- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
@@ -641,13 +641,19 @@ get_resolve_rect(struct brw_context *brw,
* with respect to render target being resolved.
*
* The scaledown factors in the table that follows are related to the
- * alignment size returned by intel_get_non_msrt_mcs_alignment(), but with
- * X and Y alignment each divided by 2.
+ * alignment size returned by intel_get_non_msrt_mcs_alignment() by a
+ * multiplier. For IVB and HSW, we divide by two, for BDW we multiply
+ * by 8 and 16.
*/
intel_get_non_msrt_mcs_alignment(brw, mt, &x_align, &y_align);
- x_scaledown = x_align / 2;
- y_scaledown = y_align / 2;
+ if (brw->gen >= 8) {
+ x_scaledown = x_align * 8;
+ y_scaledown = y_align * 16;
+ } else {
+ x_scaledown = x_align / 2;
+ y_scaledown = y_align / 2;
+ }
rect->x0 = rect->y0 = 0;
rect->x1 = ALIGN(mt->logical_width0, x_scaledown) / x_scaledown;
rect->y1 = ALIGN(mt->logical_height0, y_scaledown) / y_scaledown;