Skip to content

Commit 834978b

Browse files
authored
[SM6.10] Add Matrix class methods and other LinAlg API to linalg.h (#8299)
Implements `Matrix` class methods and other API functions related to linear algebra as specified in LinAlg spec [here](https://github.com/microsoft/hlsl-specs/blob/main/proposals/0035-linalg-matrix.md#appendix-1-hlsl-header). The header disables warning when an argument is marked as `groupshared` which is reported when the language version is other than 202x. In order to do that the warning needed to be moved to a separate diagnostic group. Also fixes couple of places in SemaHLSL that did not account for the linalg matrix type. Related to #7839
1 parent dc4354b commit 834978b

8 files changed

Lines changed: 761 additions & 7 deletions

File tree

tools/clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,4 +807,5 @@ def HLSLAvailability: DiagGroup<"hlsl-availability">;
807807
def HLSLAvailabilityConstant: DiagGroup<"hlsl-availability-constant">;
808808
def HLSLBarrier : DiagGroup<"hlsl-barrier">;
809809
def HLSLLegacyLiterals : DiagGroup<"hlsl-legacy-literal">;
810+
def HLSLGroupshared202x : DiagGroup<"hlsl-groupshared-202x">;
810811
// HLSL Change Ends

tools/clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,9 +1597,10 @@ def warn_hlsl_sometimes_uninit_out_param : Warning<
15971597
"its declaration is reached|"
15981598
"%3 is called}2">,
15991599
InGroup<HLSLParameterUsage>;
1600-
def warn_hlsl_groupshared_202x: Warning<
1601-
"Support for groupshared parameter annotation not added until HLSL 202x">,
1602-
InGroup<HLSLParameterUsage>;
1600+
def warn_hlsl_groupshared_202x
1601+
: Warning<"Support for groupshared parameter annotation not added until "
1602+
"HLSL 202x">,
1603+
InGroup<HLSLGroupshared202x>;
16031604
def warn_hlsl_groupshared_inout: Warning<
16041605
"Passing groupshared variable to a parameter annotated with inout. See "
16051606
"'groupshared' parameter annotation added in 202x.">,

0 commit comments

Comments
 (0)