[webkit-reviews] review granted: [Bug 239377] [WebGPU] Implement hardware limits : [Attachment 457722] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 15 15:51:14 PDT 2022


Darin Adler <darin at apple.com> has granted Myles C. Maxfield
<mmaxfield at apple.com>'s request for review:
Bug 239377: [WebGPU] Implement hardware limits
https://bugs.webkit.org/show_bug.cgi?id=239377

Attachment 457722: Patch

https://bugs.webkit.org/attachment.cgi?id=457722&action=review




--- Comment #5 from Darin Adler <darin at apple.com> ---
Comment on attachment 457722
  --> https://bugs.webkit.org/attachment.cgi?id=457722
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


More information about the webkit-reviews mailing list