Is first context special? #430
Unanswered
sorenchr2011
asked this question in
Q&A
Replies: 2 comments 1 reply
-
It looks like the neither context is not set up to do GL interop. See here. Attempting interop from that context is not set up for interop is, at best, undefined behavior, IMO. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks - but sorry I don't understand that - isn't that what pycuda_context = pycuda.gl.make_context(dev, flags=0) should be doing? (in setup_cuda_context()) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have an issue when creating a second a pycuda context (GL enabled in my case).
Here's a minimal example - functions are at the bottom of the post.
I create OpenGL and pycuda contexts and transfer texture data using pycuda. This works as expected.
I then take down the pycuda context (pop), set up a new one and repeat the above - this fails with a segfault. Interestingly, if the variable of first pycuda context is still in scope (the one deactivated with .pop()), then the below works.
So it looks like the pycuda calls depend on the first context - why is this, what am I misunderstanding? Why can't I pop one context and start a new one?
Thanks!
Soren
using pycuda==2023.1
Beta Was this translation helpful? Give feedback.
All reactions