P4 to Git Change 1159286 by gandryey@gera-ubuntu14 on 2015/06/09 10:30:28

ECR #304775 - Mipmaps support
	- Fix clCopyImages failures under Linux. Unmap for READ was skipping the view destruction. Combine READ/WRITE map/unmap paths for mipmap textures

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#179 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#364 edit
Этот коммит содержится в:
foreman
2015-06-09 10:41:49 -04:00
родитель 7096244ea8
Коммит 2a6b6b1c23
2 изменённых файлов: 2 добавлений и 8 удалений
+1 -1
Просмотреть файл
@@ -615,13 +615,13 @@ Memory::saveMapInfo(
if (mapFlags & (CL_MAP_WRITE | CL_MAP_WRITE_INVALIDATE_REGION)) {
writeMapInfo_.origin_ = origin;
writeMapInfo_.region_ = region;
writeMapInfo_.baseMip_ = baseMip;
writeMapInfo_.entire_ = entire;
flags_ |= UnmapWrite;
}
if (mapFlags & CL_MAP_READ) {
flags_ |= UnmapRead;
}
writeMapInfo_.baseMip_ = baseMip;
}
Program::Program(amd::Device& device)
+1 -7
Просмотреть файл
@@ -1163,7 +1163,7 @@ VirtualGPU::submitMapMemory(amd::MapMemoryCommand& vcmd)
}
else {
// Validate if it's a view for a map of mip level
if (memory->isUnmapWrite() && (vcmd.memory().parent() != NULL)) {
if (vcmd.memory().parent() != NULL) {
amd::Image* amdImage = vcmd.memory().parent()->asImage();
if ((amdImage != NULL) && (amdImage->getMipLevels() > 1)) {
// Save map write info in the parent object
@@ -1203,7 +1203,6 @@ VirtualGPU::submitUnmapMemory(amd::UnmapMemoryCommand& vcmd)
// Check if image is a mipmap and assign a saved view
amd::Image* amdImage = owner->asImage();
if ((amdImage != NULL) && (amdImage->getMipLevels() > 1) &&
memory->isUnmapWrite() &&
(memory->writeMapInfo()->baseMip_ != NULL)) {
// Clear unmap flags from the parent image
memory->clearUnmapFlags();
@@ -1286,11 +1285,6 @@ VirtualGPU::submitUnmapMemory(amd::UnmapMemoryCommand& vcmd)
}
}
}
else if ((amdImage != NULL) && (amdImage->getMipLevels() > 1) &&
(!memory->isUnmapWrite())) {
// Release a view for a mipmap map
amdImage->release();
}
else {
LogError("Unhandled unmap!");
vcmd.setStatus(CL_INVALID_VALUE);