Bug 192843 - [WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
Summary: [WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipe...
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: Justin Fan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-18 21:31 PST by Justin Fan
Modified: 2018-12-19 16:59 PST (History)
3 users (show)

See Also:


Attachments
Patch (39.81 KB, patch)
2018-12-18 21:40 PST, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (39.87 KB, patch)
2018-12-18 21:43 PST, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (40.39 KB, patch)
2018-12-19 11:42 PST, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (41.66 KB, patch)
2018-12-19 16:18 PST, Justin Fan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Fan 2018-12-18 21:31:15 PST
[WebGPU] WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
Comment 1 Justin Fan 2018-12-18 21:40:40 PST
Created attachment 357652 [details]
Patch
Comment 2 Justin Fan 2018-12-18 21:41:32 PST
<rdar://problem/46820395>
Comment 3 Justin Fan 2018-12-18 21:43:37 PST
Created attachment 357653 [details]
Patch
Comment 4 Justin Fan 2018-12-19 11:42:07 PST
Created attachment 357700 [details]
Patch
Comment 5 Myles C. Maxfield 2018-12-19 15:25:59 PST
Comment on attachment 357700 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        [WebGPU] WebGPUPipelineLayout/Descriptor and device::createPipelineLayout

I think you're missing a verb

> Source/WebCore/Modules/webgpu/WebGPUPipelineLayout.h:44
> +    Ref<GPUPipelineLayout> m_pipelineLayout;

👍

> Source/WebCore/platform/graphics/gpu/GPUPipelineLayout.h:44
> +    GPUPipelineLayoutDescriptor m_descriptor;

We shouldn't be retaining the Descriptors. The descriptor is just a blueprint, not the actual object itself.

The implementation of this should copy the bugs of the GPUBindGroupLayouts into itself. (Or ref() them instead)

> Source/WebCore/platform/graphics/gpu/GPUPipelineLayoutDescriptor.h:37
> +    Vector<RefPtr<const GPUBindGroupLayout>> bindGroupLayouts;

How does RefPtr<const Thingy> work? How can ref() and deref() be const?
Comment 6 Myles C. Maxfield 2018-12-19 15:26:56 PST
Comment on attachment 357700 [details]
Patch

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

>> Source/WebCore/platform/graphics/gpu/GPUPipelineLayout.h:44
>> +    GPUPipelineLayoutDescriptor m_descriptor;
> 
> We shouldn't be retaining the Descriptors. The descriptor is just a blueprint, not the actual object itself.
> 
> The implementation of this should copy the bugs of the GPUBindGroupLayouts into itself. (Or ref() them instead)

s/bugs/guts/
Comment 7 Myles C. Maxfield 2018-12-19 15:53:21 PST
Comment on attachment 357700 [details]
Patch

r- for retaining descriptors
Comment 8 Justin Fan 2018-12-19 16:18:55 PST
Created attachment 357747 [details]
Patch
Comment 9 WebKit Commit Bot 2018-12-19 16:59:21 PST
Comment on attachment 357747 [details]
Patch

Clearing flags on attachment: 357747

Committed r239410: <https://trac.webkit.org/changeset/239410>
Comment 10 WebKit Commit Bot 2018-12-19 16:59:23 PST
All reviewed patches have been landed.  Closing bug.