Mesa (master): nvfx: Remove util_is_pot in favor of util_is_power_of_two.

Vinson Lee vlee at kemper.freedesktop.org
Sun Aug 29 05:13:47 UTC 2010


Module: Mesa
Branch: master
Commit: 1fc396204b5676d7ebdbc20089d6442ab3dbcef4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1fc396204b5676d7ebdbc20089d6442ab3dbcef4

Author: Vinson Lee <vlee at vmware.com>
Date:   Sat Aug 28 22:12:55 2010 -0700

nvfx: Remove util_is_pot in favor of util_is_power_of_two.

This is a follow up to commit 89b2897220acfacdc431f138377fbcec9f0ea812.

---

 src/gallium/drivers/nvfx/nvfx_miptree.c |    8 ++++----
 src/gallium/drivers/nvfx/nvfx_surface.c |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/nvfx/nvfx_miptree.c b/src/gallium/drivers/nvfx/nvfx_miptree.c
index 46e1f9e..0916aaa 100644
--- a/src/gallium/drivers/nvfx/nvfx_miptree.c
+++ b/src/gallium/drivers/nvfx/nvfx_miptree.c
@@ -20,9 +20,9 @@ nvfx_miptree_choose_format(struct nvfx_miptree *mt)
 	if(no_swizzle < 0)
 		no_swizzle = debug_get_bool_option("NV40_NO_SWIZZLE", FALSE); /* this will break things on nv30 */
 
-	if (!util_is_pot(pt->width0) ||
-	    !util_is_pot(pt->height0) ||
-	    !util_is_pot(pt->depth0) ||
+	if (!util_is_power_of_two(pt->width0) ||
+	    !util_is_power_of_two(pt->height0) ||
+	    !util_is_power_of_two(pt->depth0) ||
 	    (!nvfx_screen(pt->screen)->is_nv4x && pt->target == PIPE_TEXTURE_RECT)
 	    )
 		uniform_pitch = 1;
@@ -69,7 +69,7 @@ nvfx_miptree_layout(struct nvfx_miptree *mt)
 	if(!nvfx_screen(pt->screen)->is_nv4x)
 	{
 		assert(pt->target == PIPE_TEXTURE_RECT
-			|| (util_is_pot(pt->width0) && util_is_pot(pt->height0)));
+			|| (util_is_power_of_two(pt->width0) && util_is_power_of_two(pt->height0)));
 	}
 
 	for (unsigned l = 0; l <= pt->last_level; l++)
diff --git a/src/gallium/drivers/nvfx/nvfx_surface.c b/src/gallium/drivers/nvfx/nvfx_surface.c
index f6cc985..a5931b6 100644
--- a/src/gallium/drivers/nvfx/nvfx_surface.c
+++ b/src/gallium/drivers/nvfx/nvfx_surface.c
@@ -61,7 +61,7 @@ nvfx_region_set_format(struct nv04_region* rgn, enum pipe_format format)
 	default:
 		{
 			int shift;
-			assert(util_is_pot(bits));
+			assert(util_is_power_of_two(bits));
 			shift = util_logbase2(bits) - 3;
 			assert(shift >= 2);
 			rgn->bpps = 2;




More information about the mesa-commit mailing list