Skip to content

mesa: validate texture format against GL/ES ctx

GL_ALPHA, GL_LUMINANCE and GL_LUMINANCE_ALPHA texture formats are supported in:

  1. GL Compatibility spec
  2. GLES 1.0 - GLES 3.2 spec

However, these formats are not supported in:

  1. GL Core spec

This patch changes a logic of validation texture formats in calls like glTexImage2D.

If the context is CORE and these formats were selected, then return "-1" and in upper layer return GL_INVALID_ENUM.

If the context is not CORE, return appropriate format.

Edited by Maksym Wezdecki

Merge request reports