[webkit-changes] [WebKit/WebKit] 50a41b: [WGSL] cornell box sample no longer works

Tadeu Zagallo noreply at github.com
Mon Feb 12 07:52:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 50a41be3f79734f0a90679a2412b152dc4f6cbd3
      https://github.com/WebKit/WebKit/commit/50a41be3f79734f0a90679a2412b152dc4f6cbd3
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp

  Log Message:
  -----------
  [WGSL] cornell box sample no longer works
https://bugs.webkit.org/show_bug.cgi?id=269089
rdar://122666021

Reviewed by Mike Wyrzykowski.

There were two issues after the recent patches:
- After 274365 at main we started validating the layout against the shader, checking that
  both the type of the resources match, but also that all variables used by the shader
  are present in the layout. However, we were checking that the generate arrayLength
  variables were present, which we did not keep track of, so any shader that used
  arrayLength would be rejected.
- After 274296 at main we started replacing references to override variables with their
  values. That replacement relies on the inferred type for the identifier, which wasn't
  being filled correctly when creating identifiers as part of the global variable
  rewriting.

* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::visitCallee):
(WGSL::RewriteGlobalVariables::insertStructs):

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




More information about the webkit-changes mailing list