main: Add driver cache blob fields to gl_program

These fields can be used to optionally save off a driver blob with the
program metadata. For example, serialized nir, or tgsi.

v3:
 * Rename serialized_nir* to driver_cache_blob*. (Tim)
 * Free memory. (Jason)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Jordan Justen
2017-10-13 13:00:23 -07:00
parent 54f691311c
commit 571bee96d5
2 changed files with 8 additions and 0 deletions

View File

@@ -279,6 +279,10 @@ _mesa_delete_program(struct gl_context *ctx, struct gl_program *prog)
ralloc_free(prog->sh.BindlessImages);
}
if (prog->driver_cache_blob) {
ralloc_free(prog->driver_cache_blob);
}
ralloc_free(prog);
}