Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Add an IndexUnchecked trait that uses asm!#805

Merged
khyperia merged 5 commits into
EmbarkStudios:mainfrom
expenses:index-unchecked
Nov 29, 2021
Merged

Add an IndexUnchecked trait that uses asm!#805
khyperia merged 5 commits into
EmbarkStudios:mainfrom
expenses:index-unchecked

Conversation

@expenses

Copy link
Copy Markdown
Contributor

After #803 it became possible to write asm! functions that index into arrays and RuntimeArrays without bounds checking. This PR exposes these functions as a trait. I decided on index_unchecked* instead of get_unchecked* to avoid the name aliasing. It could still be pretty confusing though.

Comment thread crates/spirv-std/src/arch.rs Outdated
@khyperia

Copy link
Copy Markdown
Contributor

Also, it'd be nice to not use gpu_only here, because it's not actually gpu_only

@expenses expenses requested a review from khyperia November 25, 2021 11:58
@khyperia khyperia merged commit 9fd3c9e into EmbarkStudios:main Nov 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants