<div dir="auto">Rb for the series. (I can't type my surname on the phone)<div dir="auto"><br></div><div dir="auto">Marek</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 25, 2019, 3:03 AM Timothy Arceri <<a href="mailto:tarceri@itsqueeze.com">tarceri@itsqueeze.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Some of the opts are not called in the general optimastion loop<br>
in the state trackers glsl -> nir conversion. We need to call<br>
the radeonsi specific optimisation once before scanning over<br>
the nir otherwise we can end up gathering info on code that<br>
is later removed.<br>
<br>
Fixes an assert in the piglit test:<br>
<br>
./bin/varying-struct-centroid_gles3<br>
---<br>
 src/gallium/drivers/radeonsi/si_compute.c       | 1 +<br>
 src/gallium/drivers/radeonsi/si_state_shaders.c | 1 +<br>
 2 files changed, 2 insertions(+)<br>
<br>
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c<br>
index 541d7e6f118..f1a433b72df 100644<br>
--- a/src/gallium/drivers/radeonsi/si_compute.c<br>
+++ b/src/gallium/drivers/radeonsi/si_compute.c<br>
@@ -106,6 +106,7 @@ static void si_create_compute_state_async(void *job, int thread_index)<br>
                assert(program->ir_type == PIPE_SHADER_IR_NIR);<br>
                sel.nir = program->ir.nir;<br>
<br>
+               si_nir_opts(sel.nir);<br>
                si_nir_scan_shader(sel.nir, &<a href="http://sel.info" rel="noreferrer noreferrer" target="_blank">sel.info</a>);<br>
                si_lower_nir(&sel);<br>
        }<br>
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c<br>
index 5bdfd4f6ac1..7250b40c5db 100644<br>
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c<br>
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c<br>
@@ -2240,6 +2240,7 @@ static void *si_create_shader_selector(struct pipe_context *ctx,<br>
<br>
                sel->nir = state->ir.nir;<br>
<br>
+               si_nir_opts(sel->nir);<br>
                si_nir_scan_shader(sel->nir, &sel->info);<br>
                si_nir_scan_tess_ctrl(sel->nir, &sel->tcs_info);<br>
        }<br>
-- <br>
2.20.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank" rel="noreferrer">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a></blockquote></div>