Interpolation qualifiers in interface blocks


I’m having problems when using interpolation qualifiers (flat/smooth) inside interface blocks.

The following works as expected with AMD and NVIDIA:

Vertex program:

flat out vec4 color;

Fragment program:

flat in vec4 color;

However, when using an interface block such as:

out Vertex
  flat vec4 color;
in Vertex
  flat vec4 color;

I get a compile error in NVIDIA (“error C7561: OpenGL requires ‘in/out’ with ‘flat’”), while in AMD the ‘flat’ keyword is just ignored and a linear interpolation is done instead.

From what I understand, it should work according to GLSL 3.30 spec (4.3.7).

I am using shader #version 330, ATI Radeon 5850 with Catalyst 10.9, NVIDIA GeForce 9300M GS with 258.96, on Windows 7 x64.


It’s a known issue for AMD driver and is fixed recently. You’d better wait for an upcoming driver to have a try.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.