Added new UNRESTRICTED_INDEX_BUFFER downlevel flag.#3157
Conversation
WebGL doesn't support buffers that are are used both as vertex and index buffer.
cwfitzgerald
left a comment
There was a problem hiding this comment.
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-unknownif 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