<div dir="ltr">On 3 December 2013 13:12, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@linux.intel.com" target="_blank">chad.versace@linux.intel.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The BSpec states that the aligment for the non-msrt clear rectangle must<br>
be doubled; the BSpec does not restricit the workaround to specific<br>
hardware.<br>
<br>
Commit 9a1a67b applied the workaround to Haswell GT3. Commit 8b659ce<br>
expanded the workaround to all Haswell variants. This commit expands it<br>
to all hardware.<br>
<br>
No Piglit regressions on Ivybridge 0x0166. No fixes either.<br>
<br>
I know no Ivybridge nor Baytrail bug related to this workaround.<br>
However, the BSpec says the extra alignment is required, so let's do it.<br>
<br>
v2: Apply to all hardware, not just gen7.<br>
<br>
CC: "9.2, 10.0" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br>
CC: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
CC: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>
Signed-off-by: Chad Versace <<a href="mailto:chad.versace@linux.intel.com">chad.versace@linux.intel.com</a>><br></blockquote><div><br></div><div>Looks correct to me.<br><br></div><div>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 35 +++++++++------------------<br>
1 file changed, 11 insertions(+), 24 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp<br>
index 3f096b5..1904bde 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp<br>
@@ -265,30 +265,17 @@ brw_blorp_clear_params::brw_blorp_clear_params(struct brw_context *brw,<br>
x_align *= 16;<br>
y_align *= 32;<br>
<br>
- if (brw->is_haswell) {<br>
- /* From BSpec: 3D-Media-GPGPU Engine > 3D Pipeline > Pixel > Pixel<br>
- * Backend > MCS Buffer for Render Target(s) [DevIVB+] > Table "Color<br>
- * Clear of Non-MultiSampled Render Target Restrictions":<br>
- *<br>
- * [IVB, VLVT, HSW]: Clear rectangle must be aligned to two times<br>
- * the number of pixels in the table shown below... x_align,<br>
- * y_align values computed above are the relevant entries in the<br>
- * referred table.<br>
- *<br>
- * We apply the workaround to only Haswell because (a) we suspect that<br>
- * is the only hardware where it is actually required and (b) we<br>
- * haven't yet validated the workaround for the other hardware.<br>
- */<br>
- x0 = ROUND_DOWN_TO(x0, 2 * x_align);<br>
- y0 = ROUND_DOWN_TO(y0, 2 * y_align);<br>
- x1 = ALIGN(x1, 2 * x_align);<br>
- y1 = ALIGN(y1, 2 * y_align);<br>
- } else {<br>
- x0 = ROUND_DOWN_TO(x0, x_align);<br>
- y0 = ROUND_DOWN_TO(y0, y_align);<br>
- x1 = ALIGN(x1, x_align);<br>
- y1 = ALIGN(y1, y_align);<br>
- }<br>
+ /* From BSpec: 3D-Media-GPGPU Engine > 3D Pipeline > Pixel > Pixel<br>
+ * Backend > MCS Buffer for Render Target(s) [DevIVB+] > Table "Color<br>
+ * Clear of Non-MultiSampled Render Target Restrictions":<br>
+ *<br>
+ * Clear rectangle must be aligned to two times the number of pixels in<br>
+ * the table shown below due to 16x16 hashing across the slice.<br>
+ */<br>
+ x0 = ROUND_DOWN_TO(x0, 2 * x_align);<br>
+ y0 = ROUND_DOWN_TO(y0, 2 * y_align);<br>
+ x1 = ALIGN(x1, 2 * x_align);<br>
+ y1 = ALIGN(y1, 2 * y_align);<br>
<br>
/* From the Ivy Bridge PRM, Vol2 Part1 11.7 "MCS Buffer for Render<br>
* Target(s)", beneath the "Fast Color Clear" bullet (p327):<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.4<br>
<br>
</font></span></blockquote></div><br></div></div>