Mesa (gallium-mesa-7.4): util: MSVC portability fixes.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Tue May 12 15:15:28 UTC 2009
Module: Mesa
Branch: gallium-mesa-7.4
Commit: d686452c5ebd846a7a1061afe292244193d039c4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d686452c5ebd846a7a1061afe292244193d039c4
Author: José Fonseca <jfonseca at vmware.com>
Date: Tue May 12 16:13:52 2009 +0100
util: MSVC portability fixes.
---
src/gallium/auxiliary/util/SConscript | 1 +
src/gallium/auxiliary/util/u_linear.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/gallium/auxiliary/util/SConscript b/src/gallium/auxiliary/util/SConscript
index 5df932c..faf8c80 100644
--- a/src/gallium/auxiliary/util/SConscript
+++ b/src/gallium/auxiliary/util/SConscript
@@ -14,6 +14,7 @@ util = env.ConvenienceLibrary(
'u_hash.c',
'u_hash_table.c',
'u_keymap.c',
+ 'u_linear.c',
'u_math.c',
'u_mm.c',
'u_rect.c',
diff --git a/src/gallium/auxiliary/util/u_linear.c b/src/gallium/auxiliary/util/u_linear.c
index a76704f..ff7645a 100644
--- a/src/gallium/auxiliary/util/u_linear.c
+++ b/src/gallium/auxiliary/util/u_linear.c
@@ -6,7 +6,7 @@ void
pipe_linear_to_tile(size_t src_stride, void *src_ptr,
struct pipe_tile_info *t, void *dst_ptr)
{
- int x, y, z;
+ unsigned x, y, z;
char *ptr;
size_t bytes = t->cols * t->block.size;
@@ -20,7 +20,7 @@ pipe_linear_to_tile(size_t src_stride, void *src_ptr,
ptr = (char*)src_ptr + src_stride * t->rows * y + bytes * x;
for (z = 0; z < t->rows; z++) {
memcpy(dst_ptr, ptr, bytes);
- dst_ptr += bytes;
+ dst_ptr = (char *)dst_ptr + bytes;
ptr += src_stride;
}
}
@@ -30,7 +30,7 @@ pipe_linear_to_tile(size_t src_stride, void *src_ptr,
void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr,
size_t dst_stride, void *dst_ptr)
{
- int x, y, z;
+ unsigned x, y, z;
char *ptr;
size_t bytes = t->cols * t->block.size;
@@ -41,7 +41,7 @@ void pipe_linear_from_tile(struct pipe_tile_info *t, void *src_ptr,
ptr = (char*)dst_ptr + dst_stride * t->rows * y + bytes * x;
for (z = 0; z < t->rows; z++) {
memcpy(ptr, src_ptr, bytes);
- src_ptr += bytes;
+ src_ptr = (char *)src_ptr + bytes;
ptr += dst_stride;
}
}
More information about the mesa-commit
mailing list