diff options
author | José Fonseca <[email protected]> | 2009-06-18 12:51:00 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-06-18 14:54:08 +0100 |
commit | 2af0173e9e4eefe910c6011038e7346091a9b2a4 (patch) | |
tree | 8ea0482b0677bd241386865bacb25db7e8dc67cc /src/gallium/auxiliary/pipebuffer/pb_buffer.h | |
parent | 42882897c67f6c74e67e120e946a95929e6c2065 (diff) |
pipebuffer: Use a type consistently for sizes/offsets.
Avoids warnings on 64bit builds.
Use regular unsigned since that's what gallium expects, but use a
typedef to facilitate possible changes in the future.
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_buffer.h')
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_buffer.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer.h b/src/gallium/auxiliary/pipebuffer/pb_buffer.h index 92b6fd00564..2590546cb4a 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer.h +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer.h @@ -72,6 +72,12 @@ struct pb_desc /** + * Size. Regular (32bit) unsigned for now. + */ +typedef unsigned pb_size; + + +/** * Base class for all pb_* buffers. */ struct pb_buffer @@ -126,7 +132,7 @@ struct pb_vtbl */ void (*get_base_buffer)( struct pb_buffer *buf, struct pb_buffer **base_buf, - unsigned *offset ); + pb_size *offset ); }; @@ -177,7 +183,7 @@ pb_unmap(struct pb_buffer *buf) static INLINE void pb_get_base_buffer( struct pb_buffer *buf, struct pb_buffer **base_buf, - unsigned *offset ) + pb_size *offset ) { assert(buf); if(!buf) { @@ -241,7 +247,7 @@ pb_reference(struct pb_buffer **dst, * the requested or not. */ static INLINE boolean -pb_check_alignment(size_t requested, size_t provided) +pb_check_alignment(pb_size requested, pb_size provided) { if(!requested) return TRUE; @@ -269,7 +275,7 @@ pb_check_usage(unsigned requested, unsigned provided) * hardware. */ struct pb_buffer * -pb_malloc_buffer_create(size_t size, +pb_malloc_buffer_create(pb_size size, const struct pb_desc *desc); |