P4 to Git Change 1387401 by rili@rili-opencl-pal-stg on 2017/03/17 18:35:37

SWDEV-97489 - Initialize variable and fix incorrect code of checking if D3D function finish.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d10.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d11.cpp#21 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d9.cpp#31 edit


[ROCm/clr commit: 0b51901411]
This commit is contained in:
foreman
2017-03-17 18:44:15 -04:00
parent c671c916f9
commit c014d0372b
3 changed files with 8 additions and 8 deletions
@@ -646,8 +646,8 @@ void SyncD3D10Objects(std::vector<amd::Memory*>& memObjects)
return;
}
query->End();
BOOL data;
while(S_OK != query->GetData(&data, sizeof(BOOL), 0) && data != TRUE)
BOOL data = FALSE;
while(S_OK != query->GetData(&data, sizeof(BOOL), 0))
{
}
}
@@ -1004,19 +1004,19 @@ D3D11Object::copyOrigToShared()
// Any usage source can be read by GPU
pImmediateContext->CopySubresourceRegion(pD3D11Res_, 0, 0, 0, 0,
pD3D11ResOrig_, subRes_, NULL);
pImmediateContext->Release();
// Flush D3D queues and make sure D3D stuff is finished
{
ScopedLock sl(resLock_);//protect from multiple
ScopedLock sl(resLock_);//protect from multiple
pImmediateContext->Flush();
pImmediateContext->End(pQuery_);
BOOL data;
while(S_OK != pImmediateContext->GetData(pQuery_, &data, sizeof(BOOL), 0) && data != TRUE)
BOOL data = FALSE;
while(S_OK != pImmediateContext->GetData(pQuery_, &data, sizeof(BOOL), 0));
{
}
}
pImmediateContext->Release();
d3dDev->Release();
return true;
}
@@ -329,8 +329,8 @@ void SyncD3D9Objects(std::vector<amd::Memory*>& memObjects)
}
ScopedLock sl(d3d9Obj->getResLock());
query->Issue(D3DISSUE_END);
BOOL data;
while(S_OK != query->GetData(&data, sizeof(BOOL), D3DGETDATA_FLUSH) && data != TRUE)
BOOL data = FALSE;
while(S_OK != query->GetData(&data, sizeof(BOOL), D3DGETDATA_FLUSH))
{
}
}