Negotiate shared CL/GL context.
Properly unref queries.