zink: vertex shader attribute index considered as an xfb_buffer
System information
System:
Host: rpi Kernel: 6.2.0-1012-raspi arch: aarch64 bits: 64 compiler: N/A
Desktop: GNOME v: 44.3 tk: GTK v: 3.24.37 wm: gnome-shell dm: GDM3
Distro: Ubuntu 23.04 (Lunar Lobster)
CPU:
Info: quad core model: N/A variant: cortex-a72 bits: 64 type: MCP
arch: ARMv8 rev: 3 cache: L1: 320 KiB L2: 1024 KiB
Speed (MHz): avg: 700 min/max: 600/1500 cores: 1: 700 2: 700 3: 700 4: 700
bogomips: 432
Features: Use -f option to see features
Graphics:
Device-1: bcm2711-hdmi0 driver: vc4_hdmi v: N/A bus-ID: N/A
chip-ID: brcm:fef00700
Device-2: bcm2711-hdmi1 driver: vc4_hdmi v: N/A bus-ID: N/A
chip-ID: brcm:fef05700
Device-3: bcm2711-vc5 driver: vc4_drm v: N/A bus-ID: N/A chip-ID: brcm:gpu
Display: wayland server: X.org v: 1.21.1.7 with: Xwayland v: 22.1.8
compositor: gnome-shell driver: X: loaded: modesetting unloaded: fbdev
dri: vc4
gpu: vc4-drm,vc4_crtc,vc4_dpi,vc4_dsi,vc4_firmware_kms,vc4_hdmi,vc4_hvs,vc4_txp,vc4_v3d,vc4_vec
display-ID: 0
Monitor-1: HDMI-A-2 model: Acer VG270U P res: 2560x1440 dpi: 109
diag: 685mm (27")
API: OpenGL v: 4.6 Mesa 23.3.0-devel (git-938465ccac) renderer: zink
Vulkan 1.2(V3D 4.2 (MESA_V3DV)) direct-render: Yes
Describe the issue
I launch an opengl program with those env variables set:
export MESA_GL_VERSION_OVERRIDE=4.6 MESA_GLSL_VERSION_OVERRIDE=460 MESA_LOADER_DRIVER_OVERRIDE=zink
The glsl shaders use vertex shader attribute indexes, e.g.:
#version 460
layout(location = 0) in vec3 aPos;
layout(location = 1) in vec3 aColor;
out vec4 vertexColor;
void main ()
{
gl_Position = vec4(aPos, 1.0);
vertexColor = vec4(aColor, 1.0);
}
The program fails to compile the shaders:
0:6(1): error: invalid xfb_buffer specified 0 is larger than MAX_TRANSFORM_FEEDBACK_BUFFERS - 1 (-1).
0:4(1): error: invalid xfb_buffer specified 0 is larger than MAX_TRANSFORM_FEEDBACK_BUFFERS - 1 (-1).
The compiler mentions xfb_buffer
though there is no use of such layout in the shaders.
I cam across #5415 (closed) which seems related: I suspect that the _OVERRIDE env vars may play a role here. However, setting those vars is the only way I found to make my apps use the zink driver.
[edit] The v3d driver runs fine with these shaders.