Possible OpenGL bug when using ARB_vertex_attrib_binding

Hello, I’m trying to perform instanced rendering while separating the vertex format from the data. When I bind vertex positions at attribute 0, normals at 1, and model matrices at 2, my normals get messed up. On the other hand, if I skip attribute index 1 and instead use 0, 2, and 3, the normals are correct.

I put together a minimal test code in C++11, using SDL2 and GLEW, which you can find here. If the preprocessor variable SKIP is set to 1 it skips attribute index 1, and works correctly. If you set it to zero, it should give the wrong result.
I have tested this on two linux systems with exactly the same results.

Could anyone confirm this is really a driver bug and if it also occurs in windows?
main.cpp (9.39 KB)

Could you please attach the reproducer to your post with the small paper clip icon which appears when hovering over your submitted post?
File sharing sites are blocked within our offices.

I attached the file. I compile it with

g++ -Wall -O3 -std=c++11 -o main -lSDL2 -lGLEW -lGL main.cpp

Thanks.

I forgot to ask about your configuration. I developed this checklist when reporting OpenGL related problems. Please fill out as much as is applicable, in your case at least 1-4, the rest should be covered by your main.cpp.

========================================
We normally need the following information to start analyses of bug reports.
(This is the general list and might not apply to all reports.)

  1. Operating system version.
    On Linux, an nvidia-bug-report.log generated by running nvidia-bug-report.sh as root.
  2. Graphics hardware.
  3. Graphics driver version.
  4. Display Control Panel settings for screen resolution, monitor configs, and driver settings.
    Under Windows: NVIDIA Control Panel -> Help -> System Information -> Save.
  5. Reproducer project.
    At least an executable which shows the problem. The simpler, the better.
    Make sure all necessary files to run this standalone are included (manifests, runtimes). Assume a clean test system!
    Source code in failing state highly appreciated.
    For GLSL compiler failures (C9999), the minimal set of shader sources reproducing the problem.
  6. Description of single steps to reproduce the problem.
  7. Description of the expected result (screenshots if possible).
    Performance issues require absolute measurement data and a description of how to reproduce them.
  8. If there is a crash in an NVIDIA module, the exact crash offset.
    ========================================

I’ve tested the program on two systems with the same results, but here is the info of the one I use at work.

  1. Attached.
  2. GeForce GT 610
  3. 352.21
  4. Attached (xorg.conf).
  5. Attached two images of expected and wrong results.

Please note you might have to #define GLM_FORCE_RADIANS before the glm header includes for some versions of glm.
bug_info.tar.gz (94.6 KB)

Hello,
did you mean to use glVertexBindingDivisor() and not glVertexAttribDivisor()?