Skip to content

[HLSL][DXC Driver] Add preprocessor definition when -metal is passed #144738

Open
@llvm-beanz

Description

@llvm-beanz

Is your feature request related to a problem? Please describe.

We recently added a -metal flag to DXC to aid with cross-platform development workflows. When that flag is passed we should set a new preprocessor define in InitPreprocessor (something like __metal__) to denote that we're targeting Metal. That will allow for code portability to work around differences in behavior between DX, VK and MTL.

We should ensure this implementation aligns with microsoft/DirectXShaderCompiler#7553.

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