mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
mesa: fix off-by-one for newblock allocation in dlist_alloc
Cc: mesa-stable
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27556>
(cherry picked from commit 460d2c46a9)
This commit is contained in:
parent
4c434ac992
commit
e886ee02ed
2 changed files with 2 additions and 2 deletions
|
|
@ -54,7 +54,7 @@
|
|||
"description": "mesa: fix off-by-one for newblock allocation in dlist_alloc",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1220,7 +1220,7 @@ dlist_alloc(struct gl_context *ctx, OpCode opcode, GLuint bytes, bool align8)
|
|||
ctx->ListState.CurrentPos++;
|
||||
}
|
||||
|
||||
if (ctx->ListState.CurrentPos + numNodes + contNodes > BLOCK_SIZE) {
|
||||
if (ctx->ListState.CurrentPos + numNodes + contNodes >= BLOCK_SIZE) {
|
||||
/* This block is full. Allocate a new block and chain to it */
|
||||
Node *newblock;
|
||||
Node *n = ctx->ListState.CurrentBlock + ctx->ListState.CurrentPos;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue