summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/framebuffer.h
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/framebuffer.h
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/framebuffer.h')
-rw-r--r--src/mesa/main/framebuffer.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h
index 745c1dabf64..ee0690b068b 100644
--- a/src/mesa/main/framebuffer.h
+++ b/src/mesa/main/framebuffer.h
@@ -128,10 +128,14 @@ extern GLboolean
_mesa_dest_buffer_exists(struct gl_context *ctx, GLenum format);
extern GLenum
-_mesa_get_color_read_type(struct gl_context *ctx);
+_mesa_get_color_read_type(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ const char *caller);
extern GLenum
-_mesa_get_color_read_format(struct gl_context *ctx);
+_mesa_get_color_read_format(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ const char *caller);
extern struct gl_renderbuffer *
_mesa_get_read_renderbuffer_for_format(const struct gl_context *ctx,