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

Specify that filtering with comparison is implementation-defined #2425

Merged
merged 2 commits into from
May 3, 2022

Conversation

kainino0x
Copy link
Contributor

@kainino0x kainino0x commented Dec 16, 2021

And specify that comparison+filtering is always allowed, but non-comparison+filtering is never allowed. Investigation indicates this is the best we can support on Vulkan for any format.

Fixes #1266


Preview | Diff

@github-actions
Copy link
Contributor

Previews, as seen when this build job started (444c13c):
WebGPU | IDL
WGSL
Explainer

@kvark
Copy link
Contributor

kvark commented Dec 17, 2021

if we allow depth textures bound as regular float textures, we could still support linear sampling, couldn't we?
The backend, seeing a depth texture, may create a view as non-depth. And that R-only view is probably filterable.

@kainino0x
Copy link
Contributor Author

if we allow depth textures bound as regular float textures, we could still support linear sampling, couldn't we? The backend, seeing a depth texture, may create a view as non-depth. And that R-only view is probably filterable.

Hm, I didn't think so, but maybe I'm missing something. According to #744 (comment), Vulkan doesn't allow reinterpreting depth formats. Also, I don't think we would know which view to use at createBindGroup time unless we can always use an R-only view?

@kainino0x kainino0x requested a review from kvark December 21, 2021 22:36
@github-actions
Copy link
Contributor

Previews, as seen when this build job started (9b104b4):
WebGPU | IDL
WGSL
Explainer

@kainino0x
Copy link
Contributor Author

I realized I needed to actually update the associated algorithm to disallow filtering "depth" bindings. (#2094 to determine whether depth textures themselves can be used with "unfilterable-float" bindings.)

@kainino0x kainino0x added the copyediting Pure editorial stuff (copyediting, *.bs file syntax, etc.) label Dec 23, 2021
@kainino0x kainino0x added this to the V1.0 milestone May 3, 2022
And specify that comparison+filtering is always allowed, but
non-comparison+filtering is never allowed. Investigation indicates this
is the best we can support on Vulkan for any format.

Fixes gpuweb#1266
@kainino0x kainino0x requested a review from toji May 3, 2022 22:25
@kainino0x kainino0x enabled auto-merge (squash) May 3, 2022 22:25
@kainino0x kainino0x removed the request for review from kvark May 3, 2022 22:29
@kainino0x kainino0x merged commit 371e040 into gpuweb:main May 3, 2022
@kainino0x kainino0x deleted the comparison-filtering branch May 3, 2022 22:30
@kainino0x
Copy link
Contributor Author

oops, apparently the review from kvark was still valid for automerge. @toji PTAL anyway

github-actions bot added a commit that referenced this pull request May 3, 2022
SHA: 371e040
Reason: push, by @kainino0x

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented May 3, 2022

Previews, as seen when this build job started (4b85a62):
WebGPU | IDL
WGSL
Explainer

github-actions bot added a commit that referenced this pull request May 3, 2022
SHA: 371e040
Reason: push, by @kainino0x

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request May 3, 2022
SHA: 371e040
Reason: push, by @kainino0x

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Member

@toji toji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-merge LGTM. :)

jdarpinian pushed a commit to jdarpinian/gpuweb that referenced this pull request Aug 12, 2022
…web#2425)

* Specify that filtering with comparison is implementation-defined

And specify that comparison+filtering is always allowed, but
non-comparison+filtering is never allowed. Investigation indicates this
is the best we can support on Vulkan for any format.

Fixes gpuweb#1266

* Only "float" texture bindings are filterable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
copyediting Pure editorial stuff (copyediting, *.bs file syntax, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post-comparison-filterable depth formats
3 participants