mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Move allowStatelessCompression from HwHelper to HwInfoConfig
Signed-off-by: Rafal Maziejuk <rafal.maziejuk@intel.com> Related-To: NEO-4541
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
09e8bc4eda
commit
bbfbf19a02
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
#include "shared/source/os_interface/hw_info_config.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -27,8 +28,8 @@ void HwHelperHw<Family>::setExtraAllocationData(AllocationData &allocationData,
|
||||
}
|
||||
}
|
||||
|
||||
auto &helper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
if (helper.allowStatelessCompression(hwInfo)) {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo.platform.eProductFamily);
|
||||
if (hwInfoConfig.allowStatelessCompression(hwInfo)) {
|
||||
if (properties.allocationType == GraphicsAllocation::AllocationType::GLOBAL_SURFACE ||
|
||||
properties.allocationType == GraphicsAllocation::AllocationType::CONSTANT_SURFACE ||
|
||||
properties.allocationType == GraphicsAllocation::AllocationType::PRINTF_SURFACE) {
|
||||
|
||||
@@ -67,7 +67,6 @@ class HwHelper {
|
||||
virtual bool preferSmallWorkgroupSizeForKernel(const size_t size, const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isBufferSizeSuitableForRenderCompression(const size_t size, const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool checkResourceCompatibility(GraphicsAllocation &graphicsAllocation) = 0;
|
||||
virtual bool allowStatelessCompression(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isBlitCopyRequiredForLocalMemory(const HardwareInfo &hwInfo, const GraphicsAllocation &allocation) const = 0;
|
||||
virtual LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const = 0;
|
||||
static bool renderCompressedBuffersSupported(const HardwareInfo &hwInfo);
|
||||
@@ -312,8 +311,6 @@ class HwHelperHw : public HwHelper {
|
||||
|
||||
void setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const HardwareInfo &hwInfo) const override;
|
||||
|
||||
bool allowStatelessCompression(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
bool isBlitCopyRequiredForLocalMemory(const HardwareInfo &hwInfo, const GraphicsAllocation &allocation) const override;
|
||||
|
||||
LocalMemoryAccessMode getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
@@ -413,14 +413,6 @@ inline bool HwHelperHw<GfxFamily>::isSpecialWorkgroupSizeRequired(const Hardware
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool HwHelperHw<GfxFamily>::allowStatelessCompression(const HardwareInfo &hwInfo) const {
|
||||
if (DebugManager.flags.EnableStatelessCompression.get() != -1) {
|
||||
return static_cast<bool>(DebugManager.flags.EnableStatelessCompression.get());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline bool HwHelperHw<GfxFamily>::isBlitCopyRequiredForLocalMemory(const HardwareInfo &hwInfo, const GraphicsAllocation &allocation) const {
|
||||
return allocation.isAllocatedInLocalMemoryPool() &&
|
||||
|
||||
Reference in New Issue
Block a user