WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
239377
[WebGPU] Implement hardware limits
https://bugs.webkit.org/show_bug.cgi?id=239377
Summary
[WebGPU] Implement hardware limits
Myles C. Maxfield
Reported
2022-04-15 01:34:57 PDT
[WebGPU] Implement hardware limits
Attachments
Patch
(50.08 KB, patch)
2022-04-15 01:41 PDT
,
Myles C. Maxfield
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(49.35 KB, patch)
2022-04-15 02:20 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(53.99 KB, patch)
2022-04-15 13:52 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(54.01 KB, patch)
2022-04-15 13:57 PDT
,
Myles C. Maxfield
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2022-04-15 01:41:37 PDT
Created
attachment 457684
[details]
Patch
Myles C. Maxfield
Comment 2
2022-04-15 02:20:58 PDT
Created
attachment 457686
[details]
Patch
Myles C. Maxfield
Comment 3
2022-04-15 13:52:30 PDT
Created
attachment 457720
[details]
Patch
Myles C. Maxfield
Comment 4
2022-04-15 13:57:51 PDT
Created
attachment 457722
[details]
Patch
Darin Adler
Comment 5
2022-04-15 15:51:14 PDT
Comment on
attachment 457722
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=457722&action=review
> Source/WebGPU/WebGPU/Adapter.h:45 > + static Ref<Adapter> create(id<MTLDevice> device, Instance& instance, WGPULimits&& limits)
There is no benefit to passing a structure full of scalars with an rvalue reference and calling WTFMove. Just const& is fine for this kind of object, unless this is generic code where it might be something with non-scalars in it, or if we think we’ll be evolving it some day.
> Source/WebGPU/WebGPU/HardwareLimits.mm:41 > +static WGPULimits apple3()
constexpr
> Source/WebGPU/WebGPU/HardwareLimits.mm:75 > +static WGPULimits apple4()
constexpr
> Source/WebGPU/WebGPU/HardwareLimits.mm:109 > +static WGPULimits apple5()
constexpr
> Source/WebGPU/WebGPU/HardwareLimits.mm:144 > +static WGPULimits apple6()
constexpr
> Source/WebGPU/WebGPU/HardwareLimits.mm:178 > +static WGPULimits apple7()
constexpr
> Source/WebGPU/WebGPU/HardwareLimits.mm:338 > +static bool checkLimits(const WGPULimits& limits)
This could be constexpr
> Source/WebGPU/WebGPU/HardwareLimits.mm:386 > +bool isValid(const WGPULimits& limits)
This could be constexpr
> Source/WebGPU/WebGPU/HardwareLimits.mm:391 > +bool anyLimitIsBetterThan(const WGPULimits& target, const WGPULimits& reference)
This could be constexpr
Myles C. Maxfield
Comment 6
2022-04-15 21:48:20 PDT
Committed
r292940
(
249705@trunk
): <
https://commits.webkit.org/249705@trunk
>
Radar WebKit Bug Importer
Comment 7
2022-04-15 21:49:14 PDT
<
rdar://problem/91842461
>
Ryosuke Niwa
Comment 8
2022-04-16 12:06:42 PDT
This patch broke builds:
https://build.webkit.org/#/builders/12/builds/11560
/Volumes/Data/worker/bigsur-debug/build/Source/WebGPU/WebGPU/HardwareLimits.mm:338:23: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
Myles C. Maxfield
Comment 9
2022-04-16 12:19:32 PDT
(In reply to Ryosuke Niwa from
comment #8
)
> This patch broke builds: >
https://build.webkit.org/#/builders/12/builds/11560
> > /Volumes/Data/worker/bigsur-debug/build/Source/WebGPU/WebGPU/HardwareLimits. > mm:338:23: error: constexpr function never produces a constant expression > [-Winvalid-constexpr]
Trying to reproduce now
Myles C. Maxfield
Comment 10
2022-04-16 12:25:20 PDT
(In reply to Myles C. Maxfield from
comment #9
)
> (In reply to Ryosuke Niwa from
comment #8
) > > This patch broke builds: > >
https://build.webkit.org/#/builders/12/builds/11560
> > > > /Volumes/Data/worker/bigsur-debug/build/Source/WebGPU/WebGPU/HardwareLimits. > > mm:338:23: error: constexpr function never produces a constant expression > > [-Winvalid-constexpr] > > Trying to reproduce now
I can't reproduce this (possibly because I have a different SDK installed than the one bot uses), but I can see by inspection that the error is correct - that function is marked as constexpr but will never produce a constant expression. I'll commit a prospective fix.
Myles C. Maxfield
Comment 11
2022-04-16 12:28:25 PDT
(In reply to Myles C. Maxfield from
comment #10
)
> (In reply to Myles C. Maxfield from
comment #9
) > > (In reply to Ryosuke Niwa from
comment #8
) > > > This patch broke builds: > > >
https://build.webkit.org/#/builders/12/builds/11560
> > > > > > /Volumes/Data/worker/bigsur-debug/build/Source/WebGPU/WebGPU/HardwareLimits. > > > mm:338:23: error: constexpr function never produces a constant expression > > > [-Winvalid-constexpr] > > > > Trying to reproduce now > > I can't reproduce this (possibly because I have a different SDK installed > than the one bot uses), but I can see by inspection that the error is > correct - that function is marked as constexpr but will never produce a > constant expression. I'll commit a prospective fix.
https://commits.webkit.org/r292941
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