[webkit-reviews] review granted: [Bug 238063] [WebGPU] maxAnisotropy > 16 is clamped, rather than illegal : [Attachment 455062] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 21 01:03:33 PDT 2022


Kimmo Kinnunen <kkinnunen at apple.com> has granted Myles C. Maxfield
<mmaxfield at apple.com>'s request for review:
Bug 238063: [WebGPU] maxAnisotropy > 16 is clamped, rather than illegal
https://bugs.webkit.org/show_bug.cgi?id=238063

Attachment 455062: Patch

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




--- Comment #2 from Kimmo Kinnunen <kkinnunen at apple.com> ---
Comment on attachment 455062
  --> https://bugs.webkit.org/attachment.cgi?id=455062
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=455062&action=review

> Source/WebGPU/WebGPU/Sampler.mm:195
> +    samplerDescriptor.maxAnisotropy = std::min(descriptor.maxAnisotropy,
static_cast<uint16_t>(16));

sometimes less tokens for the human to parse, less ambiguous(not sure it
compiles without errors for us, maybe?)
  std::min<uint16_t>(descriptor.maxAnisotropy, 16);


More information about the webkit-reviews mailing list