Skip to content

[HLSL] Make sure Clang handles uncommon cbuffer constructs per spec #118524

Open
1 of 2 issues completed
Open
@hekota

Description

@hekota

DXC supports a number of uncommon cbuffer declaration uses such as nested cbuffer declarations, static variable declaration, namespaces and function declarations inside cbuffer context. HLSL Language spec will define which of these are allowed or not (microsoft/hlsl-specs#357).

This task tracks the implementation of the 'cbuffer' construct features that are allowed. For those that are not we should report an error.

@tex3d put together an example that these various interesting cases here:
https://godbolt.org/z/E4cdx7xj8

Same shader with FXC:
https://shader-playground.timjones.io/39c0683735c0cd79b5970b5116765940

AC:

  • allowed 'cbuffer' uses are implemented in Clang and tested
  • errors are reported for disallowed uses

Depends on: microsoft/hlsl-specs#357

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    HLSLHLSL Language Support

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions