mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-23 20:30:30 +01:00
llvmpipe: Make sure to not divide by zero on debug output
Check that lp->nr_cs_variants is not zero before dividing by it as done in a few lines above. CID: 1531786 Division or modulo by zero Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35091>
This commit is contained in:
parent
383684596c
commit
d4d37ead82
1 changed files with 2 additions and 1 deletions
|
|
@ -1406,7 +1406,8 @@ llvmpipe_update_cs_variant(struct llvmpipe_context *lp,
|
|||
"\t%u instrs,\t%u instrs/variant\n",
|
||||
shader->variants_cached,
|
||||
lp->nr_cs_variants, lp->nr_cs_instrs,
|
||||
lp->nr_cs_instrs / lp->nr_cs_variants);
|
||||
lp->nr_cs_variants
|
||||
? lp->nr_cs_instrs / lp->nr_cs_variants : 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue