Mesa (master): util: Modified u_rect to default to memcpy.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Nov 27 17:56:24 UTC 2012


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

Author: James Benton <jbenton at vmware.com>
Date:   Wed Jul 11 15:31:21 2012 +0100

util: Modified u_rect to default to memcpy.

Previously this function would assert if the format didn't fit an expected 4 channel format size.

Now will work with any format type with any amount of channels.

Signed-off-by: José Fonseca <jfonseca at vmware.com>

---

 src/gallium/auxiliary/util/u_rect.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_rect.c b/src/gallium/auxiliary/util/u_rect.c
index 59bebbc..d00568f 100644
--- a/src/gallium/auxiliary/util/u_rect.c
+++ b/src/gallium/auxiliary/util/u_rect.c
@@ -144,11 +144,7 @@ util_fill_rect(ubyte * dst,
          dst += dst_stride;
       }
       break;
-   case 8:
-   case 12:
-   case 16:
-   case 24:
-   case 32:
+   default:
       for (i = 0; i < height; i++) {
          ubyte *row = dst;
          for (j = 0; j < width; j++) {
@@ -158,8 +154,5 @@ util_fill_rect(ubyte * dst,
          dst += dst_stride;
       }
       break;
-   default:
-      assert(0);
-      break;
    }
 }




More information about the mesa-commit mailing list