Skip to content

meta-gl v0.4.2

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Nov 11:00

A patch release: every change is an addition or a bug fix, so code written against 0.4.0 or
0.4.1 still compiles. Its behavior changes in one case only: a typed glUniformMatrix call with
transpose = GL_TRUE no longer terminates. find_package(meta-gl 0.4) accepts this release, and
so does CNA's sibling check, which requires 0.4.1 or a later 0.4.x. The SONAME stays
libmeta-gl.so.0.

Added

  • GetParameter gains the glGet* pnames that OpenGL ES accepts but meta-gl could not express:
    the pixel-store state (PackAlignment, PackRowLength, PackSkipRows, PackSkipPixels,
    UnpackAlignment, UnpackRowLength, UnpackImageHeight, UnpackSkipRows,
    UnpackSkipPixels, UnpackSkipImages), the hints (GenerateMipmapHint,
    FragmentShaderDerivativeHint), the enable flags (Blend, CullFace, DepthTest, Dither,
    PolygonOffsetFill, ScissorTest, StencilTest, SampleAlphaToCoverage, SampleCoverage,
    RasterizerDiscard) and the ES 3.2 TextureBufferBinding and TextureBufferOffsetAlignment.
  • BufferTarget::TextureBuffer (ES 3.2 Table 6.1), so glBindBuffer(GL_TEXTURE_BUFFER, …) can
    be written.
  • TextureLevelParameter gains Samples and FixedSampleLocations (ES 3.1+, multisample
    textures, ES 3.2 §8.11.3) and BufferDataStoreBinding, BufferOffset and BufferSize
    (ES 3.2 buffer textures, Table 21.11). They existed only in TextureParameterQuery, which is
    for glGetTexParameter*, where the specification does not allow them. As a result, the correct
    glGetTexLevelParameter* query could not be written. TextureParameterQuery is unchanged.
  • DefaultFramebufferQueryAttachment (Back, Depth, Stencil) and a matching
    glGetFramebufferAttachmentParameteriv(FramebufferTarget, DefaultFramebufferQueryAttachment, FramebufferAttachmentParameter, GLint*) overload. While framebuffer 0 is bound, OpenGL ES
    requires BACK, DEPTH or STENCIL there (ES 3.0 §6.1.13, ES 3.2 §9.2.3). Neither
    FramebufferAttachment nor DefaultFramebufferAttachment holds those values (the latter's
    Color is valid only for invalidation), so the default framebuffer could not be queried. The
    overload is the one new exported symbol: 395 instead of 394.
  • to_string() in EnumNames.hpp names every new enumerator. It also gains overloads for
    DefaultFramebufferAttachment, which had none, and DefaultFramebufferQueryAttachment.

Fixed

  • The typed glUniformMatrix and glProgramUniformMatrix helpers (container and
    initializer_list overloads) terminated the program when transpose was GL_TRUE, enforcing
    the ES 2.0 rule on every context. OpenGL ES 3.0 and later accept GL_TRUE and read the data
    in row-major order (ES 3.0 §2.12.6.1, ES 3.2 §7.6.1). The helpers now pass transpose
    through, as the raw glUniformMatrix*fv wrappers already did; on an ES 2.0 context the driver
    reports INVALID_VALUE. The helpers are inline, so a consumer must be recompiled to get the
    fix.
  • The release-contract death tests never reached a contract check. Their loader returned the same
    no-op function for every name, so Initialize() failed. Every wrapper then terminated because
    meta-gl was uninitialized, whatever its arguments, so the tests passed while checking nothing.
    Each case now runs under an initialized mock OpenGL ES 3.2 context and is paired with a
    positive control: the same call with valid arguments must return and reach the driver stub.
    Only SIGABRT counts as a termination. With the element-count check disabled, all six
    element and matrix death tests now fail, as they should.

Changed

  • The Invalid Input Contract, in README.md and Functions.hpp, said that unsupported bitfields
    terminate the program. They never did: bitfield arguments are forwarded unchanged, and the
    driver reports an invalid bit as INVALID_VALUE, as OpenGL ES defines. The text now says so.
    It also names the two cases that do terminate and were not listed: an uninitialized context
    and a missing entry point.
  • The pull-request template asks contributors to confirm that they authored the change and that
    it contains no code generated by a large language model.

Verification

  • 11/11 CTest tests pass on a shared Release build with tests, examples, GPU (EGL surfaceless)
    tests and docs enabled, including API consistency (358 wrappers) and the exported-symbol
    policy (395 exports). The build is warning-free. Doxygen reports one warning, unchanged since
    0.4.0: DesktopEsTier.hpp links to plan.md, which is outside the documentation input.
  • CI passed on develop at 333d777. The release commit on top of it changes only the version
    files and docs/releasing.md.
  • Verified on Debian GNU/Linux 13 with GCC 14.2.0, CMake 3.31.6, Ninja 1.12.1 and Mesa EGL
    25.0.7. The Khronos GLES headers are vendored in third_party/Khronos, so the tag selects
    them; the EGL implementation is a system package used only by the optional GPU smoke test.