mapi: add InternalInvalidateFramebufferAncillaryMESA

this allows glthread to handle ancillary buffer invalidation

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21910>
This commit is contained in:
Mike Blumenkrantz 2023-03-14 16:53:15 -04:00 committed by Marge Bot
parent aa9d823318
commit 0c7994bb2d
4 changed files with 17 additions and 0 deletions

View file

@ -12972,6 +12972,10 @@
<function name="DrawElementsInstancedBaseVertexBaseInstanceDrawID"
es1="1.0" es2="2.0" marshal="custom">
</function>
<!-- Internal function for glthread to implement ancillary buffer invalidation. -->
<function name="InternalInvalidateFramebufferAncillaryMESA" es2="3.0">
</function>
</category>
<xi:include href="OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>

View file

@ -1703,6 +1703,7 @@ offsets = {
"MultiDrawElementsUserBuf": 1667,
"DrawArraysInstancedBaseInstanceDrawID": 1668,
"DrawElementsInstancedBaseVertexBaseInstanceDrawID": 1669,
"InternalInvalidateFramebufferAncillaryMESA": 1670,
}
functions = [

View file

@ -5524,6 +5524,15 @@ _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments,
discard_framebuffer(ctx, fb, numAttachments, attachments);
}
void GLAPIENTRY
_mesa_InternalInvalidateFramebufferAncillaryMESA(void)
{
GET_CURRENT_CONTEXT(ctx);
struct gl_framebuffer *fb = get_framebuffer_target(ctx, GL_FRAMEBUFFER);
discard_attachments(ctx, fb, BITFIELD_BIT(BUFFER_DEPTH) | BITFIELD_BIT(BUFFER_STENCIL));
}
void GLAPIENTRY
_mesa_InvalidateNamedFramebufferData(GLuint framebuffer,

View file

@ -133,4 +133,7 @@ _mesa_bind_framebuffers(struct gl_context *ctx,
struct gl_framebuffer *newDrawFb,
struct gl_framebuffer *newReadFb);
void GLAPIENTRY
_mesa_InternalInvalidateFramebufferAncillaryMESA(void);
#endif /* FBOBJECT_H */