Skip to content

Require that vertex shaders return a position? #1567

Description

@jrprice

MSL requires that if a vertex shader does not return void, then it must at least return the position builtin. We should consider whether WGSL should impose the same requirement, and also whether it should be valid for a vertex shader to return void.

I'd like to propose that WGSL should require vertex shader return types to include [[builtin(position)]] if they are not void. I do not have a strong opinion on whether or not we should allow a return type of void.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wgslWebGPU Shading Language Issueswgsl resolvedResolved - waiting for a change to the WGSL specification

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions