mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
CPU access disallowed mode and blitter amendments
Related-To: NEO-4876 Change-Id: I7d6de1a0530e9c4f8bcf302824242033d3ca724a Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
21aa8388bc
commit
b7d5427f01
@@ -68,5 +68,13 @@ bool forceBlitterUseForGlobalBuffers(const HardwareInfo &hwInfo, GraphicsAllocat
|
||||
return false;
|
||||
}
|
||||
|
||||
bool obtainBlitterPreference(const HardwareInfo &hwInfo) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) {
|
||||
return LocalMemoryAccessMode::Default;
|
||||
}
|
||||
|
||||
} // namespace Gen12LPHelpers
|
||||
} // namespace NEO
|
||||
|
||||
@@ -20,6 +20,7 @@ class GraphicsAllocation;
|
||||
struct HardwareInfo;
|
||||
struct PipelineSelectArgs;
|
||||
class Image;
|
||||
enum class LocalMemoryAccessMode;
|
||||
|
||||
namespace Gen12LPHelpers {
|
||||
bool pipeControlWaRequired(PRODUCT_FAMILY productFamily);
|
||||
@@ -38,6 +39,8 @@ bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo);
|
||||
bool isForceEmuInt32DivRemSPWARequired(const HardwareInfo &hwInfo);
|
||||
bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo);
|
||||
bool forceBlitterUseForGlobalBuffers(const HardwareInfo &hwInfo, GraphicsAllocation *allocation);
|
||||
bool obtainBlitterPreference(const HardwareInfo &hwInfo);
|
||||
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo);
|
||||
|
||||
} // namespace Gen12LPHelpers
|
||||
} // namespace NEO
|
||||
|
||||
@@ -98,5 +98,13 @@ bool forceBlitterUseForGlobalBuffers(const HardwareInfo &hwInfo, GraphicsAllocat
|
||||
return false;
|
||||
}
|
||||
|
||||
bool obtainBlitterPreference(const HardwareInfo &hwInfo) {
|
||||
return false;
|
||||
}
|
||||
|
||||
LocalMemoryAccessMode getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) {
|
||||
return LocalMemoryAccessMode::Default;
|
||||
}
|
||||
|
||||
} // namespace Gen12LPHelpers
|
||||
} // namespace NEO
|
||||
|
||||
@@ -288,6 +288,26 @@ bool MemorySynchronizationCommands<TGLLPFamily>::isPipeControlPriorToPipelineSel
|
||||
return MemorySynchronizationCommands<TGLLPFamily>::isPipeControlWArequired(hwInfo);
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwHelperHw<Family>::obtainBlitterPreference(const HardwareInfo &hwInfo) const {
|
||||
return Gen12LPHelpers::obtainBlitterPreference(hwInfo);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline LocalMemoryAccessMode HwHelperHw<Family>::getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
|
||||
return Gen12LPHelpers::getDefaultLocalMemoryAccessMode(hwInfo);
|
||||
}
|
||||
|
||||
template <>
|
||||
void HwHelperHw<TGLLPFamily>::setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const HardwareInfo &hwInfo) const {
|
||||
HwHelper &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
if (hwHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessDisallowed) {
|
||||
if (GraphicsAllocation::isCpuAccessRequired(properties.allocationType)) {
|
||||
allocationData.flags.useSystemMemory = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template class HwHelperHw<Family>;
|
||||
template class FlatBatchBufferHelperHw<Family>;
|
||||
template struct MemorySynchronizationCommands<Family>;
|
||||
|
||||
Reference in New Issue
Block a user