radv: Use unsigned with u_bit_scan for MSVC
authorJames Park <jpark37@lagfreegames.com>
Fri, 27 Nov 2020 03:28:32 +0000 (19:28 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 2 Dec 2020 11:27:01 +0000 (11:27 +0000)
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7866>

src/amd/vulkan/radv_debug.c

index 020474f0eafcf3c9efe4cee3bfbf6cea3d07bb9e..e12b50dabf309fef3e30fc25591e908c93693fb0 100644 (file)
@@ -379,8 +379,9 @@ radv_dump_annotated_shaders(struct radv_pipeline *pipeline,
                "\n\n", num_waves);
 
        /* Dump annotated active graphics shaders. */
-       while (active_stages) {
-               int stage = u_bit_scan(&active_stages);
+       unsigned stages = active_stages;
+       while (stages) {
+               int stage = u_bit_scan(&stages);
 
                radv_dump_annotated_shader(pipeline->shaders[stage],
                                           stage, waves, num_waves, f);
@@ -447,8 +448,9 @@ radv_dump_shaders(struct radv_pipeline *pipeline,
                  VkShaderStageFlagBits active_stages, FILE *f)
 {
        /* Dump active graphics shaders. */
-       while (active_stages) {
-               int stage = u_bit_scan(&active_stages);
+       unsigned stages = active_stages;
+       while (stages) {
+               int stage = u_bit_scan(&stages);
 
                radv_dump_shader(pipeline, pipeline->shaders[stage], stage, f);
        }