mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Add allocation types for MCS, preemption and shared context image
Related-To: NEO-2733 Change-Id: I3e3e4ea6d4fe084c8c32c0e24c537c9131ce1e60 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
c5274c5087
commit
1d42fe169a
@@ -142,10 +142,7 @@ bool Device::createDeviceImpl(const HardwareInfo *pHwInfo) {
|
||||
executionEnvironment->memoryManager->setForce32BitAllocations(getDeviceInfo().force32BitAddressess);
|
||||
|
||||
if (preemptionMode == PreemptionMode::MidThread || isSourceLevelDebuggerActive()) {
|
||||
AllocationProperties properties(true, pHwInfo->capabilityTable.requiredPreemptionSurfaceSize, GraphicsAllocation::AllocationType::UNDECIDED);
|
||||
properties.flags.uncacheable = getWaTable()->waCSRUncachable;
|
||||
properties.alignment = 256 * MemoryConstants::kiloByte;
|
||||
preemptionAllocation = executionEnvironment->memoryManager->allocateGraphicsMemoryWithProperties(properties);
|
||||
preemptionAllocation = executionEnvironment->memoryManager->allocateGraphicsMemoryWithProperties(getAllocationPropertiesForPreemption());
|
||||
if (!preemptionAllocation) {
|
||||
return false;
|
||||
}
|
||||
@@ -162,6 +159,12 @@ bool Device::createDeviceImpl(const HardwareInfo *pHwInfo) {
|
||||
return true;
|
||||
}
|
||||
|
||||
AllocationProperties Device::getAllocationPropertiesForPreemption() const {
|
||||
AllocationProperties properties{true, getHardwareInfo().capabilityTable.requiredPreemptionSurfaceSize, GraphicsAllocation::AllocationType::PREEMPTION};
|
||||
properties.flags.uncacheable = getWaTable()->waCSRUncachable;
|
||||
properties.alignment = 256 * MemoryConstants::kiloByte;
|
||||
return properties;
|
||||
}
|
||||
bool Device::createEngines(const HardwareInfo *pHwInfo) {
|
||||
auto defaultEngineType = getChosenEngineType(*pHwInfo);
|
||||
auto &gpgpuEngines = HwHelper::get(pHwInfo->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances();
|
||||
|
||||
@@ -139,6 +139,7 @@ class Device : public BaseObject<_cl_device_id> {
|
||||
MOCKABLE_VIRTUAL void initializeCaps();
|
||||
void setupFp64Flags();
|
||||
void appendOSExtensions(std::string &deviceExtensions);
|
||||
AllocationProperties getAllocationPropertiesForPreemption() const;
|
||||
|
||||
unsigned int enabledClVersion = 0u;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user