HLSL Working Group

2026-08-13 - HLSL Working Group Minutes

Discussion Topics

  • This week in HLSL
  • Long vector implementation in Clang
  • Requests for Review

Meeting Notes

This Week in HLSL

This week had 33 PRs merged in HLSL:

  • HLSL Frontend
    • Various intrinsics now support matrices
    • The GSOC clangd patches are starting to land
    • Documentation improvements
    • Several HLSL functions are now implemented in the HLSL headers
  • DirectX Backend
    • Lowering for pixel shader constructs and textures has had quite a bit of progress
  • SPIR-V Backend
    • Legalization and lowering improvements - specifically around aggregates
    • Many cleanups and NFC refactorings
  • Offload Test Suite
    • XFAIL cleanups and infrastructure improvements

There were 27 new PRs opened. Between the merged PRs and some cleanup of older open PRs We’re down to 49 ongoing reviews.

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

Long Vector Implementation in Clang

@farzonl walked us through the plan for implementing HLSL long vector support in clang. It looks like most of the work here will be in updates to tablegen, and then we can move on to implementing and testing the elementwise intrinsics. For non-elementwise intrinsics like dot product we’ll probably want to implement the handling in intrinsic expansion, as doing these in the frontend would need some awkward shader model specific macro tests.

  • [HLSL][Tablegen][LongVec] Add a means of generating vector templates (llvm/wg-hlsl#462)
  • [HLSL][longvec] Add longvector support for elementwise intrinsics in the frontend (llvm/llvm-project#216103)
  • [HLSL][LongVec] Make a long Vector Dot product (llvm/llvm-project#216094)

Requests for Review

There were no specific requests for review this week.

Other topics

  • @hekota pointed out that work on dynamic resources will be happening in the coming weeks.

Appendix: Merged PRs

HLSL Frontend

  • [HLSL] Add matrix support for isnan() and isinf() (llvm/llvm-project#195586)
  • [Matrix] Implement matrix support for the pow intrinsic (llvm/llvm-project#212514)
  • [clangd][HLSL] Fix register attribute source range for hover inside arguments (llvm/llvm-project#212881)
  • [HLSL] Generate semantic signature metadata (llvm/llvm-project#212892)
  • [HLSL] Document all spellable attributes (llvm/llvm-project#213346)
  • [HLSL] Fix crash when comparing two half vectors (llvm/llvm-project#214332)
  • Update atan2 matrix tests (llvm/llvm-project#214550)
  • [HLSL] Use the right memory scope on atomic instructions (llvm/llvm-project#214592)
  • [HLSL] Move step implementation to header files (llvm/llvm-project#214604)
  • [HLSL] Move degrees implementation to header files (llvm/llvm-project#215436)
  • [HLSL] Move lerp implementation to header files (llvm/llvm-project#215692)

DirectX Backend

  • [HLSL][DirectX] Implement WaveGetLaneCount lowering (llvm/llvm-project#156338)
  • [HLSL][DirectX] Lower llvm.dx.load.input and llvm.dx.store.output to DXIL (llvm/llvm-project#208871)
  • [HLSL][DirectX] Implement lowering of texture stores (llvm/llvm-project#212364)
  • [HLSL][DirectX] Correct codegen of dx.load.input/dx.store.output intrinsic calls (llvm/llvm-project#212656)

SPIR-V Backend

  • [SPIR-V] Lower nested aggregate insertvalue operands (llvm/llvm-project#204239)
  • [SPIR-V] Avoid rescanning use lists to check for Block decoration (llvm/llvm-project#211320)
  • [NFC][SPIR-V] Remove unused SPIRVGlobalRegistry methods (llvm/llvm-project#214270)
  • [NFC][SPIR-V] Remove unused getSwitchConstructBlocks and getCaseConstructBlocks (llvm/llvm-project#214271)
  • [NFC][SPIR-V] Remove unused IsBallot and IsBallotFindBit fields from GroupBuiltin (llvm/llvm-project#214273)
  • [SPIR-V] Set MIB insert point before widened type lookup in widenSignSensitiveOps (llvm/llvm-project#214424)
  • [SPIR-V] Fix FaceForward combine erasing unrelated users (llvm/llvm-project#214626)
  • [NFC][SPIR-V] Fuse redundant store-collecting loop into main scan in SPIRVEmitIntrinsics (llvm/llvm-project#215489)
  • [NFC][SPIR-V] Fuse redundant full-traversal loops in SPIRVPrepareFunctions (llvm/llvm-project#215490)
  • [NFC][SPIR-V] Fuse redundant full-traversal loops in SPIRVStructurizer (llvm/llvm-project#215491)
  • Move spirv backend syncscope test out of clang/codegenhlsl (llvm/llvm-project#215634)

Offload Test Suite

  • Fix validation workflow build errors (llvm/offload-test-suite#1422)
  • Amend matrix_bool_* tests (llvm/offload-test-suite#1424)
  • Remove Clang XFAILs from pow matrix tests (llvm/offload-test-suite#1426)
  • [Vulkan] Add -fspv-use-legacy-buffer-matrix-order tests (llvm/offload-test-suite#1427)
  • Enable typed int64 resource tests on interlocked offload tests (llvm/offload-test-suite#1429)
  • Update GroupMemoryBarrierWithGroupSync xfail (llvm/offload-test-suite#1430)
  • Add InterlockedCompareExchange tests (llvm/offload-test-suite#1433)