Skip to content

Commit

Permalink
Rewrite and Fix Remaining Padding Bugs (#35)
Browse files Browse the repository at this point in the history
* Cleaner validation tests

* Introduce memoffset

* New tests using manual offset checking

* yeah that test is broken too

* Rename AsStdX::StdXType to AsStdX::Output for sanity

* Rename test file

* Revamp and merge test suites

* Squish tests more, make wgpu portion not run by default

* Rewrite Crevice from the ground up, suddenly passing all the tests

* Add primitive test for mat3

* Add a bare mat4 test

* Fix std430 derive and add it to tests

* Use actual struct alignment instead of min alignment for trailing padding

* Start testing (and fix) std430

* Add and disable tests to work around wgpu
  • Loading branch information
LPGhatguy authored Oct 17, 2021
1 parent b0c8a42 commit 8ddab3e
Show file tree
Hide file tree
Showing 32 changed files with 1,125 additions and 1,041 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ jobs:
- uses: actions/checkout@v2

- name: Run Validation Tests
run: cargo test --all --verbose
run: cargo test --all-features --no-fail-fast --verbose
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ default = ["std"]
std = []

[workspace]
members = ["crevice-derive", "crevice-validation"]
members = ["crevice-derive", "crevice-tests"]
default-members = ["crevice-derive", "crevice-tests"]

[dependencies]
crevice-derive = { version = "0.7.1", path = "crevice-derive" }
Expand All @@ -30,5 +31,3 @@ mint = "0.5.5"
[dev-dependencies]
cgmath = { version = "0.17.0", features = ["mint"] }
insta = "0.16.1"
type-layout = { version = "0.2.0", features = ["serde1"] }
crevice-derive = { version = "0.7.1", path = "crevice-derive", features = ["test_type_layout"] }
7 changes: 4 additions & 3 deletions crevice-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ repository = "https://github.com/LPGhatguy/crevice"
license = "MIT OR Apache-2.0"

[features]
# Feature used for testing; enables type_layout derive on types.
# Requires crate using derive to depend on type_layout as well.
test_type_layout = []
default = []

# Enable methods that let you introspect into the generated structs.
debug-methods = []

[lib]
proc-macro = true
Expand Down
Loading

0 comments on commit 8ddab3e

Please sign in to comment.