P4 to Git Change 1368703 by todli@todli-win-opencl-kv1 on 2017/02/02 18:12:31
SWDEV-96241 - Support SDI on PAL (runtime changes)
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#16 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#42 edit
[ROCm/clr commit: 1eda218988]
This commit is contained in:
1 parent
3db14ee4cb
commit
fcf63c43c8
4 files changed
+49
-53
No files matched your search
@@ -399,9 +399,9 @@ Resource::memTypeToHeap(Pal::GpuMemoryCreateInfo* createInfo)
|
||||
createInfo->heaps[0] = Pal::GpuHeapGartCacheable;
|
||||
desc_.cardMemory_ = false;
|
||||
break;
|
||||
case Shader:
|
||||
case BusAddressable:
|
||||
case ExternalPhysical:
|
||||
desc_.cardMemory_ = false;
|
||||
case Shader:
|
||||
// Fall through to process the memory allocation ...
|
||||
case Local:
|
||||
createInfo->heapCount = 2;
|
||||
@@ -1075,6 +1075,18 @@ Resource::create(MemoryType memType, CreateParams* params)
|
||||
createInfo.alignment = MaxGpuAlignment;
|
||||
createInfo.vaRange = Pal::VaRange::Default;
|
||||
createInfo.priority = Pal::GpuMemPriority::Normal;
|
||||
|
||||
if (memoryType() == ExternalPhysical){
|
||||
cl_bus_address_amd bus_address =
|
||||
(reinterpret_cast<amd::Buffer*>(params->owner_))->busAddress();
|
||||
createInfo.surfaceBusAddr = bus_address.surface_bus_address;
|
||||
createInfo.markerBusAddr = bus_address.marker_bus_address;
|
||||
createInfo.flags.sdiExternal = true;
|
||||
}
|
||||
else if (memoryType() == BusAddressable){
|
||||
createInfo.flags.busAddressable = true;
|
||||
}
|
||||
|
||||
memTypeToHeap(&createInfo);
|
||||
// createInfo.priority;
|
||||
memRef_ = dev().resourceCache().findGpuMemory(&desc_, createInfo.size, createInfo.alignment);
|
||||
|
||||
Reference in new issue
Block a user