Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eb6c954f7cfae1ab4d4892fe1108c469a2c140ba
https://github.com/WebKit/WebKit/commit/eb6c954f7cfae1ab4d4892fe1108c469a2c140ba
Author: Tadeu Zagallo <[email protected]>
Date: 2026-03-16 (Mon, 16 Mar 2026)
Changed paths:
M
LayoutTests/http/tests/webgpu/webgpu/shader/execution/expression/call/builtin/textureSampleBaseClampToEdge-expected.txt
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
Log Message:
-----------
[WGSL] The argument to textureSampleBaseClampToEdge should be clamped
https://bugs.webkit.org/show_bug.cgi?id=309819
rdar://150364488
Reviewed by Mike Wyrzykowski.
Clamp the coordinates passed to `textureSampleBaseClampToEdge` before
forwarding it to Metal according to the spec[1]. Note that this only
fixes the CTS tests for `texture_2d`. I tried to fix the failures in
the `texture_external` path as well, but that wasn't as trivial, so
it'll be fixed in a different patch.
[1]: https://www.w3.org/TR/WGSL/#textureSampleBaseClampToEdge
*
LayoutTests/http/tests/webgpu/webgpu/shader/execution/expression/call/builtin/textureSampleBaseClampToEdge-expected.txt:
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::HelperGenerator::DEFINE_HELPER):
(WGSL::Metal::FunctionDefinitionWriter::visit):
(WGSL::Metal::emitTextureSampleBaseClampToEdge): Deleted.
Canonical link: https://commits.webkit.org/309324@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications