mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
zink: correctly handle batch_id==0 in check_last_finished()
in some places this assert is used to hang check, but here we can assume that the batch_id is always valid (i.e., not a hang) and check it accordingly to avoid spurious crashes cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37239>
This commit is contained in:
parent
683e3ea0af
commit
28342d1f11
1 changed files with 3 additions and 1 deletions
|
|
@ -61,7 +61,9 @@ static inline bool
|
|||
zink_screen_check_last_finished(struct zink_screen *screen, uint32_t batch_id)
|
||||
{
|
||||
const uint32_t check_id = (uint32_t)batch_id;
|
||||
assert(check_id);
|
||||
/* 0 means an in-flight batch */
|
||||
if (check_id == 0)
|
||||
return false;
|
||||
/* last_finished may have wrapped */
|
||||
if (screen->last_finished < UINT_MAX / 2) {
|
||||
/* last_finished has wrapped, batch_id has not */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue