From db5f895dab8c0d0d1cb192c75a3fff1ac13d8e7c Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Mon, 14 Jun 2021 11:59:04 +0200 Subject: [PATCH] zink: use correct type for u_bit_scan Since we're going to iterate over each bit of this variable using u_bit_scan, we should make sure we use an unsigned int for the variable. While this works on GCC, it's not guaranteed to work, and produces a warning on MSVC. Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c index c3d9dd0..bb47ce3 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c +++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c @@ -153,7 +153,7 @@ block_label(struct ntv_context *ctx, nir_block *block) static void emit_access_decorations(struct ntv_context *ctx, nir_variable *var, SpvId var_id) { - enum gl_access_qualifier access = var->data.access; + unsigned access = var->data.access; while (access) { unsigned bit = u_bit_scan(&access); switch (1 << bit) { -- 2.7.4