<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 5, 2017 at 3:47 AM, Nicolai Hähnle <span dir="ltr"><<a href="mailto:nhaehnle@gmail.com" target="_blank">nhaehnle@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: Nicolai Hähnle <<a href="mailto:nicolai.haehnle@amd.com">nicolai.haehnle@amd.com</a>><br>
<br>
---<br>
src/compiler/nir/nir_lower_<wbr>wpos_ytransform.c | 6 ++++--<br>
1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/compiler/nir/nir_lower_<wbr>wpos_ytransform.c b/src/compiler/nir/nir_lower_<wbr>wpos_ytransform.c<br>
index 873d259..771c6ff 100644<br>
--- a/src/compiler/nir/nir_lower_<wbr>wpos_ytransform.c<br>
+++ b/src/compiler/nir/nir_lower_<wbr>wpos_ytransform.c<br>
@@ -295,22 +295,24 @@ lower_load_sample_pos(lower_<wbr>wpos_ytransform_state *state,<br>
static void<br>
lower_wpos_ytransform_block(<wbr>lower_wpos_ytransform_state *state, nir_block *block)<br>
{<br>
nir_foreach_instr_safe(instr, block) {<br>
if (instr->type == nir_instr_type_intrinsic) {<br>
nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);<br>
if (intr->intrinsic == nir_intrinsic_load_var) {<br>
nir_deref_var *dvar = intr->variables[0];<br>
nir_variable *var = dvar->var;<br>
<br>
- if (var->data.mode == nir_var_shader_in &&<br>
- var->data.location == VARYING_SLOT_POS) {<br>
+ if ((var->data.mode == nir_var_shader_in &&<br>
+ var->data.location == VARYING_SLOT_POS) ||<br>
+ (var->data.mode == nir_var_system_value &&<br>
+ var->data.location == SYSTEM_VALUE_FRAG_COORD)) {<br>
/* gl_FragCoord should not have array/struct derefs: */<br>
assert(dvar->deref.child == NULL);<br>
lower_fragcoord(state, intr);<br>
} else if (var->data.mode == nir_var_system_value &&<br>
var->data.location == SYSTEM_VALUE_SAMPLE_POS) {<br>
assert(dvar->deref.child == NULL);<br>
lower_load_sample_pos(state, intr);<br>
}<br>
} else if (intr->intrinsic == nir_intrinsic_interp_var_at_<wbr>offset) {<br>
lower_interp_var_at_offset(<wbr>state, intr);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">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/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>