Skip to content

Disallow volatile keyword #8391

@bob80905

Description

@bob80905

DXC should disallow the volatile keyword across the board, regardless of the target IR.

RWByteAddressBuffer gBuf : register(u0);
   
   [numthreads(1,1,1)]
   void main() {
       volatile RWByteAddressBuffer buf = gBuf;
       buf.Store(0, 42);
   }

DXC accepts this hlsl, and it should not.
Command: dxc -T cs_6_0 -Fo out.o input.hlsl

We need a diagnostic to be emitted, something like "unrecognized identifier volatile", that word should not be recognized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions