<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 21 March 2014 04:47, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The SIMD16 replicated FB write message only works if we don't need the<br>
color calculator to mask our framebuffer writes.  Previously, we bailed<br>
on it if color_mask wasn't <true, true, true, true>.  However, this was<br>
needlessly strict for formats with fewer than four components - only the<br>
components that actually exist matter.<br>
<br>
WebGL Aquarium attempts to clear a BGRX texture with the ColorMask set<br>
to <true, true, true, false>.  This will work perfectly fine with the<br>
replicated data message; we just bailed unnecessarily.<br>
<br>
Improves performance of WebGL Aquarium on Iris Pro (at 1920x1080) and<br>
Bay Trail (at 2048x1152) by about 40% (using Chrome 24).<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
Cc: Dylan Baker <<a href="mailto:baker.dylan.c@gmail.com">baker.dylan.c@gmail.com</a>><br>
Cc: Keith Packard <<a href="mailto:keithp@keithp.com">keithp@keithp.com</a>><br>
Cc: Eric Anholt <<a href="mailto:eric@anholt.net">eric@anholt.net</a>><br>
---<br>
 src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br></blockquote><div><br></div><div>Nice find!  Series is:</div><div><br></div><div>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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 45b9fa0..7e19c2c 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp<br>
@@ -231,7 +231,7 @@ brw_blorp_clear_params::brw_blorp_clear_params(struct brw_context *brw,<br>
    /* Constant color writes ignore everyting in blend and color calculator<br>
     * state.  This is not documented.<br>
     */<br>
-   for (int i = 0; i < 4; i++) {<br>
+   for (int i = 0; i < _mesa_format_num_components(irb->mt->format); i++) {<br>
       if (!color_mask[i]) {<br>
          color_write_disable[i] = true;<br>
          wm_prog_key.use_simd16_replicated_data = false;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>