Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f08815ba3bb00b493f18cd4bebbf2111bf963054
https://github.com/WebKit/WebKit/commit/f08815ba3bb00b493f18cd4bebbf2111bf963054
Author: Tadeu Zagallo <[email protected]>
Date: 2025-04-22 (Tue, 22 Apr 2025)
Changed paths:
M LayoutTests/fast/webgpu/regression/repro_284652.html
M
LayoutTests/http/tests/webgpu/webgpu/shader/validation/parse/enable-expected.txt
M Source/WebGPU/WGSL/Parser.cpp
M Source/WebGPU/WGSL/TypeCheck.cpp
A Source/WebGPU/WGSL/tests/f16-literal.wgsl
A Source/WebGPU/WGSL/tests/f16-types.wgsl
M Source/WebGPU/WGSL/tests/function-call.wgsl
M Source/WebGPU/WGSL/tests/fuzz-127229681.wgsl
M Source/WebGPU/WGSL/tests/overload.wgsl
M Source/WebGPU/WGSL/tests/struct.wgsl
Log Message:
-----------
[WGSL] Validate that f16 can only be used if it's enabled
https://bugs.webkit.org/show_bug.cgi?id=291645
rdar://148083643
Reviewed by Mike Wyrzykowski.
While we parsed the `enable f16` directive, we never really validated that
it had to be enabled for f16 to be used. We validate in 3 locations, which
should be enough to prevent every usage of f16:
- when referencing a type by name we checked whether it's f16, vecN<f16> or
matMxN<f16>. In theory just f16 should suffice, but it falls short due to
the built-in type aliases
- when constructing a type we perform the same validations as above
- when parsing f16 literals.
*
LayoutTests/http/tests/webgpu/webgpu/shader/validation/parse/enable-expected.txt:
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parsePrimaryExpression):
* Source/WebGPU/WGSL/TypeCheck.cpp:
(WGSL::TypeChecker::visit):
(WGSL::TypeChecker::lookupType):
(WGSL::TypeChecker::validateF16Usage):
* Source/WebGPU/WGSL/tests/f16-literal.wgsl: Added.
* Source/WebGPU/WGSL/tests/f16-types.wgsl: Added.
* Source/WebGPU/WGSL/tests/function-call.wgsl:
* Source/WebGPU/WGSL/tests/fuzz-127229681.wgsl:
* Source/WebGPU/WGSL/tests/overload.wgsl:
* Source/WebGPU/WGSL/tests/struct.wgsl:
Canonical link: https://commits.webkit.org/293957@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes