Skip to content

Commit 275426a

Browse files
authored
[Bugfix][SM6.10] Allow LinAlgMatrix type in the validator (#8441)
Fixes #8433 The validator was rejecting `%dx.types.LinAlgMatrix***` types causing debug build to be rejected. This PR notes that type as an allowed type
1 parent 348fc78 commit 275426a

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

lib/DxilValidation/DxilValidation.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2414,6 +2414,9 @@ static bool ValidateType(Type *Ty, ValidationContext &ValCtx,
24142414
// Allow HitObject type.
24152415
if (ST == HlslOP->GetHitObjectType())
24162416
return true;
2417+
// Allow LinAlgMatrix type.
2418+
if (dxilutil::IsHLSLLinAlgMatrixType(ST))
2419+
return true;
24172420
if (IsDxilBuiltinStructType(ST, HlslOP)) {
24182421
ValCtx.EmitTypeError(Ty, ValidationRule::InstrDxilStructUser);
24192422
Result = false;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
; RUN: %dxv %s 2>&1 | FileCheck %s
2+
3+
; CHECK-NOT: uses a reserved prefix.
4+
; CHECK-NOT: Validation failed.
5+
; CHECK: Validation succeeded.
6+
7+
target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
8+
target triple = "dxil-ms-dx"
9+
10+
%dx.types.LinAlgMatrixC8M16N16U0S0 = type { i8* }
11+
%struct.ByteAddressBuffer = type { i32 }
12+
13+
define void @main() {
14+
%1 = alloca %dx.types.LinAlgMatrixC8M16N16U0S0
15+
ret void
16+
}
17+
18+
!dx.targetTypes = !{!0}
19+
!llvm.ident = !{!1}
20+
!dx.version = !{!2}
21+
!dx.valver = !{!2}
22+
!dx.shaderModel = !{!3}
23+
!dx.resources = !{!4}
24+
!dx.entryPoints = !{!7}
25+
26+
!0 = !{%dx.types.LinAlgMatrixC8M16N16U0S0 undef, i32 8, i32 16, i32 16, i32 0, i32 0}
27+
!1 = !{!"dxc(private) 1.9.0.5348 (issue-8433, 167fd829e-dirty)"}
28+
!2 = !{i32 1, i32 10}
29+
!3 = !{!"cs", i32 6, i32 10}
30+
!4 = !{!5, null, null, null}
31+
!5 = !{!6}
32+
!6 = !{i32 0, %struct.ByteAddressBuffer* undef, !"", i32 0, i32 0, i32 1, i32 11, i32 0, null}
33+
!7 = !{void ()* @main, !"main", null, !4, !8}
34+
!8 = !{i32 0, i64 8388625, i32 4, !9}
35+
!9 = !{i32 8, i32 1, i32 1}

0 commit comments

Comments
 (0)