So we've hit cases where WebGL entry points don't MakeCurrent themselves. Since GL is stateful in this respect, most of the time we don't notice. We would only notice if we interleaved a MakeCurrent on a different context right before a call that's missing its own MakeCurrent. There are two main approaches. Neither takes a very long time to make, but they're both fairly large patches to review. (boring, but not that complicated) We can either do this dynamically, at runtime, and ASSERT that our current scope has MadeCurrent. Or, we can do this statically, where we actually pass through a 'safe' GL object through our callstacks to all the inner functions that make GL calls. The static approach is more invasive, but is actually much easier from a maintenance standpoint, since errors are generally caught at compile-time. The dynamic approach is a little less invasive, but takes a long time to iterate through all the asserts we hit at runtime. Also, it is more likely to be missing paths, if they aren't exercised in the set of tests we run.
We added IsCurrent asserts a while back, and bug 1390386 is looking to implicitly call MakeCurrent, which eliminates this problem.
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.