[webkit-changes] [WebKit/WebKit] 5aa9fe: [WGSL] Add parsing for directives

Tadeu Zagallo noreply at github.com
Fri Nov 17 03:39:13 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5aa9fe80938ed403d06efbba763ddf77d24913ab
      https://github.com/WebKit/WebKit/commit/5aa9fe80938ed403d06efbba763ddf77d24913ab
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-11-17 (Fri, 17 Nov 2023)

  Changed paths:
    M Source/WebGPU/WGSL/AST/AST.h
    A Source/WebGPU/WGSL/AST/ASTDiagnostic.h
    M Source/WebGPU/WGSL/AST/ASTDiagnosticAttribute.h
    A Source/WebGPU/WGSL/AST/ASTDiagnosticDirective.h
    M Source/WebGPU/WGSL/AST/ASTDirective.h
    M Source/WebGPU/WGSL/AST/ASTForward.h
    M Source/WebGPU/WGSL/AST/ASTNode.h
    M Source/WebGPU/WGSL/AST/ASTStringDumper.cpp
    M Source/WebGPU/WGSL/AST/ASTStringDumper.h
    M Source/WebGPU/WGSL/AST/ASTVisitor.cpp
    M Source/WebGPU/WGSL/AST/ASTVisitor.h
    M Source/WebGPU/WGSL/Parser.cpp
    M Source/WebGPU/WGSL/ParserPrivate.h
    M Source/WebGPU/WGSL/WGSLEnums.cpp
    M Source/WebGPU/WGSL/WGSLEnums.h
    M Source/WebGPU/WGSL/WGSLShaderModule.h
    M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj

  Log Message:
  -----------
  [WGSL] Add parsing for directives
https://bugs.webkit.org/show_bug.cgi?id=264973
rdar://118522832

Reviewed by Mike Wyrzykowski.

Add support for parsing enable, requires and diagnostic directives.

* Source/WebGPU/WGSL/AST/AST.h:
* Source/WebGPU/WGSL/AST/ASTDiagnostic.h: Copied from Source/WebGPU/WGSL/AST/ASTDirective.h.
* Source/WebGPU/WGSL/AST/ASTDiagnosticAttribute.h:
* Source/WebGPU/WGSL/AST/ASTDiagnosticDirective.h: Copied from Source/WebGPU/WGSL/AST/ASTDirective.h.
* Source/WebGPU/WGSL/AST/ASTDirective.h:
(WGSL::AST::Directive::Directive):
(WGSL::AST::Directive::name const): Deleted.
* Source/WebGPU/WGSL/AST/ASTForward.h:
* Source/WebGPU/WGSL/AST/ASTNode.h:
* Source/WebGPU/WGSL/AST/ASTStringDumper.cpp:
(WGSL::AST::StringDumper::visit):
* Source/WebGPU/WGSL/AST/ASTStringDumper.h:
* Source/WebGPU/WGSL/AST/ASTVisitor.cpp:
(WGSL::AST::Visitor::visit):
* Source/WebGPU/WGSL/AST/ASTVisitor.h:
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseShader):
(WGSL::Parser<Lexer>::parseEnableDirective):
(WGSL::Parser<Lexer>::parseRequireDirective):
(WGSL::Parser<Lexer>::parseAttribute):
(WGSL::Parser<Lexer>::parseDiagnostic):
* Source/WebGPU/WGSL/ParserPrivate.h:
* Source/WebGPU/WGSL/WGSLEnums.cpp:
* Source/WebGPU/WGSL/WGSLEnums.h:
* Source/WebGPU/WGSL/WGSLShaderModule.h:
(WGSL::ShaderModule::enabledExtensions):
(WGSL::ShaderModule::requiredFeatures):
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:

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




More information about the webkit-changes mailing list