intel/fs: Assert when brw_fs_nir sees a nir_deref_instr
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 1 May 2019 23:31:14 +0000 (16:31 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 3 May 2019 06:25:30 +0000 (23:25 -0700)
Since 09f1de97a76 "anv,i965: Lower away image derefs in the driver"
the backend compiler is not expected to handle any derefs, so let's
assert on it.

This helps identifying problems when a deref is not lowered and
"leaks" into the backend compiler.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_fs_nir.cpp

index 526cc13c71ad7d4c7f53ad3b87033449153b35b7..cdd3f7bccaa36f2a33f84ad78b56838d9bb6dacb 100644 (file)
@@ -454,7 +454,7 @@ fs_visitor::nir_emit_instr(nir_instr *instr)
       break;
 
    case nir_instr_type_deref:
-      /* Derefs can exist for images but they do nothing */
+      unreachable("All derefs should've been lowered");
       break;
 
    case nir_instr_type_intrinsic: