P4 to Git Change 1069020 by gandryey@gera-ubuntu14 on 2014/08/21 16:54:48
EPR #404714 - [CQE OCL][2.0][DTB]Opencl1.2 WF Conf. Math test failedon Pitcairn and Oland due to CL#1065597 - Add VGPU lock to flush() method, because gsl flush for the same context could be called from multiple threads - Use new scratchAlloc_ monitor for scratch reallocation Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#455 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#130 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#331 edit
This commit is contained in:
@@ -365,6 +365,7 @@ Device::Device()
|
||||
, lockAsyncOps_(NULL)
|
||||
, lockAsyncOpsForInitHeap_(NULL)
|
||||
, vgpusAccess_(NULL)
|
||||
, scratchAlloc_(NULL)
|
||||
, xferRead_(NULL)
|
||||
, xferWrite_(NULL)
|
||||
, vaCacheAccess_(NULL)
|
||||
@@ -425,6 +426,7 @@ Device::~Device()
|
||||
delete lockAsyncOps_;
|
||||
delete lockAsyncOpsForInitHeap_;
|
||||
delete vgpusAccess_;
|
||||
delete scratchAlloc_;
|
||||
delete vaCacheAccess_;
|
||||
delete vaCacheList_;
|
||||
|
||||
@@ -793,6 +795,12 @@ Device::create(CALuint ordinal)
|
||||
if (NULL == vgpusAccess_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
scratchAlloc_ = new amd::Monitor("Scratch Allocation Lock", true);
|
||||
if (NULL == scratchAlloc_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
vaCacheAccess_ = new amd::Monitor("VA Cache Ops Lock", true);
|
||||
if (NULL == vaCacheAccess_) {
|
||||
return false;
|
||||
@@ -2283,7 +2291,7 @@ Device::allocScratch(uint regNum, const VirtualGPU* vgpu)
|
||||
{
|
||||
if (regNum > 0) {
|
||||
// Serialize the scratch buffer allocation code
|
||||
amd::ScopedLock lk(*lockAsyncOps_);
|
||||
amd::ScopedLock lk(*scratchAlloc_);
|
||||
uint sb = vgpu->hwRing();
|
||||
|
||||
// Check if the current buffer isn't big enough
|
||||
|
||||
Reference in New Issue
Block a user