-
Notifications
You must be signed in to change notification settings - Fork 909
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
Implement device_features
and adapter_features
for the web backend
#2986
Conversation
We should probably find a solution to this before merging. |
Just marking this as "Draft", based on comments and title. |
Codecov Report
@@ Coverage Diff @@
## master #2986 +/- ##
===========================================
+ Coverage 47.62% 65.22% +17.60%
===========================================
Files 86 86
Lines 42697 42725 +28
===========================================
+ Hits 20335 27868 +7533
+ Misses 22362 14857 -7505
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
5d985ca
to
a28281e
Compare
Think this is about ready - I had some problems running the demos on chrome though so it'd be great if someone could check them before merging. |
device_features
and adapter_features
for the web backenddevice_features
and adapter_features
for the web backend
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.
Looks good after nit
Trying to implement it directly in wasm-bindgen: rustwasm/wasm-bindgen#3268 |
@gents83 thank you so much for that work! |
Checklist
cargo clippy
.RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown
if applicable.Connections
Description
These weren't implemented and I needed in order to be able to check for compressed texture support. I had to do an unchecked cast of the GPUSupportedFeatures class to a
js_sys::Set
because it doesn't seem like wasm-bindgen implementssetlike
and thus doesn't have ahas
method.I also added some BC formats to the texture format mapping function because my code needed them. We of-course should implement all of these in time, but I didn't want to do that here.
Testing
Tested by running a program that checks for compressed texture support and renders a model with compressed textures.