dawn-cmake/src/common
Corentin Wallez 431d618961 Add most WebGPU texture formats on Vulkan
This adds the formats to dawn.json, implements support in the Vulkan
backend and adds tests performing basic sampling checks for all formats.

The R8UnormSrgb and RG8UnormSrgb formats skipped because they are not
required in Vulkan (and RG8UnormSrgb is in fact not supported on the
machine used for developing this CL). A PR will be sent to the WebGPU
repo to remove the from the initial list of formats.

The RG11B10Float and RGB10A2Unorm formats of WebGPU are replaced with
B10GR11Float and A2RGB10Unorm that are the formats exposed by Vulkan. It
is likely that all APIs implement them with components stored in that
order.

Each format except depth-stencil ones is tested by uploading some
interesting texel data and checking that sampling from the texture
produces correct results. The goal is to make sure that backends don't
make a mistake in the giant switch statements. There was no effort made
to check the hardware implementation of the formats.

Tests will later be extended to cover rendering and clearing operations
as well as multisample resolve.

It isn't clear if depth-stencil format will support TRANSFER operations
in WebGPU so these are left untested for now.

BUG=dawn:128

Change-Id: I78ac5bf77b57398155551e6db3de50b478d69452
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8363
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-07-01 09:58:07 +00:00
..
Assert.cpp Rename src/common macros NXT_* to DAWN_* 2018-07-18 22:54:06 +02:00
Assert.h Rename NXT -> Dawn in the comments 2018-07-18 22:54:06 +02:00
BUILD.gn Add missing Constants.h in src/common/BUILD.gn 2019-04-11 07:41:38 +00:00
BitSetIterator.h Rename src/common macros NXT_* to DAWN_* 2018-07-18 22:54:06 +02:00
Compiler.h Fix extra semicolon in DAWN_UNUSED_FUNC 2019-02-13 22:11:48 +00:00
Constants.h Clear Vulkan Textures at first usage 2019-06-11 18:11:05 +00:00
DynamicLib.cpp Rename src/common macros NXT_* to DAWN_* 2018-07-18 22:54:06 +02:00
DynamicLib.h Rename the copyright authors from NXT to Dawn 2018-07-18 22:54:06 +02:00
HashUtils.h Workaround a _GLIBCXX_DEBUG bug for std::hash<std::bitset> 2018-08-21 02:28:16 -04:00
Math.cpp Add most WebGPU texture formats on Vulkan 2019-07-01 09:58:07 +00:00
Math.h Add most WebGPU texture formats on Vulkan 2019-07-01 09:58:07 +00:00
Platform.h Add support for all of Chromium's CPU architectures. 2018-11-01 14:30:24 +00:00
Result.h OpenGL: Implement the backend connection and adapter. 2019-01-07 09:48:03 +00:00
Serial.h Rename the copyright authors from NXT to Dawn 2018-07-18 22:54:06 +02:00
SerialMap.h Factor SerialQueue into SerialQueue and SerialMap 2018-11-28 17:30:12 +00:00
SerialQueue.h Add Create/ReleaseStagingBuffer to DynamicUploader 2019-06-05 16:16:37 +00:00
SerialStorage.h Memory manager: buffer uploads (D3D) - Part 1 2019-01-29 00:10:07 +00:00
SwapChainUtils.h Improve usage of static_casts over reinterpret_casts 2019-05-03 00:58:27 +00:00
vulkan_platform.h Fix VkNonDispatchableHandle alignment on Linux x86 2018-09-05 08:01:24 -04:00
windows_with_undefs.h Fix compilation of the GL backend on Windows 2019-06-14 08:50:42 +00:00