continue;
struct gl_program *prog = shader->Program;
- struct blob writer;
- blob_init(&writer);
- nir_serialize(&writer, prog->nir);
- prog->driver_cache_blob = ralloc_size(NULL, writer.size);
- memcpy(prog->driver_cache_blob, writer.data, writer.size);
- prog->driver_cache_blob_size = writer.size;
+ brw_program_serialize_nir(ctx, prog);
}
}
return next_binding_table_offset;
}
+void
+brw_program_serialize_nir(struct gl_context *ctx, struct gl_program *prog)
+{
+ struct blob writer;
+ blob_init(&writer);
+ nir_serialize(&writer, prog->nir);
+ prog->driver_cache_blob = ralloc_size(NULL, writer.size);
+ memcpy(prog->driver_cache_blob, writer.data, writer.size);
+ prog->driver_cache_blob_size = writer.size;
+}
+
void
brw_program_deserialize_nir(struct gl_context *ctx, struct gl_program *prog,
gl_shader_stage stage)
struct brw_stage_prog_data *stage_prog_data,
uint32_t next_binding_table_offset);
+void
+brw_program_serialize_nir(struct gl_context *ctx, struct gl_program *prog);
void
brw_program_deserialize_nir(struct gl_context *ctx, struct gl_program *prog,
gl_shader_stage stage);