mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
aco: Use u_memstream instead of POSIX memstream
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7785>
This commit is contained in:
parent
8259cfaa65
commit
a2c981f8d0
1 changed files with 6 additions and 5 deletions
|
|
@ -181,11 +181,12 @@ void aco_compile_shader(unsigned shader_count,
|
|||
if (get_disasm) {
|
||||
char *data = NULL;
|
||||
size_t disasm_size = 0;
|
||||
FILE *f = open_memstream(&data, &disasm_size);
|
||||
if (f) {
|
||||
bool fail = aco::print_asm(program.get(), code, exec_size / 4u, f);
|
||||
fputc(0, f);
|
||||
fclose(f);
|
||||
struct u_memstream mem;
|
||||
if (u_memstream_open(&mem, &data, &disasm_size)) {
|
||||
FILE *const memf = u_memstream_get(&mem);
|
||||
bool fail = aco::print_asm(program.get(), code, exec_size / 4u, memf);
|
||||
fputc(0, memf);
|
||||
u_memstream_close(&mem);
|
||||
|
||||
if (fail) {
|
||||
fprintf(stderr, "Failed to disassemble program:\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue