Bug 233396 - [WebGPU] Send WebGPU messages in the web process
Summary: [WebGPU] Send WebGPU messages in the web process
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-20 04:00 PST by Myles C. Maxfield
Modified: 2021-11-20 16:05 PST (History)
2 users (show)

See Also:


Attachments
Patch (272.06 KB, patch)
2021-11-20 04:04 PST, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (273.33 KB, patch)
2021-11-20 13:10 PST, Myles C. Maxfield
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (273.18 KB, patch)
2021-11-20 13:14 PST, Myles C. Maxfield
dino: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for committing (273.13 KB, patch)
2021-11-20 13:56 PST, Myles C. Maxfield
no flags 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 2021-11-20 04:00:34 PST
[WebGPU] Send WebGPU messages in the web process
Comment 1 Myles C. Maxfield 2021-11-20 04:04:01 PST
Created attachment 444894 [details]
Patch
Comment 2 Myles C. Maxfield 2021-11-20 13:10:47 PST
Created attachment 444905 [details]
Patch
Comment 3 Myles C. Maxfield 2021-11-20 13:14:33 PST
Created attachment 444906 [details]
Patch
Comment 4 Dean Jackson 2021-11-20 13:19:14 PST
Comment on attachment 444905 [details]
Patch

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

> Source/WebKit/Shared/WebGPU/WebGPUBindGroupEntry.cpp:44
> +    /*
> +    PAL::WebGPU::Index32 binding;
> +    BufferBinding bufferBinding;
> +    WebGPUIdentifier identifier;
> +    BindingResourceType type;
> +    */

Did you mean to leave this here?
Comment 5 Dean Jackson 2021-11-20 13:41:56 PST
Comment on attachment 444906 [details]
Patch

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

> Source/WebKit/Shared/WebGPU/WebGPURenderPassDescriptor.cpp:58
> +    auto depthStencilAttachment = ([&] () -> std::optional<RenderPassDepthStencilAttachment> {
> +        if (renderPassDescriptor.depthStencilAttachment)
> +            return convertToBacking(*renderPassDescriptor.depthStencilAttachment);
> +        return std::nullopt;
> +    })();
> +    if (renderPassDescriptor.depthStencilAttachment && !depthStencilAttachment)
> +        return std::nullopt;

Isn't it less lines to simply do:

std::optional<RenderPassDepthStencilAttachment> depthStencilAttachment;
if (renderPassDescriptor.depthStencilAttachment) {
  depthStencilAttachment = convertToBacking(*renderPassDescriptor.depthStencilAttachment);
  if (!depthStencilAttachment)
     return std::nullopt;
}

> Source/WebKit/Shared/WebGPU/WebGPURenderPipelineDescriptor.cpp:74
> +    auto fragment = ([&] () -> std::optional<FragmentState> {
> +        if (renderPipelineDescriptor.fragment)
> +            return convertToBacking(*renderPipelineDescriptor.fragment);
> +        return std::nullopt;
> +    })();
> +    if (renderPipelineDescriptor.fragment && !fragment)
> +        return std::nullopt;

Another one here.
Comment 6 Myles C. Maxfield 2021-11-20 13:45:31 PST
Comment on attachment 444906 [details]
Patch

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

>> Source/WebKit/Shared/WebGPU/WebGPURenderPassDescriptor.cpp:58
>> +        return std::nullopt;
> 
> Isn't it less lines to simply do:
> 
> std::optional<RenderPassDepthStencilAttachment> depthStencilAttachment;
> if (renderPassDescriptor.depthStencilAttachment) {
>   depthStencilAttachment = convertToBacking(*renderPassDescriptor.depthStencilAttachment);
>   if (!depthStencilAttachment)
>      return std::nullopt;
> }

yessssss will do.
Comment 7 Myles C. Maxfield 2021-11-20 13:56:59 PST
Created attachment 444907 [details]
Patch for committing
Comment 8 EWS 2021-11-20 16:04:02 PST
Committed r286098 (244485@main): <https://commits.webkit.org/244485@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444907 [details].
Comment 9 Radar WebKit Bug Importer 2021-11-20 16:05:22 PST
<rdar://problem/85638093>