这是indexloc提供的服务,不要输入任何密码
Skip to content

Invariant qualifier #893

@litherum

Description

@litherum

Shader optimizers can cause exact bit results of computations to vary slightly depending on how the stars align. This can mess up algorithms that run multiple passes on the same geometry. All algorithms that involve a depth compare function of "equal" will probably fall into this problem.

We should add an invariant qualifier to the language to solve this problem. This qualifier indicates that the same local operation must produce consistent results, even if the global environment has changed.

MSL has this qualifier today on vertex function outputs (section 5.2.3.3 Vertex Function Output Attributes). GLSL has (essentially) the same thing. HLSL seems not to have it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    wgslWebGPU Shading Language Issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions