Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f6cbd6bd81bc370994768b2cea2ac8adb5ca6958
      
https://github.com/WebKit/WebKit/commit/f6cbd6bd81bc370994768b2cea2ac8adb5ca6958
  Author: Mike Wyrzykowski <[email protected]>
  Date:   2025-05-19 (Mon, 19 May 2025)

  Changed paths:
    A LayoutTests/fast/webgpu/nocrash/fuzz-292945-expected.txt
    A LayoutTests/fast/webgpu/nocrash/fuzz-292945.html
    M Source/WebGPU/WGSL/Metal/MetalCodeGenerator.cpp
    M Source/WebGPU/WGSL/Metal/MetalCodeGenerator.h
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
    M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.h
    M Source/WebGPU/WGSL/WGSL.cpp
    M Source/WebGPU/WGSL/WGSL.h
    M Source/WebGPU/WebGPU/Device.h
    M Source/WebGPU/WebGPU/Device.mm
    M Source/WebGPU/WebGPU/Pipeline.mm
    M Source/WebGPU/WebGPU/ShaderModule.h
    M Source/WebGPU/WebGPU/ShaderModule.mm

  Log Message:
  -----------
  [WebGPU] Atomic loads can cause crashes with pathological codegen
https://bugs.webkit.org/show_bug.cgi?id=292945
rdar://150824375

Reviewed by Tadeu Zagallo.

Insert volatile loads for atomic loads to prevent some compiler crashes
on certain devices.

* LayoutTests/fast/webgpu/nocrash/fuzz-292945-expected.txt: Added.
* LayoutTests/fast/webgpu/nocrash/fuzz-292945.html: Added.
Add test.

* Source/WebGPU/WGSL/Metal/MetalCodeGenerator.cpp:
(WGSL::Metal::generateMetalCode):
* Source/WebGPU/WGSL/Metal/MetalCodeGenerator.h:
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
(WGSL::Metal::FunctionDefinitionWriter::metalAppleGPUFamily const):
(WGSL::Metal::emitAtomicLoad):
(WGSL::Metal::FunctionDefinitionWriter::visit):
(WGSL::Metal::emitMetalFunctions):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.h:
* Source/WebGPU/WGSL/WGSL.cpp:
(WGSL::generate):
* Source/WebGPU/WGSL/WGSL.h:
* Source/WebGPU/WebGPU/Device.h:
(WebGPU::Device::appleGPUFamily const):
* Source/WebGPU/WebGPU/Device.mm:
(WebGPU::computeAppleGPUFamily):
(WebGPU::Device::Device):
* Source/WebGPU/WebGPU/Pipeline.mm:
(WebGPU::createLibrary):
* Source/WebGPU/WebGPU/ShaderModule.h:
* Source/WebGPU/WebGPU/ShaderModule.mm:
(WebGPU::ShaderModule::createLibrary):
(WebGPU::earlyCompileShaderModule):
(WebGPU::appleGPUFamilyToString): Deleted.

Canonical link: https://commits.webkit.org/295110@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

Reply via email to