st/glsl_to_tgsi: add st_get_program_binary_driver_sha1() helper
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 28 Nov 2017 11:28:31 +0000 (22:28 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 17 Jan 2018 12:43:28 +0000 (23:43 +1100)
This will be used by ARB_get_program_binary.

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_shader_cache.c
src/mesa/state_tracker/st_shader_cache.h

index 62d62f761177294d5d661ec052f80c06d44915e0..a971b0d7ee73328e54c7f68db0606126780bc046 100644 (file)
 #include "program/ir_to_mesa.h"
 #include "util/u_memory.h"
 
+void
+st_get_program_binary_driver_sha1(struct gl_context *ctx, uint8_t *sha1)
+{
+   disk_cache_compute_key(ctx->Cache, NULL, 0, sha1);
+}
+
 static void
 write_stream_out_to_cache(struct blob *blob,
                           struct pipe_shader_state *tgsi)
index 358c6ecef88546c3c4639abb9fa34159c05ab7fd..488035c7ed54ecba7140378d93963632f5b68aec 100644 (file)
@@ -32,6 +32,9 @@
 extern "C" {
 #endif
 
+void
+st_get_program_binary_driver_sha1(struct gl_context *ctx, uint8_t *sha1);
+
 void
 st_serialise_tgsi_program(struct gl_context *ctx, struct gl_program *prog);