[Mesa-dev] Required-for-rendering internal formats

Ilia Mirkin imirkin at alum.mit.edu
Wed Sep 7 15:43:35 UTC 2016


Hello,

Is there a concept in OpenGL that certain internal formats *must* be
supported for rendering? An issue we're running into is that NVIDIA
hardware supports sampling from RGBA4 textures, but does not support
that as a render format. So if you create a tex image with GL_RGBA4,
we use that as the TexFormat, since we can sample from it. However
then attaching the image to a fbo makes that fbo incomplete.

At least one application isn't ready to handle that situation. Is the
application wrong, or must we support GL_RGBA4 as a renderable texture
attachment format, thus meaning that we should never actually make use
of the hw's RGBA4 sampling capabilities (since we never know if a
texture will later be used for rendering)?

The spec is a bit unclear about this. Table 8.12 of the GL 4.5 core
spec marks GL_RGBA4 as "required renderable", but I think that only
affects renderbuffers (which st/mesa handles properly by falling back
to RGBA8 when the requested format is not renderable).

Any advice welcome.

Cheers,

  -ilia


More information about the mesa-dev mailing list