Module: Mesa
Branch: gallium-0.2
Commit: 2f24bc698412b4635422a52f9d7073ce7854dceb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2f24bc698412b4635422a52f9d7073ce7854dceb

Author: José Fonseca <jfons...@vmware.com>
Date:   Tue Dec 30 20:10:24 2008 +0000

draw: Avoid integer overflow converting pointers on 64bit archs.

Not really an error, as we only care for the lower 4 bits.

---

 src/gallium/auxiliary/draw/draw_vs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_vs.c 
b/src/gallium/auxiliary/draw/draw_vs.c
index 7f30530..c057cd6 100644
--- a/src/gallium/auxiliary/draw/draw_vs.c
+++ b/src/gallium/auxiliary/draw/draw_vs.c
@@ -50,7 +50,7 @@ void draw_vs_set_constants( struct draw_context *draw,
                             const float (*constants)[4],
                             unsigned size )
 {
-   if (((unsigned)constants) & 0xf) {
+   if (((uintptr_t)constants) & 0xf) {
       if (size > draw->vs.const_storage_size) {
          if (draw->vs.aligned_constant_storage)
             align_free((void *)draw->vs.aligned_constant_storage);

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to