[Mesa-dev] [PATCH 18/23] i965: Import GLSL IR memory barrier intrinsic translation code.
Francisco Jerez
currojerez at riseup.net
Tue Apr 28 11:44:29 PDT 2015
---
src/mesa/drivers/dri/i965/brw_ir_glsl_intrinsics.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_ir_glsl_intrinsics.h b/src/mesa/drivers/dri/i965/brw_ir_glsl_intrinsics.h
index df7b1a3..b4d8f04 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_glsl_intrinsics.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_glsl_intrinsics.h
@@ -231,6 +231,19 @@ namespace brw {
vbld.MOV(dst_vector(v->visit_result(ir->return_deref),
ir->return_deref->type->vector_elements), tmp);
}
+
+ /**
+ * Entry point for translating GLSL IR memory barrier intrinsics.
+ */
+ template<typename V, typename B>
+ void
+ visit_barrier_intrinsic(V *v, const B &bld, ir_call *ir)
+ {
+ const typename B::dst_reg dst =
+ bld.half(0).natural_reg(BRW_REGISTER_TYPE_UD, 2);
+ bld.emit(SHADER_OPCODE_MEMORY_FENCE, dst)
+ ->regs_written = 2;
+ }
}
#endif
--
2.3.5
More information about the mesa-dev
mailing list