-
Notifications
You must be signed in to change notification settings - Fork 830
[SM6.10] Implement FillMatrix Builtin #8186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||
| // REQUIRES: dxil-1-10 | ||||
| // RUN: %dxc -T cs_6_10 -E main %s | FileCheck %s | ||||
|
|
||||
| [numthreads(1,1,1)] | ||||
| void main() { | ||||
| // CHECK-LABEL: define void @main() | ||||
|
|
||||
| // CHECK: %{{.*}} = call %dx.types.LinAlgMatrixC4M5N4U1S2 @dx.op.linAlgFillMatrix.mC4M5N4U1S2.i32(i32 -2147483636, i32 {{.*}}) ; LinAlgFillMatrix(value) | ||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does -2147483636 mean?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh that's the opcode!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's actually
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. right! haha nice catch :) |
||||
| __builtin_LinAlgMatrix [[__LinAlgMatrix_Attributes(4, 5, 4, 1, 2)]] mat1; | ||||
| __builtin_LinAlg_FillMatrix(mat1, 5); | ||||
| // CHECK: %{{.*}} = call %dx.types.LinAlgMatrixC5M3N4U0S0 @dx.op.linAlgFillMatrix.mC5M3N4U0S0.f32(i32 -2147483636, float {{.*}}) ; LinAlgFillMatrix(value) | ||||
| __builtin_LinAlgMatrix [[__LinAlgMatrix_Attributes(5, 3, 4, 0, 0)]] mat2; | ||||
| __builtin_LinAlg_FillMatrix(mat2, 3.14); | ||||
| } | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // REQUIRES: dxil-1-10 | ||
| // RUN: %dxc -T lib_6_10 -E main %s -ast-dump-implicit | FileCheck %s | ||
|
|
||
| // CHECK: FunctionDecl {{.*}} implicit used __builtin_LinAlg_FillMatrix 'void (__builtin_LinAlgMatrix & {{.*}}, unsigned int)' extern | ||
damyanp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // CHECK-NEXT: ParmVarDecl {{.*}} ret '__builtin_LinAlgMatrix &&__restrict {{.*}}' | ||
| // CHECK-NEXT: ParmVarDecl {{.*}} value 'unsigned int' | ||
| // CHECK-NEXT: HLSLIntrinsicAttr {{.*}} Implicit "op" "" 406 | ||
| // CHECK-NEXT: AvailabilityAttr {{.*}} Implicit 6.10 0 0 "" | ||
|
|
||
| [shader("compute")] | ||
| [numthreads(1,1,1)] | ||
| void main() { | ||
| __builtin_LinAlgMatrix [[__LinAlgMatrix_Attributes(1, 5, 4, 2, 2)]] mat; | ||
| __builtin_LinAlg_FillMatrix(mat, 15); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.