Closed pezcode closed 2 years ago
The macos-gles3 failure seems to be a broken interaction with MagnumDebugTools
and MagnumOpenGLTesterTestLib
. I've read the comments about the latter, but it's not entirely clear to me why MagnumDebugTools
breaks things.
Okay, seems we're at the cursed issues again. I'll take it from here :D
Ah yes, 2.0.18 doesn't die anymore, but I started hitting #507 now. Curses!
Investigating...
Ah well, and an attempted fix for the macOS global symbol mismatch, where I made MagnumDebugToolsTestLib
depend on MagnumGLTestLib
causes an ASan complaint due to duplicate symbols now appearing in different places. I suppose I just can't use DebugTools::bufferData()
in the GL library tests, then...
Oh dear, what have I done 🙊 sorry about this mess
All "good" for Emscripten now (see https://github.com/mosra/magnum/issues/507#issuecomment-1126975690 for details).
For the other problem, I managed to "fix" it so now it's not macOS or ASan complaining, but Linux tests failing due to asserts not being graceful anymore. I suppose this is the culprit, gotta fix that properly I guess.
Hm, reshuffled the library order once more and now it seems to work. Although it's a tower of brittle hacks and wishful thinking, hopefully not breaking again anytime soon.
Will merge once I implement the template-removal TODO as well. Tomorrow, enough suffering for a Sunday :skull:
Finally merged a subset of this as 500e41e4a87ae4cecb08afb089e5aea3fbcd887d...4350f1358ac1b6c6d806f3af8bb055923a2368c3, sorry for the extremely long delay. CircleCI macOS builds started also acting up in the meanwhile, further delaying everything.
I ended up deprecating the templated bufferData()
API in 0113b34852a42ce2a507dff6c8cd3dec11ccdf3d and then rebased your commits on top of that, as that order made more sense (and allowed me to reduce the deprecated code size quite a bit). Using DebugTools inside GL tests however proved to be too cursed, so I split that off into #565 for now. Will get back to fixing that later.
Thanks for your work!
This became a bit of a rabbit hole :eyes:
GL::Buffer::data()
andsubData()
are now supported on WebGL 2.0. This is exposed by Emscripten 2.0.17+ as aglGetBufferSubData()
convenience entrypoint. On older Emscripten versions,data()
/subData()
are callable but lead to an "unreachable" assert.DebugTools::bufferData()
andbufferSubData()
now forward toGL::Buffer::subData()
where available, which now makes it work on desktop GL without requiringARB_map_buffer_range
and on WebGL 2.0. Essentially everywhere except WebGL 1.0 and GLES 2.0 withoutEXT_map_buffer_range
DebugTools::bufferData()
. Technically they could also be verified on non-WebGL GLES 2.0 with the right extension, but I didn't feel like adding all the checks for thatTodos:
glGetBufferSubData()
, I probably messed up the Emscripten version checkDebugTools/BufferData.cpp
isn't being compiled, leading to missing symbols. Investigate.Mac GLES3 CI has mysteriouspostponed to #565GL::Context::current(): no current context
asserts in testsPost-merge todos for @mosra:
DebugTools::buffer[Sub]Data()
. Originally Buffer used the same API pattern, but it got deprecated and eventually dropped in ecc0ab6a59cf49d09212bd6f69ba58a3a21275d0 for being too error-prone. Time to do that here too.