Skip to content

[SPIR-V] Invalid generated SPIR-V when nesting HLSL 2021 and intrinsic. #6995

@Mr-Wiseguy

Description

@Mr-Wiseguy

Description
In an attempt to minimize branching in our HLSL 2021 shader code, we have been converting boolean operators to use the and intrinsic from HLSL 2021 that doesn't short circuit. However, when nesting two calls to and, we get the following error:
fatal error: generated SPIR-V is invalid: Expected both operands to be of Result Type: LogicalAnd

Steps to Reproduce
https://shader-playground.timjones.io/a2afd625eb79aac130756befae206296
https://godbolt.org/z/vfn3Kxc7W

Environment

  • Tested latest July 2024 release and latest trunk on godbolt (5704c47)

Metadata

Metadata

Assignees

Labels

bugBug, regression, crashspirvWork related to SPIR-V

Type

No type

Projects

Status

Done

Status

Triaged

Relationships

None yet

Development

No branches or pull requests

Issue actions