diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2023-03-14 16:53:15 -0400 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-03-30 05:06:47 +0000 |
commit | 0c7994bb2ddb082cdd72ab7b4de6de8b0d55c204 (patch) | |
tree | f945133ecc222018b4391d1769a96c49e2d13c84 /src/mesa | |
parent | aa9d823318d693247d6c0bec4f383302858f4300 (diff) | |
download | mesa-0c7994bb2ddb082cdd72ab7b4de6de8b0d55c204.tar.gz |
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>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/fbobject.c | 9 | ||||
-rw-r--r-- | src/mesa/main/fbobject.h | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index e011453a21d..42cbc20bbb5 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -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, diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index bcc4e08eb69..7dedf1006ea 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -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 */ |