-
Notifications
You must be signed in to change notification settings - Fork 961
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
Remove vertex_pulling_transfrom from PipelineCompilationOptions. #5773
Conversation
7256a0f
to
d6614e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm leaning towards approving this, but there are a couple of things I think we should resolve:
- I have some questions about the Metal codegen changes; I didn't expect or understand them yet. This makes me uneasy; weren't we shipping something tested to be correct before? 🤔
I also noticed one incorrect thing with our usage ofEDIT: Resolved on my end!Vec::with_capacity
that should be pretty trivial to resolve.
d6614e0
to
ea77dc2
Compare
For a change like this, possibly before this lands, definitely before we release next (1 mo ish), we need to reach out to our users for gpu side performance testing. Obviously enabling should be the default, but if this forces significant regressions, we should be exposing a escape hatch to the user. I also feel like we should have runtime vertex format tests now that we're polyfilling them on a platform. |
We don't have complete test coverage of all the vertex formats. @cwfitzgerald notes in a commment on this PR that we should. I'll expand this PR to include a test update that exercises evertyhing, which will help justify the changes to the unpack functions. |
Converting to draft while I expand the test coverage of all the unpack functions. |
62eae78
to
14f93b4
Compare
03acd91
to
bd58643
Compare
bd58643
to
2bf3d26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
It took me a while to double-check the decimal to byte representations, maybe we can use rust's |
We can also use |
2bf3d26
to
e6e939f
Compare
Well, however the bytes are specified, the checksums are verifying that they compute to the correct values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should resolve #5773 (comment).
The syntax for this is just markedly worse. Since the numbers are a mix of 2-byte, 4-byte, and 6-byte, and 8-byte values, it's not easy to flatten them into a single
I don't think this is improving readability. It's also actually wrong -- I got at least one of those values encoded incorrectly and it's messing up the checksums. I strongly urge that we leave the byte specification as-is. Re-open if you disagree. |
Didn't mean to close, sorry. |
The error is trivial upon reflection: the |
286a148
to
e0387ca
Compare
e0387ca
to
680d38a
Compare
This option was only evaluated for Metal backends, and now it's required there so the option is going away. It is still configurable for tests via the PipelineOptions struct, deserialized from .ron files. This also fixes some type problems with the unpack functions in writer.rs. Metal << operator extends operand to int-sized, which then has to be cast back down to the real size before as_type bit conversion. The math for the snorm values is corrected, in some cases using the metal unpack_snorm2x16_to_float function because we can't directly cast a bit-shifted ushort value to half.
680d38a
to
33ff180
Compare
This option was only evaluated for Metal backends, and now it's required there so the option is going away. It is still configurable for tests via the PipelineOptions struct, deserialized from .ron files.
This also fixes some type problems with the unpack functions in writer.rs. Metal << operator extends operand to int-sized, which then has to be cast back down to the real size before as_type bit conversion.
Connections
N/A
Description
This is fully transitioning the Metal backend to use vertex pulling for all cases.
Testing
All existing Metal tests now use the vertex pulling transform.
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.