summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-02-13 14:23:28 +1100
committerTimothy Arceri <[email protected]>2018-02-15 09:02:41 +1100
commit928be4e97e0263272a6a2d628d27d3d69df2cd58 (patch)
treea7ab9310215a9f8ac5fbaf963fafacb788976e9e /src/mesa
parent3ad52501dc28a4286c97ed386419f7b617e093af (diff)
st/shader_cache: add st_{de}serialise_nir_program() helpers
These will be used for NIR GL_ARB_get_program_binary support. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_shader_cache.c14
-rw-r--r--src/mesa/state_tracker/st_shader_cache.h8
2 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_shader_cache.c b/src/mesa/state_tracker/st_shader_cache.c
index 8eccf7c9211..6ff404220aa 100644
--- a/src/mesa/state_tracker/st_shader_cache.c
+++ b/src/mesa/state_tracker/st_shader_cache.c
@@ -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);
+}
diff --git a/src/mesa/state_tracker/st_shader_cache.h b/src/mesa/state_tracker/st_shader_cache.h
index 4457047e832..132dac00c01 100644
--- a/src/mesa/state_tracker/st_shader_cache.h
+++ b/src/mesa/state_tracker/st_shader_cache.h
@@ -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,