Skip to content
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

Feature for Min/Max filter modes #1065

Open
kvark opened this issue Dec 1, 2020 · 5 comments
Open

Feature for Min/Max filter modes #1065

kvark opened this issue Dec 1, 2020 · 5 comments
Labels
area: api Issues related to API surface help required We need community help to make this happen. type: enhancement New feature or request

Comments

@kvark
Copy link
Member

kvark commented Dec 1, 2020

Is your feature request related to a problem? Please describe.
Min/Max sampler filter modes have widespread support in native APIs and are useful to reduce bandwidth requirements of a set of image processing operations, like building a mipmap chain for the depth buffer.

Describe the solution you'd like
Add an optional feature SAMPLER_FILTER_MINMAX as well as "Min" and "Max" variants to wgt::FilterMode. The feature should map to https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_sampler_filter_minmax.html in Vulkan, and to FILTER_MINIMUM_*/FILTER_MAXIMUM_* in https://docs.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_filter

Describe alternatives you've considered
Not exposing anything.

Additional context
Min/Max modes are not considering "filtering" modes for the purpose of texture/sampler bindings.

@kvark kvark added type: enhancement New feature or request help required We need community help to make this happen. good first issue Good for newcomers area: api Issues related to API surface labels Dec 1, 2020
@kvark
Copy link
Member Author

kvark commented Dec 8, 2020

Spec PR - gpuweb/gpuweb#1283

@FuriouZz
Copy link
Contributor

FuriouZz commented Feb 3, 2021

Hello there 👋🏽 What is the status of this issue? I will be glad to contribute.

@kvark
Copy link
Member Author

kvark commented Feb 3, 2021

@FuriouZz it's available! but very optional, since it's not going to be in WebGPU for the V1 release.

If you want to work on it, gfx-rs/gfx#3523 needs to be implemented first. The API in wgpu would probably need to adjust for it as well, i.e. instead of adding Min/Max to the wgt::FilterMode, we'd probably want to have a separate field called reduction_mode in the sampler descriptor.

@kvark kvark removed the good first issue Good for newcomers label Feb 3, 2021
@kvark
Copy link
Member Author

kvark commented Feb 3, 2021

I think the "good first issue" label is a bit of a mistake on my part here, given the reasoning in the previous comment. This is average difficulty, not easy, and not very urgent/important at this moment.

@FuriouZz
Copy link
Contributor

FuriouZz commented Feb 3, 2021

Oh ok thanks. I will have look. I have made some exploration before asking. I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API surface help required We need community help to make this happen. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants