summaryrefslogtreecommitdiff
path: root/bsd-core/nv10_graph.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-07-06 11:55:28 -0700
committerEric Anholt <eric@anholt.net>2009-07-06 13:11:03 -0700
commit78fa590a1d297f2e2fea98bd3f0cbf4cdb1e3a08 (patch)
tree69b75677d8c3910a6aa8ed3e921b9cba1cd6a174 /bsd-core/nv10_graph.c
parentcea2d29ee49f23d560f0088a1a3dd01932a1eaf4 (diff)
intel: Fix up math errors when allocating very large BOs.
The logbase2 would overflow and wrap the size around to 0, making the code allocate a 4kb object instead. By simplifying the code to just walk the 14-entry bucket array comparing sizes instead of indexing on ffs(1 << logbase2(size)), we avoid silly math errors and have code of approximately the same speed. Many thanks to Simon Farnsworth for debugging and providing a working patch. Bug #27365.
Diffstat (limited to 'bsd-core/nv10_graph.c')
0 files changed, 0 insertions, 0 deletions