The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

jimvaughn (4) [Avatar] Offline
#1
You need to determine the correct OpenCL device for the OpenGL context. If not you cannot guarantee your code will execute if the user has more than one device such as a multi GPU setup or on a laptop with switchable graphics from the same vendor. I hope you will cover this as it is a stumbling block for some many who are starting out.

For both Nvidia and AMD it seems to work fine if you specify the device NOT connected to the display but it is actually doing a transparent "GPU1 to host" copy and then a "host to GPU2" copy. I realize AMD and Nvidia are trying to help the programmer but this should fail or at least provide some notification that it really isn't sharing buffers. Most importantly I hope you get a chance to represent this as non of the other OpenCL books cover it.

P.S. Your book is really good!
jimvaughn (4) [Avatar] Offline
#2
Re: Chapter 15 - Selecting first device is not appropriate or CLGL Interop
You already have the code to do this check in 15.2.2 but you don't have it in the examples. Also your description of the CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR seems to not described what is actually being returned here. To be fair the description on the OpenCL 1.1 spec is pretty poor and non-specific about this parameter and you have to read the entire section and infer the correct information between multiple statements.