Minecraft: spec related compile errors
System information
System:
Host: vixea Kernel: 6.1.0-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc
v: 12.2.0 Desktop: KDE Plasma v: 5.26.4 tk: Qt v: 5.15.7 wm: kwin_wayland
dm: SDDM Distro: Arch Linux
CPU:
Info: 8-core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP arch: Zen 2
rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 32 MiB
Speed (MHz): avg: 3055 high: 4300 min/max: 2200/4426 boost: enabled cores:
1: 4295 2: 4296 3: 2447 4: 2554 5: 4294 6: 2228 7: 2184 8: 2150 9: 4300
10: 4192 11: 2457 12: 2638 13: 4272 14: 2144 15: 2296 16: 2142
bogomips: 115207
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M]
vendor: Gigabyte driver: amdgpu v: kernel arch: RDNA-2 pcie: speed: 16 GT/s
lanes: 16 ports: active: DP-2 empty: DP-1,HDMI-A-1,HDMI-A-2
bus-ID: 28:00.0 chip-ID: 1002:73df
Display: wayland server: X.org v: 1.21.1.6 with: Xwayland v: 22.1.7
compositor: kwin_wayland driver: X: loaded: amdgpu
unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
gpu: amdgpu display-ID: 0
Monitor-1: DP-2 res: 1920x1080 size: N/A
API: OpenGL v: 4.6 Mesa 22.3.1 renderer: AMD Radeon RX 6700 XT (navi22
LLVM 14.0.6 DRM 3.49 6.1.0-zen1-1-zen) direct render: Yes
Describe the issue
#define AUTO_EXPOSURE_MIN_LOG_LUM -8
const float a = -AUTO_EXPOSURE_MIN_LOG_LUM;
Loading a minimal shaderpack with the above lines causes a compiler error when talking with the developers of the shaderpack I first discovered it with it seems to be a violation of this spec right here. The issue is when adding the - causes it to be no longer a constant causing such an error. https://registry.khronos.org/OpenGL/specs/gl/GLSLangSpec.4.60.html#constant-expressions
Edit: Mesa doesn't follow: An expression formed by an operator on operands that are all constant expressions, including getting an element of a constant array, or a member of a constant structure, or components of a constant vector.
Regression
As far as I know it never worked.
Log files as attachment
Any extra information would be greatly appreciated
Edited by Vixea