<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, May 20, 2016 at 2:36 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, May 20, 2016 at 1:49 PM, Dave Airlie <span dir="ltr"><<a href="mailto:airlied@gmail.com" target="_blank">airlied@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Dave Airlie <<a href="mailto:airlied@redhat.com" target="_blank">airlied@redhat.com</a>><br>
<br>
For cull distance GLSL will let unsized unused arrays get<br>
into the backend, we should nuke those straight away, to<br>
save caring about them later.<br>
<br>
This fixes:<br>
arb_separate_shader_objects/linker/large-number-of-unused-varyings<br>
as a side effect (even without culling changes).<br>
<br>
Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com" target="_blank">airlied@redhat.com</a>><br>
<br>
Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com" target="_blank">airlied@redhat.com</a>><br>
---<br>
src/mesa/drivers/dri/i965/brw_nir.c | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c<br>
index 9afd036..6ceac7e 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_nir.c<br>
+++ b/src/mesa/drivers/dri/i965/brw_nir.c<br>
@@ -560,6 +560,8 @@ brw_create_nir(struct brw_context *brw,<br>
/* First, lower the GLSL IR or Mesa IR to NIR */<br>
if (shader_prog) {<br>
nir = glsl_to_nir(shader_prog, stage, options);<br>
+ nir_remove_dead_variables(nir, nir_var_shader_in);<br>
+ nir_remove_dead_variables(nir, nir_var_shader_out);<br></blockquote><div><br></div></span><div>The mode parameter is a bitfield. You can just do nir_var_shader_in | nir_var_shader_out.<br><br></div><div>I think this is the right thing to do. Pardon my while I run it though CI.<br></div></div></div></div></blockquote><div><br></div><div>Pardon the delay. I was 95% sure this was the right thing to do but wanted to make sure I wasn't missing something. Jenkins is good with it.<br><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
OPT_V(nir_lower_io_to_temporaries,<br>
nir_shader_get_entrypoint(nir),<br>
true, false);<br>
<span><font color="#888888">--<br>
2.5.5<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>