P4 to Git Change 1102960 by gandryey@gera-dev-w7 on 2014/12/05 10:51:47

EPR #410824 - [CQE OCL][CZ][S/G][QR] Two Bolt sample failing on CPU; Faulty CL: 1101352
	- The test performs double maps with different map flags. Optimization could choose different map schemes for each call and memory coherency could be broken. Add extra conditions to detect multiple maps and use the same  path as the first map.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.hpp#45 edit
Cette révision appartient à :
foreman
2014-12-05 11:07:57 -05:00
Parent 3444e16d99
révision a1202e54be
+9 -2
Voir le fichier
@@ -205,8 +205,15 @@ public:
//! will cause a switch to indirect map for MAP_READ operations
bool isDirectMap(uint mapFlags)
{
return (isCacheable() || (owner()->getMemFlags() & CL_MEM_ALLOC_HOST_PTR) ||
!isHostMemDirectAccess() || !(mapFlags & CL_MAP_READ));
return (((isCacheable() || (owner()->getMemFlags() & CL_MEM_ALLOC_HOST_PTR) ||
!isHostMemDirectAccess() || !(mapFlags & CL_MAP_READ)) &&
// If map(indirect) memory isn't NULL,
// then it's a double map from the app with different map flags.
// If runtime will provide different regions,
// then it won't be able to guarantee coherency
(mapMemory_ == NULL)) ||
// Keep direct map always if the first map was direct already
((indirectMapCount_ > 1) && (mapMemory_ == NULL)));
}
protected: