i965/nir/vec4: Implement loading values from an UBO
authorAntia Puentes <apuentes@igalia.com>
Tue, 16 Jun 2015 20:10:32 +0000 (22:10 +0200)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Aug 2015 16:40:48 +0000 (09:40 -0700)
commit168bbfa6ff22a586ad6307c187cfa3b8fff5f227
tree1d978a33f6e62270debc2bd469562ba151e84d6e
parent98d07022f5312967bdfd54069869c8d6c65117a7
i965/nir/vec4: Implement loading values from an UBO

Based on the vec4_visitor IR implementation for the ir_binop_load_ubo
operation. Notice that unlike the vec4_visitor IR, adding the !=0
comparison for UBO bools is not needed here because that comparison is
already added by the nir_visitor when processing the ir_binop_load_ubo
(in UBOs "true" is any value different from zero, but for us is ~0).

Adds NIR instrinsics:

   * nir_intrinsic_load_ubo_indirect
   * nir_intrinsic_load_ubo

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp