You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Metal is unable to copy depth formats into colors #1692
Currently the spec allows D32 -> R32 and D16 -> R16 copies.
On Metal, we generally implement copies between different formats by "casting" one of the sides to the other (i.e .newTextureViewWithPixelFormat], followed by the copy command on BlitCommandEncoder.
However, Metal defines "cast" only within certain groups, and it places color formats in a separate group from the depth formats. So we end up with:
source texture pixelFormat (MTLPixelFormatDepth32Float) not castable
I suggest we remove any notion of Depth -> Color copies from the spec, at least for MVP, to address this.
Copies between depth textures can only happen within the following sets of formats:
depth16unorm, r16uint
Additionally, depth32float textures can be copied into depth32float and r32float textures
Activity
kainino0x commentedon Apr 29, 2021
@austinEng I thought Dawn implemented this - did we use another approach or am I misremembering?
austinEng commentedon Apr 29, 2021
Dawn requires exact format equality right now.
https://source.chromium.org/chromium/chromium/src/+/master:third_party/dawn/src/dawn_native/CommandValidation.cpp;l=447;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3
kainino0x commentedon Apr 29, 2021
OK. Seems like we should make this change then.
Kangz commentedon Apr 29, 2021
It seems the spec is already requiring format equality:
kvark commentedon Apr 29, 2021
The bits that need be fixes are:
kainino0x commentedon Sep 10, 2021
Pretty sure this is a duplicate of #1464
Implement val:queue,writeTexture:texture_state (gpuweb#1702)
Implement val:queue,writeTexture:sample_count (gpuweb#1703)
Implement 'texture,device_mismatch' test in writeTexture.spec.ts (gpu…