mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
zink: always reset batch states when finding a new one
this is a bit safer Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753>
This commit is contained in:
parent
d54688f1e8
commit
a8d925f52e
1 changed files with 3 additions and 2 deletions
|
|
@ -202,10 +202,11 @@ init_batch_state(struct zink_context *ctx, struct zink_batch *batch)
|
|||
if (he) { //there may not be any entries available
|
||||
bs = he->data;
|
||||
_mesa_hash_table_remove(&ctx->batch_states[batch->queue], he);
|
||||
zink_reset_batch_state(ctx, bs);
|
||||
}
|
||||
}
|
||||
if (!bs) {
|
||||
if (bs)
|
||||
zink_reset_batch_state(ctx, bs);
|
||||
else {
|
||||
if (!batch->state) {
|
||||
/* this is batch init, so create a few more states for later use */
|
||||
for (int i = 0; i < 3; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue