mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 21:10:24 +01:00
v3d: Changed v3d_compile:failed to an enum
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>
This commit is contained in:
parent
56846a2b68
commit
1c8167da61
4 changed files with 11 additions and 3 deletions
|
|
@ -3018,7 +3018,8 @@ v3d_nir_to_vir(struct v3d_compile *c)
|
|||
fprintf(stderr, "Failed to register allocate at %d threads:\n",
|
||||
c->threads);
|
||||
vir_dump(c);
|
||||
c->failed = true;
|
||||
c->compilation_result =
|
||||
V3D_COMPILATION_FAILED_REGISTER_ALLOCATION;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -489,6 +489,12 @@ vir_after_block(struct qblock *block)
|
|||
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.
|
||||
|
|
@ -666,7 +672,7 @@ struct v3d_compile {
|
|||
bool emitted_tlb_load;
|
||||
bool lock_scoreboard_on_first_thrsw;
|
||||
|
||||
bool failed;
|
||||
enum v3d_compilation_result compilation_result;
|
||||
|
||||
bool tmu_dirty_rcl;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -512,6 +512,7 @@ vir_compile_init(const struct v3d_compiler *compiler,
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ v3d_vir_to_qpu(struct v3d_compile *c, struct qpu_reg *temp_registers)
|
|||
fprintf(stderr, "Failed to pack instruction:\n");
|
||||
vir_dump_inst(c, inst);
|
||||
fprintf(stderr, "\n");
|
||||
c->failed = true;
|
||||
c->compilation_result = V3D_COMPILATION_FAILED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue