From b13260c689499840c805c9de0149485fa3d1585e Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Fri, 13 Aug 2021 18:48:40 +0200 Subject: [PATCH] [d3d11] Use BitMask helper --- src/d3d11/d3d11_util.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/d3d11/d3d11_util.h b/src/d3d11/d3d11_util.h index 2edecb6c1..749dc8bed 100644 --- a/src/d3d11/d3d11_util.h +++ b/src/d3d11/d3d11_util.h @@ -12,11 +12,8 @@ namespace dxvk { UINT CompactSparseList(T* pData, UINT Mask) { uint32_t count = 0; - while (Mask != 0) { - uint32_t id = bit::tzcnt(Mask); + for (uint32_t id : bit::BitMask(Mask)) pData[count++] = pData[id]; - Mask &= Mask - 1; - } return count; }