-
Notifications
You must be signed in to change notification settings - Fork 954
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
Added new UNRESTRICTED_INDEX_BUFFER downlevel flag. #3157
Added new UNRESTRICTED_INDEX_BUFFER downlevel flag. #3157
Conversation
WebGL doesn't support buffers that are are used both as vertex and index buffer.
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.
The requirement is actually that index usage can only share with COPY_DST or COPY_SRC. INDEX | UNIFORM is also invalid. See https://registry.khronos.org/webgl/specs/latest/2.0/#BUFFER_OBJECT_BINDING.
There's also complexity where some buffer copies are invalid in webgl but this PR doesn't have to try to express that.
Maybe |
and use it on buffer copies as well
Thanks for digging that up! Went ahead and looked into doing transfer restrictions as well which is why I called it |
Codecov Report
@@ Coverage Diff @@
## master #3157 +/- ##
==========================================
- Coverage 64.73% 64.73% -0.01%
==========================================
Files 81 81
Lines 38737 38782 +45
==========================================
+ Hits 25076 25105 +29
- Misses 13661 13677 +16
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Checklist
cargo clippy
.RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown
if applicable.Connections
n/a
Description
WebGL doesn't support buffers that are are used both as vertex and index buffer. This introduces a new downlevel feature to check for this.
Testing
Tested same application in browser and desktop (Metal). Browser now correctly logs an error:
not super expressive but good enough I reckon