Summary: | [WHLSL] Pack and unpack data at entry points and exit points | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||||||||
Component: | New Bugs | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | commit-queue, dino, ews-watchlist, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
Myles C. Maxfield
2019-01-26 17:27:55 PST
Created attachment 360258 [details]
WIP
Attachment 360258 [details] did not pass style-queue:
ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5]
Total errors found: 1 in 13 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 360298 [details]
Patch
Attachment 360298 [details] did not pass style-queue:
ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5]
Total errors found: 1 in 13 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 360319 [details]
Patch
Attachment 360319 [details] did not pass style-queue:
ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5]
Total errors found: 1 in 16 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 363689 [details]
WIP
Created attachment 363790 [details]
Patch
Comment on attachment 363790 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=363790&action=review > Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:107 > + namedBindGroup.argumentBufferIndex = argumentBufferIndex++; Why can't you use i here? (or rename i to be argumentBufferIndex) > Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:113 > + namedBinding.index = index++; Why can't you use j here? > Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:407 > + m_namedOutputs.reserveInitialCapacity(m_entryPointItems.outputs.size()); > + for (size_t i = 0; i < m_entryPointItems.outputs.size(); ++i) { > + NamedOutput namedOutput; > + namedOutput.elementName = m_typeNamer.generateNextStructureElementName(); > + m_namedOutputs.uncheckedAppend(WTFMove(namedOutput)); > + } I wonder if you could use .map for these loops. It sets up the initial capacity for you. m_namedOutputs = m_entryPointItems.output.map([] (...) -> NamedOutput { .... return namedOutput; } > Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:265 > + CRASH(); Really? Wouldn't we want to return an invalid program instead? > Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:360 > + CRASH(); ditto for other instances of CRASH() > Source/WebCore/Modules/webgpu/WHLSL/WHLSLSemanticMatcher.cpp:97 > + itemIndices.add(i + 1); // Work around the fact that HashSet's keys are restricted. Confused--- Can't you use a HashSet with a zero key? You test for max above? Comment on attachment 363790 [details] Patch Clearing flags on attachment: 363790 Committed r242571: <https://trac.webkit.org/changeset/242571> All reviewed patches have been landed. Closing bug. |