aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-03-27 09:45:23 -0700
committerJason Ekstrand <[email protected]>2018-06-22 20:54:00 -0700
commitd4dd2ca4a7d93fb6f60b76a455219c7c88193c19 (patch)
tree065187745c4d5188e8b18f4e321f8641cd558faf /src/compiler
parent54bfc0cbcf423218ea8e665a40b4c3121861f75b (diff)
nir: Remove deref chain support from opt_peephole_select
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')
-rw-r--r--src/compiler/nir/nir_opt_peephole_select.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/compiler/nir/nir_opt_peephole_select.c b/src/compiler/nir/nir_opt_peephole_select.c
index 608701ab55c..51c03a1aa9c 100644
--- a/src/compiler/nir/nir_opt_peephole_select.c
+++ b/src/compiler/nir/nir_opt_peephole_select.c
@@ -66,17 +66,6 @@ block_check_for_allowed_instrs(nir_block *block, unsigned *count, bool alu_ok)
nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr);
switch (intrin->intrinsic) {
- case nir_intrinsic_load_var:
- switch (intrin->variables[0]->var->data.mode) {
- case nir_var_shader_in:
- case nir_var_uniform:
- break;
-
- default:
- return false;
- }
- break;
-
case nir_intrinsic_load_deref:
switch (nir_src_as_deref(intrin->src[0])->mode) {
case nir_var_shader_in:
@@ -266,6 +255,8 @@ nir_opt_peephole_select(nir_shader *shader, unsigned limit)
{
bool progress = false;
+ nir_assert_unlowered_derefs(shader, nir_lower_load_store_derefs);
+
nir_foreach_function(function, shader) {
if (function->impl)
progress |= nir_opt_peephole_select_impl(function->impl, limit);