mesa: rename ScissorIndexed() to scissor_indexed_err()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 6 Jun 2017 19:58:27 +0000 (21:58 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 7 Jun 2017 07:09:13 +0000 (09:09 +0200)
And move GET_CURRENT_CONTEXT() into the APIENTRY calls
for consistency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/mesa/main/scissor.c

index 0dd956c9e3d765f55bc424bd5c8f8be3b3fd0182..5cf02168bdd0acc0960f24433228cd1fb829c028 100644 (file)
@@ -169,11 +169,10 @@ _mesa_ScissorArrayv(GLuint first, GLsizei count, const GLint *v)
  * Verifies the parameters call set_scissor_no_notify to do the work.
  */
 static void
-ScissorIndexed(GLuint index, GLint left, GLint bottom,
-               GLsizei width, GLsizei height, const char *function)
+scissor_indexed_err(struct gl_context *ctx, GLuint index, GLint left,
+                    GLint bottom, GLsizei width, GLsizei height,
+                    const char *function)
 {
-   GET_CURRENT_CONTEXT(ctx);
-
    if (MESA_VERBOSE & VERBOSE_API)
       _mesa_debug(ctx, "%s(%d, %d, %d, %d, %d)\n",
                   function, index, left, bottom, width, height);
@@ -199,13 +198,17 @@ void GLAPIENTRY
 _mesa_ScissorIndexed(GLuint index, GLint left, GLint bottom,
                      GLsizei width, GLsizei height)
 {
-   ScissorIndexed(index, left, bottom, width, height, "glScissorIndexed");
+   GET_CURRENT_CONTEXT(ctx);
+   scissor_indexed_err(ctx, index, left, bottom, width, height,
+                       "glScissorIndexed");
 }
 
 void GLAPIENTRY
 _mesa_ScissorIndexedv(GLuint index, const GLint *v)
 {
-   ScissorIndexed(index, v[0], v[1], v[2], v[3], "glScissorIndexedv");
+   GET_CURRENT_CONTEXT(ctx);
+   scissor_indexed_err(ctx, index, v[0], v[1], v[2], v[3],
+                       "glScissorIndexedv");
 }
 
 void GLAPIENTRY