Bug 198706 - [WHLSL] Remove unnecessary ASSERT()s and clean up visitor lambdas
Summary: [WHLSL] Remove unnecessary ASSERT()s and clean up visitor lambdas
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
: 198705 (view as bug list)
Depends on:
Blocks: 198704
  Show dependency treegraph
 
Reported: 2019-06-09 23:38 PDT by Myles C. Maxfield
Modified: 2019-06-13 22:46 PDT (History)
7 users (show)

See Also:


Attachments
WIP (32.13 KB, patch)
2019-06-09 23:39 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (35.55 KB, patch)
2019-06-12 23:54 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (37.80 KB, patch)
2019-06-13 10:44 PDT, Myles C. Maxfield
dino: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2019-06-09 23:38:45 PDT
General cleanup. No behavior change.
Comment 1 Myles C. Maxfield 2019-06-09 23:39:15 PDT
Created attachment 371724 [details]
WIP
Comment 2 Myles C. Maxfield 2019-06-09 23:40:13 PDT
*** Bug 198705 has been marked as a duplicate of this bug. ***
Comment 3 Jon Lee 2019-06-12 08:53:03 PDT
Changing to P1 since it blocks 198704.
Comment 4 Radar WebKit Bug Importer 2019-06-12 08:54:25 PDT
<rdar://problem/51668851>
Comment 5 Myles C. Maxfield 2019-06-12 23:54:38 PDT
Created attachment 372022 [details]
Patch
Comment 6 Myles C. Maxfield 2019-06-13 10:44:49 PDT
Created attachment 372066 [details]
Patch
Comment 7 Saam Barati 2019-06-13 12:55:30 PDT
LGTM too.
Comment 8 Robin Morisset 2019-06-13 14:08:39 PDT
Comment on attachment 372066 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=372066&action=review

r=me with just a nitpick.

> Source/WebCore/Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:350
> +    auto textureTypeIndex = std::find(m_textureTypeNames, m_textureTypeNames + WTF_ARRAY_LENGTH(m_textureTypeNames), nativeTypeDeclaration.name()) - m_textureTypeNames;

I understand that is more concise, but I am not entirely comfortable with replacing some reasonable code by pointer arithmetic (the - m_textureTypeNames at the end).
It gets me especially wary because of the auto. Is this std::ptrdiff_t ?uintptr_t ?
Comment 9 Myles C. Maxfield 2019-06-13 22:46:04 PDT
Committed r246428: <https://trac.webkit.org/changeset/246428>