update_fragcoord(b, intr, for_sample_shading);
progress = true;
}
- } else if (intr->intrinsic == nir_intrinsic_load_var) {
- 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) {
- /* gl_FragCoord should not have array/struct derefs: */
- assert(dvar->deref.child == NULL);
- update_fragcoord(b, intr, for_sample_shading);
- progress = true;
- }
}
}
}
assert(shader->info.stage == MESA_SHADER_FRAGMENT);
+ nir_assert_unlowered_derefs(shader, nir_lower_load_store_derefs);
+
nir_foreach_function(function, shader) {
if (function->impl) {
nir_builder_init(&b, function->impl);