Skip to content

DCE does not remove unused built-in Input variables, keeping required capabilities alive #6486

@Przemog1

Description

@Przemog1

SPIRV-Tools DCE fails to remove unused built-in Input variables.
As a result, capabilities required by those built-ins are kept, even though the variables
are never referenced anywhere in the module.

Steps to reproduce:
HLSL: https://godbolt.org/z/a6TsvPE9c
SPIR-V emitted: https://godbolt.org/z/Ks7915d63

Additional note:
This is likely caused by the fact that SPV_EXT_shader_atomic_float16_add is not included in the DCE whitelist.

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