From: Kenneth Graunke Date: Mon, 9 Mar 2015 08:58:59 +0000 (-0700) Subject: i965: Use NIR for scalar VS when INTEL_USE_NIR is set. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=547c760964bcad23a056e5156e4fefd7487c0192;p=mesa.git i965: Use NIR for scalar VS when INTEL_USE_NIR is set. Signed-off-by: Kenneth Graunke Reviewed-by: Jason Ekstrand --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 6d7cf0e42ee..8702ea8a21f 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -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;