This affect virtually *all* targets so I would need to put this
everywhere, which I'm not. I am putting this only for the most often
used (and thus most problematic) dependencies, which is SDL and GLFW.
Fails. Problem spotted on WebGL 2 and is an unfortunate consequence of
these events:
1. Neither EXT_DSA nor ARB_DSA is available, but VAOs are available,
which means virtually all ES 3 and WebGL 2 implementations and also
ES 2 / WebGL 1 with OES_VAO available.
2. Index buffer gets created with TargetHint::ElementArray, bound to
GL_ELEMENT_ARRAY_BUFFER and filled with data.
3. Mesh object with VAO inside is created and the index buffer from
above gets bound to GL_ELEMENT_ARRAY_BUFFER again to attach it to the
VAO.
4. Another index buffer, possibly for another mesh, gets created with
TargetHint::ElementArray and bound to GL_ELEMENT_ARRAY_BUFFER in
order to be filled with data. But because the VAO from above is still
bound, the index buffer attachment is then stomped on.
5. Rendering such mesh will use a different index buffer, most probably
causing some out-of-range GL error and nothing rendered.
* SDL2 is now a system package, no need to build it manually
* GLFW needs a bunch of new dependencies
* Android needs to use 12.04 and so we download proper CMake manually
(the one from kubuntu-backports doesn't work yet)
* Enabled ES3 build on Linux as all the symbols are now there
SVGA3D has broken handling of glTex[ture][Sub]Image*D() for 1D arrays,
2D arrays, 3D textures and cube map textures where it uploads just the
first slice in the last dimension. This is only with copies from host
memory, not with buffer images. Seems to be fixed in Mesa 13, but I have
no such system to verify that on. Relevant commit in the Mesa sources:
2aa9ff0cda
This is one of the uglier workarounds -- I had to reintroduce multiple
code paths for glTexImage() which were removed when implementing ARB_DSA
and the workaround consists of basically a bunch of functions that are
slicing the image and calling the original implementations with each
slice.
For some reason a buffer *allocated* with this function caused
Mesh::draw() to draw nothing. I gave up on investigating the root cause
-- using non-DSA glBufferData() "just works", so in case of this driver
the "svga3d-broken-dsa-bufferdata" workaround uses the non-DSA code
path.