[Mesa-dev] [PATCH 14/21] mesa: add KHR_no_error support for glBlitNamedFramebuffer()
Timothy Arceri
tarceri at itsqueeze.com
Sun Jun 4 22:03:22 UTC 2017
On 01/06/17 23:05, Samuel Pitoiset wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +-
> src/mesa/main/blit.c | 30 ++++++++++++++++++++++++++
> src/mesa/main/blit.h | 9 ++++++++
> 3 files changed, 40 insertions(+), 1 deletion(-)
>
> diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> index cb24d7981c..54992e5304 100644
> --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml
> +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml
> @@ -247,7 +247,7 @@
> <param name="stencil" type="GLint" />
> </function>
>
> - <function name="BlitNamedFramebuffer">
> + <function name="BlitNamedFramebuffer" no_error="true">
> <param name="readFramebuffer" type="GLuint" />
> <param name="drawFramebuffer" type="GLuint" />
> <param name="srcX0" type="GLint" />
> diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c
> index 4e5f7b27bf..95a71fca60 100644
> --- a/src/mesa/main/blit.c
> +++ b/src/mesa/main/blit.c
> @@ -606,6 +606,36 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
>
>
> void GLAPIENTRY
> +_mesa_BlitNamedFramebuffer_no_error(GLuint readFramebuffer,
> + GLuint drawFramebuffer,
> + GLint srcX0, GLint srcY0,
> + GLint srcX1, GLint srcY1,
> + GLint dstX0, GLint dstY0,
> + GLint dstX1, GLint dstY1,
> + GLbitfield mask, GLenum filter)
> +{
> + struct gl_framebuffer *readFb, *drawFb;
> +
> + GET_CURRENT_CONTEXT(ctx);
> +
> + if (readFramebuffer)
> + readFb = _mesa_lookup_framebuffer(ctx, readFramebuffer);
> + else
> + readFb = ctx->WinSysReadBuffer;
> +
> + if (drawFramebuffer)
> + drawFb = _mesa_lookup_framebuffer(ctx, drawFramebuffer);
> + else
> + drawFb = ctx->WinSysDrawBuffer;
> +
> + blit_framebuffer(ctx, readFb, drawFb,
> + srcX0, srcY0, srcX1, srcY1,
> + dstX0, dstY0, dstX1, dstY1,
> + mask, filter, true, "glBlitNamedFramebuffer");
For consistency with how we have done things elsewhere I think we should
create:
static ALWAYS_INLINED void
blit_named_framebuffer(..., bool no_error)
{
}
And use it here and in the regular _mesa_BlitNamedFramebuffer().
> +}
> +
> +
> +void GLAPIENTRY
> _mesa_BlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer,
> GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
> GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
> diff --git a/src/mesa/main/blit.h b/src/mesa/main/blit.h
> index 6397518dbd..39021e7be6 100644
> --- a/src/mesa/main/blit.h
> +++ b/src/mesa/main/blit.h
> @@ -45,6 +45,15 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
> GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
> GLbitfield mask, GLenum filter);
>
> +void GLAPIENTRY
> +_mesa_BlitNamedFramebuffer_no_error(GLuint readFramebuffer,
> + GLuint drawFramebuffer,
> + GLint srcX0, GLint srcY0,
> + GLint srcX1, GLint srcY1,
> + GLint dstX0, GLint dstY0,
> + GLint dstX1, GLint dstY1,
> + GLbitfield mask, GLenum filter);
> +
> extern void GLAPIENTRY
> _mesa_BlitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer,
> GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
>
More information about the mesa-dev
mailing list