Skip to content

Use GLSL_NV_mesh_shader with separate program #250

@JustinCop

Description

@JustinCop

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions