P4 to Git Change 1102328 by gandryey@gera-dev-w7 on 2014/12/03 18:56:06

EPR #410736 - [CQE OCL][ISV][QR][G] FFMPEG app generating corrupted video output; Faulty CL:1101352
	- Add detection for AHP allocation.
	 FFmpeg uses AHP allocations with CL_MAP_READ flag, but actually performs CPU write into the buffer. With indirect map runtime executes useless transfer on map and doesn't write updated memory on unmap, because a wrong flag sent by the app.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#113 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.hpp#44 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#341 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/perf/TestList.cpp#40 edit
This commit is contained in:
foreman
2014-12-03 19:02:40 -05:00
parent 750e1bf9bd
commit f9f5df731e
3 changed files with 13 additions and 8 deletions
+2 -2
View File
@@ -923,7 +923,7 @@ Memory::allocMapTarget(
// If host memory exists, use it
if ((owner()->getHostMem() != NULL) &&
(isCacheable() || !isHostMemDirectAccess() || !(mapFlags & CL_MAP_READ))) {
isDirectMap(mapFlags)) {
mapAddress = reinterpret_cast<address>(owner()->getHostMem());
}
// If resource is a persistent allocation, we can use it directly
@@ -1249,7 +1249,7 @@ Image::allocMapTarget(
// If host memory exists, use it
if ((owner()->getHostMem() != NULL) &&
(isCacheable() || !isHostMemDirectAccess() || !(mapFlags & CL_MAP_READ))) {
isDirectMap(mapFlags)) {
useRemoteResource = false;
mapAddress = reinterpret_cast<address>(owner()->getHostMem());
amd::Image* amdImage = owner()->asImage();