-
Notifications
You must be signed in to change notification settings - Fork 920
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
Add SHADERINT_16
feature to allow 16bit ints in Vulkan shaders
#3401
Conversation
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.
don't forget to update deserialize_features
in deno_webgpu/src/lib.rs, and update the GPUFeatureName
enum in deno_webgpu/src/02_idl_types.js
Wanted to mention that I filed #3406; not a blocker for this PR but something to put on our radar. |
Does the edit: Also, is i16 support considered to be extended from spec? edit2: To answer my own question, it looks like webgpu.idl shouldn't be updated, and it should be considered an extension of the spec. Does deno_webgpu want what are potentially native only features? |
yes; if my memory serves right, the spec states that the implementer can extend the standard set of features. we just allow all features that wgpu has, because why not. |
I think this should be done now. |
thanks! |
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.
Deno part looks good to me.
Co-authored-by: Connor Fitzgerald <[email protected]>
Checklist
cargo clippy
.RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown
if applicable.Connections
Stops Vulkan Validation errors for FSR2 when using https://github.com/JMS55/fsr2_wgpu (currently very much a WIP).
Description
This just enables the Vulkan
shader_int16
device feature if the feature is requested. I copied how it seems to be done forSHADER_FLOAT64
.According to the docs, this isn't an extension and is part of vulkan 1.0
VkPhysicalDeviceFeatures
.I don't know if anything doesn't support this feature, so I'm wondering if it should be enabled by default?Did some more digging on https://vulkan.gpuinfo.org/ and it isn't nearly as universal as I thought.Testing
Tested using bevy+fsr2, it stopped the validation errors about 16bit ints.