diff options
author | Jason Ekstrand <[email protected]> | 2018-03-27 09:14:56 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-22 20:54:00 -0700 |
commit | 3992665c52733f9e7630726ae3596d4c7c08b9d5 (patch) | |
tree | 05fa751f0103db0d4e223fa43f479fd451529335 /src/compiler/nir | |
parent | 8a62db77124425febf7c2f6497a1d1243fb8d008 (diff) |
nir: Remove deref chain support from lower_wpos_center
Acked-by: Rob Clark <[email protected]>
Acked-by: Bas Nieuwenhuizen <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_lower_wpos_center.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/compiler/nir/nir_lower_wpos_center.c b/src/compiler/nir/nir_lower_wpos_center.c index 5b68caca358..26f2b5d165f 100644 --- a/src/compiler/nir/nir_lower_wpos_center.c +++ b/src/compiler/nir/nir_lower_wpos_center.c @@ -92,17 +92,6 @@ lower_wpos_center_block(nir_builder *b, nir_block *block, 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; - } } } } @@ -118,6 +107,8 @@ nir_lower_wpos_center(nir_shader *shader, const bool for_sample_shading) 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); |