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:
parent
87f25134a8
commit
498d5ea20a
|
@ -1646,7 +1646,7 @@
|
|||
{"value": 48, "name": "BC5 RG unorm"},
|
||||
{"value": 49, "name": "BC5 RG snorm"},
|
||||
{"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": 53, "name": "BC7 RGBA unorm srgb"}
|
||||
]
|
||||
|
|
|
@ -95,6 +95,7 @@ typedef uint32_t WGPUFlags;
|
|||
{% endfor %}
|
||||
//* TODO(dawn:22) remove this once the PSA is sent and the deadline passed.
|
||||
#define WGPUTextureFormat_RG11B10Float WGPUTextureFormat_RG11B10Ufloat
|
||||
#define WGPUTextureFormat_BC6HRGBSfloat WGPUTextureFormat_BC6HRGBFloat
|
||||
|
||||
typedef struct WGPUChainedStruct {
|
||||
struct WGPUChainedStruct const * next;
|
||||
|
|
|
@ -29,6 +29,7 @@ namespace wgpu {
|
|||
//* TODO(dawn:22) remove this once the PSA is sent and the deadline passed.
|
||||
{% if type.name.canonical_case() == "texture format" %}
|
||||
RG11B10Float = RG11B10Ufloat,
|
||||
BC6HRGBSfloat = BC6HRGBFloat,
|
||||
{% endif %}
|
||||
};
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ namespace dawn_native {
|
|||
AddCompressedFormat(wgpu::TextureFormat::BC3RGBAUnormSrgb, 16, 4, 4, isBCFormatSupported);
|
||||
AddCompressedFormat(wgpu::TextureFormat::BC5RGSnorm, 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::BC7RGBAUnorm, 16, 4, 4, isBCFormatSupported);
|
||||
AddCompressedFormat(wgpu::TextureFormat::BC7RGBAUnormSrgb, 16, 4, 4, isBCFormatSupported);
|
||||
|
|
|
@ -191,7 +191,7 @@ namespace dawn_native { namespace d3d12 {
|
|||
case wgpu::TextureFormat::BC5RGUnorm:
|
||||
return DXGI_FORMAT_BC5_TYPELESS;
|
||||
|
||||
case wgpu::TextureFormat::BC6HRGBSfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBFloat:
|
||||
case wgpu::TextureFormat::BC6HRGBUfloat:
|
||||
return DXGI_FORMAT_BC6H_TYPELESS;
|
||||
|
||||
|
@ -312,7 +312,7 @@ namespace dawn_native { namespace d3d12 {
|
|||
return DXGI_FORMAT_BC5_SNORM;
|
||||
case wgpu::TextureFormat::BC5RGUnorm:
|
||||
return DXGI_FORMAT_BC5_UNORM;
|
||||
case wgpu::TextureFormat::BC6HRGBSfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBFloat:
|
||||
return DXGI_FORMAT_BC6H_SF16;
|
||||
case wgpu::TextureFormat::BC6HRGBUfloat:
|
||||
return DXGI_FORMAT_BC6H_UF16;
|
||||
|
|
|
@ -225,7 +225,7 @@ namespace dawn_native { namespace metal {
|
|||
return MTLPixelFormatBC5_RGSnorm;
|
||||
case wgpu::TextureFormat::BC5RGUnorm:
|
||||
return MTLPixelFormatBC5_RGUnorm;
|
||||
case wgpu::TextureFormat::BC6HRGBSfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBFloat:
|
||||
return MTLPixelFormatBC6H_RGBFloat;
|
||||
case wgpu::TextureFormat::BC6HRGBUfloat:
|
||||
return MTLPixelFormatBC6H_RGBUfloat;
|
||||
|
|
|
@ -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::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::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::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);
|
||||
|
|
|
@ -360,7 +360,7 @@ namespace dawn_native { namespace vulkan {
|
|||
return VK_FORMAT_BC5_SNORM_BLOCK;
|
||||
case wgpu::TextureFormat::BC5RGUnorm:
|
||||
return VK_FORMAT_BC5_UNORM_BLOCK;
|
||||
case wgpu::TextureFormat::BC6HRGBSfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBFloat:
|
||||
return VK_FORMAT_BC6H_SFLOAT_BLOCK;
|
||||
case wgpu::TextureFormat::BC6HRGBUfloat:
|
||||
return VK_FORMAT_BC6H_UFLOAT_BLOCK;
|
||||
|
|
|
@ -322,7 +322,7 @@ class CompressedTextureBCFormatTest : public DawnTest {
|
|||
case wgpu::TextureFormat::BC5RGUnorm:
|
||||
return {0xff, 0x0, 0x40, 0x2, 0x24, 0x40, 0x2, 0x24,
|
||||
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,
|
||||
0x0, 0xff, 0x0, 0xff, 0x0, 0xff, 0x0, 0xff};
|
||||
case wgpu::TextureFormat::BC6HRGBUfloat:
|
||||
|
@ -376,7 +376,7 @@ class CompressedTextureBCFormatTest : public DawnTest {
|
|||
|
||||
case wgpu::TextureFormat::BC5RGSnorm:
|
||||
case wgpu::TextureFormat::BC5RGUnorm:
|
||||
case wgpu::TextureFormat::BC6HRGBSfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBFloat:
|
||||
case wgpu::TextureFormat::BC6HRGBUfloat:
|
||||
return FillExpectedData(testRegion, RGBA8::kRed, RGBA8::kGreen);
|
||||
|
||||
|
@ -417,13 +417,13 @@ class CompressedTextureBCFormatTest : public DawnTest {
|
|||
}
|
||||
|
||||
const std::array<wgpu::TextureFormat, 14> kBCFormats = {
|
||||
wgpu::TextureFormat::BC1RGBAUnorm, wgpu::TextureFormat::BC1RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC2RGBAUnorm, wgpu::TextureFormat::BC2RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC3RGBAUnorm, wgpu::TextureFormat::BC3RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC4RSnorm, wgpu::TextureFormat::BC4RUnorm,
|
||||
wgpu::TextureFormat::BC5RGSnorm, wgpu::TextureFormat::BC5RGUnorm,
|
||||
wgpu::TextureFormat::BC6HRGBSfloat, wgpu::TextureFormat::BC6HRGBUfloat,
|
||||
wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb};
|
||||
wgpu::TextureFormat::BC1RGBAUnorm, wgpu::TextureFormat::BC1RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC2RGBAUnorm, wgpu::TextureFormat::BC2RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC3RGBAUnorm, wgpu::TextureFormat::BC3RGBAUnormSrgb,
|
||||
wgpu::TextureFormat::BC4RSnorm, wgpu::TextureFormat::BC4RUnorm,
|
||||
wgpu::TextureFormat::BC5RGSnorm, wgpu::TextureFormat::BC5RGUnorm,
|
||||
wgpu::TextureFormat::BC6HRGBFloat, wgpu::TextureFormat::BC6HRGBUfloat,
|
||||
wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb};
|
||||
|
||||
// Tthe block width and height in texels are 4 for all BC formats.
|
||||
static constexpr uint32_t kBCBlockWidthInTexels = 4;
|
||||
|
|
|
@ -390,7 +390,7 @@ namespace {
|
|||
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::BC6HRGBUfloat, wgpu::TextureFormat::BC6HRGBFloat,
|
||||
wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb};
|
||||
};
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ namespace utils {
|
|||
case wgpu::TextureFormat::BC5RGUnorm:
|
||||
case wgpu::TextureFormat::BC5RGSnorm:
|
||||
case wgpu::TextureFormat::BC6HRGBUfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBSfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBFloat:
|
||||
case wgpu::TextureFormat::BC7RGBAUnorm:
|
||||
case wgpu::TextureFormat::BC7RGBAUnormSrgb:
|
||||
return 16u;
|
||||
|
@ -218,7 +218,7 @@ namespace utils {
|
|||
case wgpu::TextureFormat::BC5RGUnorm:
|
||||
case wgpu::TextureFormat::BC5RGSnorm:
|
||||
case wgpu::TextureFormat::BC6HRGBUfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBSfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBFloat:
|
||||
case wgpu::TextureFormat::BC7RGBAUnorm:
|
||||
case wgpu::TextureFormat::BC7RGBAUnormSrgb:
|
||||
return 4u;
|
||||
|
@ -284,7 +284,7 @@ namespace utils {
|
|||
case wgpu::TextureFormat::BC5RGUnorm:
|
||||
case wgpu::TextureFormat::BC5RGSnorm:
|
||||
case wgpu::TextureFormat::BC6HRGBUfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBSfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBFloat:
|
||||
case wgpu::TextureFormat::BC7RGBAUnorm:
|
||||
case wgpu::TextureFormat::BC7RGBAUnormSrgb:
|
||||
return 4u;
|
||||
|
@ -378,7 +378,7 @@ namespace utils {
|
|||
case wgpu::TextureFormat::BC5RGUnorm:
|
||||
case wgpu::TextureFormat::BC5RGSnorm:
|
||||
case wgpu::TextureFormat::BC6HRGBUfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBSfloat:
|
||||
case wgpu::TextureFormat::BC6HRGBFloat:
|
||||
case wgpu::TextureFormat::BC7RGBAUnorm:
|
||||
case wgpu::TextureFormat::BC7RGBAUnormSrgb:
|
||||
case wgpu::TextureFormat::Depth32Float:
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace utils {
|
|||
wgpu::TextureFormat::BC5RGUnorm,
|
||||
wgpu::TextureFormat::BC5RGSnorm,
|
||||
wgpu::TextureFormat::BC6HRGBUfloat,
|
||||
wgpu::TextureFormat::BC6HRGBSfloat,
|
||||
wgpu::TextureFormat::BC6HRGBFloat,
|
||||
wgpu::TextureFormat::BC7RGBAUnorm,
|
||||
wgpu::TextureFormat::BC7RGBAUnormSrgb,
|
||||
};
|
||||
|
@ -84,7 +84,7 @@ namespace utils {
|
|||
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::BC6HRGBUfloat, wgpu::TextureFormat::BC6HRGBFloat,
|
||||
wgpu::TextureFormat::BC7RGBAUnorm, wgpu::TextureFormat::BC7RGBAUnormSrgb};
|
||||
|
||||
const char* GetColorTextureComponentTypePrefix(wgpu::TextureFormat textureFormat);
|
||||
|
|
Loading…
Reference in New Issue