Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
struct blob metadata;
blob_init(&metadata);
+ if (ctx->Driver.ShaderCacheSerializeDriverBlob) {
+ for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
+ struct gl_linked_shader *sh = prog->_LinkedShaders[i];
+ if (sh)
+ ctx->Driver.ShaderCacheSerializeDriverBlob(ctx, sh->Program);
+ }
+ }
+
serialize_glsl_program(&metadata, ctx, prog);
struct cache_item_metadata cache_item_metadata;
struct gl_semaphore_object *semObj,
int fd);
/*@}*/
+
+ /**
+ * \name Disk shader cache functions
+ */
+ /*@{*/
+ /**
+ * Called to initialize gl_program::driver_cache_blob (and size) with a
+ * ralloc allocated buffer.
+ *
+ * This buffer will be saved and restored as part of the gl_program
+ * serialization and deserialization.
+ */
+ void (*ShaderCacheSerializeDriverBlob)(struct gl_context *ctx,
+ struct gl_program *prog);
+ /*@}*/
};