-
Notifications
You must be signed in to change notification settings - Fork 2
[mlir][dxsa] Add dcl_input_ps, dcl_input_ps_siv and dcl_input_ps_sgv instructions #131
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
Merged
tagolog
merged 1 commit into
access-softek:dxsa-mlir
from
tagolog:dxsa-mlir-dcl_input_ps
May 21, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // RUN: mlir-translate --import-dxsa-bin %S/inputs/dcl_input_ps.bin | FileCheck %s | ||
|
|
||
| // CHECK-LABEL: module | ||
| module { | ||
| // dcl_input_ps constant v0.x | ||
| // CHECK: %0 = dxsa.index.imm {imm = 0 : i32} | ||
| // CHECK-NEXT: %1 = dxsa.operand %0 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps constant %1 | ||
|
|
||
| // dcl_input_ps linear v1.x | ||
| // CHECK-NEXT: %2 = dxsa.index.imm {imm = 1 : i32} | ||
| // CHECK-NEXT: %3 = dxsa.operand %2 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps linear %3 | ||
|
|
||
| // dcl_input_ps linearCentroid v2.x | ||
| // CHECK-NEXT: %4 = dxsa.index.imm {imm = 2 : i32} | ||
| // CHECK-NEXT: %5 = dxsa.operand %4 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps linearCentroid %5 | ||
|
|
||
| // dcl_input_ps linearNoPerspective v3.x | ||
| // CHECK-NEXT: %6 = dxsa.index.imm {imm = 3 : i32} | ||
| // CHECK-NEXT: %7 = dxsa.operand %6 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps linearNoPerspective %7 | ||
|
|
||
| // dcl_input_ps linearNoPerspectiveCentroid v4.x | ||
| // CHECK-NEXT: %8 = dxsa.index.imm {imm = 4 : i32} | ||
| // CHECK-NEXT: %9 = dxsa.operand %8 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps linearNoPerspectiveCentroid %9 | ||
|
|
||
| // dcl_input_ps linearSample v5.x | ||
| // CHECK-NEXT: %10 = dxsa.index.imm {imm = 5 : i32} | ||
| // CHECK-NEXT: %11 = dxsa.operand %10 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps linearSample %11 | ||
|
|
||
| // dcl_input_ps linearNoPerspectiveSample v6.x | ||
| // CHECK-NEXT: %12 = dxsa.index.imm {imm = 6 : i32} | ||
| // CHECK-NEXT: %13 = dxsa.operand %12 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps linearNoPerspectiveSample %13 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // RUN: mlir-translate --import-dxsa-bin %S/inputs/dcl_input_ps_sgv.bin | FileCheck %s | ||
|
|
||
| // CHECK-LABEL: module | ||
| module { | ||
| // dcl_input_ps_sgv v0.x, primitiveID | ||
| // CHECK: %0 = dxsa.index.imm {imm = 0 : i32} | ||
| // CHECK-NEXT: %1 = dxsa.operand %0 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps_sgv %1, primitiveID | ||
|
|
||
| // dcl_input_ps_sgv v1.x, isFrontFace | ||
| // CHECK-NEXT: %2 = dxsa.index.imm {imm = 1 : i32} | ||
| // CHECK-NEXT: %3 = dxsa.operand %2 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps_sgv %3, isFrontFace | ||
|
|
||
| // dcl_input_ps_sgv v2.x, sampleIndex | ||
| // CHECK-NEXT: %4 = dxsa.index.imm {imm = 2 : i32} | ||
| // CHECK-NEXT: %5 = dxsa.operand %4 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps_sgv %5, sampleIndex | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // RUN: mlir-translate --import-dxsa-bin %S/inputs/dcl_input_ps_siv.bin | FileCheck %s | ||
|
|
||
| // CHECK-LABEL: module | ||
| module { | ||
| // dcl_input_ps_siv linear v0.x, position | ||
| // CHECK: %0 = dxsa.index.imm {imm = 0 : i32} | ||
| // CHECK-NEXT: %1 = dxsa.operand %0 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps_siv linear %1, position | ||
|
|
||
| // dcl_input_ps_siv linear v1.x, clipDistance | ||
| // CHECK-NEXT: %2 = dxsa.index.imm {imm = 1 : i32} | ||
| // CHECK-NEXT: %3 = dxsa.operand %2 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps_siv linear %3, clipDistance | ||
|
|
||
| // dcl_input_ps_siv linear v2.x, cullDistance | ||
| // CHECK-NEXT: %4 = dxsa.index.imm {imm = 2 : i32} | ||
| // CHECK-NEXT: %5 = dxsa.operand %4 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps_siv linear %5, cullDistance | ||
|
|
||
| // dcl_input_ps_siv linear v3.x, renderTargetArrayIndex | ||
| // CHECK-NEXT: %6 = dxsa.index.imm {imm = 3 : i32} | ||
| // CHECK-NEXT: %7 = dxsa.operand %6 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps_siv linear %7, renderTargetArrayIndex | ||
|
|
||
| // dcl_input_ps_siv linear v4.x, viewportArrayIndex | ||
| // CHECK-NEXT: %8 = dxsa.index.imm {imm = 4 : i32} | ||
| // CHECK-NEXT: %9 = dxsa.operand %8 {mask = 16 : i32, num_components = 4 : i32, type = 1 : i32} | ||
| // CHECK-NEXT: dxsa.dcl_input_ps_siv linear %9, viewportArrayIndex | ||
| } |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.