[RADV] Some bindings seem broken with VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT
Description
If I use VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXT
to specify the stride at runtime and set the stride to something invalid (1 byte) in the pipeline, it seems to work for some bindings since position works OK but color is broken.
The demo below exercises different dynamic states but it works fine if this state isn't dynamic. You can comment it out at line 32018 to toggle between broken:
or working:
Repro steps
I've attached a mega C++ file which can be compiled with a one-liner: ext_state_repro.cpp. It needs glslc or glslangValidator in the path to compile the shaders, then g++ ext_state_repro.cpp $(pkg-config --cflags --libs sdl2) -ldl -o program
.
Running it by default will use the dynamic stride and seems to render black triangles for me (the colours are passed through from vertex binding all the way to output).
System information
System: Host: lupino Kernel: 5.4.0-47-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Fluxbox 1.3.5 dm: GDM3 Distro: Ubuntu 20.04.1 LTS (Focal Fossa)
CPU: Topology: 8-Core model: AMD Ryzen 7 1700X bits: 64 type: MT MCP arch: Zen rev: 1
L2 cache: 4096 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 108794
Speed: 1893 MHz min/max: 2200/3400 MHz Core speeds (MHz): 1: 1889 2: 1891 3: 1887 4: 1899
5: 1911 6: 2025 7: 1886 8: 1888 9: 1886 10: 1895 11: 1890 12: 1894 13: 1890 14: 1894
15: 1887 16: 1895
Graphics: Device-1: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] vendor: PC Partner Limited
driver: amdgpu v: kernel bus ID: 24:00.0 chip ID: 1002:67df
Device-2: NVIDIA TU102 [GeForce RTX 2080 Ti Rev. A] driver: N/A bus ID: 25:00.0
chip ID: 10de:1e07
Display: x11 server: X.Org 1.20.8 driver: ati,modesetting unloaded: fbdev,radeon,vesa
resolution: 1920x1080~60Hz
OpenGL:
renderer: AMD Radeon RX 480 Graphics (POLARIS10 DRM 3.35.0 5.4.0-47-generic LLVM 10.0.1)
v: 4.6 Mesa 20.3.0-devel (git-cf3b638f47) direct render: Yes