Bug 192843

Summary: [WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
Product: WebKit Reporter: Justin Fan <justin_fan>
Component: New BugsAssignee: Justin Fan <justin_fan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, mmaxfield, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

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.