[webkit-changes] [WebKit/WebKit] 4a8e3e: [WebGPU] unsized arrays require bounds checking

Tadeu Zagallo noreply at github.com
Tue Feb 13 04:35:42 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4a8e3ed33b457fb86af90d09931855a3ae88fa54
      https://github.com/WebKit/WebKit/commit/4a8e3ed33b457fb86af90d09931855a3ae88fa54
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2024-02-13 (Tue, 13 Feb 2024)

  Changed paths:
    M Source/WebGPU/WGSL/AST/ASTCallExpression.h
    M Source/WebGPU/WGSL/AST/ASTExpression.h
    A Source/WebGPU/WGSL/BoundsCheck.cpp
    A Source/WebGPU/WGSL/BoundsCheck.h
    M Source/WebGPU/WGSL/WGSL.cpp
    M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj

  Log Message:
  -----------
  [WebGPU] unsized arrays require bounds checking
https://bugs.webkit.org/show_bug.cgi?id=251376
rdar://104827098

Reviewed by Mike Wyrzykowski.

Add bounds checking to index accesses. This gets all the shader,execution,robust_access:*
CTS tests passing.

* Source/WebGPU/WGSL/AST/ASTCallExpression.h:
* Source/WebGPU/WGSL/AST/ASTExpression.h:
* Source/WebGPU/WGSL/BoundsCheck.cpp: Added.
(WGSL::BoundsCheckVisitor::BoundsCheckVisitor):
(WGSL::BoundsCheckVisitor::run):
(WGSL::BoundsCheckVisitor::visit):
(WGSL::insertBoundsChecks):
* Source/WebGPU/WGSL/BoundsCheck.h: Added.
* Source/WebGPU/WGSL/WGSL.cpp:
(WGSL::prepareImpl):
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/274540@main




More information about the webkit-changes mailing list