Skip to content

NonWritablePointer and NonStorablePointer for BDA ? Motivation similar to Aliased #392

Description

The problem is similar to annotating that a BDA aliases, this is why AliasedPointer and RestrictPointer exists in SPIR-V.

They tell us that its not the pointer given out by OpVariable which may alias memory locations when used, but the pointer stored at the location pointed to by OpVariable can aliasmemory locations when used (because there will be two OpLoad or one OpLoad and one OpStore instructions chained together and its about the second one).

So with regards to NonWritable and NonReadable we need a similar solution to let the compiler know a BDA won't be used in certain ways.

Right now I can let the compiler know that an SSBO will be readonly, but not BDA.

Another and cleaner way would be to bake this into the declared BDA pointer type, like a const decoration on a pointer in C or C++.
Could be done either via decoration of the OpType or simply by allowing one more operand to OpType when its a PhysicalStorageBuffer pointer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions