summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dd.h
diff options
context:
space:
mode:
authorAndres Rodriguez <andresx7@gmail.com>2017-10-06 17:17:54 -0400
committerAndres Rodriguez <andresx7@gmail.com>2018-01-30 15:13:49 -0500
commit67d5d08682c4975a025182a7bf58a4768753e677 (patch)
treebfca34272dd4eee12b89e32dfedbe4169b8d1df7 /src/mesa/main/dd.h
parent8e635f7d65752cd5af362036fd50ff3957275510 (diff)
mesa: add support for semaphore object creation/import/delete v3
Used by EXT_semmaphore and EXT_semaphore_fd v2: Removed unnecessary dummy callback initialization v3: Fixed attempting to free the DummySemaphoreObject Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/mesa/main/dd.h')
-rw-r--r--src/mesa/main/dd.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 4fd4d864cd3..c80af0be074 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1133,6 +1133,40 @@ struct dd_function_table {
struct gl_shader_program *shProg,
struct gl_program *prog);
/*@}*/
+
+ /**
+ * \name GL_EXT_semaphore interface
+ */
+ /*@{*/
+ /**
+ * Called to allocate a new semaphore object. Drivers will usually
+ * allocate/return a subclass of gl_semaphore_object.
+ */
+ struct gl_semaphore_object * (*NewSemaphoreObject)(struct gl_context *ctx,
+ GLuint name);
+ /**
+ * Called to delete/free a semaphore object. Drivers should free the
+ * object and any associated resources.
+ */
+ void (*DeleteSemaphoreObject)(struct gl_context *ctx,
+ struct gl_semaphore_object *semObj);
+ /*@}*/
+
+ /**
+ * \name GL_EXT_semaphore_fd interface
+ */
+ /*@{*/
+ /**
+ * Called to import a semaphore object. The caller relinquishes ownership
+ * of fd after the call returns.
+ *
+ * Accessing fd after ImportSemaphoreFd returns results in undefined
+ * behaviour. This is consistent with EXT_semaphore_fd.
+ */
+ void (*ImportSemaphoreFd)(struct gl_context *ctx,
+ struct gl_semaphore_object *semObj,
+ int fd);
+ /*@}*/
};