mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 20:18:12 +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>
(cherry picked from commit 28342d1f11)
This commit is contained in:
parent
f8a88724ad
commit
113db9ac20
2 changed files with 4 additions and 2 deletions
|
|
@ -7394,7 +7394,7 @@
|
|||
"description": "zink: correctly handle batch_id==0 in check_last_finished()",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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