|
8 | 8 | #include "runtime/built_ins/builtins_dispatch_builder.h" |
9 | 9 | #include "runtime/command_stream/command_stream_receiver_hw.h" |
10 | 10 | #include "runtime/helpers/flush_stamp.h" |
| 11 | +#include "runtime/helpers/hw_helper.h" |
11 | 12 | #include "runtime/helpers/options.h" |
12 | 13 | #include "runtime/helpers/surface_formats.h" |
13 | 14 | #include "runtime/kernel/kernel.h" |
@@ -2410,50 +2411,3 @@ TEST(KernelTest, whenAllocationReadOnlyNonFlushRequiredThenAssignNullPointerToCa |
2410 | 2411 | EXPECT_EQ(nullptr, kernel.mockKernel->kernelArgRequiresCacheFlush[0]); |
2411 | 2412 | } |
2412 | 2413 |
|
2413 | | -TEST(KernelTest, givenEnableCacheFlushFlagIsEnableWhenPlatformDoesNotSupportThenOverrideAndReturnSupportTrue) { |
2414 | | - DebugManagerStateRestore restore; |
2415 | | - DebugManager.flags.EnableCacheFlushAfterWalker.set(1); |
2416 | | - |
2417 | | - HardwareInfo localHwInfo = *platformDevices[0]; |
2418 | | - localHwInfo.capabilityTable.supportCacheFlushAfterWalker = false; |
2419 | | - |
2420 | | - auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&localHwInfo)); |
2421 | | - MockKernelWithInternals kernel(*device); |
2422 | | - EXPECT_TRUE(kernel.mockKernel->platformSupportCacheFlushAfterWalker()); |
2423 | | -} |
2424 | | - |
2425 | | -TEST(KernelTest, givenEnableCacheFlushFlagIsDisableWhenPlatformSupportsThenOverrideAndReturnSupportFalse) { |
2426 | | - DebugManagerStateRestore restore; |
2427 | | - DebugManager.flags.EnableCacheFlushAfterWalker.set(0); |
2428 | | - |
2429 | | - HardwareInfo localHwInfo = *platformDevices[0]; |
2430 | | - localHwInfo.capabilityTable.supportCacheFlushAfterWalker = true; |
2431 | | - |
2432 | | - auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&localHwInfo)); |
2433 | | - MockKernelWithInternals kernel(*device); |
2434 | | - EXPECT_FALSE(kernel.mockKernel->platformSupportCacheFlushAfterWalker()); |
2435 | | -} |
2436 | | - |
2437 | | -TEST(KernelTest, givenEnableCacheFlushFlagIsReadPlatformSettingWhenPlatformDoesNotSupportThenReturnSupportFalse) { |
2438 | | - DebugManagerStateRestore restore; |
2439 | | - DebugManager.flags.EnableCacheFlushAfterWalker.set(-1); |
2440 | | - |
2441 | | - HardwareInfo localHwInfo = *platformDevices[0]; |
2442 | | - localHwInfo.capabilityTable.supportCacheFlushAfterWalker = false; |
2443 | | - |
2444 | | - auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&localHwInfo)); |
2445 | | - MockKernelWithInternals kernel(*device); |
2446 | | - EXPECT_FALSE(kernel.mockKernel->platformSupportCacheFlushAfterWalker()); |
2447 | | -} |
2448 | | - |
2449 | | -TEST(KernelTest, givenEnableCacheFlushFlagIsReadPlatformSettingWhenPlatformSupportsThenReturnSupportTrue) { |
2450 | | - DebugManagerStateRestore restore; |
2451 | | - DebugManager.flags.EnableCacheFlushAfterWalker.set(-1); |
2452 | | - |
2453 | | - HardwareInfo localHwInfo = *platformDevices[0]; |
2454 | | - localHwInfo.capabilityTable.supportCacheFlushAfterWalker = true; |
2455 | | - |
2456 | | - auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&localHwInfo)); |
2457 | | - MockKernelWithInternals kernel(*device); |
2458 | | - EXPECT_TRUE(kernel.mockKernel->platformSupportCacheFlushAfterWalker()); |
2459 | | -} |
0 commit comments