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-
Patch (49.35 KB, patch)
2022-04-15 02:20 PDT, Myles C. Maxfield
no flags
Patch (53.99 KB, patch)
2022-04-15 13:52 PDT, Myles C. Maxfield
no flags
Patch (54.01 KB, patch)
2022-04-15 13:57 PDT, Myles C. Maxfield
darin: review+
Myles C. Maxfield
Comment 1 2022-04-15 01:41:37 PDT
Myles C. Maxfield
Comment 2 2022-04-15 02:20:58 PDT
Myles C. Maxfield
Comment 3 2022-04-15 13:52:30 PDT
Myles C. Maxfield
Comment 4 2022-04-15 13:57:51 PDT
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
Radar WebKit Bug Importer
Comment 7 2022-04-15 21:49:14 PDT
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.