mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Debug flag to override Images support
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
1388818a0e
commit
0378f2e8b3
@ -106,6 +106,22 @@ TEST_F(DeviceFactoryTest, WhenOverridingUsingDebugManagerThenOverridesAreApplied
|
||||
hwInfo->capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
|
||||
}
|
||||
|
||||
TEST_F(DeviceFactoryTest, givenDebugFlagSetWhenCreatingDevicesThenForceImagesSupport) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
|
||||
for (int32_t flag : {0, 1}) {
|
||||
DebugManager.flags.ForceImagesSupport.set(flag);
|
||||
|
||||
MockExecutionEnvironment mockExecutionEnvironment(defaultHwInfo.get());
|
||||
|
||||
auto success = DeviceFactory::prepareDeviceEnvironments(mockExecutionEnvironment);
|
||||
ASSERT_TRUE(success);
|
||||
auto hwInfo = mockExecutionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
|
||||
EXPECT_EQ(!!flag, hwInfo->capabilityTable.supportsImages);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(DeviceFactoryTest, givenZeAffinityMaskSetWhenCreateDevicesThenProperNumberOfDevicesIsReturned) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateMultipleRootDevices.set(5);
|
||||
|
@ -209,6 +209,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, ReadBackCommandBufferAllocation, -1, "Read comma
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, UseContextEndOffsetForEventCompletion, -1, "Use Context End or Context Start for event completion signalling. -1: default: platform dependent, 0 - Use Context Start, 1 - Use Context End")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceWddmLowPriorityContextValue, -1, "Force scheduling priority value during Wddm low priority context creation. -1 - default.")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, FailBuildProgramWithStatefulAccess, -1, "-1: default, 0: disable, 1: enable, Fail build program/module creation whenever stateful access is discovered (except built in kernels).")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, ForceImagesSupport, -1, "-1: default, 0: disable, 1: enable. Override support for Images.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DisableScratchPages, false, "Disable scratch pages during VM creations")
|
||||
DECLARE_DEBUG_VARIABLE(std::string, OverrideDeviceName, std::string("unk"), "Device name to override")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideL1CachePolicyInSurfaceStateAndStateless, -1, "-1: default, >=0 : following policy will be programmed in render surface state (for regular buffers) and stateless L1 caching")
|
||||
|
@ -167,6 +167,10 @@ int HwInfoConfig::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo
|
||||
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideEnableQuickKmdSleepForDirectSubmission.get(), kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
|
||||
KmdNotifyHelper::overrideFromDebugVariable(DebugManager.flags.OverrideDelayQuickKmdSleepForDirectSubmissionMicroseconds.get(), kmdNotifyProperties.delayQuickKmdSleepForDirectSubmissionMicroseconds);
|
||||
|
||||
if (DebugManager.flags.ForceImagesSupport.get() != -1) {
|
||||
outHwInfo->capabilityTable.supportsImages = DebugManager.flags.ForceImagesSupport.get();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -55,6 +55,11 @@ int HwInfoConfig::configureHwInfoWddm(const HardwareInfo *inHwInfo, HardwareInfo
|
||||
if (ret != 0) {
|
||||
*outHwInfo = {};
|
||||
}
|
||||
|
||||
if (DebugManager.flags.ForceImagesSupport.get() != -1) {
|
||||
outHwInfo->capabilityTable.supportsImages = DebugManager.flags.ForceImagesSupport.get();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -438,4 +438,5 @@ ExperimentalEnableDeviceAllocationCache = 0
|
||||
OverrideL1CachePolicyInSurfaceStateAndStateless = -1
|
||||
EnableBcsSwControlWa = -1
|
||||
ExperimentalEnableL0DebuggerForOpenCL = 0
|
||||
DebuggerDisableSingleAddressSbaTracking = 0
|
||||
DebuggerDisableSingleAddressSbaTracking = 0
|
||||
ForceImagesSupport = -1
|
Reference in New Issue
Block a user