Rename BC6HRGBSfloat to BC6HRGBFloat

Bug: dawn:22
Change-Id: Ib579e15ff923cbd7c4f523a58c2ef582d39ba7c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27200
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2020-09-10 08:48:57 +00:00 committed by Commit Bot service account
parent 87f25134a8
commit 498d5ea20a
12 changed files with 25 additions and 23 deletions

View File

@ -1646,7 +1646,7 @@
{"value": 48, "name": "BC5 RG unorm"}, {"value": 48, "name": "BC5 RG unorm"},
{"value": 49, "name": "BC5 RG snorm"}, {"value": 49, "name": "BC5 RG snorm"},
{"value": 50, "name": "BC6H RGB ufloat"}, {"value": 50, "name": "BC6H RGB ufloat"},
{"value": 51, "name": "BC6H RGB sfloat"}, {"value": 51, "name": "BC6H RGB float"},
{"value": 52, "name": "BC7 RGBA unorm"}, {"value": 52, "name": "BC7 RGBA unorm"},
{"value": 53, "name": "BC7 RGBA unorm srgb"} {"value": 53, "name": "BC7 RGBA unorm srgb"}
] ]

View File

@ -95,6 +95,7 @@ typedef uint32_t WGPUFlags;
{% endfor %} {% endfor %}
//* TODO(dawn:22) remove this once the PSA is sent and the deadline passed. //* TODO(dawn:22) remove this once the PSA is sent and the deadline passed.
#define WGPUTextureFormat_RG11B10Float WGPUTextureFormat_RG11B10Ufloat #define WGPUTextureFormat_RG11B10Float WGPUTextureFormat_RG11B10Ufloat
#define WGPUTextureFormat_BC6HRGBSfloat WGPUTextureFormat_BC6HRGBFloat
typedef struct WGPUChainedStruct { typedef struct WGPUChainedStruct {
struct WGPUChainedStruct const * next; struct WGPUChainedStruct const * next;

View File

@ -29,6 +29,7 @@ namespace wgpu {
//* TODO(dawn:22) remove this once the PSA is sent and the deadline passed. //* TODO(dawn:22) remove this once the PSA is sent and the deadline passed.
{% if type.name.canonical_case() == "texture format" %} {% if type.name.canonical_case() == "texture format" %}
RG11B10Float = RG11B10Ufloat, RG11B10Float = RG11B10Ufloat,
BC6HRGBSfloat = BC6HRGBFloat,
{% endif %} {% endif %}
}; };

View File

@ -312,7 +312,7 @@ namespace dawn_native {
AddCompressedFormat(wgpu::TextureFormat::BC3RGBAUnormSrgb, 16, 4, 4, isBCFormatSupported); AddCompressedFormat(wgpu::TextureFormat::BC3RGBAUnormSrgb, 16, 4, 4, isBCFormatSupported);
AddCompressedFormat(wgpu::TextureFormat::BC5RGSnorm, 16, 4, 4, isBCFormatSupported); AddCompressedFormat(wgpu::TextureFormat::BC5RGSnorm, 16, 4, 4, isBCFormatSupported);
AddCompressedFormat(wgpu::TextureFormat::BC5RGUnorm, 16, 4, 4, isBCFormatSupported); AddCompressedFormat(wgpu::TextureFormat::BC5RGUnorm, 16, 4, 4, isBCFormatSupported);
AddCompressedFormat(wgpu::TextureFormat::BC6HRGBSfloat, 16, 4, 4, isBCFormatSupported); AddCompressedFormat(wgpu::TextureFormat::BC6HRGBFloat, 16, 4, 4, isBCFormatSupported);
AddCompressedFormat(wgpu::TextureFormat::BC6HRGBUfloat, 16, 4, 4, isBCFormatSupported); AddCompressedFormat(wgpu::TextureFormat::BC6HRGBUfloat, 16, 4, 4, isBCFormatSupported);
AddCompressedFormat(wgpu::TextureFormat::BC7RGBAUnorm, 16, 4, 4, isBCFormatSupported); AddCompressedFormat(wgpu::TextureFormat::BC7RGBAUnorm, 16, 4, 4, isBCFormatSupported);
AddCompressedFormat(wgpu::TextureFormat::BC7RGBAUnormSrgb, 16, 4, 4, isBCFormatSupported); AddCompressedFormat(wgpu::TextureFormat::BC7RGBAUnormSrgb, 16, 4, 4, isBCFormatSupported);

View File

@ -191,7 +191,7 @@ namespace dawn_native { namespace d3d12 {
case wgpu::TextureFormat::BC5RGUnorm: case wgpu::TextureFormat::BC5RGUnorm:
return DXGI_FORMAT_BC5_TYPELESS; return DXGI_FORMAT_BC5_TYPELESS;
case wgpu::TextureFormat::BC6HRGBSfloat: case wgpu::TextureFormat::BC6HRGBFloat:
case wgpu::TextureFormat::BC6HRGBUfloat: case wgpu::TextureFormat::BC6HRGBUfloat:
return DXGI_FORMAT_BC6H_TYPELESS; return DXGI_FORMAT_BC6H_TYPELESS;
@ -312,7 +312,7 @@ namespace dawn_native { namespace d3d12 {
return DXGI_FORMAT_BC5_SNORM; return DXGI_FORMAT_BC5_SNORM;
case wgpu::TextureFormat::BC5RGUnorm: case wgpu::TextureFormat::BC5RGUnorm:
return DXGI_FORMAT_BC5_UNORM; return DXGI_FORMAT_BC5_UNORM;
case wgpu::TextureFormat::BC6HRGBSfloat: case wgpu::TextureFormat::BC6HRGBFloat:
return DXGI_FORMAT_BC6H_SF16; return DXGI_FORMAT_BC6H_SF16;
case wgpu::TextureFormat::BC6HRGBUfloat: case wgpu::TextureFormat::BC6HRGBUfloat:
return DXGI_FORMAT_BC6H_UF16; return DXGI_FORMAT_BC6H_UF16;

View File

@ -225,7 +225,7 @@ namespace dawn_native { namespace metal {
return MTLPixelFormatBC5_RGSnorm; return MTLPixelFormatBC5_RGSnorm;
case wgpu::TextureFormat::BC5RGUnorm: case wgpu::TextureFormat::BC5RGUnorm:
return MTLPixelFormatBC5_RGUnorm; return MTLPixelFormatBC5_RGUnorm;
case wgpu::TextureFormat::BC6HRGBSfloat: case wgpu::TextureFormat::BC6HRGBFloat:
return MTLPixelFormatBC6H_RGBFloat; return MTLPixelFormatBC6H_RGBFloat;
case wgpu::TextureFormat::BC6HRGBUfloat: case wgpu::TextureFormat::BC6HRGBUfloat:
return MTLPixelFormatBC6H_RGBUfloat; return MTLPixelFormatBC6H_RGBUfloat;

View File

@ -106,7 +106,7 @@ namespace dawn_native { namespace opengl {
AddFormat(wgpu::TextureFormat::BC4RUnorm, GL_COMPRESSED_RED_RGTC1, GL_RED, GL_UNSIGNED_BYTE, Type::Float); AddFormat(wgpu::TextureFormat::BC4RUnorm, GL_COMPRESSED_RED_RGTC1, GL_RED, GL_UNSIGNED_BYTE, Type::Float);
AddFormat(wgpu::TextureFormat::BC5RGSnorm, GL_COMPRESSED_SIGNED_RG_RGTC2, GL_RG, GL_BYTE, Type::Float); AddFormat(wgpu::TextureFormat::BC5RGSnorm, GL_COMPRESSED_SIGNED_RG_RGTC2, GL_RG, GL_BYTE, Type::Float);
AddFormat(wgpu::TextureFormat::BC5RGUnorm, GL_COMPRESSED_RG_RGTC2, GL_RG, GL_UNSIGNED_BYTE, Type::Float); AddFormat(wgpu::TextureFormat::BC5RGUnorm, GL_COMPRESSED_RG_RGTC2, GL_RG, GL_UNSIGNED_BYTE, Type::Float);
AddFormat(wgpu::TextureFormat::BC6HRGBSfloat, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT, GL_RGB, GL_HALF_FLOAT, Type::Float); AddFormat(wgpu::TextureFormat::BC6HRGBFloat, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT, GL_RGB, GL_HALF_FLOAT, Type::Float);
AddFormat(wgpu::TextureFormat::BC6HRGBUfloat, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT, GL_RGB, GL_HALF_FLOAT, Type::Float); AddFormat(wgpu::TextureFormat::BC6HRGBUfloat, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT, GL_RGB, GL_HALF_FLOAT, Type::Float);
AddFormat(wgpu::TextureFormat::BC7RGBAUnorm, GL_COMPRESSED_RGBA_BPTC_UNORM, GL_RGBA, GL_UNSIGNED_BYTE, Type::Float); AddFormat(wgpu::TextureFormat::BC7RGBAUnorm, GL_COMPRESSED_RGBA_BPTC_UNORM, GL_RGBA, GL_UNSIGNED_BYTE, Type::Float);
AddFormat(wgpu::TextureFormat::BC7RGBAUnormSrgb, GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM, GL_RGBA, GL_UNSIGNED_BYTE, Type::Float); AddFormat(wgpu::TextureFormat::BC7RGBAUnormSrgb, GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM, GL_RGBA, GL_UNSIGNED_BYTE, Type::Float);

View File

@ -360,7 +360,7 @@ namespace dawn_native { namespace vulkan {
return VK_FORMAT_BC5_SNORM_BLOCK; return VK_FORMAT_BC5_SNORM_BLOCK;
case wgpu::TextureFormat::BC5RGUnorm: case wgpu::TextureFormat::BC5RGUnorm:
return VK_FORMAT_BC5_UNORM_BLOCK; return VK_FORMAT_BC5_UNORM_BLOCK;
case wgpu::TextureFormat::BC6HRGBSfloat: case wgpu::TextureFormat::BC6HRGBFloat:
return VK_FORMAT_BC6H_SFLOAT_BLOCK; return VK_FORMAT_BC6H_SFLOAT_BLOCK;
case wgpu::TextureFormat::BC6HRGBUfloat: case wgpu::TextureFormat::BC6HRGBUfloat:
return VK_FORMAT_BC6H_UFLOAT_BLOCK; return VK_FORMAT_BC6H_UFLOAT_BLOCK;

View File

@ -322,7 +322,7 @@ class CompressedTextureBCFormatTest : public DawnTest {
case wgpu::TextureFormat::BC5RGUnorm: case wgpu::TextureFormat::BC5RGUnorm:
return {0xff, 0x0, 0x40, 0x2, 0x24, 0x40, 0x2, 0x24, return {0xff, 0x0, 0x40, 0x2, 0x24, 0x40, 0x2, 0x24,
0xff, 0x0, 0x9, 0x90, 0x0, 0x9, 0x90, 0x0}; 0xff, 0x0, 0x9, 0x90, 0x0, 0x9, 0x90, 0x0};
case wgpu::TextureFormat::BC6HRGBSfloat: case wgpu::TextureFormat::BC6HRGBFloat:
return {0xe3, 0x1f, 0x0, 0x0, 0x0, 0xe0, 0x1f, 0x0, return {0xe3, 0x1f, 0x0, 0x0, 0x0, 0xe0, 0x1f, 0x0,
0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff}; 0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff};
case wgpu::TextureFormat::BC6HRGBUfloat: case wgpu::TextureFormat::BC6HRGBUfloat:
@ -376,7 +376,7 @@ class CompressedTextureBCFormatTest : public DawnTest {
case wgpu::TextureFormat::BC5RGSnorm: case wgpu::TextureFormat::BC5RGSnorm:
case wgpu::TextureFormat::BC5RGUnorm: case wgpu::TextureFormat::BC5RGUnorm:
case wgpu::TextureFormat::BC6HRGBSfloat: case wgpu::TextureFormat::BC6HRGBFloat:
case wgpu::TextureFormat::BC6HRGBUfloat: case wgpu::TextureFormat::BC6HRGBUfloat:
return FillExpectedData(testRegion, RGBA8::kRed, RGBA8::kGreen); return FillExpectedData(testRegion, RGBA8::kRed, RGBA8::kGreen);
@ -417,13 +417,13 @@ class CompressedTextureBCFormatTest : public DawnTest {
} }
const std::array<wgpu::TextureFormat, 14> kBCFormats = { const std::array<wgpu::TextureFormat, 14> kBCFormats = {
wgpu::TextureFormat::BC1RGBAUnorm, wgpu::TextureFormat::BC1RGBAUnormSrgb, wgpu::TextureFormat::BC1RGBAUnorm, wgpu::TextureFormat::BC1RGBAUnormSrgb,
wgpu::TextureFormat::BC2RGBAUnorm, wgpu::TextureFormat::BC2RGBAUnormSrgb, wgpu::TextureFormat::BC2RGBAUnorm, wgpu::TextureFormat::BC2RGBAUnormSrgb,
wgpu::TextureFormat::BC3RGBAUnorm, wgpu::TextureFormat::BC3RGBAUnormSrgb, wgpu::TextureFormat::BC3RGBAUnorm, wgpu::TextureFormat::BC3RGBAUnormSrgb,
wgpu::TextureFormat::BC4RSnorm, wgpu::TextureFormat::BC4RUnorm, wgpu::TextureFormat::BC4RSnorm, wgpu::TextureFormat::BC4RUnorm,
wgpu::TextureFormat::BC5RGSnorm, wgpu::TextureFormat::BC5RGUnorm, wgpu::TextureFormat::BC5RGSnorm, wgpu::TextureFormat::BC5RGUnorm,
wgpu::TextureFormat::BC6HRGBSfloat, wgpu::TextureFormat::BC6HRGBUfloat, wgpu::TextureFormat::BC6HRGBFloat, wgpu::TextureFormat::BC6HRGBUfloat,
wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb}; wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb};
// Tthe block width and height in texels are 4 for all BC formats. // Tthe block width and height in texels are 4 for all BC formats.
static constexpr uint32_t kBCBlockWidthInTexels = 4; static constexpr uint32_t kBCBlockWidthInTexels = 4;

View File

@ -390,7 +390,7 @@ namespace {
wgpu::TextureFormat::BC3RGBAUnorm, wgpu::TextureFormat::BC3RGBAUnormSrgb, wgpu::TextureFormat::BC3RGBAUnorm, wgpu::TextureFormat::BC3RGBAUnormSrgb,
wgpu::TextureFormat::BC4RUnorm, wgpu::TextureFormat::BC4RSnorm, wgpu::TextureFormat::BC4RUnorm, wgpu::TextureFormat::BC4RSnorm,
wgpu::TextureFormat::BC5RGUnorm, wgpu::TextureFormat::BC5RGSnorm, wgpu::TextureFormat::BC5RGUnorm, wgpu::TextureFormat::BC5RGSnorm,
wgpu::TextureFormat::BC6HRGBUfloat, wgpu::TextureFormat::BC6HRGBSfloat, wgpu::TextureFormat::BC6HRGBUfloat, wgpu::TextureFormat::BC6HRGBFloat,
wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb}; wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb};
}; };

View File

@ -150,7 +150,7 @@ namespace utils {
case wgpu::TextureFormat::BC5RGUnorm: case wgpu::TextureFormat::BC5RGUnorm:
case wgpu::TextureFormat::BC5RGSnorm: case wgpu::TextureFormat::BC5RGSnorm:
case wgpu::TextureFormat::BC6HRGBUfloat: case wgpu::TextureFormat::BC6HRGBUfloat:
case wgpu::TextureFormat::BC6HRGBSfloat: case wgpu::TextureFormat::BC6HRGBFloat:
case wgpu::TextureFormat::BC7RGBAUnorm: case wgpu::TextureFormat::BC7RGBAUnorm:
case wgpu::TextureFormat::BC7RGBAUnormSrgb: case wgpu::TextureFormat::BC7RGBAUnormSrgb:
return 16u; return 16u;
@ -218,7 +218,7 @@ namespace utils {
case wgpu::TextureFormat::BC5RGUnorm: case wgpu::TextureFormat::BC5RGUnorm:
case wgpu::TextureFormat::BC5RGSnorm: case wgpu::TextureFormat::BC5RGSnorm:
case wgpu::TextureFormat::BC6HRGBUfloat: case wgpu::TextureFormat::BC6HRGBUfloat:
case wgpu::TextureFormat::BC6HRGBSfloat: case wgpu::TextureFormat::BC6HRGBFloat:
case wgpu::TextureFormat::BC7RGBAUnorm: case wgpu::TextureFormat::BC7RGBAUnorm:
case wgpu::TextureFormat::BC7RGBAUnormSrgb: case wgpu::TextureFormat::BC7RGBAUnormSrgb:
return 4u; return 4u;
@ -284,7 +284,7 @@ namespace utils {
case wgpu::TextureFormat::BC5RGUnorm: case wgpu::TextureFormat::BC5RGUnorm:
case wgpu::TextureFormat::BC5RGSnorm: case wgpu::TextureFormat::BC5RGSnorm:
case wgpu::TextureFormat::BC6HRGBUfloat: case wgpu::TextureFormat::BC6HRGBUfloat:
case wgpu::TextureFormat::BC6HRGBSfloat: case wgpu::TextureFormat::BC6HRGBFloat:
case wgpu::TextureFormat::BC7RGBAUnorm: case wgpu::TextureFormat::BC7RGBAUnorm:
case wgpu::TextureFormat::BC7RGBAUnormSrgb: case wgpu::TextureFormat::BC7RGBAUnormSrgb:
return 4u; return 4u;
@ -378,7 +378,7 @@ namespace utils {
case wgpu::TextureFormat::BC5RGUnorm: case wgpu::TextureFormat::BC5RGUnorm:
case wgpu::TextureFormat::BC5RGSnorm: case wgpu::TextureFormat::BC5RGSnorm:
case wgpu::TextureFormat::BC6HRGBUfloat: case wgpu::TextureFormat::BC6HRGBUfloat:
case wgpu::TextureFormat::BC6HRGBSfloat: case wgpu::TextureFormat::BC6HRGBFloat:
case wgpu::TextureFormat::BC7RGBAUnorm: case wgpu::TextureFormat::BC7RGBAUnorm:
case wgpu::TextureFormat::BC7RGBAUnormSrgb: case wgpu::TextureFormat::BC7RGBAUnormSrgb:
case wgpu::TextureFormat::Depth32Float: case wgpu::TextureFormat::Depth32Float:

View File

@ -73,7 +73,7 @@ namespace utils {
wgpu::TextureFormat::BC5RGUnorm, wgpu::TextureFormat::BC5RGUnorm,
wgpu::TextureFormat::BC5RGSnorm, wgpu::TextureFormat::BC5RGSnorm,
wgpu::TextureFormat::BC6HRGBUfloat, wgpu::TextureFormat::BC6HRGBUfloat,
wgpu::TextureFormat::BC6HRGBSfloat, wgpu::TextureFormat::BC6HRGBFloat,
wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnorm,
wgpu::TextureFormat::BC7RGBAUnormSrgb, wgpu::TextureFormat::BC7RGBAUnormSrgb,
}; };
@ -84,7 +84,7 @@ namespace utils {
wgpu::TextureFormat::BC3RGBAUnorm, wgpu::TextureFormat::BC3RGBAUnormSrgb, wgpu::TextureFormat::BC3RGBAUnorm, wgpu::TextureFormat::BC3RGBAUnormSrgb,
wgpu::TextureFormat::BC4RUnorm, wgpu::TextureFormat::BC4RSnorm, wgpu::TextureFormat::BC4RUnorm, wgpu::TextureFormat::BC4RSnorm,
wgpu::TextureFormat::BC5RGUnorm, wgpu::TextureFormat::BC5RGSnorm, wgpu::TextureFormat::BC5RGUnorm, wgpu::TextureFormat::BC5RGSnorm,
wgpu::TextureFormat::BC6HRGBUfloat, wgpu::TextureFormat::BC6HRGBSfloat, wgpu::TextureFormat::BC6HRGBUfloat, wgpu::TextureFormat::BC6HRGBFloat,
wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb}; wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb};
const char* GetColorTextureComponentTypePrefix(wgpu::TextureFormat textureFormat); const char* GetColorTextureComponentTypePrefix(wgpu::TextureFormat textureFormat);