From: Francisco Jerez Date: Mon, 27 Jul 2015 13:25:55 +0000 (+0300) Subject: i965/fs: Translate memory barrier NIR intrinsics. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7cb60d770fc24bf00b6f7e5898cca1426e55c026;p=mesa.git i965/fs: Translate memory barrier NIR intrinsics. Reviewed-by: Jason Ekstrand --- diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 6d22faa54c3..722e4e75a82 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -1287,6 +1287,13 @@ fs_visitor::nir_emit_intrinsic(const fs_builder &bld, nir_intrinsic_instr *instr break; } + case nir_intrinsic_memory_barrier: { + const fs_reg tmp = bld.vgrf(BRW_REGISTER_TYPE_UD, 16 / dispatch_width); + bld.emit(SHADER_OPCODE_MEMORY_FENCE, tmp) + ->regs_written = 2; + break; + } + case nir_intrinsic_load_front_face: bld.MOV(retype(dest, BRW_REGISTER_TYPE_D), *emit_frontfacing_interpolation());