mesa: create _mesa_attach_renderbuffer_without_ref() helper
authorTimothy Arceri <tarceri@itsqueeze.com>
Sat, 8 Apr 2017 00:03:20 +0000 (10:03 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 10 Apr 2017 00:55:34 +0000 (10:55 +1000)
commit074a485d35e75f514bf4d5c300442c2c4b4979ba
tree5bda218b12f8dc8b27a8bd2a55439657cb9e9e66
parent89253d5c676dc630ac83c5e03d39236825134049
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 <emil.velikov@collabora.com>
Tested-by: Bartosz Tomczyk <bartosz.tomczyk86@gmail.com>
src/mesa/main/renderbuffer.c
src/mesa/main/renderbuffer.h