P4 to Git Change 1191682 by gandryey@gera-dev-w7 on 2015/09/17 11:14:23
ECR #304775 - Remove EG/NI support - Remove the heap emulation (non-vm) Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#77 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#12 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpusettings.cpp#31 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#186 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#253 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#118 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#523 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#148 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuheap.cpp#28 delete ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuheap.hpp#16 delete ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#297 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#116 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#122 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.hpp#48 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#227 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.hpp#83 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#329 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.hpp#94 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#379 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#143 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#57 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsasettings.cpp#38 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsasettings.cpp#9 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#242 edit
This commit is contained in:
@@ -322,7 +322,7 @@ static uint32_t GetHSAILImageOrderType(gslChannelOrder chOrder, cmSurfFmt format
|
||||
}
|
||||
|
||||
bool
|
||||
Resource::create(MemoryType memType, CreateParams* params, bool heap)
|
||||
Resource::create(MemoryType memType, CreateParams* params)
|
||||
{
|
||||
bool calRes = false;
|
||||
gslMemObject gslResource = 0;
|
||||
@@ -382,7 +382,7 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
|
||||
}
|
||||
|
||||
// Force remote allocation if it was requested in the settings
|
||||
if (dev().settings().remoteAlloc_ && !heap &&
|
||||
if (dev().settings().remoteAlloc_ &&
|
||||
((memoryType() == Local) ||
|
||||
(memoryType() == Persistent))) {
|
||||
if (dev().settings().apuSystem_ && dev().settings().viPlus_) {
|
||||
@@ -515,7 +515,7 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
|
||||
if (memoryType() == Local) {
|
||||
cal_.type_ = Persistent;
|
||||
}
|
||||
else if (!heap && (memoryType() == Persistent)) {
|
||||
else if (memoryType() == Persistent) {
|
||||
cal_.type_ = RemoteUSWC;
|
||||
}
|
||||
// Remote cacheable to uncacheable
|
||||
@@ -553,11 +553,6 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
|
||||
reinterpret_cast<const char*>(address_) - tmpHost);
|
||||
|
||||
pinOffset_ = hostMemOffset & 0xff;
|
||||
//!@note GSL has a problem with the defines for flags and
|
||||
//! view creation, so check the restriction here
|
||||
if (!dev().heap()->isVirtual() && (pinOffset_ != 0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
pinAddress = tmpHost;
|
||||
// Align width to avoid GSL useless assert with a view
|
||||
@@ -629,20 +624,6 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
|
||||
calRes = true;
|
||||
}
|
||||
|
||||
// Check if it's a heap allocation
|
||||
if (!dev().heap()->isVirtual()) {
|
||||
if (viewOwner_ == &dev().globalMem()) {
|
||||
// Allocation directly from the heap
|
||||
hbOffset_ = static_cast<uint64_t>(view->offset_);
|
||||
}
|
||||
else {
|
||||
// Allocation from another memory object
|
||||
hbOffset_ = static_cast<uint64_t>(view->offset_) +
|
||||
viewOwner_->hbOffset();
|
||||
}
|
||||
hbSize_ = view->size_;
|
||||
}
|
||||
|
||||
if (viewOwner_->isMemoryType(Pinned)) {
|
||||
address_ = viewOwner_->data() + offset();
|
||||
}
|
||||
@@ -952,11 +933,9 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
|
||||
cal_.tiled_ = (GSL_MOA_TILING_LINEAR != tiling) &&
|
||||
(GSL_MOA_TILING_LINEAR_GENERAL != tiling);
|
||||
|
||||
// Get the heap block offset if it's a virtual heap
|
||||
if (dev().heap()->isVirtual()) {
|
||||
hbOffset_ = gslResource->getSurfaceAddress() -
|
||||
dev().heap()->baseAddress();
|
||||
}
|
||||
// Get the heap block offset
|
||||
hbOffset_ = gslResource->getSurfaceAddress() -
|
||||
dev().heap().baseAddress();
|
||||
hbSize_ = static_cast<uint64_t>(gslResource->getSurfaceSize());
|
||||
|
||||
if (!dev().settings().use64BitPtr_ &&
|
||||
@@ -1036,32 +1015,6 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
Resource::reallocate(CreateParams* params)
|
||||
{
|
||||
GslResourceReference* old;
|
||||
GslResourceReference* active;
|
||||
|
||||
old = gslRef_;
|
||||
if (!create(memoryType(), params)) {
|
||||
gslRef_ = old;
|
||||
return false;
|
||||
}
|
||||
// Get the new active resource
|
||||
active = gslRef_;
|
||||
gslRef_ = old;
|
||||
|
||||
dev().resCopy(old->gslResource(),
|
||||
active->gslResource(), CAL_MEMCOPY_SYNC);
|
||||
|
||||
// Free all old resources
|
||||
assert(renames_.size() == 0);
|
||||
free();
|
||||
|
||||
gslRef_ = active;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
Resource::free()
|
||||
{
|
||||
@@ -1813,10 +1766,8 @@ Resource::setActiveRename(VirtualGPU& gpu, GslResourceReference* rename)
|
||||
gslRef_ = rename;
|
||||
address_ = rename->cpuAddress_;
|
||||
|
||||
if (dev().heap()->isVirtual()) {
|
||||
hbOffset_ = rename->gslResource()->getSurfaceAddress() -
|
||||
dev().heap()->baseAddress();
|
||||
}
|
||||
hbOffset_ = rename->gslResource()->getSurfaceAddress() -
|
||||
dev().heap().baseAddress();
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user