With mDebugMode=1 on DEBUG builds, we assert that the desired rendering context is current. On WinXP, this is failing consistently on a fFlush call. Relevant try run: https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=00e70ccf9e37 Log excerpt: Initializing context 106BF1E0 surface 114FCE80 on display 0B5A8078 --- WebGL context created: 0B734B70 Fatal: mozilla::gl::GLContext::fFlush called on non-current context 0B752F58. The current context for this thread is 0B734B70. ###!!! ABORT: file e:\builds\moz2_slave\try-w32-dbg\build\obj-firefox\dist\include\GLContext.h, line 1163 WARNING: shutting down early because of crash!: file e:/builds/moz2_slave/try-w32-dbg/build/dom/plugins/ipc/PluginModuleChild.cpp, line 712 WARNING: plugin process _exit()ing: file e:/builds/moz2_slave/try-w32-dbg/build/dom/plugins/ipc/PluginModuleChild.cpp, line 704 NPP_Destroy NPP_Destroy NPP_Destroy nsStringStats => mAllocCount: 88 => mReallocCount: 1 => mFreeCount: 24 -- LEAKED 64 !!! => mShareCount: 125 => mAdoptCount: 0 => mAdoptFreeCount: 0 TEST-UNEXPECTED-FAIL | /tests/content/canvas/test/webgl/test_webgl_conformance_test_suite.html | Exited with code 253 during test run INFO | automation.py | Application ran for: 0:12:54 INFO | automation.py | Reading PID log: c:\docume~1\cltbld\locals~1\temp\tmpkehwdipidlog ==> process 1320 launched child process 3364 INFO | automation.py | Checking for orphan process with PID: 3364 PROCESS-CRASH | /tests/content/canvas/test/webgl/test_webgl_conformance_test_suite.html | application crashed (minidump found)
The problem is also replicable on win7 using d3d9 layers.
Unsurprisingly, given the near-identical code, d3d10 has this problem when not using a shared texture. (Shared texture path preempts the unsafe call to fFlush)
Created attachment 565275 [details] [diff] [review] Adds MakeCurrent call before unchecked calls to fFlush This should fix the problem on d3d9 and d3d10. I will check the OGL layers, just to be sure.
OGL layer manager calls a GLContext call which calls MakeCurrent.
Comment on attachment 565275 [details] [diff] [review] Adds MakeCurrent call before unchecked calls to fFlush jgilbert++ MOZ_GL_DEBUG++