commit | a5988a3058c02d028785551fc249aff664205324 | [log] [tgz] |
---|---|---|
author | Zhaoming Jiang <zhaoming.jiang@intel.com> | Mon Jul 11 15:43:38 2022 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jul 11 15:43:38 2022 +0000 |
tree | 910d0300dea7ea26980bb863df456b77e14f7d7d | |
parent | 94c6495ad29c9025e60a07ae4e66164875c2d197 [diff] |
tint/writer/hlsl: Support for F16 type, constructor, and convertor This patch make HLSL writer support emitting f16 types, f16 literals, f16 constructor and convertor. Unittests are also implemented. The HLSL writer will emit f16 literal as `float16_t(1.23h)`, making the type explicit, and map f16 types as follow. The generated code require DXC with SM6.0 or higher, and `-enable-16bit-types`. WGSL type -> HLSL type f16 -> float16_t vec2<f16> -> vector<float16_t, 2> vec3<f16> -> vector<float16_t, 3> vec4<f16> -> vector<float16_t, 4> mat2x2<f16> -> matrix<float16_t, 2, 2> mat2x3<f16> -> matrix<float16_t, 2, 3> mat2x4<f16> -> matrix<float16_t, 2, 4> mat3x2<f16> -> matrix<float16_t, 3, 2> mat3x3<f16> -> matrix<float16_t, 3, 3> mat3x4<f16> -> matrix<float16_t, 3, 4> mat4x2<f16> -> matrix<float16_t, 4, 2> mat4x3<f16> -> matrix<float16_t, 4, 3> mat4x4<f16> -> matrix<float16_t, 4, 4> Bug: tint:1473, tint:1502 Change-Id: Iaf564f3ce29ace2984cef19d7df5a7dfb0fab2ef Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/95685 Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com> Reviewed-by: Ben Clayton <bclayton@google.com>
Dawn is an open-source and cross-platform implementation of the work-in-progress WebGPU standard. More precisely it implements webgpu.h
that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h
version that Dawn implements.webgpu.h
.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
(TODO)
Apache 2.0 Public License, please see LICENSE.
This is not an officially supported Google product.