nir: modify the instruction insertion in nir_visitor::visit(ir_call *ir)
authorSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Wed, 23 Sep 2015 06:48:21 +0000 (08:48 +0200)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 25 Sep 2015 06:39:22 +0000 (08:39 +0200)
commit3e70c968de363168fc491ca673a4798284a10c44
treea28aed68b047a17fadd41c12ef045d5bdf4c7bf2
parent922b3d1bb16b4b6b292cb159e5fe3d0615ca725c
nir: modify the instruction insertion in nir_visitor::visit(ir_call *ir)

This patch moves nir_instr_insert_after_cf_list call into each case
in the intrinsics switch at nir_visitor::visit(ir_call *ir) and
define a nir_dest variable which will be used when handling
ir->return_deref after the switch.

This patch simplifies the code for nir_intrinsic_load_ssbo
implementation changes we are going to do next.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/glsl/nir/glsl_to_nir.cpp