mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
nv50: Extract needed value bits without shifting them before calling bitcount
This can save one instruction since bitcount doesn't care about specific bits' positions. Reviewed-by: Karol Herbst <kherbst@redhat.com>
This commit is contained in:
parent
3a1df14a7b
commit
967aabca06
1 changed files with 1 additions and 1 deletions
|
|
@ -992,7 +992,7 @@ nv50_screen_create(struct nouveau_device *dev)
|
|||
nouveau_getparam(dev, NOUVEAU_GETPARAM_GRAPH_UNITS, &value);
|
||||
|
||||
screen->TPs = util_bitcount(value & 0xffff);
|
||||
screen->MPsInTP = util_bitcount((value >> 24) & 0xf);
|
||||
screen->MPsInTP = util_bitcount(value & 0x0f000000);
|
||||
|
||||
screen->mp_count = screen->TPs * screen->MPsInTP;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue