WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
192817
[WebGPU] BindGroupLayout and Device::createBindGroupLayout
https://bugs.webkit.org/show_bug.cgi?id=192817
Summary
[WebGPU] BindGroupLayout and Device::createBindGroupLayout
Justin Fan
Reported
2018-12-18 11:32:12 PST
[WebGPU] BindGroupLayout and Device::createBindGroupLayout
Attachments
Patch
(29.34 KB, patch)
2018-12-18 12:24 PST
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Patch for landing
(29.21 KB, patch)
2018-12-18 13:14 PST
,
Justin Fan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Justin Fan
Comment 1
2018-12-18 11:34:56 PST
<
rdar://problem/46816659
>
Justin Fan
Comment 2
2018-12-18 12:24:48 PST
Created
attachment 357597
[details]
Patch
Dean Jackson
Comment 3
2018-12-18 12:47:50 PST
Comment on
attachment 357597
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=357597&action=review
> Source/WebCore/Modules/webgpu/WebGPUBindGroupLayout.cpp:41 > + UNUSED_PARAM(layout);
Remove this. You use the parameter.
> Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:71 > + return layout ? static_cast<RefPtr<WebGPUBindGroupLayout>>(WebGPUBindGroupLayout::create(layout.releaseNonNull())) : nullptr;
Why do you have to cast? I think the compiler will handle this.
> Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.cpp:35 > + return adoptRef(new GPUBindGroupLayout(WTFMove(descriptor)));
So for now it will never fail to return a layout? But it will in the future, hence the try name?
Justin Fan
Comment 4
2018-12-18 13:07:29 PST
(In reply to Dean Jackson from
comment #3
)
> Comment on
attachment 357597
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=357597&action=review
> > > Source/WebCore/Modules/webgpu/WebGPUDevice.cpp:71 > > + return layout ? static_cast<RefPtr<WebGPUBindGroupLayout>>(WebGPUBindGroupLayout::create(layout.releaseNonNull())) : nullptr; > > Why do you have to cast? I think the compiler will handle this. > > > Source/WebCore/platform/graphics/gpu/GPUBindGroupLayout.cpp:35 > > + return adoptRef(new GPUBindGroupLayout(WTFMove(descriptor))); > > So for now it will never fail to return a layout? But it will in the future, > hence the try name?
Since there's no way to fail to create a layout right now, I've refactored the ::create s to return a Ref, obviating the need for a conditional null check.
Justin Fan
Comment 5
2018-12-18 13:14:14 PST
Created
attachment 357600
[details]
Patch for landing
WebKit Commit Bot
Comment 6
2018-12-18 13:52:05 PST
Comment on
attachment 357600
[details]
Patch for landing Clearing flags on attachment: 357600 Committed
r239351
: <
https://trac.webkit.org/changeset/239351
>
WebKit Commit Bot
Comment 7
2018-12-18 13:52:07 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug