HLSL Working Group

2026-07-30 - HLSL Working Group Minutes

Discussion Topics

  • This week in HLSL
  • Math intrinsics and double overloads

Meeting Notes

This Week in HLSL

We saw 29 PRs merged, 25 new PRs opened, and have 64 PRs ongoing.

For a full list of merged PRs, see the appendix.

Math intrinsics and double overloads

We discussed some inconsistencies around intrinsics that are pure math and whether or not they have double overloads or if using doubles for these casts down to a float. We need to survey DXC’s implementation here to get an idea of how prevalent these are, but it would probably be a good thing to make a change in HLSL 202x to add double overloads for most or all of these.

Appendix: Merged PRs

HLSL Frontend

  • Add InterlockedAdd resource methods (llvm/llvm-project#208128)
  • [HLSL] Implement HLSL InterlockedXor (llvm/llvm-project#209254)
  • [HLSL] Add in-memory representation of Semantic Signatures (llvm/llvm-project#209907)
  • [HLSL] Move cross implementation to header files (llvm/llvm-project#211446)
  • Add InterlockedOr resource methods (llvm/llvm-project#211639)
  • [HLSL] Add UsedByAtomic64 shader flag (llvm/llvm-project#211691)
  • [HLSL] Add sema for use of samplers and gathers on textures of doubles and ints (llvm/llvm-project#212613)
  • [HLSL] Add availability attributes to texture sample methods that require implicit derivatives (llvm/llvm-project#212846)

SPIR-V Backend

  • [SPIRV][Matrix] Change Matrix Shader legalization to largest common divisor (llvm/llvm-project#207768)
  • [SPIR-V] Reject builtin calls if mangled argument types do not match the IR (llvm/llvm-project#208152)
  • [SPIR-V] Guard against infinite loop in decorateUsesAsNonUniform (llvm/llvm-project#208224)
  • [NFC][SPIR-V] Add constrainSelectedInstRegOperands helper to dedup repeating pattern in global registry (llvm/llvm-project#208703)
  • [SPIR-V] Fix direct return of aggregate extractvalue (llvm/llvm-project#209762)
  • [SPIRV] Emit NonSemantic DebugTypeArray. (llvm/llvm-project#211537)
  • [NFC][SPIR-V] Reuse PartialOrderingVisitor DominatorTree in structurizer splitter (llvm/llvm-project#211544)
  • [SPIRV] Preserve sign-sensitive width record across G_TRUNC replacement (llvm/llvm-project#211626)
  • Implement support for NSDI DebugFunction opcode. (llvm/llvm-project#211760)
  • [SPIRV] Emit NonSemantic DebugTypeComposite and DebugTypeMember. (llvm/llvm-project#211638)
  • Revert “[SPIRV][Matrix] Change Matrix Shader legalization to largest common divisor” (llvm/llvm-project#211660)
  • [SPIRV] Emit NonSemantic DebugTypedef (llvm/llvm-project#211883)
  • [SPIR-V] Fix vloada_halfn builtin number (llvm/llvm-project#212218)
  • [SPIR-V] Fix hex float exponent for f64 Inf/NaN literals (llvm/llvm-project#212295)
  • [SPIR-V] Fix OpDecorate insertion point for non-PHI defs in decorateUsesAsNonUniform (llvm/llvm-project#212524)

Offload Test Suite

  • Support arrays of TLAS bindings (llvm/offload-test-suite#1305)
  • Add mipmap support to createTextureWithData. (llvm/offload-test-suite#1332)
  • OffloadMigration: Fix -Wchanges-meaning errors from newer GCC (llvm/offload-test-suite#1352)
  • Support standalone builds of the offload test suite (llvm/offload-test-suite#1376)
  • Add pow matrix tests (llvm/offload-test-suite#1396)
  • XFAIL tests that sink OpImageSampleImplicitLod into control flow (llvm/offload-test-suite#1399)
  • [DirectX] Implement sampler support (llvm/offload-test-suite#1403)