nvfx: Remove util_is_pot in favor of util_is_power_of_two.
authorVinson Lee <vlee@vmware.com>
Sun, 29 Aug 2010 05:12:55 +0000 (22:12 -0700)
committerVinson Lee <vlee@vmware.com>
Sun, 29 Aug 2010 05:12:55 +0000 (22:12 -0700)
This is a follow up to commit 89b2897220acfacdc431f138377fbcec9f0ea812.

src/gallium/drivers/nvfx/nvfx_miptree.c
src/gallium/drivers/nvfx/nvfx_surface.c

index 46e1f9e4f482e781cfd99728ef4f432c8c43f72f..0916aaa8289ba830bc098d7bdb0c1a49f3ba18c9 100644 (file)
@@ -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++)
index f6cc98567379846c436f4a9b2751b30d229f553d..a5931b6e1526e75d3878643e7ebf50407b29a252 100644 (file)
@@ -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;