[all-commits] [llvm/llvm-project] 0eba8c: [DirectX] Implement Max64UAVs shader flag analysis...

Deric C. via All-commits all-commits at lists.llvm.org
Tue Apr 22 09:35:56 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0eba8cbef6a196d5373de17d8844487daf27656a
      https://github.com/llvm/llvm-project/commit/0eba8cbef6a196d5373de17d8844487daf27656a
  Author: Deric C. <cheung.deric at gmail.com>
  Date:   2025-04-22 (Tue, 22 Apr 2025)

  Changed paths:
    M llvm/lib/Target/DirectX/DXILShaderFlags.cpp
    A llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs-array-sm6_5.ll
    A llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs-array-sm6_6.ll
    A llvm/test/CodeGen/DirectX/ShaderFlags/max-64-uavs.ll

  Log Message:
  -----------
  [DirectX] Implement Max64UAVs shader flag analysis (#136229)

Fixes [#114553](https://github.com/llvm/llvm-project/issues/114553)

This implementation replicates the behavior of DXC in setting the
`m_b64UAVs` flag: the `Max64UAVs` DXIL module flag is set in the
presence of more than 8 UAVs in a DXIL module.

The behavior of how UAV (resource) arrays are counted differs based on
Shader Model version:
- If Shader Model < 6.6, then a UAV array counts as a single UAV
regardless of its range size
- if Shader Model >= 6.6, then a UAV array contributes its range size to
the total number of UAVs

I initially thought the complete implementation of this analysis may be
blocked by the resource arrays implementation, but it seems that it is
not the case, as the `@llvm.dx.resource.handle*` already includes a
range size argument.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list