mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 06:21:13 +01:00
* Introduce SamplerBindingType enum and fix bug in validation This matches the WebGPU spec more closely and also lets us implement the validation as it's written in the spec[1]. This fixes a bug which previously prevented the "shadow" example from running in Firefox. Previously the validation would check whether the filtering was appropiate even if it was a comparison sampler. This didn't matter when running the shadow example natively since the example was setting `filtering: true` in addition to `comparison: true`. But this failed when running through a browser since there the used WebIDL has the proper enum representation and eventually resulted in `filtering: false` being passed to wgpu-core which would then fail validation.[2] [1]: https://gpuweb.github.io/gpuweb/#bind-group-creation [2]: https://github.com/mozilla/gecko-dev/blob/674b6582bafedc11fba6dc537769c88e9ed921d3/dom/webgpu/ipc/WebGPUChild.cpp#L502-L513 * Fix remaining examples * Fix deno_webgpu