P4 to Git Change 2053377 by gandryey@gera-win10 on 2020/01/07 17:55:38
SWDEV-218016 - There is a bug in the OCL/DX interop - Initialize event query value to FALSE and correct the loop condition to make sure query waits for the end. http://ocltc.amd.com/reviews/r/18447/ Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d10.cpp#18 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_d3d11.cpp#28 edit
This commit is contained in:
@@ -1367,8 +1367,8 @@ bool D3D10Object::copyOrigToShared() {
|
||||
// Flush D3D queues and make sure D3D stuff is finished
|
||||
d3dDev->Flush();
|
||||
pQuery_->End();
|
||||
BOOL data;
|
||||
while (S_OK != pQuery_->GetData(&data, sizeof(BOOL), 0) && data != TRUE) {
|
||||
BOOL data = FALSE;
|
||||
while ((S_OK != pQuery_->GetData(&data, sizeof(BOOL), 0)) || (data != TRUE)) {
|
||||
}
|
||||
|
||||
d3dDev->Release();
|
||||
|
||||
@@ -916,9 +916,8 @@ bool D3D11Object::copyOrigToShared() {
|
||||
pImmediateContext->Flush();
|
||||
pImmediateContext->End(pQuery_);
|
||||
BOOL data = FALSE;
|
||||
while (S_OK != pImmediateContext->GetData(pQuery_, &data, sizeof(BOOL), 0))
|
||||
;
|
||||
{}
|
||||
while (S_OK != pImmediateContext->GetData(pQuery_, &data, sizeof(BOOL), 0)) {
|
||||
}
|
||||
}
|
||||
|
||||
pImmediateContext->Release();
|
||||
@@ -1032,8 +1031,8 @@ void SyncD3D11Objects(std::vector<amd::Memory*>& memObjects) {
|
||||
{
|
||||
ScopedLock sl(d3dObj->getResLock());
|
||||
pImmediateContext->End(query);
|
||||
BOOL data;
|
||||
while (S_OK != pImmediateContext->GetData(query, &data, sizeof(BOOL), 0) && data != TRUE) {
|
||||
BOOL data = FALSE;
|
||||
while ((S_OK != pImmediateContext->GetData(query, &data, sizeof(BOOL), 0)) || (data != TRUE)) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user