zink: assert that batch_id is valid in zink_screen_check_last_finished()

0 is never a valid batch_id

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27729>
This commit is contained in:
Mike Blumenkrantz
2024-02-21 11:10:10 -05:00
committed by Marge Bot
parent 3283415bbd
commit 35185ad9df
+1
View File
@@ -61,6 +61,7 @@ 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);
/* last_finished may have wrapped */
if (screen->last_finished < UINT_MAX / 2) {
/* last_finished has wrapped, batch_id has not */