Wddm interface [6/n]: Add debug variables

Change-Id: Ia4a6b25f2c5b0a230e7344f34822197e90d45ff3
This commit is contained in:
Dunajski, Bartosz
2018-05-15 14:07:37 +02:00
parent 41f570ab50
commit ef76b9ddc4
4 changed files with 26 additions and 1 deletions

View File

@ -85,6 +85,8 @@ DECLARE_DEBUG_VARIABLE(int32_t, CsrDispatchMode, 0, "Chooses DispatchMode for Cs
/*DRIVER TOGGLES*/
DECLARE_DEBUG_VARIABLE(int32_t, ForceOCLVersion, 0, "Force specific OpenCL API version")
DECLARE_DEBUG_VARIABLE(int32_t, ForcePreemptionMode, -1, "Keep this variable in sync with PreemptionMode enum. -1 - devices default mode, 1 - disable, 2 - midBatch, 3 - threadGroup, 4 - midThread")
DECLARE_DEBUG_VARIABLE(int32_t, ForceWddmInterfaceVersion, 0, "Windows only. Force internal interface version. 0 is default value. Example: set 20 to force 2.0")
DECLARE_DEBUG_VARIABLE(bool, HwQueueSupported, false, "Windows only. Pass flag to KMD during Wddm Context creation")
DECLARE_DEBUG_VARIABLE(int32_t, NodeOrdinal, -1, "-1: default do not override, 0: ENGINE_RCS")
DECLARE_DEBUG_VARIABLE(bool, UseMaxSimdSizeToDeduceMaxWorkgroupSize, false, "With this flag on, max workgroup size is deduced using SIMD32 instead of SIMD8, this causes the max wkg size to be 4 times bigger")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideThreadArbitrationPolicy, -1, "-1 (dont override) or any valid config (0: Age Based, 1: Round Robin)")

View File

@ -727,7 +727,8 @@ bool Wddm::createContext() {
PrivateData.NoRingFlushes = DebugManager.flags.UseNoRingFlushesKmdMode.get();
CreateContext.EngineAffinity = 0;
CreateContext.Flags.NullRendering = (UINT)DebugManager.flags.EnableNullHardware.get();
CreateContext.Flags.NullRendering = static_cast<UINT>(DebugManager.flags.EnableNullHardware.get());
CreateContext.Flags.HwQueueSupported = static_cast<UINT>(DebugManager.flags.HwQueueSupported.get());
if (preemptionMode >= PreemptionMode::MidBatch) {
CreateContext.Flags.DisableGpuTimeout = readEnablePreemptionRegKey();

View File

@ -663,10 +663,30 @@ HWTEST_F(WddmTestWithMockGdiDll, givenUseNoRingFlushesKmdModeDebugFlagToTrueWhen
EXPECT_TRUE(!!privateData->NoRingFlushes);
}
HWTEST_F(WddmTestWithMockGdiDll, givenHwQueueSupportEnabledWhenCreateContextIsCalledThenSetAppropriateFlag) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.HwQueueSupported.set(true);
wddm->init<FamilyType>();
EXPECT_EQ(1u, getCreateContextDataFcn()->Flags.HwQueueSupported);
}
HWTEST_F(WddmTestWithMockGdiDll, givenHwQueueSupportDisabledWhenCreateContextIsCalledThenSetAppropriateFlag) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.HwQueueSupported.set(false);
wddm->init<FamilyType>();
EXPECT_EQ(0u, getCreateContextDataFcn()->Flags.HwQueueSupported);
}
HWTEST_F(WddmTest, givenDebugManagerWhenGetForUseNoRingFlushesKmdModeIsCalledThenTrueIsReturned) {
EXPECT_TRUE(DebugManager.flags.UseNoRingFlushesKmdMode.get());
}
HWTEST_F(WddmTest, givenDebugManagerWhenGetForHwQueueSupportedIsCalledThenFalseIsReturned) {
EXPECT_FALSE(DebugManager.flags.HwQueueSupported.get());
}
HWTEST_F(WddmTest, makeResidentMultipleHandles) {
wddm->init<FamilyType>();
ASSERT_TRUE(wddm->isInitialized());

View File

@ -61,3 +61,5 @@ PrintDriverDiagnostics = -1
FlattenBatchBufferForAUBDump = false
PrintDispatchParameters = false
AddPatchInfoCommentsForAUBDump = false
HwQueueSupported = false
ForceWddmInterfaceVersion = 0