for (unsigned i = 0; i < 2; i++)
draw->default_inner_tess_level[i] = default_inner_level[i];
}
+
+void
+draw_set_disk_cache_callbacks(struct draw_context *draw,
+ void *data_cookie,
+ void (*find_shader)(void *cookie,
+ struct lp_cached_code *cache,
+ unsigned char ir_sha1_cache_key[20]),
+ void (*insert_shader)(void *cookie,
+ struct lp_cached_code *cache,
+ unsigned char ir_sha1_cache_key[20]))
+{
+ draw->disk_cache_find_shader = find_shader;
+ draw->disk_cache_insert_shader = insert_shader;
+ draw->disk_cache_cookie = data_cookie;
+
+}
boolean
draw_get_option_use_llvm(void);
+struct lp_cached_code;
+void
+draw_set_disk_cache_callbacks(struct draw_context *draw,
+ void *data_cookie,
+ void (*find_shader)(void *cookie,
+ struct lp_cached_code *cache,
+ unsigned char ir_sha1_cache_key[20]),
+ void (*insert_shader)(void *cookie,
+ struct lp_cached_code *cache,
+ unsigned char ir_sha1_cache_key[20]));
#endif /* DRAW_CONTEXT_H */
struct draw_pt_front_end;
struct draw_assembler;
struct draw_llvm;
-
+struct lp_cached_code;
/**
* Represents the mapped vertex buffer.
struct draw_assembler *ia;
+ void *disk_cache_cookie;
+ void (*disk_cache_find_shader)(void *cookie,
+ struct lp_cached_code *cache,
+ unsigned char ir_sha1_cache_key[20]);
+ void (*disk_cache_insert_shader)(void *cookie,
+ struct lp_cached_code *cache,
+ unsigned char ir_sha1_cache_key[20]);
+
void *driver_private;
};