summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-01-06 12:50:43 -0700
committerBrian Paul <[email protected]>2014-01-06 13:37:00 -0700
commit3486f6f31b8cdb01e480cfbd8814c1e4222d26b0 (patch)
treedc45a8f11d2b08593ea8d6db5b16e0968756095a /src/mesa/main/get.c
parent7db56ddee07fb365832881e05205d98f281cea80 (diff)
mesa: implement missing glGet(GL_RGBA_SIGNED_COMPONENTS_EXT) query
This is part of the GL_EXT_packed_float extension. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=73096 Cc: 10.0 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 691380898b8..c45a8d156c3 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -327,6 +327,12 @@ static const int extra_EXT_framebuffer_sRGB_and_new_buffers[] = {
EXTRA_END
};
+static const int extra_EXT_packed_float[] = {
+ EXT(EXT_packed_float),
+ EXTRA_NEW_BUFFERS,
+ EXTRA_END
+};
+
static const int extra_EXT_texture_array_es3[] = {
EXT(EXT_texture_array),
EXTRA_API_ES3,
@@ -757,6 +763,22 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
ctx->Texture.Unit[unit].CurrentTex[d->offset]->Name;
break;
+ /* GL_EXT_packed_float */
+ case GL_RGBA_SIGNED_COMPONENTS_EXT:
+ {
+ /* Note: we only check the 0th color attachment. */
+ const struct gl_renderbuffer *rb =
+ ctx->DrawBuffer->_ColorDrawBuffers[0];
+ const GLboolean is_signed =
+ rb ? _mesa_is_format_signed(rb->Format) : GL_FALSE;
+ /* At this time, all color channels have same signedness */
+ v->value_int_4[0] =
+ v->value_int_4[1] =
+ v->value_int_4[2] =
+ v->value_int_4[3] = is_signed;
+ }
+ break;
+
/* GL_ARB_vertex_buffer_object */
case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB: