mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add isL3Configurable() method to HwHelper
Add isL3Configurable() method to HwHelper to query if L3 is configurable using an HwHelper instance. Change-Id: I0f350ae292f12980611a250301293378dbd8dd91 Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
5f46acb089
commit
08a3046e4d
@ -37,6 +37,7 @@ class HwHelper {
|
||||
virtual void setCapabilityCoherencyFlag(const HardwareInfo *pHwInfo, bool &coherencyFlag) = 0;
|
||||
virtual void adjustDefaultEngineType(HardwareInfo *pHwInfo) = 0;
|
||||
virtual void setupHardwareCapabilities(HardwareCapabilities *caps, const HardwareInfo &hwInfo) = 0;
|
||||
virtual bool isL3Configurable(const HardwareInfo &hwInfo) = 0;
|
||||
virtual SipKernelType getSipKernelType(bool debuggingActive) = 0;
|
||||
virtual uint32_t getConfigureAddressSpaceMode() = 0;
|
||||
virtual bool isLocalMemoryEnabled(const HardwareInfo &hwInfo) const = 0;
|
||||
@ -124,6 +125,8 @@ class HwHelperHw : public HwHelper {
|
||||
|
||||
void setupHardwareCapabilities(HardwareCapabilities *caps, const HardwareInfo &hwInfo) override;
|
||||
|
||||
bool isL3Configurable(const HardwareInfo &hwInfo) override;
|
||||
|
||||
SipKernelType getSipKernelType(bool debuggingActive) override;
|
||||
|
||||
uint32_t getConfigureAddressSpaceMode() override;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "runtime/helpers/hardware_commands_helper.h"
|
||||
#include "runtime/helpers/hw_helper.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/helpers/preamble.h"
|
||||
#include "runtime/memory_manager/graphics_allocation.h"
|
||||
#include "runtime/memory_manager/memory_constants.h"
|
||||
#include "runtime/os_interface/os_interface.h"
|
||||
@ -36,6 +37,11 @@ void HwHelperHw<Family>::setupHardwareCapabilities(HardwareCapabilities *caps, c
|
||||
caps->isStatelesToStatefullWithOffsetSupported = true;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
bool HwHelperHw<Family>::isL3Configurable(const HardwareInfo &hwInfo) {
|
||||
return PreambleHelper<Family>::isL3Configurable(hwInfo);
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
SipKernelType HwHelperHw<Family>::getSipKernelType(bool debuggingActive) {
|
||||
if (!debuggingActive) {
|
||||
|
@ -571,6 +571,19 @@ HWTEST_F(HwHelperTest, DISABLED_profilingCreationOfRenderSurfaceStateVsMemcpyOfC
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST_F(HwHelperTest, testIfL3ConfigProgrammable) {
|
||||
bool PreambleHelperL3Config;
|
||||
bool isL3Programmable;
|
||||
const HardwareInfo &hwInfo = **platformDevices;
|
||||
|
||||
PreambleHelperL3Config =
|
||||
PreambleHelper<FamilyType>::isL3Configurable(**platformDevices);
|
||||
isL3Programmable =
|
||||
HwHelperHw<FamilyType>::get().isL3Configurable(hwInfo);
|
||||
|
||||
EXPECT_EQ(PreambleHelperL3Config, isL3Programmable);
|
||||
}
|
||||
|
||||
TEST(HwHelperCacheFlushTest, givenEnableCacheFlushFlagIsEnableWhenPlatformDoesNotSupportThenOverrideAndReturnSupportTrue) {
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.EnableCacheFlushAfterWalker.set(1);
|
||||
|
Reference in New Issue
Block a user