Skip to content

GLSLang should throw an error when a shader input or output variable does not have a location #781

@gfxstrand

Description

@gfxstrand

From the Vulkan 1.0.43 spec:

The remaining variables listed by OpEntryPoint with the Input or Output storage class form the user-defined variable interface. By default such variables have a type with a width of 32 or 64. If an implementation supports storageInputOutput16KHX, user-defined variables in the Input and Output storage classes can also have types with a width of 16. These variables must be identified with a Location decoration and can also be identified with a Component decoration.

So it's invalid to have a user-defined interface variable that does not have a location specifier. When building shaders for Vulkan, GLSLang should throw an error whenever a location specifier isn't provided. Perhaps we also need something added to the vulkan GLSL extension spec?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions