这是indexloc提供的服务,不要输入任何密码
Skip to content

Investigation: Compressed Texture Formats #144

@Jiawei-Shao

Description

@Jiawei-Shao

Introduction

Compressed texture formats are useful when we want to save memory bandwidth for access to textures. There are mainly 4 families of compressed texture formats: BC, PVRTC, ETC and ASTC. In this report we will investigate the support of these compressed texture formats on D3D12, Metal and Vulkan

Compressed Texture Formats

BC

There are totally 7 BC algorithms (BC1, BC2, BC3, BC4, BC5, BC6H, BC7). BC1, BC2 and BC3 are also known as S3TC or DXTC. BC1 refers to DXT1, BC2 refers to DXT2 and DXT3, and BC3 refers to DXT4 and DXT5.

For D3D12, all BC formats are supported on the devices that support feature level 11_0 and above.

For Metal, BC formats are supported on all macOS devices, but they are not supported on iOS devices.

For Vulkan, the support of BC formats can be queried from vkGetPhysicalDeviceFeatures(), and if textureCompressionBC == true, then we know this Vulkan driver supports BC formats. 88% of Vulkan Hardware Database entries support BC formats.

PVRTC

PVRTC formats are only supported on iOS devices. No macOS, D3D12 or Vulkan devices support PVRTC formats despite OpenGL ES support on PowerVR Android devices.

ETC

ETC format family includes ETC1, ETC2 and EAC texture formats.

For D3D12, no ETC formats are supported.

For Metal, ETC formats are supported on all iOS devices, but they are not supported on macOS devices.

For Vulkan, the support of ETC formats can be queried from vkGetPhysicalDeviceFeatures(), and if textureCompressionETC2 == true, then we know this Vulkan driver supports ETC formats. 22% of Vulkan Hardware Database entries support ETC formats.

ASTC

For D3D12, no ASTC formats are supported.

For Metal, ASTC formats are supported on newer iOS devices (A8 and later), but they are not supported on macOS devices.

For Vulkan, the support of ASTC formats can be queried from vkGetPhysicalDeviceFeatures(), and if textureCompressionASTC_LDR == true, then we know this Vulkan driver supports ASTC formats. 19% of Vulkan Hardware Database entries support ASTC formats.

Proposal

The supports of compressed texture formats on D3D12, Metal and Vulkan can be summarized in the following table. From this table we can see that no compressed texture formats can be supported on D3D12, Metal or Vulkan simultaneously.

D3D12 Metal Vulkan
BC FL11_0 and above macOS textureCompressionBC == true (88%)
PVRTC No Support iOS No Support
ETC No Support iOS textureCompressionETC2 == true (22%)
ASTC No Support Newer iOS (A8 and above) textureCompressionASTC_LDR == true (19%)

As it could cause huge performance loss to emulate any compressed texture format by software, one feasible way is treating each of them as separate WebGPU extensions, which is actually how compressed texture formats are supported in WebGL.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions