Skip to content

Surround C++ operator overloads in hpp and hpp11 with an #ifndef SPV_DISABLE_ENUM_OPERATORS  #385

@devshgraphicsprogramming

Description

Hi, we're doing a slightly weird thing, which is we're including the SPIR-V Header in our HLSL code to make the writing on SPIR-V intrinsics easier (don't need to remember the opcodes)

However HLSL doesn't support global operator overloads, so we need a define similar to SPV_ENABLE_UTILITY_CODE (although a negative one so backwards compatibility it preserved)

alternative is #ifndef __HLSL_VERSION which checks for the HLSL compiler.

PR incoming.

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