Instead of just having a bool status for the failure, there is now an
enum so that the compilation can report a more detailed status.
Currently this is only used to report whether the failure was due to
failed register allocation. The “failed” bool doesn’t seem to actually
have been used anywhere so this doesn’t really change a lot.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5953>
fprintf(stderr, "Failed to register allocate at %d threads:\n",
c->threads);
vir_dump(c);
fprintf(stderr, "Failed to register allocate at %d threads:\n",
c->threads);
vir_dump(c);
+ c->compilation_result =
+ V3D_COMPILATION_FAILED_REGISTER_ALLOCATION;
return (struct vir_cursor){ vir_cursor_addtail, &block->instructions };
}
return (struct vir_cursor){ vir_cursor_addtail, &block->instructions };
}
+enum v3d_compilation_result {
+ V3D_COMPILATION_SUCCEEDED,
+ V3D_COMPILATION_FAILED_REGISTER_ALLOCATION,
+ V3D_COMPILATION_FAILED,
+};
+
/**
* Compiler state saved across compiler invocations, for any expensive global
* setup.
/**
* Compiler state saved across compiler invocations, for any expensive global
* setup.
bool emitted_tlb_load;
bool lock_scoreboard_on_first_thrsw;
bool emitted_tlb_load;
bool lock_scoreboard_on_first_thrsw;
+ enum v3d_compilation_result compilation_result;
c->threads = 4;
c->debug_output = debug_output;
c->debug_output_data = debug_output_data;
c->threads = 4;
c->debug_output = debug_output;
c->debug_output_data = debug_output_data;
+ c->compilation_result = V3D_COMPILATION_SUCCEEDED;
s = nir_shader_clone(c, s);
c->s = s;
s = nir_shader_clone(c, s);
c->s = s;
fprintf(stderr, "Failed to pack instruction:\n");
vir_dump_inst(c, inst);
fprintf(stderr, "\n");
fprintf(stderr, "Failed to pack instruction:\n");
vir_dump_inst(c, inst);
fprintf(stderr, "\n");
+ c->compilation_result = V3D_COMPILATION_FAILED;