summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorAlejandro Piñeiro <[email protected]>2017-01-17 18:06:36 -0200
committerAlejandro Piñeiro <[email protected]>2017-02-06 08:50:21 +0100
commit0cd2a4737eb189fb37ff53c7583c8e4aa2d5a630 (patch)
tree6409b24e8cf23f2fb6221e5e5b2e55e507f5f158 /src/mesa/main/get.c
parent106a51440d018031b94c91758eecc7424a3bb5ee (diff)
main/framebuffer: refactor _mesa_get_color_read_format/type
Current implementation returns the value for the currently bound read framebuffer. GetNamedFramebufferParameteriv allows to get it for any given framebuffer. GetFramebufferParameteriv would be also interested on that method It was refactored by allowing to pass a given framebuffer. If NULL is passed, it used the currently bound framebuffer. It also adds a call to _mesa_update_state. When used only by GetIntegerv, this one was called as part of the extra checks defined at get_hash. But now that the method is used by more methods, and the update is needed, it makes sense (and it is safer) just calling it on the method itself, instead of rely on the caller. Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index f0bb041fc38..397f4a3547e 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -787,10 +787,10 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
break;
case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
- v->value_int = _mesa_get_color_read_type(ctx);
+ v->value_int = _mesa_get_color_read_type(ctx, NULL, "glGetIntegerv");
break;
case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
- v->value_int = _mesa_get_color_read_format(ctx);
+ v->value_int = _mesa_get_color_read_format(ctx, NULL, "glGetIntegerv");
break;
case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: