Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 68599de50ec3ddcde811c71ff97cf03ea1740827
https://github.com/WebKit/WebKit/commit/68599de50ec3ddcde811c71ff97cf03ea1740827
Author: Tadeu Zagallo <[email protected]>
Date: 2026-02-02 (Mon, 02 Feb 2026)
Changed paths:
M
LayoutTests/http/tests/webgpu/webgpu/shader/validation/expression/access/array-expected.txt
M
LayoutTests/http/tests/webgpu/webgpu/shader/validation/expression/access/matrix-expected.txt
M
LayoutTests/http/tests/webgpu/webgpu/shader/validation/parse/blankspace-expected.txt
M Source/WebGPU/WGSL/BoundsCheck.cpp
M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
M Source/WebGPU/WGSL/TypeCheck.cpp
M Source/WebGPU/WGSL/WGSL.cpp
M Source/WebGPU/WGSL/WGSLShaderModule.cpp
M Source/WebGPU/WGSL/WGSLShaderModule.h
M Tools/TestWebKitAPI/Tests/WGSL/MetalCompilationTests.mm
M Tools/TestWebKitAPI/Tests/WGSL/TestWGSLAPI.h
M Tools/TestWebKitAPI/Tests/WGSL/shaders/fuzz-127229681.wgsl
Log Message:
-----------
[WGSL] Bounds checking of override-sized arrays should happen at
pipeline-creation time
https://bugs.webkit.org/show_bug.cgi?id=306411
rdar://150369771
Reviewed by Mike Wyrzykowski.
Bounds checking was only happening at runtime, but instead we should introduce
an override validation, as those happens at pipeline-creation time. If the index
and/or size are not know at pipeline-creation time (and no errors are detected)
we still emit a runtime bounds check.
* Source/WebGPU/WGSL/BoundsCheck.cpp:
(WGSL::BoundsCheckVisitor::visit):
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::determineUsedGlobals):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
* Source/WebGPU/WGSL/WGSLShaderModule.cpp:
(WGSL::ShaderModule::validateOverrides):
* Source/WebGPU/WGSL/WGSLShaderModule.h:
(WGSL::ShaderModule::addOverrideValidation):
Canonical link: https://commits.webkit.org/306636@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications