-
Notifications
You must be signed in to change notification settings - Fork 45
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
Static Samplers #284
Comments
I'm not sure that it will become a core WebGPU feature soon, because it seems a bit niche and polyfillable excpet for YCbCr sampling, or if in the future we have some |
I was sorta hoping that even if it doesn't become core WebGPU soon, we could add it in native and then drop all WGPUFeatureName gating it at that point. That could be too much future-predicting probably, and if it doesn't happen, webgpu.h will be in a bad position where there's an optional member that isn't valid except for some specific native implementations. |
This would be fine, we also have EDIT: here's the issue where we're merging it to the core struct #212 (comment) |
but agree this wouldn't be great |
Thinking more, I guess policy wise, we should probably be conservative, and probably shouldn't add this until it is in the JS spec first. That means that even if we're very confident it can eventually be core webgpu, it should still be a chained struct. Because even if it does become core, who knows what the name will be - will it be "immutable" or "static" or something else? What do you think? |
Yeah, that sounds right to me. |
Closing this since it's Dawn-internal for now. Can reopen if we want to make it common. |
Chrome is interested in adding static samplers to Dawn. Filing this issue because I think there's a possibility it could eventually be a core webgpu concept. Great to add it to the header if that's the case.
Proposal:
OR
WGPUFeatureName_StaticSamplers
, and if it makes it to the Web and all implementations add it, remove the feature? It can be emulated by the implementation when the backend doesn't actually support it.constexpr sampler
injected into the MSL shader.WGPUFeatureName_StaticSamplers
is not enabled.This is how Vulkan does it (no chained struct)
WGPUSamplerBindingLayoutStatic
ifWGPUFeatureName_StaticSamplers
is not enabled.The first option is attractive because I expect this could become core, so it would be nifty to put it in the base sampler binding layout struct before we cut the webgpu.h 1.0 header. On the other hand, if it never becomes core, it's awkward that it's in the base struct, but you still need to explicitly enable the feature to use it.
The text was updated successfully, but these errors were encountered: