From: Nicolai Hähnle Date: Sun, 25 Jun 2017 13:26:01 +0000 (+0200) Subject: nir: fix nir_lower_wpos_ytransform when gl_FragCoord is a system value X-Git-Tag: upstream/18.1.0~7264 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5011923e09ec835dbd275a5137fde532ec600368;p=platform%2Fupstream%2Fmesa.git nir: fix nir_lower_wpos_ytransform when gl_FragCoord is a system value Reviewed-by: Jason Ekstrand --- diff --git a/src/compiler/nir/nir_lower_wpos_ytransform.c b/src/compiler/nir/nir_lower_wpos_ytransform.c index 873d259..771c6ff 100644 --- a/src/compiler/nir/nir_lower_wpos_ytransform.c +++ b/src/compiler/nir/nir_lower_wpos_ytransform.c @@ -302,8 +302,10 @@ lower_wpos_ytransform_block(lower_wpos_ytransform_state *state, nir_block *block nir_deref_var *dvar = intr->variables[0]; nir_variable *var = dvar->var; - if (var->data.mode == nir_var_shader_in && - var->data.location == VARYING_SLOT_POS) { + if ((var->data.mode == nir_var_shader_in && + var->data.location == VARYING_SLOT_POS) || + (var->data.mode == nir_var_system_value && + var->data.location == SYSTEM_VALUE_FRAG_COORD)) { /* gl_FragCoord should not have array/struct derefs: */ assert(dvar->deref.child == NULL); lower_fragcoord(state, intr);