未验证 提交 392fee61 编写于 作者: M Michael Herzog 提交者: GitHub

WebGPURenderer: Update to latest API. (#21699)

上级 f027db2a
......@@ -41,13 +41,13 @@ class WebGPUComputePipelines {
//
const computeStage = {
const compute = {
module: moduleCompute,
entryPoint: 'main'
};
pipeline = device.createComputePipeline( {
computeStage: computeStage
compute: compute
} );
this.pipelines.set( param, pipeline );
......
......@@ -189,10 +189,10 @@ class WebGPURenderer {
this._renderPassDescriptor = {
colorAttachments: [ {
attachment: null
view: null
} ],
depthStencilAttachment: {
attachment: null,
view: null,
depthStoreOp: GPUStoreOp.Store,
stencilStoreOp: GPUStoreOp.Store
}
......@@ -246,24 +246,24 @@ class WebGPURenderer {
const renderTargetProperties = this._properties.get( renderTarget );
colorAttachment.attachment = renderTargetProperties.colorTextureGPU.createView();
depthStencilAttachment.attachment = renderTargetProperties.depthTextureGPU.createView();
colorAttachment.view = renderTargetProperties.colorTextureGPU.createView();
depthStencilAttachment.view = renderTargetProperties.depthTextureGPU.createView();
} else {
if ( this._parameters.antialias === true ) {
colorAttachment.attachment = this._colorBuffer.createView();
colorAttachment.view = this._colorBuffer.createView();
colorAttachment.resolveTarget = this._swapChain.getCurrentTexture().createView();
} else {
colorAttachment.attachment = this._swapChain.getCurrentTexture().createView();
colorAttachment.view = this._swapChain.getCurrentTexture().createView();
colorAttachment.resolveTarget = undefined;
}
depthStencilAttachment.attachment = this._depthBuffer.createView();
depthStencilAttachment.view = this._depthBuffer.createView();
}
......
......@@ -111,7 +111,7 @@ class WebGPUTextureUtils {
const passEncoder = commandEncoder.beginRenderPass( {
colorAttachments: [ {
attachment: dstView,
view: dstView,
loadValue: [ 0, 0, 0, 0 ],
} ],
} );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册