mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
Add wgpu::TextureFormat::RGB9E5Ufloat
Also update RG11B10Float to be name RG11B10Ufloat Bug: dawn:22 Change-Id: I0ea76dc25c37ebaeb4c2c2c2a119d00940acc145 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25760 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
b54c82ed39
commit
2f6e4ec6c0
@@ -27,7 +27,8 @@ namespace utils {
|
||||
case wgpu::TextureFormat::RGBA8Unorm:
|
||||
case wgpu::TextureFormat::RGBA8Snorm:
|
||||
case wgpu::TextureFormat::RGB10A2Unorm:
|
||||
case wgpu::TextureFormat::RG11B10Float:
|
||||
case wgpu::TextureFormat::RG11B10Ufloat:
|
||||
case wgpu::TextureFormat::RGB9E5Ufloat:
|
||||
case wgpu::TextureFormat::RG32Float:
|
||||
case wgpu::TextureFormat::RGBA16Float:
|
||||
case wgpu::TextureFormat::RGBA32Float:
|
||||
@@ -118,7 +119,8 @@ namespace utils {
|
||||
case wgpu::TextureFormat::BGRA8Unorm:
|
||||
case wgpu::TextureFormat::BGRA8UnormSrgb:
|
||||
case wgpu::TextureFormat::RGB10A2Unorm:
|
||||
case wgpu::TextureFormat::RG11B10Float:
|
||||
case wgpu::TextureFormat::RG11B10Ufloat:
|
||||
case wgpu::TextureFormat::RGB9E5Ufloat:
|
||||
case wgpu::TextureFormat::Depth32Float:
|
||||
return 4u;
|
||||
|
||||
@@ -189,7 +191,8 @@ namespace utils {
|
||||
case wgpu::TextureFormat::BGRA8Unorm:
|
||||
case wgpu::TextureFormat::BGRA8UnormSrgb:
|
||||
case wgpu::TextureFormat::RGB10A2Unorm:
|
||||
case wgpu::TextureFormat::RG11B10Float:
|
||||
case wgpu::TextureFormat::RG11B10Ufloat:
|
||||
case wgpu::TextureFormat::RGB9E5Ufloat:
|
||||
case wgpu::TextureFormat::RG32Float:
|
||||
case wgpu::TextureFormat::RG32Uint:
|
||||
case wgpu::TextureFormat::RG32Sint:
|
||||
@@ -254,7 +257,8 @@ namespace utils {
|
||||
case wgpu::TextureFormat::BGRA8Unorm:
|
||||
case wgpu::TextureFormat::BGRA8UnormSrgb:
|
||||
case wgpu::TextureFormat::RGB10A2Unorm:
|
||||
case wgpu::TextureFormat::RG11B10Float:
|
||||
case wgpu::TextureFormat::RG11B10Ufloat:
|
||||
case wgpu::TextureFormat::RGB9E5Ufloat:
|
||||
case wgpu::TextureFormat::RG32Float:
|
||||
case wgpu::TextureFormat::RG32Uint:
|
||||
case wgpu::TextureFormat::RG32Sint:
|
||||
@@ -338,7 +342,7 @@ namespace utils {
|
||||
return "rgba8i";
|
||||
case wgpu::TextureFormat::RGB10A2Unorm:
|
||||
return "rgb10_a2";
|
||||
case wgpu::TextureFormat::RG11B10Float:
|
||||
case wgpu::TextureFormat::RG11B10Ufloat:
|
||||
return "r11f_g11f_b10f";
|
||||
case wgpu::TextureFormat::RG32Float:
|
||||
return "rg32f";
|
||||
@@ -359,6 +363,7 @@ namespace utils {
|
||||
case wgpu::TextureFormat::RGBA32Sint:
|
||||
return "rgba32i";
|
||||
|
||||
case wgpu::TextureFormat::RGB9E5Ufloat:
|
||||
case wgpu::TextureFormat::RGBA8UnormSrgb:
|
||||
case wgpu::TextureFormat::BGRA8Unorm:
|
||||
case wgpu::TextureFormat::BGRA8UnormSrgb:
|
||||
|
||||
@@ -22,33 +22,60 @@
|
||||
#include "common/Assert.h"
|
||||
|
||||
namespace utils {
|
||||
static constexpr std::array<wgpu::TextureFormat, 52> kAllTextureFormats = {
|
||||
wgpu::TextureFormat::R8Unorm, wgpu::TextureFormat::R8Snorm,
|
||||
wgpu::TextureFormat::R8Uint, wgpu::TextureFormat::R8Sint,
|
||||
wgpu::TextureFormat::R16Uint, wgpu::TextureFormat::R16Sint,
|
||||
wgpu::TextureFormat::R16Float, wgpu::TextureFormat::RG8Unorm,
|
||||
wgpu::TextureFormat::RG8Snorm, wgpu::TextureFormat::RG8Uint,
|
||||
wgpu::TextureFormat::RG8Sint, wgpu::TextureFormat::R32Float,
|
||||
wgpu::TextureFormat::R32Uint, wgpu::TextureFormat::R32Sint,
|
||||
wgpu::TextureFormat::RG16Uint, wgpu::TextureFormat::RG16Sint,
|
||||
wgpu::TextureFormat::RG16Float, wgpu::TextureFormat::RGBA8Unorm,
|
||||
wgpu::TextureFormat::RGBA8UnormSrgb, wgpu::TextureFormat::RGBA8Snorm,
|
||||
wgpu::TextureFormat::RGBA8Uint, wgpu::TextureFormat::RGBA8Sint,
|
||||
wgpu::TextureFormat::BGRA8Unorm, wgpu::TextureFormat::BGRA8UnormSrgb,
|
||||
wgpu::TextureFormat::RGB10A2Unorm, wgpu::TextureFormat::RG11B10Float,
|
||||
wgpu::TextureFormat::RG32Float, wgpu::TextureFormat::RG32Uint,
|
||||
wgpu::TextureFormat::RG32Sint, wgpu::TextureFormat::RGBA16Uint,
|
||||
wgpu::TextureFormat::RGBA16Sint, wgpu::TextureFormat::RGBA16Float,
|
||||
wgpu::TextureFormat::RGBA32Float, wgpu::TextureFormat::RGBA32Uint,
|
||||
wgpu::TextureFormat::RGBA32Sint, wgpu::TextureFormat::Depth32Float,
|
||||
wgpu::TextureFormat::Depth24Plus, wgpu::TextureFormat::Depth24PlusStencil8,
|
||||
wgpu::TextureFormat::BC1RGBAUnorm, wgpu::TextureFormat::BC1RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC2RGBAUnorm, wgpu::TextureFormat::BC2RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC3RGBAUnorm, wgpu::TextureFormat::BC3RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC4RUnorm, wgpu::TextureFormat::BC4RSnorm,
|
||||
wgpu::TextureFormat::BC5RGUnorm, wgpu::TextureFormat::BC5RGSnorm,
|
||||
wgpu::TextureFormat::BC6HRGBUfloat, wgpu::TextureFormat::BC6HRGBSfloat,
|
||||
wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb,
|
||||
static constexpr std::array<wgpu::TextureFormat, 53> kAllTextureFormats = {
|
||||
wgpu::TextureFormat::R8Unorm,
|
||||
wgpu::TextureFormat::R8Snorm,
|
||||
wgpu::TextureFormat::R8Uint,
|
||||
wgpu::TextureFormat::R8Sint,
|
||||
wgpu::TextureFormat::R16Uint,
|
||||
wgpu::TextureFormat::R16Sint,
|
||||
wgpu::TextureFormat::R16Float,
|
||||
wgpu::TextureFormat::RG8Unorm,
|
||||
wgpu::TextureFormat::RG8Snorm,
|
||||
wgpu::TextureFormat::RG8Uint,
|
||||
wgpu::TextureFormat::RG8Sint,
|
||||
wgpu::TextureFormat::R32Float,
|
||||
wgpu::TextureFormat::R32Uint,
|
||||
wgpu::TextureFormat::R32Sint,
|
||||
wgpu::TextureFormat::RG16Uint,
|
||||
wgpu::TextureFormat::RG16Sint,
|
||||
wgpu::TextureFormat::RG16Float,
|
||||
wgpu::TextureFormat::RGBA8Unorm,
|
||||
wgpu::TextureFormat::RGBA8UnormSrgb,
|
||||
wgpu::TextureFormat::RGBA8Snorm,
|
||||
wgpu::TextureFormat::RGBA8Uint,
|
||||
wgpu::TextureFormat::RGBA8Sint,
|
||||
wgpu::TextureFormat::BGRA8Unorm,
|
||||
wgpu::TextureFormat::BGRA8UnormSrgb,
|
||||
wgpu::TextureFormat::RGB10A2Unorm,
|
||||
wgpu::TextureFormat::RG11B10Ufloat,
|
||||
wgpu::TextureFormat::RGB9E5Ufloat,
|
||||
wgpu::TextureFormat::RG32Float,
|
||||
wgpu::TextureFormat::RG32Uint,
|
||||
wgpu::TextureFormat::RG32Sint,
|
||||
wgpu::TextureFormat::RGBA16Uint,
|
||||
wgpu::TextureFormat::RGBA16Sint,
|
||||
wgpu::TextureFormat::RGBA16Float,
|
||||
wgpu::TextureFormat::RGBA32Float,
|
||||
wgpu::TextureFormat::RGBA32Uint,
|
||||
wgpu::TextureFormat::RGBA32Sint,
|
||||
wgpu::TextureFormat::Depth32Float,
|
||||
wgpu::TextureFormat::Depth24Plus,
|
||||
wgpu::TextureFormat::Depth24PlusStencil8,
|
||||
wgpu::TextureFormat::BC1RGBAUnorm,
|
||||
wgpu::TextureFormat::BC1RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC2RGBAUnorm,
|
||||
wgpu::TextureFormat::BC2RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC3RGBAUnorm,
|
||||
wgpu::TextureFormat::BC3RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC4RUnorm,
|
||||
wgpu::TextureFormat::BC4RSnorm,
|
||||
wgpu::TextureFormat::BC5RGUnorm,
|
||||
wgpu::TextureFormat::BC5RGSnorm,
|
||||
wgpu::TextureFormat::BC6HRGBUfloat,
|
||||
wgpu::TextureFormat::BC6HRGBSfloat,
|
||||
wgpu::TextureFormat::BC7RGBAUnorm,
|
||||
wgpu::TextureFormat::BC7RGBAUnormSrgb,
|
||||
};
|
||||
|
||||
const char* GetColorTextureComponentTypePrefix(wgpu::TextureFormat textureFormat);
|
||||
|
||||
Reference in New Issue
Block a user