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


[ROCm/clr commit: 0de4b2962c]
Ta zmiana jest zawarta w:
Alex Xie authored and AlexBin Xie committed 2021-03-31 11:17:56 -04:00
1 rodzic cf25ce9dc8
złożenie e0c4654f3e
Plik 1 zmieniony
+7 -9
+7 -9
Wyświetl plik
@@ -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) {