[webkit-changes] [WebKit/WebKit] 60342c: Support GPUAutoLayoutMode
mwyrzykowski
noreply at github.com
Wed Dec 7 19:00:25 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 60342c994bcb6d900091f653662773eb1db91fe7
https://github.com/WebKit/WebKit/commit/60342c994bcb6d900091f653662773eb1db91fe7
Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
Date: 2022-12-07 (Wed, 07 Dec 2022)
Changed paths:
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Headers.cmake
A Source/WebCore/Modules/WebGPU/GPUAutoLayoutMode.h
A Source/WebCore/Modules/WebGPU/GPUAutoLayoutMode.idl
M Source/WebCore/Modules/WebGPU/GPUComputePipelineDescriptor.h
M Source/WebCore/Modules/WebGPU/GPUDevice.cpp
M Source/WebCore/Modules/WebGPU/GPUDevice.h
M Source/WebCore/Modules/WebGPU/GPUPipelineDescriptorBase.h
M Source/WebCore/Modules/WebGPU/GPUPipelineDescriptorBase.idl
M Source/WebCore/Modules/WebGPU/GPURenderPipelineDescriptor.h
M Source/WebCore/Modules/WebGPU/GPUShaderModuleCompilationHint.h
M Source/WebCore/Modules/WebGPU/GPUShaderModuleCompilationHint.idl
M Source/WebCore/Modules/WebGPU/GPUShaderModuleDescriptor.h
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
A Websites/webkit.org/demos/webgpu/hello-cube-auto-layout.html
A Websites/webkit.org/demos/webgpu/scripts/hello-cube-auto-layout.js
Log Message:
-----------
Support GPUAutoLayoutMode
https://bugs.webkit.org/show_bug.cgi?id=248706
<rdar://101404965>
Reviewed by Dean Jackson.
Allow layout: "auto" to be specified in place of creating a pipeline layout.
This is needed to support running some WebGPU existing samples, e.g., the ones
located at https://austin-eng.com/webgpu-samples/
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Modules/WebGPU/GPUAutoLayoutMode.h: Copied from Source/WebCore/Modules/WebGPU/GPUShaderModuleCompilationHint.idl.
* Source/WebCore/Modules/WebGPU/GPUAutoLayoutMode.idl: Copied from Source/WebCore/Modules/WebGPU/GPUPipelineDescriptorBase.idl.
Add files.
* Source/WebCore/Modules/WebGPU/GPUComputePipelineDescriptor.h:
(WebCore::GPUComputePipelineDescriptor::convertToBacking const):
* Source/WebCore/Modules/WebGPU/GPUDevice.cpp:
(WebCore::GPUDevice::GPUDevice):
(WebCore::m_queue):
(WebCore::m_autoPipelineLayout):
(WebCore::GPUDevice::createShaderModule):
(WebCore::GPUDevice::createComputePipeline):
(WebCore::GPUDevice::createRenderPipeline):
(WebCore::GPUDevice::createComputePipelineAsync):
(WebCore::GPUDevice::createRenderPipelineAsync):
Support auto pipeline layouts by passing an empty pipeline layout.
* Source/WebCore/Modules/WebGPU/GPUDevice.h:
(WebCore::GPUDevice::GPUDevice): Deleted.
(WebCore::GPUDevice::m_queue): Deleted.
Moved to cpp file.
* Source/WebCore/Modules/WebGPU/GPUPipelineDescriptorBase.h:
(WebCore::convertPipelineLayoutToBacking):
(WebCore::GPUPipelineDescriptorBase::convertToBacking const):
* Source/WebCore/Modules/WebGPU/GPUPipelineDescriptorBase.idl:
* Source/WebCore/Modules/WebGPU/GPURenderPipelineDescriptor.h:
(WebCore::GPURenderPipelineDescriptor::convertToBacking const):
* Source/WebCore/Modules/WebGPU/GPUShaderModuleCompilationHint.h:
(WebCore::GPUShaderModuleCompilationHint::convertToBacking const):
* Source/WebCore/Modules/WebGPU/GPUShaderModuleCompilationHint.idl:
* Source/WebCore/Modules/WebGPU/GPUShaderModuleDescriptor.h:
(WebCore::GPUShaderModuleDescriptor::convertToBacking const):
Pass the auto layout to convertToBacking(), so we can fall back to that
one if needed.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Websites/webkit.org/demos/webgpu/hello-cube-auto-layout.html: Added.
* Websites/webkit.org/demos/webgpu/scripts/hello-cube-auto-layout.js: Added.
(async helloCube.frameUpdate):
(async helloCube):
Example using layout: "auto" in the call to createRenderPipeline and the shader
hint, which are both supported in the specification.
Canonical link: https://commits.webkit.org/257537@main
More information about the webkit-changes
mailing list