mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-23 09:40:29 +01:00
mesa: add KHR_no_error support for gl*ReadBuffer()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
91fcba9914
commit
352adb53db
4 changed files with 40 additions and 2 deletions
|
|
@ -197,7 +197,7 @@
|
|||
<param name="bufs" type="const GLenum *" />
|
||||
</function>
|
||||
|
||||
<function name="NamedFramebufferReadBuffer">
|
||||
<function name="NamedFramebufferReadBuffer" no_error="true">
|
||||
<param name="framebuffer" type="GLuint" />
|
||||
<param name="buf" type="GLenum" />
|
||||
</function>
|
||||
|
|
|
|||
|
|
@ -2626,7 +2626,7 @@
|
|||
<glx rop="170" large="true"/>
|
||||
</function>
|
||||
|
||||
<function name="ReadBuffer" es2="3.0">
|
||||
<function name="ReadBuffer" es2="3.0" no_error="true">
|
||||
<param name="mode" type="GLenum"/>
|
||||
<glx rop="171"/>
|
||||
</function>
|
||||
|
|
|
|||
|
|
@ -801,6 +801,22 @@ read_buffer_err(struct gl_context *ctx, struct gl_framebuffer *fb,
|
|||
}
|
||||
|
||||
|
||||
static void
|
||||
read_buffer_no_error(struct gl_context *ctx, struct gl_framebuffer *fb,
|
||||
GLenum buffer, const char *caller)
|
||||
{
|
||||
read_buffer(ctx, fb, buffer, caller, true);
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_ReadBuffer_no_error(GLenum buffer)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
read_buffer_no_error(ctx, ctx->ReadBuffer, buffer, "glReadBuffer");
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_ReadBuffer(GLenum buffer)
|
||||
{
|
||||
|
|
@ -809,6 +825,23 @@ _mesa_ReadBuffer(GLenum buffer)
|
|||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_NamedFramebufferReadBuffer_no_error(GLuint framebuffer, GLenum src)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
struct gl_framebuffer *fb;
|
||||
|
||||
if (framebuffer) {
|
||||
fb = _mesa_lookup_framebuffer(ctx, framebuffer);
|
||||
} else {
|
||||
fb = ctx->WinSysReadBuffer;
|
||||
}
|
||||
|
||||
read_buffer_no_error(ctx, fb, src, "glNamedFramebufferReadBuffer");
|
||||
}
|
||||
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,10 +65,15 @@ _mesa_readbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
|
|||
extern void
|
||||
_mesa_update_draw_buffers(struct gl_context *ctx);
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_ReadBuffer_no_error(GLenum mode);
|
||||
|
||||
extern void GLAPIENTRY
|
||||
_mesa_ReadBuffer( GLenum mode );
|
||||
|
||||
void GLAPIENTRY
|
||||
_mesa_NamedFramebufferReadBuffer_no_error(GLuint framebuffer, GLenum src);
|
||||
|
||||
extern void GLAPIENTRY
|
||||
_mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue