fix compilation with clang 9

ci: add build with clang on Arch

Signed-off-by: Jacek Danecki <jacek.danecki@intel.com>

https://github.com/intel/compute-runtime/pull/241

Change-Id: I1a8620c9f8146e7108098d18e9db75b9ff178f44
This commit is contained in:
Jacek Danecki
2019-12-11 15:30:14 +01:00
committed by ocldev
parent c7755c2c48
commit fb8df1a328
7 changed files with 53 additions and 14 deletions

View File

@@ -80,12 +80,13 @@ struct L3CNTLRegisterOffset {
static const uint32_t registerOffset;
};
namespace DebugModeRegisterOffset {
template <typename GfxFamily>
constexpr uint32_t registerOffset = 0x20ec;
template <typename GfxFamily>
constexpr uint32_t debugEnabledValue = (1 << 6) | (1 << 22);
}; // namespace DebugModeRegisterOffset
struct DebugModeRegisterOffset {
enum {
registerOffset = 0x20ec,
debugEnabledValue = (1 << 6) | (1 << 22)
};
};
namespace TdDebugControlRegisterOffset {
static constexpr uint32_t registerOffset = 0xe400;

View File

@@ -89,8 +89,8 @@ template <typename GfxFamily>
void PreambleHelper<GfxFamily>::programKernelDebugging(LinearStream *pCommandStream) {
auto pCmd = reinterpret_cast<MI_LOAD_REGISTER_IMM *>(pCommandStream->getSpace(sizeof(MI_LOAD_REGISTER_IMM)));
*pCmd = GfxFamily::cmdInitLoadRegisterImm;
pCmd->setRegisterOffset(DebugModeRegisterOffset::registerOffset<GfxFamily>);
pCmd->setDataDword(DebugModeRegisterOffset::debugEnabledValue<GfxFamily>);
pCmd->setRegisterOffset(DebugModeRegisterOffset<GfxFamily>::registerOffset);
pCmd->setDataDword(DebugModeRegisterOffset<GfxFamily>::debugEnabledValue);
auto pCmd2 = reinterpret_cast<MI_LOAD_REGISTER_IMM *>(pCommandStream->getSpace(sizeof(MI_LOAD_REGISTER_IMM)));
*pCmd2 = GfxFamily::cmdInitLoadRegisterImm;