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

Using GL_NV_mesh_shader in separate program #21

Open
JustinCop opened this issue Sep 3, 2024 · 5 comments
Open

Using GL_NV_mesh_shader in separate program #21

JustinCop opened this issue Sep 3, 2024 · 5 comments

Comments

@JustinCop
Copy link

Hi, I'm using mesh shader with separate program (OpenGL). 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

This gl_nv_meshlet_cadscene does not using separate mode, so I don't know how to correctly redeclare outputs. Would you help give me an example?

@pdaniell-nv
Copy link

I think you're hitting a compiler bug, and it shouldn't be complaining about those particular builtins. Can you point me to the full shaders, or a repro?

@pdaniell-nv
Copy link

As a workaround, try using the compatibility profile with your #version declaration.

@pdaniell-nv
Copy link

I have reported this issue internally as nvbug 4846676.

@JustinCop
Copy link
Author

JustinCop commented Sep 4, 2024

Thank you for your quick response.
I am learning this article: https://www.geeks3d.com/20200519/introduction-to-mesh-shaders-opengl-and-vulkan/
The full shader is in that article.
BTW, using compatibility with #version declaration does not work.

The driver version is 560.94.

@pdaniell-nv
Copy link

There should be a fix for this issue in the latest Vulkan beta driver version 553.40 (Windows) and 550.40.76 (Linux) found here: https://developer.nvidia.com/vulkan-driver

I realize this is a "Vulkan" beta driver, but it should also contain this OpenGL GLSL fix.

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

2 participants