cts
cts copied to clipboard
Consolidate texture format lists for tests
Many tests take a list of texture formats. It would probably be good to consolidate those lists and or provide helpers/patterns for their usage.
For example. Some storage texture tests use TexelFormats
in src/webgpu/shader/types.ts
. Others use filter the list of all formats (kAllTextureFormats
) by looking at kTextureFormatInfo[p.format].color?.storage === true
or calling isTextureFormatUsableAsStorageFormat
.
Ideally, a new texture format can be added to kTextureFormatInfo
and would be picked up by all relevant tests? To do this, all tests should probably take some kind data from format_info.ts
and call selectDeviceForTextureFormatOrSkipTestCase
or other appropriate functions.
related: https://github.com/gpuweb/cts/issues/3848