diff --git a/src/utils/TextureUtils.h b/src/utils/TextureUtils.h index 9fe3e48b09..be271ccd82 100644 --- a/src/utils/TextureUtils.h +++ b/src/utils/TextureUtils.h @@ -22,8 +22,8 @@ #include "common/Assert.h" namespace utils { - // TODO(dawn:666, 570): Add Stencil8, Depth16Unorm formats if they are implemented. - static constexpr std::array kAllTextureFormats = { + // TODO(dawn:666): Add Stencil8 format when it's implemented. + static constexpr std::array kAllTextureFormats = { wgpu::TextureFormat::R8Unorm, wgpu::TextureFormat::R8Snorm, wgpu::TextureFormat::R8Uint, @@ -60,6 +60,7 @@ namespace utils { wgpu::TextureFormat::RGBA32Float, wgpu::TextureFormat::RGBA32Uint, wgpu::TextureFormat::RGBA32Sint, + wgpu::TextureFormat::Depth16Unorm, wgpu::TextureFormat::Depth32Float, wgpu::TextureFormat::Depth24Plus, wgpu::TextureFormat::Depth24PlusStencil8, @@ -182,12 +183,11 @@ namespace utils { kBCFormats.size() + kETC2Formats.size() + kASTCFormats.size(), "Number of compressed format must equal number of BC, ETC2, and ASTC formats."); - // TODO(dawn:666, 570): Add more depth/stencil formats if Stencil8, Depth16Unorm are - // implemented. - static constexpr std::array kDepthFormats = { - wgpu::TextureFormat::Depth32Float, wgpu::TextureFormat::Depth24Plus, - wgpu::TextureFormat::Depth24PlusStencil8, wgpu::TextureFormat::Depth24UnormStencil8, - wgpu::TextureFormat::Depth32FloatStencil8, + // TODO(dawn:666): Add Stencil8 format when it's implemented. + static constexpr std::array kDepthFormats = { + wgpu::TextureFormat::Depth16Unorm, wgpu::TextureFormat::Depth32Float, + wgpu::TextureFormat::Depth24Plus, wgpu::TextureFormat::Depth24PlusStencil8, + wgpu::TextureFormat::Depth24UnormStencil8, wgpu::TextureFormat::Depth32FloatStencil8, }; static constexpr std::array kStencilFormats = { wgpu::TextureFormat::Depth24PlusStencil8,