<div dir="ltr">On 20 December 2013 06:38, Topi Pohjolainen <span dir="ltr"><<a href="mailto:topi.pohjolainen@intel.com" target="_blank">topi.pohjolainen@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 split of the emission of the two halfs into single emission<br>
call prapares for fs_generator support that already does similar<br>
thing. No regressions seen on IVB (unit tests and piglit quick).<br>
<br>
Signed-off-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
---<br>
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 26 ++++++++++----------------<br>
src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h | 13 +++++++++++++<br>
2 files changed, 23 insertions(+), 16 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
index 1b7310b..b95104e 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp<br>
@@ -1679,29 +1679,23 @@ brw_blorp_blit_program::manual_blend_bilinear(unsigned num_samples)<br>
}<br>
<br>
#define SAMPLE(x, y) offset(texture_data[x], y)<br>
- brw_set_access_mode(&func, BRW_ALIGN_16);<br>
- brw_set_compression_control(&func, BRW_COMPRESSION_NONE);<br>
for (int index = 3; index > 0; ) {<br>
/* Since we're doing SIMD16, 4 color channels fits in to 8 registers.<br>
* Counter value of 8 in 'for' loop below is used to interpolate all<br>
* the color components.<br>
*/<br>
- for (int k = 0; k < 8; ++k)<br>
- brw_LRP(&func,<br>
- vec8(SAMPLE(index - 1, k)),<br>
- offset(x_frac, k & 1),<br>
- SAMPLE(index, k),<br>
- SAMPLE(index - 1, k));<br>
+ for (int k = 0; k < 8; k += 2)<br>
+ emit_lrp(vec8(SAMPLE(index - 1, k)),<br>
+ offset(x_frac, k & 1),<br></blockquote><div><br></div><div>This line can just be "x_frac" now, because k is always even, so (k & 1) is always zero.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ SAMPLE(index, k),<br>
+ SAMPLE(index - 1, k));<br>
index -= 2;<br>
}<br>
- for (int k = 0; k < 8; ++k)<br>
- brw_LRP(&func,<br>
- vec8(SAMPLE(0, k)),<br>
- offset(y_frac, k & 1),<br>
- vec8(SAMPLE(2, k)),<br>
- vec8(SAMPLE(0, k)));<br>
- brw_set_compression_control(&func, BRW_COMPRESSION_COMPRESSED);<br>
- brw_set_access_mode(&func, BRW_ALIGN_1);<br>
+ for (int k = 0; k < 8; k += 2)<br>
+ emit_lrp(vec8(SAMPLE(0, k)),<br>
+ offset(y_frac, k & 1),<br></blockquote><div><br></div><div>Same comment applies here.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ vec8(SAMPLE(2, k)),<br>
+ vec8(SAMPLE(0, k)));<br>
#undef SAMPLE<br>
}<br></blockquote><div><br></div><div>With those two things fixed, this patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br></div><br></div></div></div>