Henri Verbeet : wined3d: Use wined3d_bit_scan() in context_preload_textures().

Alexandre Julliard julliard at winehq.org
Thu Jan 27 15:36:18 CST 2022


Module: wine
Branch: master
Commit: d89bfc39c5185d421924a746014ea0d68bebdd78
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d89bfc39c5185d421924a746014ea0d68bebdd78

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Jan 27 15:57:59 2022 +0100

wined3d: Use wined3d_bit_scan() in context_preload_textures().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/context.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 6aa5ae4e997..1dc691c46a0 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -390,12 +390,12 @@ void context_preload_textures(struct wined3d_context *context, const struct wine
     }
     else
     {
-        WORD ffu_map = context->fixed_function_usage_map;
+        uint32_t ffu_map = context->fixed_function_usage_map;
 
-        for (i = 0; ffu_map; ffu_map >>= 1, ++i)
+        while (ffu_map)
         {
-            if (ffu_map & 1)
-                context_preload_texture(context, state, i);
+            i = wined3d_bit_scan(&ffu_map);
+            context_preload_texture(context, state, i);
         }
     }
 }




More information about the wine-cvs mailing list