st/shader_cache: add st_{de}serialise_nir_program() helpers
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 13 Feb 2018 03:23:28 +0000 (14:23 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 14 Feb 2018 22:02:41 +0000 (09:02 +1100)
These will be used for NIR GL_ARB_get_program_binary support.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_shader_cache.c
src/mesa/state_tracker/st_shader_cache.h

index 8eccf7c9211454402f54b97d69dc71216c3d3f33..6ff404220aaff252cdb7d1f79e9ef010cae3af16 100644 (file)
@@ -408,3 +408,17 @@ st_deserialise_tgsi_program(struct gl_context *ctx,
 {
    st_deserialise_ir_program(ctx, shProg, prog, false);
 }
+
+void
+st_serialise_nir_program(struct gl_context *ctx, struct gl_program *prog)
+{
+   st_serialise_ir_program(ctx, prog, true);
+}
+
+void
+st_deserialise_nir_program(struct gl_context *ctx,
+                           struct gl_shader_program *shProg,
+                           struct gl_program *prog)
+{
+   st_deserialise_ir_program(ctx, shProg, prog, true);
+}
index 4457047e832c93637de33d7ae4805b464a6c91a2..132dac00c011d8869f98268913c55dd7f3fb8d9c 100644 (file)
@@ -43,6 +43,14 @@ st_deserialise_tgsi_program(struct gl_context *ctx,
                             struct gl_shader_program *shProg,
                             struct gl_program *prog);
 
+void
+st_serialise_nir_program(struct gl_context *ctx, struct gl_program *prog);
+
+void
+st_deserialise_nir_program(struct gl_context *ctx,
+                           struct gl_shader_program *shProg,
+                           struct gl_program *prog);
+
 bool
 st_load_ir_from_disk_cache(struct gl_context *ctx,
                            struct gl_shader_program *prog,