[webkit-changes] [WebKit/WebKit] c578df: [WebGPU] Depth buffer / texture support
mwyrzykowski
noreply at github.com
Tue Dec 13 12:00:25 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c578df6c965c6b8937a9b7d31de11a848fe2c8cc
https://github.com/WebKit/WebKit/commit/c578df6c965c6b8937a9b7d31de11a848fe2c8cc
Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
Date: 2022-12-13 (Tue, 13 Dec 2022)
Changed paths:
M Source/WebGPU/WebGPU/CommandEncoder.mm
M Source/WebGPU/WebGPU/RenderPassEncoder.mm
M Source/WebGPU/WebGPU/RenderPipeline.h
M Source/WebGPU/WebGPU/RenderPipeline.mm
A Websites/webkit.org/demos/webgpu/instanced-textured-cube.html
A Websites/webkit.org/demos/webgpu/scripts/instanced-textured-cube.js
Log Message:
-----------
[WebGPU] Depth buffer / texture support
https://bugs.webkit.org/show_bug.cgi?id=249037
<radar://101571337>
Reviewed by Dean Jackson.
Add depth buffer support along with a test case which shows
several intersecting rotating textured cubes.
* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::CommandEncoder::validateRenderPassDescriptor const):
(WebGPU::CommandEncoder::beginRenderPass):
Create the depth state.
* Source/WebGPU/WebGPU/RenderPassEncoder.mm:
(WebGPU::RenderPassEncoder::setPipeline):
Set the depth stencil state if it exists.
* Source/WebGPU/WebGPU/RenderPipeline.h:
(WebGPU::RenderPipeline::create):
(WebGPU::RenderPipeline::depthStencilState const):
* Source/WebGPU/WebGPU/RenderPipeline.mm:
(WebGPU::topologyType):
Set input topology type.
(WebGPU::Device::validateRenderPipeline):
Depth stencil is supported.
(WebGPU::convertToMTLCompare):
Convert compare function to metal compare function.
(WebGPU::Device::createRenderPipeline):
(WebGPU::RenderPipeline::RenderPipeline):
* Websites/webkit.org/demos/webgpu/instanced-textured-cube.html: Added.
* Websites/webkit.org/demos/webgpu/scripts/instanced-textured-cube.js: Added.
(async helloCube.frameUpdate):
(async helloCube):
Add a test case showing 9 cubes rotating with different offsets and intersecting
other cubes to illustrate a working depth buffer.
Canonical link: https://commits.webkit.org/257807@main
More information about the webkit-changes
mailing list