Skip to content

DCE for unused shared memory arguments #455

@nazar-pc

Description

@nazar-pc

When debugging code, I often end up commenting-out pieces of code, which sometimes results in DCE that leaves shared memory arguments unused.

Unfortunately this results in validation error:

error: error:0:0 - [VUID-StandaloneSpirv-None-10684] Invalid explicit layout decorations on type for operand '290[%_ptr_Workgroup__struct_106]'
         %scratch_space = OpVariable %_ptr_Workgroup__struct_106 Workgroup
  |
  = note: spirv-val failed
  = note: module `file.spv`

It'd be really nice from DX perspective to also DCE this unused workgroup argument so that it doesn't end up in SPIR-V file and passes validation as the result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions