Skip to content

proposal: eliminate the aliasing restrictions #5611

Description

@dneto0

Followup to #5501 and #5581

The aliasing section, "11.4.1.2 Aliasing", forbids potential read-write and write-write hazards through pointer parameters to function calls.

This rule was established to ensure safe use of pointer parameters where

  • we assumed a fairly direct translation to underlying platform shader languages, and
  • there are known hazards in those translations. (e.g. HLSL inout params can be implemented as copy-in-copy-out or as by reference)

If kept, the aliasing restriction will severely limit the utility of bindless and buffer-view proposals. We believe that implementations already have all or most of the machinery to avoid the bad underlying behaviours.

Per the discussions on the above two issues (e.g. here), treat the removal of the aliasing restrictions as its own independent language feature. Formally it is independent of buffer-view and bindless.

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 Issues

    Type

    No type

    Projects

    • Status
      Needs spec PR

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions