mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
mesa/formatquery: Added COLOR_ENCODING <pname> query.
From the ARB_internalformat_query2 specification:
"- COLOR_ENCODING: The color encoding for the resource is returned in
<params>. Possible values for color buffers are LINEAR or SRGB,
for linear or sRGB-encoded color components, respectively. For non-color
formats (such as depth or stencil), or for unsupported resources,
the value NONE is returned."
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
b1755535ec
commit
e88cbb7a51
1 changed files with 7 additions and 1 deletions
|
|
@ -1099,7 +1099,13 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
|
|||
break;
|
||||
|
||||
case GL_COLOR_ENCODING:
|
||||
/* @TODO */
|
||||
if (!_mesa_is_color_format(internalformat))
|
||||
goto end;
|
||||
|
||||
if (_mesa_is_srgb_format(internalformat))
|
||||
buffer[0] = GL_SRGB;
|
||||
else
|
||||
buffer[0] = GL_LINEAR;
|
||||
break;
|
||||
|
||||
case GL_SRGB_READ:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue