mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
util: Replace the usage of redundant u_align_u32 with align and remove u_align_u32
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23732>
This commit is contained in:
parent
7ac83b0961
commit
4d7c969dd8
2 changed files with 1 additions and 9 deletions
|
|
@ -78,7 +78,7 @@ u_vector_add(struct u_vector *vector)
|
|||
* piece goes to the right locations. Thanks to the change in
|
||||
* size, it may or may not still wrap around.
|
||||
*/
|
||||
split = u_align_u32(vector->tail, vector->size);
|
||||
split = align(vector->tail, vector->size);
|
||||
assert(vector->tail <= split && split < vector->head);
|
||||
memcpy((char *)data + dst_tail, (char *)vector->data + src_tail,
|
||||
split - vector->tail);
|
||||
|
|
|
|||
|
|
@ -38,14 +38,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* TODO - move to u_math.h - name it better etc */
|
||||
static inline uint32_t
|
||||
u_align_u32(uint32_t v, uint32_t a)
|
||||
{
|
||||
assert(a != 0 && a == (a & -((int32_t) a)));
|
||||
return (v + a - 1) & ~(a - 1);
|
||||
}
|
||||
|
||||
struct u_vector {
|
||||
uint32_t head;
|
||||
uint32_t tail;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue