/* GL_ARB_get_program_binary */
brw_program_binary_init(brw->screen->deviceID);
functions->GetProgramBinaryDriverSHA1 = brw_get_program_binary_driver_sha1;
- functions->ProgramBinarySerializeDriverBlob = brw_program_serialize_nir;
+ functions->ProgramBinarySerializeDriverBlob = brw_serialize_program_binary;
functions->ProgramBinaryDeserializeDriverBlob =
brw_deserialize_program_binary;
brw_program_binary_init(unsigned device_id);
extern void
brw_get_program_binary_driver_sha1(struct gl_context *ctx, uint8_t *sha1);
+void brw_serialize_program_binary(struct gl_context *ctx,
+ struct gl_shader_program *sh_prog,
+ struct gl_program *prog);
extern void
brw_deserialize_program_binary(struct gl_context *ctx,
struct gl_shader_program *shProg,
brw_program_deserialize_driver_blob(ctx, prog, prog->info.stage);
}
+void
+brw_serialize_program_binary(struct gl_context *ctx,
+ struct gl_shader_program *sh_prog,
+ struct gl_program *prog)
+{
+ brw_program_serialize_nir(ctx, prog);
+}
+
void
brw_write_blob_program_data(struct blob *binary, gl_shader_stage stage,
const void *program,
void (*GetProgramBinaryDriverSHA1)(struct gl_context *ctx, uint8_t *sha1);
void (*ProgramBinarySerializeDriverBlob)(struct gl_context *ctx,
+ struct gl_shader_program *shProg,
struct gl_program *prog);
void (*ProgramBinaryDeserializeDriverBlob)(struct gl_context *ctx,
for (unsigned stage = 0; stage < MESA_SHADER_STAGES; stage++) {
struct gl_linked_shader *shader = sh_prog->_LinkedShaders[stage];
if (shader)
- ctx->Driver.ProgramBinarySerializeDriverBlob(ctx, shader->Program);
+ ctx->Driver.ProgramBinarySerializeDriverBlob(ctx, sh_prog,
+ shader->Program);
}
serialize_glsl_program(blob, ctx, sh_prog);
PIPE_SHADER_CAP_PREFERRED_IR);
if (preferred_ir == PIPE_SHADER_IR_NIR) {
functions->ShaderCacheSerializeDriverBlob = st_serialise_nir_program;
- functions->ProgramBinarySerializeDriverBlob = st_serialise_nir_program;
+ functions->ProgramBinarySerializeDriverBlob =
+ st_serialise_nir_program_binary;
functions->ProgramBinaryDeserializeDriverBlob =
st_deserialise_nir_program;
} else {
functions->ShaderCacheSerializeDriverBlob = st_serialise_tgsi_program;
- functions->ProgramBinarySerializeDriverBlob = st_serialise_tgsi_program;
+ functions->ProgramBinarySerializeDriverBlob =
+ st_serialise_tgsi_program_binary;
functions->ProgramBinaryDeserializeDriverBlob =
st_deserialise_tgsi_program;
}
st_serialise_ir_program(ctx, prog, false);
}
+void
+st_serialise_tgsi_program_binary(struct gl_context *ctx,
+ struct gl_shader_program *shProg,
+ struct gl_program *prog)
+{
+ st_serialise_ir_program(ctx, prog, false);
+}
+
void
st_deserialise_tgsi_program(struct gl_context *ctx,
struct gl_shader_program *shProg,
st_serialise_ir_program(ctx, prog, true);
}
+void
+st_serialise_nir_program_binary(struct gl_context *ctx,
+ struct gl_shader_program *shProg,
+ 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,
void
st_serialise_tgsi_program(struct gl_context *ctx, struct gl_program *prog);
+void
+st_serialise_tgsi_program_binary(struct gl_context *ctx,
+ struct gl_shader_program *shProg,
+ struct gl_program *prog);
+
void
st_deserialise_tgsi_program(struct gl_context *ctx,
struct gl_shader_program *shProg,
void
st_serialise_nir_program(struct gl_context *ctx, struct gl_program *prog);
+void
+st_serialise_nir_program_binary(struct gl_context *ctx,
+ struct gl_shader_program *shProg,
+ struct gl_program *prog);
+
void
st_deserialise_nir_program(struct gl_context *ctx,
struct gl_shader_program *shProg,