mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
tgsi/ureg: don't call tgsi_sanity when it's too slow
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
This commit is contained in:
parent
80aecad0ca
commit
8c71b70f07
1 changed files with 12 additions and 1 deletions
|
|
@ -2106,7 +2106,18 @@ const struct tgsi_token *ureg_finalize( struct ureg_program *ureg )
|
|||
}
|
||||
|
||||
#if DEBUG
|
||||
if (tokens && !tgsi_sanity_check(tokens)) {
|
||||
/* tgsi_sanity doesn't seem to return if there are too many constants. */
|
||||
bool too_many_constants = false;
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(ureg->const_decls); i++) {
|
||||
for (unsigned j = 0; j < ureg->const_decls[i].nr_constant_ranges; j++) {
|
||||
if (ureg->const_decls[i].constant_range[j].last > 4096) {
|
||||
too_many_constants = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tokens && !too_many_constants && !tgsi_sanity_check(tokens)) {
|
||||
debug_printf("tgsi_ureg.c, sanity check failed on generated tokens:\n");
|
||||
tgsi_dump(tokens, 0);
|
||||
assert(0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue