summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-06-06 21:58:29 +0200
committerSamuel Pitoiset <[email protected]>2017-06-07 09:09:19 +0200
commitf075c2bc0b249efe59a818c89de20de81279e3d9 (patch)
treed8dcdaa154c3af4e82aa94125307f266490d3b96 /src
parente2524a21cb7846c36d2b01ed402f2de428654d52 (diff)
mesa: add KHR_no_error support for glScissor*()
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mapi/glapi/gen/ARB_viewport_array.xml6
-rw-r--r--src/mapi/glapi/gen/gl_API.xml2
-rw-r--r--src/mesa/main/scissor.c31
-rw-r--r--src/mesa/main/scissor.h13
4 files changed, 48 insertions, 4 deletions
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 @@
<param name="index" type="GLuint"/>
<param name="v" type="const GLfloat *" count="4"/>
</function>
- <function name="ScissorArrayv">
+ <function name="ScissorArrayv" no_error="true">
<param name="first" type="GLuint"/>
<param name="count" type="GLsizei"/>
<param name="v" type="const int *" count="count" count_scale="4"/>
</function>
- <function name="ScissorIndexed">
+ <function name="ScissorIndexed" no_error="true">
<param name="index" type="GLuint"/>
<param name="left" type="GLint"/>
<param name="bottom" type="GLint"/>
<param name="width" type="GLsizei"/>
<param name="height" type="GLsizei"/>
</function>
- <function name="ScissorIndexedv">
+ <function name="ScissorIndexedv" no_error="true">
<param name="index" type="GLuint"/>
<param name="v" type="const GLint *" count="4"/>
</function>
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 @@
<glx rop="102"/>
</function>
- <function name="Scissor" es1="1.0" es2="2.0">
+ <function name="Scissor" es1="1.0" es2="2.0" no_error="true">
<param name="x" type="GLint"/>
<param name="y" type="GLint"/>
<param name="width" type="GLsizei"/>
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
@@ -83,6 +83,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)
{
GET_CURRENT_CONTEXT(ctx);
@@ -147,6 +154,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)
{
int i;
@@ -210,6 +226,14 @@ scissor_indexed_err(struct gl_context *ctx, GLuint index, GLint left,
}
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)
{
@@ -219,6 +243,13 @@ _mesa_ScissorIndexed(GLuint index, GLint left, GLint bottom,
}
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)
{
GET_CURRENT_CONTEXT(ctx);
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);