Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualgravitino

Posted 25 July 2013 - 04:01 AM

I'd like to share a possible solution.

 

In my heavily concurrent application, I had the similar problems, though I had two possible error codes: ERROR_TRANSFORM_NOT_SUPPORTED or ERROR_INVALID_HANDLE, both appearing in an apparent in-deterministic manner, indicating a multithreading issue. I figured out that wglMakeCurrent ist *not* reentrant (at least when called on the same device context HDC, i didn't test the scenario when both, HDC and HGLRC, point to a different handle). By creating a spin-lock around wglMakeCurrent the problem disappeared for me.


#1gravitino

Posted 25 July 2013 - 04:00 AM

I'd like to share a possible solution.

 

In my heavily concurrent application, I had the similar problems, though I had two possible error codes: ERROR_TRANSFORM_NOT_SUPPORTED or ERROR_INVALID_HANDLE, both appearing in an apparent in-deterministic manner, indicating a multithreading issue. I figured out that wglMakeCurrent ist *not* reentrant (at least when called on the same device context HDC, i didn't test the scenario when both, HDC and HGLRC, point to a different handle). By creating a spin-lock around wglMakeCurrent the problem disappeared for me.

 


PARTNERS