mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
mesa: Disable validate_ir_tree() on release builds.
Since half of ir_validate uses asserts() (the other using printf() then
abort()), there's not much use to calling it in a release build. Cuts
6.3% of the startup time of TF2.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 712bac1f41)
This commit is contained in:
parent
80092d8869
commit
c589071fb2
2 changed files with 6 additions and 2 deletions
|
|
@ -695,6 +695,11 @@ check_node_type(ir_instruction *ir, void *data)
|
|||
void
|
||||
validate_ir_tree(exec_list *instructions)
|
||||
{
|
||||
/* We shouldn't have any reason to validate IR in a release build,
|
||||
* and it's half composed of assert()s anyway which wouldn't do
|
||||
* anything.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
ir_validate v;
|
||||
|
||||
v.run(instructions);
|
||||
|
|
@ -704,4 +709,5 @@ validate_ir_tree(exec_list *instructions)
|
|||
|
||||
visit_tree(ir, check_node_type, NULL);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1067,13 +1067,11 @@ link_intrastage_shaders(void *mem_ctx,
|
|||
|
||||
free(linking_shaders);
|
||||
|
||||
#ifdef DEBUG
|
||||
/* At this point linked should contain all of the linked IR, so
|
||||
* validate it to make sure nothing went wrong.
|
||||
*/
|
||||
if (linked)
|
||||
validate_ir_tree(linked->ir);
|
||||
#endif
|
||||
|
||||
/* Make a pass over all variable declarations to ensure that arrays with
|
||||
* unspecified sizes have a size specified. The size is inferred from the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue