glthread: handle DeleteBuffers(n=-1) gracefully
this is a valid error condition
cc: mesa-stable
fixes:
GTF-GL46.gtf21.GL2FixedTests.buffer_objects.buffer_objects
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18856>
(cherry picked from commit 004c5b60ca
)
This commit is contained in:

committed by
Dylan Baker

parent
3aa0a2a7c7
commit
1cfd9ec3d7
@@ -1444,7 +1444,7 @@
|
||||
"description": "glthread: handle DeleteBuffers(n=-1) gracefully",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
@@ -208,7 +208,7 @@ _mesa_glthread_DeleteBuffers(struct gl_context *ctx, GLsizei n,
|
||||
{
|
||||
struct glthread_state *glthread = &ctx->GLThread;
|
||||
|
||||
if (!buffers)
|
||||
if (!buffers || n < 0)
|
||||
return;
|
||||
|
||||
for (unsigned i = 0; i < n; i++) {
|
||||
|
Reference in New Issue
Block a user