From: Zhigang Gong Date: Tue, 25 Jun 2013 06:22:43 +0000 (+0800) Subject: GBE: work around the local memory barrier fence issue. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad25e88d973045ad55b5e660db1269582d4c703e;p=contrib%2Fbeignet.git GBE: work around the local memory barrier fence issue. According to the spec, we do not need to add a memory fence for SLM's access. But, in pratice, we have to add it to make sure get correct result. Don't know the root cause yet, just use this work around now. Signed-off-by: Zhigang Gong --- diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp index 5901419..1e5f514 100644 --- a/backend/src/backend/gen_insn_selection.cpp +++ b/backend/src/backend/gen_insn_selection.cpp @@ -1695,8 +1695,8 @@ namespace gbe const ir::Register reg = sel.reg(FAMILY_DWORD); const uint32_t params = insn.getParameters(); - //need to double check local barrier whether need fence or not - if(params == syncGlobalBarrier) { + //XXX TODO need to double check local barrier whether need fence or not + if(params == syncGlobalBarrier || params == syncLocalBarrier) { const ir::Register fenceDst = sel.reg(FAMILY_DWORD); sel.FENCE(sel.selReg(fenceDst, ir::TYPE_U32)); }