Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Jiawei-Shao
Copy link
Contributor

@Jiawei-Shao Jiawei-Shao commented Dec 3, 2019

This patch adds "depth16unorm" to WebGPU SPEC as it can be supported
on D3D12 (required in feature level 11_0), Metal (all Metal feature sets) and
Vulkan (required in Vulkan SPEC).


Preview | Diff

This patch adds "depth16unorm" to WebGPU SPEC as it can be supported
on D3D12 (feature level 11_0), Metal (all Metal devices) and Vulkan
(required in Vulkan SPEC).
@Jiawei-Shao
Copy link
Contributor Author

@Kangz PTAL, thanks!

@Kangz
Copy link
Contributor

Kangz commented Dec 3, 2019

LGTM as mentioned offline, but we need other browsers to take a look too.

@kvark
Copy link
Contributor

kvark commented Dec 3, 2019

@Jiawei-Shao if you did the research, please provide the links to save us time verifying it.

Copy link
Contributor

@kvark kvark left a comment

Choose a reason for hiding this comment

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

I can confirm it's supported everywhere.
Just trying to remember what stopped us from including it to start with... given how much we talked about the depth formats at the F2F.

@Kangz
Copy link
Contributor

Kangz commented Dec 3, 2019

I don't think we ever considered that format since it wasn't in the original list @JusSn added in #211. D16 isn't enough precision for many usecases so I think all of us kinda forgot about it to focus on the issues supporting depth-stencil formats.

@kainino0x
Copy link
Contributor

One interesting note from the Metal tables: depth16unorm is always filterable, unlike depth32float. I wonder if that's something we can guarantee across apis.

@Jiawei-Shao
Copy link
Contributor Author

@kvark sorry about that. Let me attach my investigations here.

Depth16Unorm can be supported on D3D feature level 11_0 (item No. 55) , all Metal feature sets (Page 9 of 11) and all Vulkan devices according to Vulkan SPEC (Table 48) .

In addition, it is a depth format that is required to support "Filter" on Metal and VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT on Vulkan (on D3D12 we can create a texture with the typeless format R16_TYPELESS and create an SRV on it with the format R16_UNORM and a DSV with D16_UNORM).

@Jiawei-Shao
Copy link
Contributor Author

Sorry for my fault that I realized I referred a wrong document when writing this patch.

Although depth16unorm is available on all Metal devices, it requires macOS 10.12 and iOS 13, so we cannot bring this format into core WebGPU SPEC.

@kvark
Copy link
Contributor

kvark commented Dec 12, 2019

Good candidate for an extensions then.
Let's roll this back from the spec though... Edit: nvm, it wasn't merged

@kainino0x
Copy link
Contributor

I'd like to reconsider adding this to core as the min iOS version is probably acceptable. So we need to decide whether we want to support macOS 10.11 (most importantly, hardware that didn't get updates to 10.12).

@kdashg
Copy link
Contributor

kdashg commented Apr 17, 2020

I would be surprised if we can otherwise-support that ten year old hardware. We should strongly consider leaving it behind.

@Kangz
Copy link
Contributor

Kangz commented Apr 20, 2020

There is a not insignificant portion of Chrome users on macOS on 10.11 (and even 10.10 which stays the min_deployement_target for Chrome on Mac) so we should carefully weight whether we want to drop WebGPU support for them. And D16 is imho not enough to do that, because it doesn't have a huge advantage compared to D32 that is in core WebGPU.

@kdashg
Copy link
Contributor

kdashg commented Apr 20, 2020

Do you trust those first-gen metal drivers? :) It would be nice to support them but I suppose I'm inclined to write them off as likely too hard to support.

I suppose we can add it later, but we have to make the call whether leaving that door open for now is worth whatever sacrifices it forces us to make to our spec. I would like to skate towards where the puck is going, here. (but I also don't feel strongly about it)

@kvark kvark changed the base branch from master to main June 23, 2020 13:18
@grorg
Copy link
Contributor

grorg commented Aug 24, 2020

Discussed at the 2020-08-24 meeting.

@kainino0x
Copy link
Contributor

kainino0x commented Aug 24, 2020

Resolution: Approved! macOS 10.11 is EOL in Nov 2018 and not expected to receive Safari feature updates - would be limited to Chrome/Firefox.

We agreed this format is valuable, especially for memory usage on lower end devices, and copyability.

kdashg added a commit to kdashg/gpuweb that referenced this pull request Aug 24, 2020
kvark pushed a commit that referenced this pull request Aug 26, 2020
@kainino0x
Copy link
Contributor

I don't remember why it was a new PR but this was fixed in #1026.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants