projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d41740e
)
radeon: Use _mesa_next_pow_two_32 instead of own implementation.
author
Pauli Nieminen
<suokkos@gmail.com>
Sat, 6 Feb 2010 04:35:49 +0000
(06:35 +0200)
committer
Pauli Nieminen
<suokkos@gmail.com>
Sat, 6 Feb 2010 17:25:13 +0000
(19:25 +0200)
src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index 9ef3a84056a1d2e9568d4a93ab45802334cf5eaa..cd843d965e5884b443183b3fc1b6f21fe92b83fa 100644
(file)
--- a/
src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/
src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@
-81,19
+81,6
@@
static unsigned get_compressed_image_size(
return rowStride * ((height + blockHeight - 1) / blockHeight);
}
return rowStride * ((height + blockHeight - 1) / blockHeight);
}
-static int find_next_power_of_two(GLuint value)
-{
- int i, tmp;
-
- i = 0;
- tmp = value - 1;
- while (tmp) {
- tmp >>= 1;
- i++;
- }
- return (1 << i);
-}
-
/**
* Compute sizes and fill in offset and blit information for the given
* image (determined by \p face and \p level).
/**
* Compute sizes and fill in offset and blit information for the given
* image (determined by \p face and \p level).
@@
-108,7
+95,7
@@
static void compute_tex_image_offset(radeonContextPtr rmesa, radeon_mipmap_tree
uint32_t row_align;
GLuint height;
uint32_t row_align;
GLuint height;
- height =
find_next_power_of_two
(lvl->height);
+ height =
_mesa_next_pow_two_32
(lvl->height);
/* Find image size in bytes */
if (_mesa_is_format_compressed(mt->mesaFormat)) {
/* Find image size in bytes */
if (_mesa_is_format_compressed(mt->mesaFormat)) {