Querying GL_MAX_VARYING_FLOATS is "unacceptable value" on NVidia GTX 1080


calling this on an NVidia GeForce GTX 1080

GLint result;
glGetIntegerv(GL_MAX_VARYING_FLOATS, &result);

results in error code

An unacceptable value is specified for an enumerated argument. The offending command is ignored and has no other side effect than to set the error flag. (Code: 1280)

when checking with glGetError()! I am using OpenGL 3.2 Core Profile context.

Why do I get this error? Checked with an AMD Radeon card and no error is reported.

Help is really appreciated!

Betriebssystem: Windows 10 Home, 64-bit
DirectX-Version: 12.0
GPU-Prozessor: GeForce GTX 1080
Treiberversion: 368.39


NvUpdtr.dll NVIDIA Update Components
NvUpdt.dll NVIDIA Update Components
nvui.dll NVIDIA User Experience Driver Component
nvxdsync.exe NVIDIA User Experience Driver Component
nvxdplcy.dll NVIDIA User Experience Driver Component
nvxdbat.dll NVIDIA User Experience Driver Component
nvxdapix.dll NVIDIA User Experience Driver Component
NVCPL.DLL NVIDIA User Experience Driver Component
nvCplUIR.dll 8.1.900.0 NVIDIA Control Panel
nvCplUI.exe 8.1.900.0 NVIDIA Control Panel
nvWSSR.dll NVIDIA Workstation Server
nvWSS.dll NVIDIA Workstation Server
nvViTvSR.dll NVIDIA Video Server
nvViTvS.dll NVIDIA Video Server
nvLicensingS.dll NVIDIA Licensing Server
NVSTVIEW.EXE NVIDIA 3D Vision Photo Viewer
NVSTTEST.EXE NVIDIA 3D Vision Test Application
nvDispSR.dll NVIDIA Display Server
NVMCTRAY.DLL NVIDIA Media Center Library
nvDispS.dll NVIDIA Display Server
PhysX 09.16.0318 NVIDIA PhysX
nvGameSR.dll NVIDIA 3D Settings Server
nvGameS.dll NVIDIA 3D Settings Server

Problem already solved! Thread can be closed.

Got the hint from somebody to remove the flag for forward-compatible context. That solved the problem and in general is not recommended to be used anyway.

Appendix E.2.1 of the OpenGL 3.2 specification says:

E.2.1 Deprecated But Still Supported Features

The following features are deprecated, but still present in the core profile. They may be removed from a future version of OpenGL, and are removed in a forward-compatible context implementing the core profile.

* Wide lines - LineWidth values greater than 1.0 will generate an INVALID_VALUE error.

* Global component limit query - the implementation-dependent values MAX_VARYING_COMPONENTS and MAX_VARYING_FLOATS.