Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GLSL_NV_mesh_shader with separate program #250

Open
JustinCop opened this issue Sep 2, 2024 · 2 comments
Open

Use GLSL_NV_mesh_shader with separate program #250

JustinCop opened this issue Sep 2, 2024 · 2 comments

Comments

@JustinCop
Copy link

I'm using mesh shader with separate program. when compiling mesh shader (using glCreateShaderProgramv), it return following error:
C7592: ARB_separate_shader_objects requires built-in block gl_PerVertex to be redeclared before accessing its members

If I declare output like this:

out gl_PerVertex {
    vec4 gl_Position;
};

It returns following error:
error C7593: Builtin block member gl_Position not found in redeclaration of out gl_PerVertex

If I declare output like this:

out gl_MeshPerVertexNV {  
    vec4 gl_Position;  
} gl_MeshVerticesNV[];  

It returns following error:

error C7528: OpenGL reserves names starting with 'gl_': gl_MeshPerVertexNV
error C7528: OpenGL reserves names starting with 'gl_': gl_MeshVerticesNV

The example here (https://github.com/nvpro-samples/gl_vk_meshlet_cadscene) does not using separate mode, so I don't know how to correctly redeclare outputs. Would you help give me an example?

@pixeljetstream
Copy link

pixeljetstream commented Sep 27, 2024

this looks like bug in the OpenGL driver's shader compiler. GLSLANG is fine with specifying.

out gl_MeshPerVertexNV {  
    vec4 gl_Position;  
} gl_MeshVerticesNV[];  

We filed a bug internally about this. Thanks for reporting.

@pdaniell-nv
Copy link
Contributor

Yes I agree. I'll try to get a fix implement asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants