From: Samuel Pitoiset Date: Tue, 6 Jun 2017 19:58:29 +0000 (+0200) Subject: mesa: add KHR_no_error support for glScissor*() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f075c2bc0b249efe59a818c89de20de81279e3d9;p=mesa.git mesa: add KHR_no_error support for glScissor*() Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- diff --git a/src/mapi/glapi/gen/ARB_viewport_array.xml b/src/mapi/glapi/gen/ARB_viewport_array.xml index be67912884e..3e9c65549ef 100644 --- a/src/mapi/glapi/gen/ARB_viewport_array.xml +++ b/src/mapi/glapi/gen/ARB_viewport_array.xml @@ -45,19 +45,19 @@ - + - + - + diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 8f93318b95d..df999248c8e 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -2108,7 +2108,7 @@ - + diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c index 50d01a4692c..c04c64ca3fe 100644 --- a/src/mesa/main/scissor.c +++ b/src/mesa/main/scissor.c @@ -82,6 +82,13 @@ scissor(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height) /** * Called via glScissor */ +void GLAPIENTRY +_mesa_Scissor_no_error(GLint x, GLint y, GLsizei width, GLsizei height) +{ + GET_CURRENT_CONTEXT(ctx); + scissor(ctx, x, y, width, height); +} + void GLAPIENTRY _mesa_Scissor(GLint x, GLint y, GLsizei width, GLsizei height) { @@ -146,6 +153,15 @@ scissor_array(struct gl_context *ctx, GLuint first, GLsizei count, * * Verifies the parameters and call set_scissor_no_notify to do the work. */ +void GLAPIENTRY +_mesa_ScissorArrayv_no_error(GLuint first, GLsizei count, const GLint *v) +{ + GET_CURRENT_CONTEXT(ctx); + + struct gl_scissor_rect *p = (struct gl_scissor_rect *)v; + scissor_array(ctx, first, count, p); +} + void GLAPIENTRY _mesa_ScissorArrayv(GLuint first, GLsizei count, const GLint *v) { @@ -209,6 +225,14 @@ scissor_indexed_err(struct gl_context *ctx, GLuint index, GLint left, _mesa_set_scissor(ctx, index, left, bottom, width, height); } +void GLAPIENTRY +_mesa_ScissorIndexed_no_error(GLuint index, GLint left, GLint bottom, + GLsizei width, GLsizei height) +{ + GET_CURRENT_CONTEXT(ctx); + _mesa_set_scissor(ctx, index, left, bottom, width, height); +} + void GLAPIENTRY _mesa_ScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height) @@ -218,6 +242,13 @@ _mesa_ScissorIndexed(GLuint index, GLint left, GLint bottom, "glScissorIndexed"); } +void GLAPIENTRY +_mesa_ScissorIndexedv_no_error(GLuint index, const GLint *v) +{ + GET_CURRENT_CONTEXT(ctx); + _mesa_set_scissor(ctx, index, v[0], v[1], v[2], v[3]); +} + void GLAPIENTRY _mesa_ScissorIndexedv(GLuint index, const GLint *v) { diff --git a/src/mesa/main/scissor.h b/src/mesa/main/scissor.h index 1d0fac877b3..264873eaf1d 100644 --- a/src/mesa/main/scissor.h +++ b/src/mesa/main/scissor.h @@ -31,15 +31,28 @@ struct gl_context; +void GLAPIENTRY +_mesa_Scissor_no_error(GLint x, GLint y, GLsizei width, GLsizei height); + extern void GLAPIENTRY _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ); +void GLAPIENTRY +_mesa_ScissorArrayv_no_error(GLuint first, GLsizei count, const GLint * v); + extern void GLAPIENTRY _mesa_ScissorArrayv(GLuint first, GLsizei count, const GLint * v); +void GLAPIENTRY +_mesa_ScissorIndexed_no_error(GLuint index, GLint left, GLint bottom, + GLsizei width, GLsizei height); + extern void GLAPIENTRY _mesa_ScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +void GLAPIENTRY +_mesa_ScissorIndexedv_no_error(GLuint index, const GLint * v); + extern void GLAPIENTRY _mesa_ScissorIndexedv(GLuint index, const GLint * v);