Add Depth16Unorm texture format in utils/TextureUtils.h
The Depth16Unorm format has been implemented at https://dawn-review.googlesource.com/c/dawn/+/62420, we can add it to kAllTextureFormats and kDepthFormats in utils/TextureUtils.h. Bug=dawn:570 Change-Id: I5abf845341debc1d6881c639bc400c40b14fc3bc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70900 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Hao Li <hao.x.li@intel.com>
This commit is contained in:
parent
633d40bd0f
commit
66467a4d8f
|
@ -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<wgpu::TextureFormat, 93> kAllTextureFormats = {
|
||||
// TODO(dawn:666): Add Stencil8 format when it's implemented.
|
||||
static constexpr std::array<wgpu::TextureFormat, 94> 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<wgpu::TextureFormat, 5> 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<wgpu::TextureFormat, 6> kDepthFormats = {
|
||||
wgpu::TextureFormat::Depth16Unorm, wgpu::TextureFormat::Depth32Float,
|
||||
wgpu::TextureFormat::Depth24Plus, wgpu::TextureFormat::Depth24PlusStencil8,
|
||||
wgpu::TextureFormat::Depth24UnormStencil8, wgpu::TextureFormat::Depth32FloatStencil8,
|
||||
};
|
||||
static constexpr std::array<wgpu::TextureFormat, 3> kStencilFormats = {
|
||||
wgpu::TextureFormat::Depth24PlusStencil8,
|
||||
|
|
Loading…
Reference in New Issue