Add debug flag to disable aux translation

Change-Id: I1f3a2941de44e9fe793ef3f1c6425c80293cc63a
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-06-25 10:22:59 +02:00
committed by sys_ocldev
parent 67a1087ffb
commit bb6dfd4fe6
4 changed files with 12 additions and 0 deletions

View File

@ -2395,6 +2395,8 @@ TEST(KernelTest, givenKernelWithKernelInfoWith64bitPointerSizeThenReport64bit) {
}
TEST(KernelTest, givenFtrRenderCompressedBuffersWhenInitializingArgsWithNonStatefulAccessThenMarkKernelForAuxTranslation) {
DebugManagerStateRestore restore;
DebugManager.flags.DisableAuxTranslation.set(false);
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
auto hwInfo = device->getExecutionEnvironment()->getMutableHardwareInfo();
auto &capabilityTable = hwInfo->capabilityTable;
@ -2416,6 +2418,10 @@ TEST(KernelTest, givenFtrRenderCompressedBuffersWhenInitializingArgsWithNonState
capabilityTable.ftrRenderCompressedBuffers = true;
kernel.mockKernel->initialize();
EXPECT_TRUE(kernel.mockKernel->isAuxTranslationRequired());
DebugManager.flags.DisableAuxTranslation.set(true);
kernel.mockKernel->initialize();
EXPECT_FALSE(kernel.mockKernel->isAuxTranslationRequired());
}
TEST(KernelTest, givenDebugVariableSetWhenKernelHasStatefulBufferAccessThenMarkKernelForAuxTranslation) {