diff options
author | José Fonseca <[email protected]> | 2008-04-15 15:41:08 +0900 |
---|---|---|
committer | José Fonseca <[email protected]> | 2008-04-15 15:41:08 +0900 |
commit | 95aeeb6d746e57473116ef4d72c05330902f68a5 (patch) | |
tree | e51ff6826baebf02ced7f0e77f37b563964f24ab /src/gallium/auxiliary/pipebuffer/pb_buffer.h | |
parent | d005befcb9e191ae90619fbdd3c37e262ae3b03e (diff) |
gallium: Several fixes to buffer caching.
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_buffer.h')
-rw-r--r-- | src/gallium/auxiliary/pipebuffer/pb_buffer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer.h b/src/gallium/auxiliary/pipebuffer/pb_buffer.h index 4b09c80b2a1..49705cb8627 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer.h +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer.h @@ -193,6 +193,17 @@ pb_reference(struct pb_buffer **dst, /** + * Utility function to check whether a requested alignment is consistent with + * the provided alignment or not. + */ +static INLINE int +pb_check_alignment(size_t requested, size_t provided) +{ + return requested <= provided && (provided % requested) == 0; +} + + +/** * Malloc-based buffer to store data that can't be used by the graphics * hardware. */ |