Skip to content

[DirectX] Implement Shader Flag Analysis for RequiresGroup #116276

@bharadwajy

Description

@bharadwajy

DXC sets the flag m_bRequiresGroup to indicate a function accesses group shared memory. It is set if any of the function instruction's type or operand type being a pointer into thread group shared memory - per this and this.

  1. Need to add SHADER_FEATURE_FLAG(32, 40, RequiresGroup, "Function accesses thread group shared memory") to llvm/include/llvm/BinaryFormat/DXContainerConstants.def.
  2. Set RequiresGroup if any of the function instruction's type or operand type being a pointer into thread group shared memory.

Clarification needed: Does clang use a separate address space or some other mechanism to represent thread group shared memory?

AC:

Add tests to verify correctness of analysis.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions