diff options
author | Jason Ekstrand <[email protected]> | 2018-04-02 15:59:39 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-06-22 20:54:00 -0700 |
commit | fc59230a46b608394b40ab8f9363d14a4b96746a (patch) | |
tree | 8e964bc1c7a6577250de1ca6445adb2bcf22dd6d /src/compiler/nir | |
parent | d4dd2ca4a7d93fb6f60b76a455219c7c88193c19 (diff) |
nir: Remove deref chain support from lower_drawpixels
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_drawpixels.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/compiler/nir/nir_lower_drawpixels.c b/src/compiler/nir/nir_lower_drawpixels.c index 05131affdb2..f8fecebe6d2 100644 --- a/src/compiler/nir/nir_lower_drawpixels.c +++ b/src/compiler/nir/nir_lower_drawpixels.c @@ -225,19 +225,6 @@ lower_drawpixels_block(lower_drawpixels_state *state, nir_block *block) assert(deref->deref_type == nir_deref_type_var); lower_texcoord(state, intr); } - } else if (intr->intrinsic == nir_intrinsic_load_var) { - nir_deref_var *dvar = intr->variables[0]; - nir_variable *var = dvar->var; - - if (var->data.location == VARYING_SLOT_COL0) { - /* gl_Color should not have array/struct derefs: */ - assert(dvar->deref.child == NULL); - lower_color(state, intr); - } else if (var->data.location == VARYING_SLOT_TEX0) { - /* gl_TexCoord should not have array/struct derefs: */ - assert(dvar->deref.child == NULL); - lower_texcoord(state, intr); - } } } } @@ -266,6 +253,11 @@ nir_lower_drawpixels(nir_shader *shader, .shader = shader, }; + /* note that this pass already assumes texture/sampler derefs are already + * lowered to index + */ + nir_assert_unlowered_derefs(shader, nir_lower_load_store_derefs); + assert(shader->info.stage == MESA_SHADER_FRAGMENT); nir_foreach_function(function, shader) { |