[Mesa-dev] [PATCH 11/23] mesa: add driver callbacks for serialising ProgramBinary blobs

Timothy Arceri tarceri at itsqueeze.com
Wed Nov 29 01:24:47 UTC 2017


---
 src/mesa/main/dd.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index da03b2e8b94..4e4d2a6f37d 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1119,20 +1119,37 @@ struct dd_function_table {
     * of fd after the call returns.
     *
     * Accessing fd after ImportMemoryObjectFd returns results in undefined
     * behaviour. This is consistent with EXT_external_object_fd.
     */
    void (*ImportMemoryObjectFd)(struct gl_context *ctx,
                                 struct gl_memory_object *memObj,
                                 GLuint64 size,
                                 int fd);
    /*@}*/
+
+   /**
+    * \name GL_ARB_get_program_binary
+    */
+   /*@{*/
+   /**
+    * Calls to retrieve/store a binary serialized copy of the current program.
+    */
+   void (*GetProgramBinaryDriverSHA1)(struct gl_context *ctx, uint8_t *sha1);
+
+   void (*ProgramBinarySerializeDriverBlob)(struct gl_context *ctx,
+                                            struct gl_program *prog);
+
+   void (*ProgramBinaryDeserializeDriverBlob)(struct gl_context *ctx,
+                                              struct gl_shader_program *shProg,
+                                              struct gl_program *prog);
+   /*@}*/
 };
 
 
 /**
  * Per-vertex functions.
  *
  * These are the functions which can appear between glBegin and glEnd.
  * Depending on whether we're inside or outside a glBegin/End pair
  * and whether we're in immediate mode or building a display list, these
  * functions behave differently.  This structure allows us to switch
-- 
2.14.3



More information about the mesa-dev mailing list