NV minibug: using gl_MaxPatchVertices or similar needs GL_NV_gpu_shader5

Hi defining a tess control shader gl_PerVertex using explicit sizing with gl_MaxPatchVertices fails compilation saying it requires:
#extension GL_NV_gpu_shader5 : enable

as this is a GLSL standard feature this is a bug…


out gl_PerVertex {
vec4 gl_Position;
vec3 pos2;
vec3 pos3;
vec3 nor1;
vec3 nor2;
vec3 tex;

float gl_PointSize;
} mygl_out[gl_MaxPatchVertices];

You probably confused the compiler when you redeclare [var]gl_PerVertex[/var] by adding a bunch of variables to it. That’s not allowed. The spec is very clear; you can only redeclare them with their current set of members.

If you have user-defined values, you need a user-defined interface block to stick them in.

Ok Alfonse,
you make me reason harder but I still have some reason…
let’s see…

  1. note I say that adding GL_NV_gpu_shader5 shader works so seems i’m not violating OGL too much…
  2. Sorry for gl_PerVertex def but even with an standard one it fails also…

out gl_PerVertex {
vec4 gl_Position;
float gl_PointSize;
float gl_ClipDistance[];
} gl_out[gl_MaxPatchVertices];

  1. I redefine whole data buffer names to avoid naming bugs and also fails:

out myglperv{
    vec4 pos1;
//vec4 gl_Position;
vec3 pos2;
vec3 pos3;
vec3 nor1;
vec3 nor2;
vec3 tex;
} mygl_out[gl_MaxPatchVertices];

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