[all-commits] [llvm/llvm-project] 7ccdc5: [HLSL][RootSignature] Add basic parameter validati...

Finn Plummer via All-commits all-commits at lists.llvm.org
Sun Jul 13 10:24:00 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ccdc595f8ecca0bc477c3e17683c52dca440845
      https://github.com/llvm/llvm-project/commit/7ccdc595f8ecca0bc477c3e17683c52dca440845
  Author: Finn Plummer <finn.c.plum at gmail.com>
  Date:   2025-07-13 (Sun, 13 Jul 2025)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaHLSL.cpp
    M clang/test/AST/HLSL/RootSignatures-AST.hlsl
    M clang/test/CodeGenHLSL/RootSignature.hlsl
    M clang/test/SemaHLSL/RootSignature-err.hlsl
    A clang/test/SemaHLSL/RootSignature-flags-err.hlsl

  Log Message:
  -----------
  [HLSL][RootSignature] Add basic parameter validations of Root Elements (#145795)

In this pr we go through and enforce the various bounded parameter
values for non-flag values and the valid flag combinations for
`RootDescriptor` and `DescriptorRange` flags.

For reference of the required checks, please see here:
https://github.com/llvm/wg-hlsl/blob/main/proposals/0002-root-signature-in-clang.md#validations-in-sema.

- Updates `SemaHLSL` to iterate through `RootElement`s and verify that
all non-flag parameters are within their bounds
- Updates `SemaHLSL` to iterate through `RootElement`s and verify that
all flag parameters are a valid combination
- Extends `RootSignature-err.hlsl` with testcases for all invalid
specifications
- Adds `RootSignature-flags-err.hlsl` with testcase for invalid flag
specifications

Resolves: https://github.com/llvm/llvm-project/issues/129940



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