llvmpipe: Make lp_build_interp_soa declaration match its definition
authorMichel Dänzer <mdaenzer@redhat.com>
Fri, 14 Apr 2023 09:26:10 +0000 (11:26 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 18 Apr 2023 09:49:44 +0000 (09:49 +0000)
Pointed out by GCC 13:

../src/gallium/drivers/llvmpipe/lp_bld_interp.c:545:1: warning: conflicting types for ‘lp_build_interp_soa’ due to enum/integer mismatch; have ‘struct LLVMOpaqueValue *(struct lp_build_interp_soa_context *, struct gallivm_state *, struct LLVMOpaqueValue *, struct LLVMOpaqueType *, struct LLVMOpaqueValue *, unsigned int,  unsigned int,  enum tgsi_interpolate_loc,  struct LLVMOpaqueValue *, struct LLVMOpaqueValue **)’ [-Wenum-int-mismatch]
  545 | lp_build_interp_soa(struct lp_build_interp_soa_context *bld,
      | ^~~~~~~~~~~~~~~~~~~
In file included from ../src/gallium/drivers/llvmpipe/lp_bld_interp.c:50:
../src/gallium/drivers/llvmpipe/lp_bld_interp.h:154:1: note: previous declaration of ‘lp_build_interp_soa’ with type ‘struct LLVMOpaqueValue *(struct lp_build_interp_soa_context *, struct gallivm_state *, struct LLVMOpaqueValue *, struct LLVMOpaqueType *, struct LLVMOpaqueValue *, unsigned int,  unsigned int,  unsigned int,  struct LLVMOpaqueValue *, struct LLVMOpaqueValue **)’
  154 | lp_build_interp_soa(struct lp_build_interp_soa_context *bld,
      | ^~~~~~~~~~~~~~~~~~~

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22517>

src/gallium/drivers/llvmpipe/lp_bld_interp.h

index 445c865..34e44ac 100644 (file)
@@ -157,7 +157,7 @@ lp_build_interp_soa(struct lp_build_interp_soa_context *bld,
                     LLVMTypeRef mask_type,
                     LLVMValueRef mask_store,
                     unsigned attrib, unsigned chan,
-                    unsigned loc,
+                    enum tgsi_interpolate_loc loc,
                     LLVMValueRef indir_index,
                     LLVMValueRef offsets[2]);