mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add debug flag to disable aux translation
Change-Id: I1f3a2941de44e9fe793ef3f1c6425c80293cc63a Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
67a1087ffb
commit
bb6dfd4fe6
@ -352,6 +352,10 @@ cl_int Kernel::initialize() {
|
||||
}
|
||||
}
|
||||
|
||||
if (DebugManager.flags.DisableAuxTranslation.get()) {
|
||||
auxTranslationRequired = false;
|
||||
}
|
||||
|
||||
if (usingImages && !usingBuffers) {
|
||||
usingImagesOnly = true;
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ DECLARE_DEBUG_VARIABLE(bool, RebuildPrecompiledKernels, false, "forces driver to
|
||||
DECLARE_DEBUG_VARIABLE(bool, LoopAtPlatformInitialize, false, "Adds endless loop in platform initalize, useful for debugging.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DoNotRegisterTrimCallback, false, "When set to true driver is not registering trim callback.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, OverrideInvalidEngineWithDefault, false, "When set to true driver chooses engine 0 if no engine is found.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DisableAuxTranslation, false, "Disable aux translation when required by Kernel.")
|
||||
|
||||
/*LOGGING FLAGS*/
|
||||
DECLARE_DEBUG_VARIABLE(bool, PrintDebugSettings, false, "Enables dumping debug variables settings to text 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) {
|
||||
|
@ -112,3 +112,4 @@ OverrideInvalidEngineWithDefault = 0
|
||||
EnableFormatQuery = 0
|
||||
AllowOpenFdOperations = 0
|
||||
EnableBlitterOperationsForReadWriteBuffers = 0
|
||||
DisableAuxTranslation = 0
|
||||
|
Reference in New Issue
Block a user