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
This commit is contained in:
foreman
2015-06-09 10:41:49 -04:00
szülő 7096244ea8
commit 2a6b6b1c23
2 fájl változott, egészen pontosan 2 új sor hozzáadva és 8 régi sor törölve
@@ -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);