[webkit-changes] [WebKit/WebKit] 392913: Enable WebGPU in WebKitTestRunner

Alex Christensen noreply at github.com
Tue Apr 9 08:11:05 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3929136b4e632a0734bacadee8e164e28abde80e
      https://github.com/WebKit/WebKit/commit/3929136b4e632a0734bacadee8e164e28abde80e
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2024-04-09 (Tue, 09 Apr 2024)

  Changed paths:
    M LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt
    M LayoutTests/fast/webgpu/accelerated-image-conversion-failure.html
    M LayoutTests/fast/webgpu/bind-group-layout-invalid.html
    M LayoutTests/fast/webgpu/command-buffer-after-destruction.html
    M LayoutTests/fast/webgpu/conversion-to-rg8unorm.html
    M LayoutTests/fast/webgpu/copy-texture-more-than-4gb.html
    M LayoutTests/fast/webgpu/forbid-bottom-struct-member.html
    M LayoutTests/fast/webgpu/image-data-8-bytes-per-pixel.html
    M LayoutTests/fast/webgpu/invalid-surface-height.html
    M LayoutTests/fast/webgpu/multidimensional-texture-bounds.html
    M LayoutTests/fast/webgpu/null-video-texture.html
    M LayoutTests/fast/webgpu/optional-media-identifier.html
    M LayoutTests/fast/webgpu/present-without-compute-pipeline.html
    M LayoutTests/fast/webgpu/queue-write-texture-offset.html
    M LayoutTests/fast/webgpu/render-bundle-validation-color-format.html
    M LayoutTests/fast/webgpu/repeated-out-of-memory-error.html
    M LayoutTests/fast/webgpu/type-checker-array-without-argument.html
    M LayoutTests/fast/webgpu/use-canvas-without-layer.html
    M LayoutTests/fast/webgpu/write-to-destroyed-buffer.html
    M LayoutTests/platform/glib/TestExpectations
    M LayoutTests/platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt
    M LayoutTests/platform/ios/TestExpectations
    M LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt
    M LayoutTests/platform/mac/fast/dom/navigator-detached-no-crash-expected.txt
    M LayoutTests/platform/wincairo/fast/dom/navigator-detached-no-crash-expected.txt
    M LayoutTests/platform/wpe/fast/dom/navigator-detached-no-crash-expected.txt
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUCreateImpl.cpp
    M Source/WebCore/Modules/WebGPU/Implementation/WebGPUCreateImpl.h
    M Source/WebGPU/WebGPU/Instance.h
    M Source/WebGPU/WebGPU/PresentationContextIOSurface.h
    M Source/WebGPU/WebGPU/PresentationContextIOSurface.mm
    M Source/WebGPU/WebGPU/Queue.h
    M Source/WebGPU/WebGPU/Queue.mm
    M Tools/TestRunnerShared/TestFeatures.cpp
    M Tools/WebKitTestRunner/TestController.cpp

  Log Message:
  -----------
  Enable WebGPU in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=271744
rdar://125823851

Reviewed by Mike Wyrzykowski.

For some unknown and mysterious reason, enabling it in hardcodedFeaturesBasedOnPathForTest
was insufficient to actually enable WebGPU in WebKitTestRunner.  There's no reason to limit
its existence to just WebGPU tests.  Let's enable it in all tests.

I had written several tests with extra try/catch statements to work if WebGPU was enabled
or not.  Now that it's enabled in WebKitTestRunner, I can remove these and make the tests
more effective in catching regressions.

In order to make the tests run to completion on computers with different GPUs made by different
manufacturers, I had to reduce all the maxBindingsPerBindGroup values to less than 1000,
remove all requirements to have etc2 and astc texture compression extensions, and use a
more commonly supported texture format, which I arbitrarily chose to be rgb9e5ufloat.
Also minStorageBufferOffsetAlignment and minUniformBufferOffsetAlignment need to be 256.
These things were unrelated to the original issues for which I introduced the tests.

The iOS simulator is unfortunately currently unable to run WebGPU tests, so I skip them there.

In order to fix assertions in debug builds, I changed some types from CompletionHandler<void()>
to Function<void()> because StreamConnectionWorkQueue::dispatch is not actually guaranteed
to call the function if m_shouldQuit ever becomes true because stopAndWaitForCompletion is called.

* LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt:
* LayoutTests/fast/webgpu/accelerated-image-conversion-failure.html:
* LayoutTests/fast/webgpu/bind-group-layout-invalid.html:
* LayoutTests/fast/webgpu/command-buffer-after-destruction.html:
* LayoutTests/fast/webgpu/conversion-to-rg8unorm.html:
* LayoutTests/fast/webgpu/copy-texture-more-than-4gb.html:
* LayoutTests/fast/webgpu/forbid-bottom-struct-member.html:
* LayoutTests/fast/webgpu/image-data-8-bytes-per-pixel.html:
* LayoutTests/fast/webgpu/invalid-surface-height.html:
* LayoutTests/fast/webgpu/multidimensional-texture-bounds.html:
* LayoutTests/fast/webgpu/null-video-texture.html:
* LayoutTests/fast/webgpu/optional-media-identifier.html:
* LayoutTests/fast/webgpu/present-without-compute-pipeline.html:
* LayoutTests/fast/webgpu/queue-write-texture-offset.html:
* LayoutTests/fast/webgpu/render-bundle-validation-color-format.html:
* LayoutTests/fast/webgpu/repeated-out-of-memory-error.html:
* LayoutTests/fast/webgpu/type-checker-array-without-argument.html:
* LayoutTests/fast/webgpu/use-canvas-without-layer.html:
* LayoutTests/fast/webgpu/write-to-destroyed-buffer.html:
* LayoutTests/platform/glib/TestExpectations:
* LayoutTests/platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt:
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
* LayoutTests/platform/mac/fast/dom/navigator-detached-no-crash-expected.txt:
* LayoutTests/platform/wincairo/fast/dom/navigator-detached-no-crash-expected.txt:
* LayoutTests/platform/wpe/fast/dom/navigator-detached-no-crash-expected.txt:
* Tools/TestRunnerShared/TestFeatures.cpp:
(WTR::hardcodedFeaturesBasedOnPathForTest):
(WTR::shouldEnableWebGPU): Deleted.
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list