pan/bi: Output binaries from standalone compiler
Useful for shader replacement. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12026>
This commit is contained in:
parent
8cbabbd532
commit
cdc79d2a03
|
@ -193,6 +193,14 @@ compile_shader(int stages, char **files)
|
|||
|
||||
util_dynarray_clear(&binary);
|
||||
bifrost_compile_shader_nir(nir[i], &inputs, &binary, &info);
|
||||
|
||||
char *fn = NULL;
|
||||
asprintf(&fn, "shader_%u.bin", i);
|
||||
assert(fn != NULL);
|
||||
FILE *fp = fopen(fn, "wb");
|
||||
fwrite(binary.data, 1, binary.size, fp);
|
||||
fclose(fp);
|
||||
free(fn);
|
||||
}
|
||||
|
||||
util_dynarray_fini(&binary);
|
||||
|
|
Loading…
Reference in New Issue