mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 22:00:11 +01:00
glthread: add a missing end-of-batch marker
Unmarshal calls that "look ahead" in the batch use it. They expect
the next call ID to be equal to a specific GL call. NUM_DISPATCH_CMD
is not equal to any GL call (it's last_call_id + 1).
This was missed in the referenced commit, causing assertion failures.
Fixes: c3b95d1507 - glthread: add a marker at the end of batches indicating the end
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26786>
This commit is contained in:
parent
9643671dae
commit
5a4eddc298
1 changed files with 5 additions and 0 deletions
|
|
@ -390,6 +390,11 @@ _mesa_glthread_finish(struct gl_context *ctx)
|
|||
}
|
||||
|
||||
if (glthread->used) {
|
||||
/* Mark the end of the batch, but don't increment "used". */
|
||||
struct marshal_cmd_base *last =
|
||||
(struct marshal_cmd_base *)&next->buffer[glthread->used];
|
||||
last->cmd_id = NUM_DISPATCH_CMD;
|
||||
|
||||
p_atomic_add(&glthread->stats.num_direct_items, glthread->used);
|
||||
next->used = glthread->used;
|
||||
glthread->used = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue