X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fstate_trackers%2Fg3dvl%2Fvl_util.c;h=50aa9af66f2684d7ae44b86e92f1e3ea089bc8f2;hb=c4c86bbd16688ee4a0afb32efa27ba52abceb1ca;hp=2421ae22101ac224eff8c38f514574030aba4b26;hpb=f56eda6a85912dee9eef9099f6023c6bab05a41a;p=mesa.git diff --git a/src/gallium/state_trackers/g3dvl/vl_util.c b/src/gallium/state_trackers/g3dvl/vl_util.c index 2421ae22101..50aa9af66f2 100644 --- a/src/gallium/state_trackers/g3dvl/vl_util.c +++ b/src/gallium/state_trackers/g3dvl/vl_util.c @@ -4,14 +4,13 @@ unsigned int vlRoundUpPOT(unsigned int x) { unsigned int i; - + assert(x > 0); - + --x; - + for (i = 1; i < sizeof(unsigned int) * 8; i <<= 1) x |= x >> i; - + return x + 1; } -