diff options
author | Vlad Golovkin <[email protected]> | 2018-04-16 23:50:24 +0300 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2018-05-02 15:12:48 +0200 |
commit | 967aabca06fc48ee18e1f4fc534483d45bdcaa70 (patch) | |
tree | 862492f42f31678edf20626b858f54632eb140ca /src/gallium | |
parent | 3a1df14a7b5c1652aa72eb6cf43e69ab447c6273 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_screen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 1db112fa6c7..b278a2f11b4 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -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; |