mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
tools: Expand / clean-up the template WGSL type helpers
Fix `IsAbstract()` so that it doesn't consider most-nested element types. Add `ElementType()` and `DeepestElementType()` helpers. Add `OverloadUsesF16` as a helper for https://dawn-review.googlesource.com/c/dawn/+/96722. Simplifies template code. Change-Id: Iff5a9a7258caea06e00ee37c29e5298d9c35b799 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97361 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
8dbd4d0280
commit
a253a5f7e7
@@ -302,8 +302,11 @@ func (g *generator) bindAndParse(t *template.Template, text string) error {
|
||||
"IsTemplateNumberParam": is(sem.TemplateNumberParam{}),
|
||||
"IsTemplateTypeParam": is(sem.TemplateTypeParam{}),
|
||||
"IsType": is(sem.Type{}),
|
||||
"ElementType": gen.ElementType,
|
||||
"DeepestElementType": gen.DeepestElementType,
|
||||
"IsAbstract": gen.IsAbstract,
|
||||
"IsDeclarable": gen.IsDeclarable,
|
||||
"OverloadUsesF16": gen.OverloadUsesF16,
|
||||
"IsFirstIn": isFirstIn,
|
||||
"IsLastIn": isLastIn,
|
||||
"Sem": g.cache.sem,
|
||||
|
||||
Reference in New Issue
Block a user