Bug 107629 - [regression][bisected] Build fails with nir_load_sample_id_no_per_sample being undefined
Summary: [regression][bisected] Build fails with nir_load_sample_id_no_per_sample bein...
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-20 19:05 UTC by Hi-Angel
Modified: 2018-08-20 20:18 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Hi-Angel 2018-08-20 19:05:33 UTC
Build fails with the following errors:

	[77/1193] Compiling C object 'src/compiler/nir/src@compiler@nir@@nir@sta/meson-generated_.._nir_intrinsics.c.o'.
	src/compiler/nir/nir_intrinsics.c:2039:1: warning: excess elements in array initializer
	 {
	 ^
	src/compiler/nir/nir_intrinsics.c:2039:1: note: (near initialization for ‘nir_intrinsic_infos’)
	[123/1193] Compiling C object 'src/compiler/nir/src@compiler@nir@@nir@sta/nir_lower_system_values.c.o'.
	FAILED: src/compiler/nir/src@compiler@nir@@nir@sta/nir_lower_system_values.c.o 
	cc -Isrc/compiler/nir/src@compiler@nir@@nir@sta -Isrc/compiler/nir -I../mesa/src/compiler/nir -Isrc/../include -I../mesa/src/../include -Isrc -I../mesa/src -Isrc/mapi -I../mesa/src/mapi -Isrc/mesa -I../mesa/src/mesa -I../mesa/src/gallium/include -Isrc/gallium/auxiliary -I../mesa/src/gallium/auxiliary -Isrc/compiler -I../mesa/src/compiler -Isrc/compiler/nir/../spirv -I../mesa/src/compiler/nir/../spirv -Isrc/compiler/spirv -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -std=c99 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DVERSION="18.2.0-devel"' -DPACKAGE_VERSION=VERSION '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa"' -DGLX_USE_TLS -DHAVE_ST_VDPAU -DENABLE_ST_OMX_BELLAGIO=1 -DENABLE_ST_OMX_TIZONIA=0 -DHAVE_X11_PLATFORM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DHAVE_SURFACELESS_PLATFORM -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_64_ASM -DMAJOR_IN_SYSMACROS -DHAVE_SYS_SYSCTL_H -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_POSIX_MEMALIGN -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_PTHREAD -DHAVE_LIBDRM -DHAVE_LLVM=0x0800 -DMESA_LLVM_VERSION_PATCH=0 -DUSE_LIBGLVND=1 -DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -Wall -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-math-errno -fno-trapping-math -Wno-missing-field-initializers -march=native -O3 -fno-stack-protector -fweb -fno-semantic-interposition -fmerge-all-constants -floop-nest-optimize -fPIC -fvisibility=hidden -Werror=pointer-arith -Werror=vla -Wno-override-init  -MD -MQ 'src/compiler/nir/src@compiler@nir@@nir@sta/nir_lower_system_values.c.o' -MF 'src/compiler/nir/src@compiler@nir@@nir@sta/nir_lower_system_values.c.o.d' -o 'src/compiler/nir/src@compiler@nir@@nir@sta/nir_lower_system_values.c.o' -c ../mesa/src/compiler/nir/nir_lower_system_values.c
	../mesa/src/compiler/nir/nir_lower_system_values.c: In function ‘convert_block’:
	../mesa/src/compiler/nir/nir_lower_system_values.c:153:28: error: implicit declaration of function ‘nir_load_sample_id_no_per_sample’; did you mean ‘nir_load_sample_pos’? [-Werror=implicit-function-declaration]
								nir_load_sample_id_no_per_sample(b));
								^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
								nir_load_sample_pos
	../mesa/src/compiler/nir/nir_lower_system_values.c:153:28: warning: passing argument 3 of ‘nir_ishl’ makes pointer from integer without a cast [-Wint-conversion]
								nir_load_sample_id_no_per_sample(b));
								^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	In file included from ../mesa/src/compiler/nir/nir_builder.h:379,
					 from ../mesa/src/compiler/nir/nir_lower_system_values.c:29:
	../mesa/src/compiler/nir/nir_builder_opcodes.h:789:62: note: expected ‘nir_ssa_def *’ {aka ‘struct nir_ssa_def *’} but argument is of type ‘int’
	 nir_ishl(nir_builder *build, nir_ssa_def *src0, nir_ssa_def *src1)
													 ~~~~~~~~~~~~~^~~~
	cc1: some warnings being treated as errors
	[128/1193] Compiling C object 'src/compiler/nir/src@compiler@nir@@nir@sta/nir_lower_tex.c.o'.
	ninja: build stopped: subcommand failed.
	==> ERROR: A failure occurred in build().
		Aborting...

# Bisected commit:


8dfc9e22c12ff840510d876b09d7f7163256bb17 is the first bad commit
commit 8dfc9e22c12ff840510d876b09d7f7163256bb17
Author: Rob Clark <robdclark@gmail.com>
Date:   Fri Jun 1 14:07:15 2018 -0400

    nir: add lowering for gl_HelperInvocation
    
    v2: reword comment about lower_helper_invocations to be more clear
        that it might not work on all hardware
    v3: add special variant of load_sample_id which does not imply per-
        sample shading
    
    Signed-off-by: Rob Clark <robdclark@gmail.com>

:040000 040000 ddb9c228e9f22d020ec2a1eb20b46803187a6ea0 55e9ca1c8d04a1e157697a94576dfbec8c140db2 M      src

# Steps to reproduce

Build with the following commands:

    meson setup mesa _build \
       -D b_ndebug=true \
       -D buildtype=plain \
       --wrap-mode=nofallback \
       -D prefix=/usr \
       -D sysconfdir=/etc \
       -D platforms=x11,wayland,drm,surfaceless \
       -D dri-drivers="" \
       -D gallium-drivers=r600,swrast \
       -D vulkan-drivers="" \
       -D dri3=true \
       -D egl=true \
       -D gallium-extra-hud=true \
       -D gallium-nine=true \
       -D gallium-omx=bellagio \
       -D gallium-va=true \
       -D gallium-vdpau=true \
       -D gallium-xa=false \
       -D gallium-xvmc=false \
       -D gbm=true \
       -D gles1=true \
       -D gles2=true \
       -D glvnd=true \
       -D glx=dri \
       -D libunwind=false \
       -D llvm=true \
       -D lmsensors=true \
       -D osmesa=gallium \
       -D shared-glapi=true \
       -D gallium-opencl=icd \
       -D valgrind=false \
       -D tools=[]
    meson configure _build
    ninja -C _build
Comment 1 Rob Clark 2018-08-20 19:22:40 UTC
this seems like you are somehow ending up with old versions of some of the generated headers?

At one point, nir_intrinsics.h was not autogenerated.. maybe you have an old copy of it lying around?

Do you get the same issue with a freshly cloned git tree?
Comment 2 Hi-Angel 2018-08-20 20:18:09 UTC
> Do you get the same issue with a freshly cloned git tree?

Oh, indeed, removing both build and source code directories made it working. Sorry for the noise.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.