From 04a643d877c5fc6963469a68a3896d47ee6703b4 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 10 May 2025 23:18:03 +0200 Subject: [PATCH] intel/compiler: use ffsll instead of ffsl in brw_vue_map.c 18bbcf9a triggered the following building error in Android, simple fix is to use ffsll() as it was done before 18bbcf9a to process uint64_t generics argument. Fixes the following building error: FAILED: src/intel/compiler/libintel_compiler.a.p/brw_vue_map.c.o ... ../src/intel/compiler/brw_vue_map.c:120:37: error: implicit declaration of function 'ffsl' is invalid in C99 [-Werror,-Wimplicit-function-declaratio n] const int first_generic_output = ffsl(generics) - 1; ^ ../src/intel/compiler/brw_vue_map.c:120:37: note: did you mean 'ffs'? /home/utente/r-x86_kernel/bionic/libc/include/strings.h:72:5: note: 'ffs' declared here int ffs(int __i) __INTRODUCED_IN_X86(18); ^ 1 error generated. Fixes: 18bbcf9a ("intel: introduce new VUE layout for separate compiled shader with mesh") Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw_vue_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_vue_map.c b/src/intel/compiler/brw_vue_map.c index d5c2a32d3ef..646080b2150 100644 --- a/src/intel/compiler/brw_vue_map.c +++ b/src/intel/compiler/brw_vue_map.c @@ -117,7 +117,7 @@ brw_compute_per_primitive_map(int *out_per_primitive_map, /* Lay out generics */ const uint64_t generics = per_primitive_outputs_written & ~BITFIELD64_MASK(VARYING_SLOT_VAR0); - const int first_generic_output = ffsl(generics) - 1; + const int first_generic_output = ffsll(generics) - 1; u_foreach_bit64(location, generics) { assert(out_per_primitive_map[location] == -1); if (!separate_shader) {