Skip to content

[HLSL] Add diagnostics for Buffers/RWBuffers with invalid element types #75676

@bogner

Description

@bogner

There's a specific closed set of types that are valid as element types for TypedBuffer types, which includes int/uint of sizes 16/32/64, half, float, and double. If someone writes RWBuffer<MyCustomType> we should reject it and give the user a nice diagnostic.

AC:

  • A spec is created to dictate the validation behavior
  • Type validation happens prior to code generation
  • Tests written to validate failure on mixed types

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Support

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions