-
Notifications
You must be signed in to change notification settings - Fork 180
Conversation
690: Implement Anisotropic Filtering Extension and Expose Extension Interface r=kvark a=cwfitzgerald **Connections** Resolves #568. **Description** This PR solves two tightly related problems: - Adds the ability to create a sampler with anisotropic filtering - Adds the webgpu interface for getting the limits/extensions on adapters and devies. **Testing** I have tested this against my codebase which uses it. Adding an example in wgpu-rs on how to use extensions/limits would be good, especially as we have native/webgpu extensions, but can come as a future enhancement, once we feel the extension situation has stabilized a bit. **TODO** - [x] Allow wgpu-rs to call limit/extension interface (gfx-rs/wgpu-rs#338) - [ ] Determine how wgpu-native is going to adopt this functionality. - [ ] After discussing #691, what changes need to be made. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
690: Implement Anisotropic Filtering Extension and Expose Extension Interface r=kvark a=cwfitzgerald **Connections** Resolves #568. **Description** This PR solves two tightly related problems: - Adds the ability to create a sampler with anisotropic filtering - Adds the webgpu interface for getting the limits/extensions on adapters and devies. **Testing** I have tested this against my codebase which uses it. Adding an example in wgpu-rs on how to use extensions/limits would be good, especially as we have native/webgpu extensions, but can come as a future enhancement, once we feel the extension situation has stabilized a bit. **TODO** - [x] Allow wgpu-rs to call limit/extension interface (gfx-rs/wgpu-rs#338) - [ ] Determine how wgpu-native is going to adopt this functionality. - [ ] After discussing #691, what changes need to be made. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
ee868f1
to
e189d0d
Compare
e189d0d
to
c4819cc
Compare
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.
Thank you!
bors r+
@@ -130,6 +130,7 @@ impl framework::Example for Skybox { | |||
lod_min_clamp: 0.0, | |||
lod_max_clamp: 100.0, | |||
compare: wgpu::CompareFunction::Undefined, | |||
anisotropy_clamp: 1, |
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.
I think we should change most (if not all) sampler descriptors to end with .. Default::default()
. That would be more future proof, match the web better, and avoid exposing stuff that is not relevant
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.
I agree. Should I change this in this PR? Or should that be separate?
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.
let's have this merged, the PR just continues the convention of the old code, it's not required to change that
345: Rustify the example's use of Extensions and SamplerDescriptor r=kvark a=cwfitzgerald Implements gfx-rs/wgpu#696. This didn't change any content from #338, just interface, but I tested a couple examples and it seems to work okay. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
345: Rustify the example's use of Extensions and SamplerDescriptor r=kvark a=cwfitzgerald Implements gfx-rs/wgpu#696. This didn't change any content from #338, just interface, but I tested a couple examples and it seems to work okay. Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Follow up to gfx-rs/wgpu#690.
This forwards the extension/limit access interface into wgpu-rs.
It appears that the web-sys doesn't actually implement any of the methods we need, so I had them return the defaults.
Device::limits
exists, but it returnsObject
notGpuLimits
, so doesn't appear usable.