P4 to Git Change 1133818 by gandryey@gera-w8 on 2015/03/24 11:30:12
ECR #304775 - Mipmaps support in OCL - Add support for clEnqueueMapImage/Unmap functionality Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#76 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#175 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#241 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#503 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#140 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#120 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#212 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#356 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.cpp#89 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.hpp#46 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#27 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#13 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.hpp#14 edit
This commit is contained in:
@@ -269,9 +269,6 @@ Device::isAncestor(const Device* sub) const
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool Device::IsHsaCapableDevice() {
|
||||
static bool init = false;
|
||||
typedef std::vector<std::string> ListType;
|
||||
@@ -506,6 +503,26 @@ Device::getExtensionString()
|
||||
return result;
|
||||
}
|
||||
|
||||
void*
|
||||
Device::allocMapTarget(
|
||||
amd::Memory& mem,
|
||||
const amd::Coord3D& origin,
|
||||
const amd::Coord3D& region,
|
||||
uint mapFlags,
|
||||
size_t* rowPitch,
|
||||
size_t* slicePitch)
|
||||
{
|
||||
// Translate memory references
|
||||
device::Memory* devMem = mem.getDeviceMemory(*this);
|
||||
if (devMem == NULL) {
|
||||
LogError("allocMapTarget failed. Can't allocate video memory");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Pass request over to memory
|
||||
return devMem->allocMapTarget(origin, region, mapFlags, rowPitch, slicePitch);
|
||||
}
|
||||
|
||||
} // namespace amd
|
||||
|
||||
namespace device {
|
||||
@@ -577,11 +594,13 @@ Memory::saveMapInfo(
|
||||
const amd::Coord3D origin,
|
||||
const amd::Coord3D region,
|
||||
uint mapFlags,
|
||||
bool entire)
|
||||
bool entire,
|
||||
amd::Image* baseMip)
|
||||
{
|
||||
if (mapFlags & (CL_MAP_WRITE | CL_MAP_WRITE_INVALIDATE_REGION)) {
|
||||
writeMapInfo_.origin_ = origin;
|
||||
writeMapInfo_.region_ = region;
|
||||
writeMapInfo_.baseMip_ = baseMip;
|
||||
writeMapInfo_.entire_ = entire;
|
||||
flags_ |= UnmapWrite;
|
||||
}
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user