Mesa (master): mesa: create copyteximage_err() helper and always inline copyteximage()

Timothy Arceri tarceri at kemper.freedesktop.org
Mon Jun 26 22:27:23 UTC 2017


Module: Mesa
Branch: master
Commit: 167f6a33fa7be914f4b5171eeeb82bc5e01255f9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=167f6a33fa7be914f4b5171eeeb82bc5e01255f9

Author: Timothy Arceri <tarceri at itsqueeze.com>
Date:   Mon Jun 26 13:14:03 2017 +1000

mesa: create copyteximage_err() helper and always inline copyteximage()

This will be useful in the following patch when we add KHR_no_error
support.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

---

 src/mesa/main/teximage.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index ad3c9872fb..b3519a40a5 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3803,7 +3803,7 @@ copy_texture_sub_image_no_error(struct gl_context *ctx, GLuint dims,
 /**
  * Implement the glCopyTexImage1/2D() functions.
  */
-static void
+static ALWAYS_INLINE void
 copyteximage(struct gl_context *ctx, GLuint dims,
              GLenum target, GLint level, GLenum internalFormat,
              GLint x, GLint y, GLsizei width, GLsizei height, GLint border )
@@ -3956,6 +3956,15 @@ copyteximage(struct gl_context *ctx, GLuint dims,
 }
 
 
+static void
+copyteximage_err(struct gl_context *ctx, GLuint dims, GLenum target,
+                 GLint level, GLenum internalFormat, GLint x, GLint y,
+                 GLsizei width, GLsizei height, GLint border)
+{
+   copyteximage(ctx, dims, target, level, internalFormat, x, y, width, height,
+                border);
+}
+
 
 void GLAPIENTRY
 _mesa_CopyTexImage1D( GLenum target, GLint level,
@@ -3964,7 +3973,8 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
                       GLsizei width, GLint border )
 {
    GET_CURRENT_CONTEXT(ctx);
-   copyteximage(ctx, 1, target, level, internalFormat, x, y, width, 1, border);
+   copyteximage_err(ctx, 1, target, level, internalFormat, x, y, width, 1,
+                    border);
 }
 
 
@@ -3975,8 +3985,8 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
                       GLint border )
 {
    GET_CURRENT_CONTEXT(ctx);
-   copyteximage(ctx, 2, target, level, internalFormat,
-                x, y, width, height, border);
+   copyteximage_err(ctx, 2, target, level, internalFormat,
+                    x, y, width, height, border);
 }
 
 




More information about the mesa-commit mailing list