Skip to content
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

Add any and all arch instructions #441

Merged
merged 1 commit into from
Feb 25, 2021
Merged

Add any and all arch instructions #441

merged 1 commit into from
Feb 25, 2021

Conversation

XAMPPRocky
Copy link
Member

@XAMPPRocky XAMPPRocky commented Feb 22, 2021

This also adds a const generic (N) to vector for representing the length of a vector, this allows us to enforced requirements like "The Result type must have the same number of components as the operand", and allows us to create the correct types in SPIR-V generically.

Copy link
Contributor

@eddyb eddyb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, comments are mostly nits.

crates/spirv-builder/src/test/basic.rs Outdated Show resolved Hide resolved
crates/spirv-builder/src/test/basic.rs Outdated Show resolved Hide resolved
crates/spirv-std/src/arch.rs Outdated Show resolved Hide resolved
"%boolean = OpSelect %uchar %result %uchar_1 %uchar_0",
"OpStore {result} %boolean",
vector = in(reg) &vector,
len = const N,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love that parameterizing inline asm! by const generics is a thing now! (I wonder how it's implemented but I'm getting distracted...)

@eddyb eddyb merged commit 57a9ebb into main Feb 25, 2021
@eddyb eddyb deleted the any-all branch February 25, 2021 15:09
@khyperia khyperia removed their request for review February 26, 2021 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants