<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Jul 31, 2018 at 9:55 AM Nils Wallménius <<a href="mailto:nils.wallmenius@gmail.com">nils.wallmenius@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Hi, sorry for the drive-by but a comment in line below<br><br><div class="gmail_quote"><div dir="ltr">Den tis 31 juli 2018 16:09Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>> skrev:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Shader-db results on Kaby Lake:<br>
<br>
total instructions in shared programs: 15166953 -> 15073611 (-0.62%)<br>
instructions in affected programs: 2390284 -> 2296942 (-3.91%)<br>
helped: 16469<br>
HURT: 505<br>
<br>
total loops in shared programs: 4954 -> 4951 (-0.06%)<br>
loops in affected programs: 3 -> 0<br>
helped: 3<br>
HURT: 0<br>
---<br>
src/intel/compiler/brw_nir.c | 17 ++++++++++++-----<br>
1 file changed, 12 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c<br>
index 99ef6bec77f..a6e3e502cdd 100644<br>
--- a/src/intel/compiler/brw_nir.c<br>
+++ b/src/intel/compiler/brw_nir.c<br>
@@ -713,6 +713,18 @@ brw_nir_link_shaders(const struct brw_compiler *compiler,<br>
nir_validate_shader(*producer);<br>
nir_validate_shader(*consumer);<br>
<br>
+ const bool p_is_scalar =<br>
+ compiler->scalar_stage[(*producer)->info.stage];<br>
+ const bool c_is_scalar =<br>
+ compiler->scalar_stage[(*producer)->info.stage];<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Shouldn't the above index be s/producer/consumer/ ? else both booleans are the same.</div></div></blockquote><div><br></div><div>Good catch! That's a pre-existing bug. I've fixed it the v2 I just sent. <br></div></div></div>