Skip to content

Commit df915aa

Browse files
committed
Added a hack for fixing a strange windows issue with the CL-GL interoperability which hangs
1 parent d5f0d84 commit df915aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

source/FAST/Data/Image.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,13 @@ OpenGLTextureAccess::pointer Image::getOpenGLTextureAccess(accessType type, Open
15431543
std::vector<cl::Memory> v;
15441544
v.push_back(imageGL);
15451545
device->getCommandQueue().enqueueAcquireGLObjects(&v);
1546+
#ifdef WIN32
1547+
// This hack fixes a strange bug on some windows machines with the NVIDIA CL platform
1548+
// where without this finish statement, the program just hangs after the next line
1549+
if(device->getPlatformVendor() == PLATFORM_VENDOR_NVIDIA) {
1550+
device->getCommandQueue().finish();
1551+
}
1552+
#endif
15461553
device->getCommandQueue().enqueueCopyImage(*access->get(), imageGL, createOrigoRegion(), createOrigoRegion(), createRegion(getSize()));
15471554
device->getCommandQueue().enqueueReleaseGLObjects(&v);
15481555
doCPUtransfer = false;

0 commit comments

Comments
 (0)