i965: Use NIR for scalar VS when INTEL_USE_NIR is set.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Mar 2015 08:58:59 +0000 (01:58 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 12 Mar 2015 15:29:49 +0000 (08:29 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 6d7cf0e42ee3b8c595caa6aeb28e41afe8d23d5e..8702ea8a21f6dbd82af7a6e734b9c0726cfbedee 100644 (file)
@@ -3840,12 +3840,17 @@ fs_visitor::run_vs()
    if (INTEL_DEBUG & DEBUG_SHADER_TIME)
       emit_shader_time_begin();
 
-   foreach_in_list(ir_instruction, ir, shader->base.ir) {
-      base_ir = ir;
-      this->result = reg_undef;
-      ir->accept(this);
+   if (getenv("INTEL_USE_NIR") != NULL) {
+      emit_nir_code();
+   } else {
+      foreach_in_list(ir_instruction, ir, shader->base.ir) {
+         base_ir = ir;
+         this->result = reg_undef;
+         ir->accept(this);
+      }
+      base_ir = NULL;
    }
-   base_ir = NULL;
+
    if (failed)
       return false;