P4 to Git Change 1128279 by gandryey@gera-w8 on 2015/03/06 12:37:59

ECR #304775 - Mip levels implementation
	- Initial change. Update the runtime interfaces to allow a mipmap allocation.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#74 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#240 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpublit.cpp#113 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#499 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#138 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#119 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.hpp#47 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#210 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.hpp#79 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#305 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#110 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#118 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#89 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#225 edit
Esse commit está contido em:
foreman committed 2015-03-06 13:13:39 -05:00
1 pai 1976010ccd
commit ae9e6d1a92
12 files changed
+112 -89

No files matched your search

+11 -14
Ver Arquivo
@@ -276,13 +276,12 @@ Device::Engines::getRequested(uint engines, gslEngineDescriptor* desc) const
Device::XferBuffers::~XferBuffers()
{
// Destroy temporary buffer for reads
for (std::list<Resource*>::const_iterator i = freeBuffers_.begin();
i != freeBuffers_.end(); ++i) {
for (const auto& buf : freeBuffers_) {
// CPU optimization: unmap staging buffer just once
if (!(*i)->cal()->cardMemory_) {
(*i)->unmap(NULL);
if (!buf->cal()->cardMemory_) {
buf->unmap(NULL);
}
delete (*i);
delete buf;
}
freeBuffers_.clear();
}
@@ -1748,7 +1747,8 @@ Device::createImage(amd::Memory& owner, bool directAccess) const
image.getDepth(),
format.type_,
format.channelOrder_,
image.getType());
image.getType(),
image.getMipLevels());
// Create resource
if (NULL != gpuImage) {
@@ -2001,7 +2001,8 @@ Device::createView(amd::Memory& owner, const device::Memory& parent) const
image.getDepth(),
format.type_,
format.channelOrder_,
image.getType());
image.getType(),
image.getMipLevels());
// Create resource
if (NULL != gpuImage) {
@@ -2223,13 +2224,11 @@ Device::removeVACache(const Memory* memory) const
void* end = reinterpret_cast<address>(start) + memory->owner()->getSize();
// Find VA cache entry for the specified memory
std::list<VACacheEntry*>::const_iterator it;
for (it = vaCacheList_->begin(); it != vaCacheList_->end(); ++it) {
VACacheEntry* entry = *it;
for (const auto& entry : *vaCacheList_) {
if (entry->startAddress_ == start) {
CondLog((entry->endAddress_ != end), "Incorrect VA range");
vaCacheList_->remove(entry);
delete entry;
vaCacheList_->remove(entry);
break;
}
}
@@ -2241,9 +2240,7 @@ Device::findMemoryFromVA(const void* ptr, size_t* offset) const
{
// VA cache access must be serialised
amd::ScopedLock lk(*vaCacheAccess_);
std::list<VACacheEntry*>::const_iterator it;
for (it = vaCacheList_->begin(); it != vaCacheList_->end(); ++it) {
VACacheEntry* entry = *it;
for (const auto& entry : *vaCacheList_) {
if ((entry->startAddress_ <= ptr) && (entry->endAddress_ > ptr)) {
*offset = static_cast<size_t>(reinterpret_cast<const char*>(ptr) -
reinterpret_cast<char*>(entry->startAddress_));