From 8b7c5744791fe403375dd1d61c4a99b882044415 Mon Sep 17 00:00:00 2001 From: Andres Rodriguez Date: Wed, 12 Jul 2017 18:45:07 -0400 Subject: mesa: add support for memory object creation/import/delete Used by EXT_external_objects and EXT_external_objects_fd V2 (Timothy Arceri): - Throw GL_OUT_OF_MEMORY error if CreateMemoryObjectsEXT() fails. - C99 tidy ups - remove void cast (Constantine Kharlamov) V3 (Timothy Arceri): - rename mo -> memObj - check that the object is not NULL before initializing - add missing "EXT" in function error message V4 (Timothy Arceri): - remove checks for (memory objecy id == 0) and catch in _mesa_lookup_memory_object() instead. Signed-off-by: Andres Rodriguez Reviewed-by: Samuel Pitoiset --- src/mesa/drivers/common/driverfuncs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/drivers/common') diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index 5008ae8feaf..ddb4bb6d6a1 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -49,6 +49,7 @@ #include "main/syncobj.h" #include "main/barrier.h" #include "main/transformfeedback.h" +#include "main/externalobjects.h" #include "program/program.h" #include "tnl/tnl.h" @@ -166,6 +167,9 @@ _mesa_init_driver_functions(struct dd_function_table *driver) _mesa_init_sync_object_functions(driver); + /* memory objects */ + _mesa_init_memory_object_functions(driver); + driver->NewFramebuffer = _mesa_new_framebuffer; driver->NewRenderbuffer = _swrast_new_soft_renderbuffer; driver->MapRenderbuffer = _swrast_map_soft_renderbuffer; -- cgit v1.2.3