Mesa (master): mesa: update comments for _mesa_format_matches_format_and_type(), 80-column wrapping

Brian Paul brianp at kemper.freedesktop.org
Tue Nov 29 01:10:51 UTC 2011


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

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Nov 28 18:09:14 2011 -0700

mesa: update comments for _mesa_format_matches_format_and_type(), 80-column wrapping

---

 src/mesa/main/formats.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index c884646..d3b12d0 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -2480,11 +2480,12 @@ _mesa_format_to_type_and_comps(gl_format format,
 }
 
 /**
- * Returns a MESA_FORMAT describing pixels with the given format/type if
- * available, or MESA_FORMAT_NONE.
+ * Check if a gl_format exactly matches a GL formaat/type combination
+ * such that we can use memcpy() from one to the other.
  *
- * If a format is returned, it should be suitable to memcpy
- * _mesa_get_format_bytes() at a time to move the pixel data.
+ * Note: this matching assumes that GL_PACK/UNPACK_SWAP_BYTES is unset.
+ *
+ * \return GL_TRUE if the formats match, GL_FALSE otherwise.
  */
 GLboolean
 _mesa_format_matches_format_and_type(gl_format gl_format,
@@ -2494,13 +2495,11 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
 
    /* Note: When reading a GL format/type combination, the format lists channel
     * assignments from most significant channel in the type to least
-    * significant.  A type with _REV indicates that the assignments are swapped,
-    * so they are listed from least significant to most significant.
-    *
-    * For sanity, please keep this switch statement ordered the same as the enum
-    * in formats.h.
+    * significant.  A type with _REV indicates that the assignments are
+    * swapped, so they are listed from least significant to most significant.
     *
-    * This matching assumes that GL_PACK/UNPACK_SWAP_BYTES is unset.
+    * For sanity, please keep this switch statement ordered the same as the
+    * enums in formats.h.
     */
 
    switch (gl_format) {




More information about the mesa-commit mailing list