summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/renderbuffer.h
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-04-08 10:03:20 +1000
committerTimothy Arceri <[email protected]>2017-04-10 10:55:34 +1000
commit074a485d35e75f514bf4d5c300442c2c4b4979ba (patch)
tree5bda218b12f8dc8b27a8bd2a55439657cb9e9e66 /src/mesa/main/renderbuffer.h
parent89253d5c676dc630ac83c5e03d39236825134049 (diff)
mesa: create _mesa_attach_renderbuffer_without_ref() helper
This will be used to take ownership of freashly created renderbuffers, avoiding the need to call the reference function which requires locking. V2: dereference any existing fb attachments and actually attach the new rb. v3: split out validation and attachment type/complete setting into a shared static function. Reviewed-by: Emil Velikov <[email protected]> Tested-by: Bartosz Tomczyk <[email protected]>
Diffstat (limited to 'src/mesa/main/renderbuffer.h')
-rw-r--r--src/mesa/main/renderbuffer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/renderbuffer.h b/src/mesa/main/renderbuffer.h
index aa83120c1e4..a6f14394982 100644
--- a/src/mesa/main/renderbuffer.h
+++ b/src/mesa/main/renderbuffer.h
@@ -47,6 +47,11 @@ extern void
_mesa_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb);
extern void
+_mesa_add_renderbuffer_without_ref(struct gl_framebuffer *fb,
+ gl_buffer_index bufferName,
+ struct gl_renderbuffer *rb);
+
+extern void
_mesa_add_renderbuffer(struct gl_framebuffer *fb,
gl_buffer_index bufferName, struct gl_renderbuffer *rb);