update rust-gpu dependencies and rustc version
also add the Cargo.lock files to version control, since the spirv stuff is highly dependent on specific versions of dependencies. TODO: update wgpu to 0.12
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,2 @@
|
||||
out/
|
||||
target/
|
||||
Cargo.lock
|
||||
|
2616
Cargo.lock
generated
Normal file
2616
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,3 @@
|
||||
cargo-features = ["edition2021"]
|
||||
[package]
|
||||
name = "coremem"
|
||||
version = "0.1.0"
|
||||
@@ -34,7 +33,7 @@ more-asserts = "0.2"
|
||||
natord = "1.0"
|
||||
ndarray = { version = "0.15", features = ["rayon", "serde"] }
|
||||
num = "0.4"
|
||||
piecewise-linear = "0.1"
|
||||
# piecewise-linear = "0.1"
|
||||
# plotly = { version = "0.6", features = ["kaleido", "plotly_ndarray"], path = "../plotly/plotly" }
|
||||
rand = "0.8"
|
||||
rayon = "1.5"
|
||||
@@ -61,9 +60,9 @@ criterion = "0.3"
|
||||
name = "driver"
|
||||
harness = false
|
||||
|
||||
[profile.release]
|
||||
# [profile.release]
|
||||
# LTO gives 3% perf boost
|
||||
lto = true
|
||||
# lto = true
|
||||
# codegen-units = 1 gives no measureable perf boost
|
||||
# codegen-units = 1
|
||||
# panic = abort doesn't give any measureable perf boost
|
||||
|
8
README
8
README
@@ -2,5 +2,11 @@ magnetic core memory simulator (i.e. those things they used in the Apollo comput
|
||||
|
||||
run
|
||||
```
|
||||
cargo run --example coremem
|
||||
$ cargo run --example coremem
|
||||
```
|
||||
|
||||
this requires a specific rustc toolchain to build:
|
||||
```
|
||||
$ rustup default nightly-2021-06-08
|
||||
$ rustup component add rust-src rustc-dev llvm-tools-preview
|
||||
```
|
||||
|
110
src/sim/spirv_backend/Cargo.lock
generated
Normal file
110
src/sim/spirv_backend/Cargo.lock
generated
Normal file
@@ -0,0 +1,110 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "glam"
|
||||
version = "0.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e4fa84eead97d5412b2a20aed4d66612a97a9e41e08eababdb9ae2bf88667490"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libm"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"libm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spirv-std"
|
||||
version = "0.4.0-alpha.12"
|
||||
source = "git+https://github.com/EmbarkStudios/rust-gpu#31e3fdb09b60c33c611e8db53ed1970afc94aa2b"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"glam",
|
||||
"num-traits",
|
||||
"spirv-std-macros",
|
||||
"spirv-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spirv-std-macros"
|
||||
version = "0.4.0-alpha.12"
|
||||
source = "git+https://github.com/EmbarkStudios/rust-gpu#31e3fdb09b60c33c611e8db53ed1970afc94aa2b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"spirv-types",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spirv-types"
|
||||
version = "0.4.0-alpha.12"
|
||||
source = "git+https://github.com/EmbarkStudios/rust-gpu#31e3fdb09b60c33c611e8db53ed1970afc94aa2b"
|
||||
|
||||
[[package]]
|
||||
name = "spirv_backend"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"spirv-std",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.86"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
@@ -1,4 +1,3 @@
|
||||
cargo-features = ["edition2021"]
|
||||
[package]
|
||||
name = "spirv_backend"
|
||||
version = "0.1.0"
|
||||
|
@@ -4,7 +4,6 @@
|
||||
register_attr(spirv),
|
||||
no_std
|
||||
)]
|
||||
#![feature(asm)]
|
||||
|
||||
extern crate spirv_std;
|
||||
|
||||
|
@@ -127,36 +127,37 @@ impl<T: core::ops::Div<T, Output=T>> XYZStd<T> {
|
||||
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
pub struct Optional<T> {
|
||||
present: bool,
|
||||
// XXX: not a bool, because: "entrypoint parameter cannot contain a boolean"
|
||||
present: u8,
|
||||
data: T,
|
||||
}
|
||||
|
||||
impl<T> Optional<T> {
|
||||
pub fn some(data: T) -> Self {
|
||||
Self {
|
||||
present: true,
|
||||
present: 1,
|
||||
data,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn explicit_none(data: T) -> Self {
|
||||
Self {
|
||||
present: false,
|
||||
present: 0,
|
||||
data,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_some(self) -> bool {
|
||||
self.present
|
||||
self.present != 0
|
||||
}
|
||||
|
||||
pub fn unwrap(self) -> T {
|
||||
assert!(self.present);
|
||||
assert!(self.present != 0);
|
||||
self.data
|
||||
}
|
||||
|
||||
pub fn map<U: Default, F: FnOnce(T) -> U>(self, f: F) -> Optional<U> {
|
||||
if self.present {
|
||||
if self.present != 0 {
|
||||
Optional::some(f(self.unwrap()))
|
||||
} else {
|
||||
Optional::none()
|
||||
@@ -164,7 +165,7 @@ impl<T> Optional<T> {
|
||||
}
|
||||
|
||||
pub fn unwrap_or(self, default: T) -> T {
|
||||
if self.present {
|
||||
if self.present != 0 {
|
||||
self.unwrap()
|
||||
} else {
|
||||
default
|
||||
|
110
src/sim/spirv_backend_lib/Cargo.lock
generated
Normal file
110
src/sim/spirv_backend_lib/Cargo.lock
generated
Normal file
@@ -0,0 +1,110 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "glam"
|
||||
version = "0.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e4fa84eead97d5412b2a20aed4d66612a97a9e41e08eababdb9ae2bf88667490"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libm"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"libm",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spirv-std"
|
||||
version = "0.4.0-alpha.12"
|
||||
source = "git+https://github.com/EmbarkStudios/rust-gpu#31e3fdb09b60c33c611e8db53ed1970afc94aa2b"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"glam",
|
||||
"num-traits",
|
||||
"spirv-std-macros",
|
||||
"spirv-types",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spirv-std-macros"
|
||||
version = "0.4.0-alpha.12"
|
||||
source = "git+https://github.com/EmbarkStudios/rust-gpu#31e3fdb09b60c33c611e8db53ed1970afc94aa2b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"spirv-types",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "spirv-types"
|
||||
version = "0.4.0-alpha.12"
|
||||
source = "git+https://github.com/EmbarkStudios/rust-gpu#31e3fdb09b60c33c611e8db53ed1970afc94aa2b"
|
||||
|
||||
[[package]]
|
||||
name = "spirv_backend_lib"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"spirv-std",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.86"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
@@ -1,4 +1,3 @@
|
||||
cargo-features = ["edition2021"]
|
||||
[package]
|
||||
name = "spirv_backend_lib"
|
||||
version = "0.1.0"
|
||||
|
Reference in New Issue
Block a user