Mesa (master): mesa: rename function to _mesa_is_format_integer_color()

Brian Paul brianp at kemper.freedesktop.org
Wed Oct 27 02:31:23 UTC 2010


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

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Oct 26 20:30:40 2010 -0600

mesa: rename function to _mesa_is_format_integer_color()

Be a bit more clear about its operation.

---

 src/mesa/main/fbobject.c |    2 +-
 src/mesa/main/formats.c  |    2 +-
 src/mesa/main/formats.h  |    2 +-
 src/mesa/main/readpix.c  |    2 +-
 src/mesa/main/teximage.c |    4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index bf46f51..7c33570 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -696,7 +696,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
       }
 
       /* check if integer color */
-      fb->_IntegerColor = _mesa_is_format_integer(mesaFormat);
+      fb->_IntegerColor = _mesa_is_format_integer_color(mesaFormat);
 
       /* Error-check width, height, format, samples
        */
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index f604e23..e18a9fc 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -1011,7 +1011,7 @@ _mesa_is_format_packed_depth_stencil(gl_format format)
  * Is the given format a signed/unsigned integer color format?
  */
 GLboolean
-_mesa_is_format_integer(gl_format format)
+_mesa_is_format_integer_color(gl_format format)
 {
    const struct gl_format_info *info = _mesa_get_format_info(format);
    return (info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT) &&
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 73d85f2..eeb460d 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -200,7 +200,7 @@ extern GLboolean
 _mesa_is_format_packed_depth_stencil(gl_format format);
 
 extern GLboolean
-_mesa_is_format_integer(gl_format format);
+_mesa_is_format_integer_color(gl_format format);
 
 extern GLenum
 _mesa_get_format_color_encoding(gl_format format);
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index ad27d11..a5612e3 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -191,7 +191,7 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
     */
    if (ctx->Extensions.EXT_texture_integer && _mesa_is_color_format(format)) {
       const struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
-      const GLboolean srcInteger = _mesa_is_format_integer(rb->Format);
+      const GLboolean srcInteger = _mesa_is_format_integer_color(rb->Format);
       const GLboolean dstInteger = _mesa_is_integer_format(format);
       if (dstInteger != srcInteger) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index b65a2de..2e9410f 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2107,9 +2107,9 @@ copytexsubimage_error_check2( struct gl_context *ctx, GLuint dimensions,
    /* If copying into an integer texture, the source buffer must also be
     * integer-valued.
     */
-   if (_mesa_is_format_integer(teximage->TexFormat)) {
+   if (_mesa_is_format_integer_color(teximage->TexFormat)) {
       struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
-      if (!_mesa_is_format_integer(rb->Format)) {
+      if (!_mesa_is_format_integer_color(rb->Format)) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
                   "glCopyTexSubImage%dD(source buffer is not integer format)",
                   dimensions);




More information about the mesa-commit mailing list