2018-05-08 19:51:31 +08:00
|
|
|
/*
|
2022-01-17 20:54:53 +08:00
|
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
2018-05-08 19:51:31 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-05-08 19:51:31 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-05-08 19:51:31 +08:00
|
|
|
|
2018-10-03 01:10:29 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
bool UnitTestHelper<GfxFamily>::isPageTableManagerSupported(const HardwareInfo &hwInfo) {
|
|
|
|
return false;
|
|
|
|
}
|
2018-10-18 19:40:53 +08:00
|
|
|
|
2019-11-12 20:59:37 +08:00
|
|
|
template <typename GfxFamily>
|
2022-03-08 01:00:26 +08:00
|
|
|
inline uint32_t UnitTestHelper<GfxFamily>::getAppropriateThreadArbitrationPolicy(int32_t policy) {
|
|
|
|
return static_cast<uint32_t>(policy);
|
2019-11-12 20:59:37 +08:00
|
|
|
}
|
|
|
|
|
2019-08-14 15:33:51 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
bool UnitTestHelper<GfxFamily>::isPipeControlWArequired(const HardwareInfo &hwInfo) {
|
|
|
|
return false;
|
|
|
|
}
|
2019-08-29 16:42:17 +08:00
|
|
|
|
2020-04-25 17:09:57 +08:00
|
|
|
template <typename GfxFamily>
|
2020-12-01 02:32:05 +08:00
|
|
|
bool UnitTestHelper<GfxFamily>::isAdditionalSynchronizationRequired() {
|
2020-04-25 17:09:57 +08:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2020-02-05 03:26:04 +08:00
|
|
|
template <typename GfxFamily>
|
2021-03-18 23:21:23 +08:00
|
|
|
bool UnitTestHelper<GfxFamily>::isAdditionalMiSemaphoreWaitRequired(const HardwareInfo &hwInfo) {
|
2020-02-05 03:26:04 +08:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2019-08-29 16:42:17 +08:00
|
|
|
template <typename GfxFamily>
|
2021-06-09 18:00:13 +08:00
|
|
|
inline uint64_t UnitTestHelper<GfxFamily>::getAtomicMemoryAddress(const typename GfxFamily::MI_ATOMIC &atomic) {
|
2019-08-29 16:42:17 +08:00
|
|
|
return atomic.getMemoryAddress() | ((static_cast<uint64_t>(atomic.getMemoryAddressHigh())) << 32);
|
|
|
|
}
|
2019-09-06 16:25:14 +08:00
|
|
|
|
2020-05-27 23:39:43 +08:00
|
|
|
template <typename GfxFamily>
|
2021-10-26 15:42:53 +08:00
|
|
|
inline bool UnitTestHelper<GfxFamily>::requiresTimestampPacketsInSystemMemory(HardwareInfo &hwInfo) {
|
2020-05-27 23:39:43 +08:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-09-08 00:07:23 +08:00
|
|
|
template <typename GfxFamily>
|
2021-09-08 21:38:48 +08:00
|
|
|
void UnitTestHelper<GfxFamily>::setExtraMidThreadPreemptionFlag(HardwareInfo &hwInfo, bool value) {
|
2021-11-25 17:31:14 +08:00
|
|
|
hwInfo.featureTable.flags.ftrGpGpuMidThreadLevelPreempt = value;
|
2021-09-08 00:07:23 +08:00
|
|
|
}
|
|
|
|
|
2019-09-06 16:25:14 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
const bool UnitTestHelper<GfxFamily>::tiledImagesSupported = true;
|
|
|
|
|
2019-10-01 14:35:02 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
const uint32_t UnitTestHelper<GfxFamily>::smallestTestableSimdSize = 8;
|
|
|
|
|
2019-11-22 16:50:10 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
const AuxTranslationMode UnitTestHelper<GfxFamily>::requiredAuxTranslationMode = AuxTranslationMode::Builtin;
|
|
|
|
|
2020-02-05 00:58:41 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
const bool UnitTestHelper<GfxFamily>::useFullRowForLocalIdsGeneration = false;
|
|
|
|
|
2020-03-12 17:49:20 +08:00
|
|
|
template <typename GfxFamily>
|
|
|
|
const bool UnitTestHelper<GfxFamily>::additionalMiFlushDwRequired = false;
|
|
|
|
|
2021-11-09 00:50:31 +08:00
|
|
|
template <typename GfxFamily>
|
2021-11-16 01:18:09 +08:00
|
|
|
inline uint64_t UnitTestHelper<GfxFamily>::getPipeControlPostSyncAddress(const typename GfxFamily::PIPE_CONTROL &pipeControl) {
|
2021-11-09 00:50:31 +08:00
|
|
|
uint64_t gpuAddress = pipeControl.getAddress();
|
|
|
|
uint64_t gpuAddressHigh = pipeControl.getAddressHigh();
|
|
|
|
|
|
|
|
return (gpuAddressHigh << 32) | gpuAddress;
|
|
|
|
}
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|