mesa: fix GL_INVALID_OPERATION when releasing buffer in GLES1/2 ctx

The Function glInternalReleaseBufferMESA is called whenever a
intermediate buffer is used by MESA internal and being released, however
it's only exported for GLES3, which leads to drawing w/o VBO not
operational for GLES1/2.

Fixes invalid operation warning in `glmark2-es2 -b build:use-vbo=false` for
GLES2 HW / any HW with MESA_GLES_VERSION_OVERRIDE=2.0 .

VBO-less drawing is possible for GLES 1.0 too, so this function is also
exported with GLES1. Tested on GLES1 with mesa-demos gears demo with
VBO allocation commented out.

Fixes: ae75b59cb5 ("glthread, tc: Fix buffer release with glthread and tc")
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
(cherry picked from commit ba43568f4b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39462>
This commit is contained in:
Icenowy Zheng 2025-12-27 09:10:51 +08:00 committed by Dylan Baker
parent 3936155db6
commit fec205f2ed
2 changed files with 2 additions and 2 deletions

View file

@ -1334,7 +1334,7 @@
"description": "mesa: fix GL_INVALID_OPERATION when releasing buffer in GLES1/2 ctx",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "ae75b59cb526eff5de906726b105e33258a283cf",
"notes": null

View file

@ -11099,7 +11099,7 @@
</function>
<!-- Internal function for glthread to defer buffer release. -->
<function name="InternalReleaseBufferMESA" es2="3.0" marshal="async">
<function name="InternalReleaseBufferMESA" es1="1.0" es2="2.0" marshal="async">
<param name="buffer" type="GLvoid *"/>
</function>
</category>