SWDEV-268914 - Linux, AMF, tests fail to scale images down

This is part 2 of the change. This is for PAL backend.
The parent buffer sometimes has newer data than the sub buffer or image.
We always need to copy the data into copybuffer in pitch workaround.

Tests:
clinfo
Conformance tests: all images test, info, API, basic.
Internal runtime tests

Change-Id: I97d876ac75b240e69b48244be4c9e522db24f8ac
Этот коммит содержится в:
Alex Xie
2021-03-28 21:55:11 -04:00
коммит произвёл AlexBin Xie
родитель 925da60e88
Коммит 0de4b2962c
+7 -9
Просмотреть файл
@@ -1249,15 +1249,13 @@ void VirtualGPU::submitReadMemory(amd::ReadMemoryCommand& vcmd) {
// Check if synchronization has to be performed
if (nullptr != imageBuffer->CopyImageBuffer()) {
memory = imageBuffer->CopyImageBuffer();
if (nullptr == imageBuffer->owner()->getLastWriter()) {
Memory* buffer = dev().getGpuMemory(imageBuffer->owner()->parent());
amd::Image* image = imageBuffer->owner()->asImage();
amd::Coord3D offs(0);
// Copy memory from the original image buffer into the backing store image
result = blitMgr().copyBufferToImage(*buffer, *imageBuffer->CopyImageBuffer(), offs,
offs, image->getRegion(), true,
image->getRowPitch(), image->getSlicePitch());
}
Memory* buffer = dev().getGpuMemory(imageBuffer->owner()->parent());
amd::Image* image = imageBuffer->owner()->asImage();
amd::Coord3D offs(0);
// Copy memory from the original image buffer into the backing store image
result = blitMgr().copyBufferToImage(*buffer, *imageBuffer->CopyImageBuffer(), offs,
offs, image->getRegion(), true,
image->getRowPitch(), image->getSlicePitch());
}
}
if (hostMemory != nullptr) {