Skip to content

MoltenVK rejects SPIR-V uint(bool) casts emitted for WaveActiveAnyTrue #2593

@farzonl

Description

@farzonl

Test failure:

WaveActiveAnyTrue.test

Godbolt link

https://godbolt.org/z/vc34faxoj

How to generate the SPIRV:

clang-dxc -spirv -fspv-target-env=vulkan1.3 -fspv-extension=DXC -T cs_6_5 WaveActiveAnyTrue.test.hlsl > WaveActiveAnyTrue.test.spv

As the godbolt link shows SPIRV-Cross transpiled this fine But these line are erroring:

Out._m0[gl_GlobalInvocationID.x] = uint(bool _63);
Out._m0[gl_GlobalInvocationID.x + 4u] = uint(simd_any(bool _62));

MVK error(s)

[mvk-error] VK_ERROR_INITIALIZATION_FAILED: Shader library compile failed (Error code 3):
program_source:109:71: error: expected '(' for function-style cast or type construction
    (*spvDescriptorSet0.Out)._m0[gl_GlobalInvocationID.x] = uint(bool _63);
                                                                 ~~~~ ^
program_source:110:85: error: expected '(' for function-style cast or type construction
    (*spvDescriptorSet0.Out)._m0[gl_GlobalInvocationID.x + 4u] = uint(simd_any(bool _62));
                                                                               ~~~~ ^
.
[mvk-error] VK_ERROR_INITIALIZATION_FAILED: Compute shader function could not be compiled into pipeline. See previous logged error.

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