zink: fix batch disambiguation on first submit
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 6 Jul 2023 12:57:29 +0000 (08:57 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 11 Jul 2023 02:33:40 +0000 (02:33 +0000)
commit3c520892b10ca249723f11d3e4858cc41e072e0c
tree04609411f405f2fde02878015d7be018a377f90a
parent9b572ce8ebd727ea108c70b11b8f8636b1e0e42c
zink: fix batch disambiguation on first submit

submit_count is used to disambiguate a batch_id based on the generation
id of a given batch: this value is incremented once on submit and once on
reset such that the diff of the values is > 1 any time the batch does not
represent the fence it was last submitted with

in the case of a batch's first use, however, this value was being incorrectly
incremented such that the first submit would cause disambiguation checks
to erroneously determine that the batch had already completed, breaking synchronization

fixes #9313

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24016>
src/gallium/drivers/zink/zink_batch.c