提交 5ab1daab 编写于 作者: M Mugen87

WebGPURenderer: Update to latest WebGPU API.

上级 5286ae1f
...@@ -852,7 +852,7 @@ class WebGPURenderer { ...@@ -852,7 +852,7 @@ class WebGPURenderer {
size: { size: {
width: this._width * this._pixelRatio, width: this._width * this._pixelRatio,
height: this._height * this._pixelRatio, height: this._height * this._pixelRatio,
depth: 1 depthOrArrayLayers: 1
}, },
sampleCount: this._parameters.sampleCount, sampleCount: this._parameters.sampleCount,
format: GPUTextureFormat.BRGA8Unorm, format: GPUTextureFormat.BRGA8Unorm,
...@@ -875,7 +875,7 @@ class WebGPURenderer { ...@@ -875,7 +875,7 @@ class WebGPURenderer {
size: { size: {
width: this._width * this._pixelRatio, width: this._width * this._pixelRatio,
height: this._height * this._pixelRatio, height: this._height * this._pixelRatio,
depth: 1 depthOrArrayLayers: 1
}, },
sampleCount: this._parameters.sampleCount, sampleCount: this._parameters.sampleCount,
format: GPUTextureFormat.Depth24PlusStencil8, format: GPUTextureFormat.Depth24PlusStencil8,
......
...@@ -203,7 +203,7 @@ class WebGPUTextures { ...@@ -203,7 +203,7 @@ class WebGPUTextures {
size: { size: {
width: width, width: width,
height: height, height: height,
depth: 1 depthOrArrayLayers: 1
}, },
format: colorTextureFormat, format: colorTextureFormat,
usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.SAMPLED usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.SAMPLED
...@@ -231,7 +231,7 @@ class WebGPUTextures { ...@@ -231,7 +231,7 @@ class WebGPUTextures {
size: { size: {
width: width, width: width,
height: height, height: height,
depth: 1 depthOrArrayLayers: 1
}, },
format: depthTextureFormat, format: depthTextureFormat,
usage: GPUTextureUsage.RENDER_ATTACHMENT usage: GPUTextureUsage.RENDER_ATTACHMENT
...@@ -332,7 +332,7 @@ class WebGPUTextures { ...@@ -332,7 +332,7 @@ class WebGPUTextures {
size: { size: {
width: width, width: width,
height: height, height: height,
depth: depth, depthOrArrayLayers: depth,
}, },
mipLevelCount: mipLevelCount, mipLevelCount: mipLevelCount,
sampleCount: 1, sampleCount: 1,
...@@ -403,7 +403,7 @@ class WebGPUTextures { ...@@ -403,7 +403,7 @@ class WebGPUTextures {
{ {
width: image.width, width: image.width,
height: image.height, height: image.height,
depth: ( image.depth !== undefined ) ? image.depth : 1 depthOrArrayLayers: ( image.depth !== undefined ) ? image.depth : 1
} ); } );
} }
...@@ -436,7 +436,7 @@ class WebGPUTextures { ...@@ -436,7 +436,7 @@ class WebGPUTextures {
}, { }, {
width: image.width, width: image.width,
height: image.height, height: image.height,
depth: 1 depthOrArrayLayers: 1
} }
); );
...@@ -470,7 +470,7 @@ class WebGPUTextures { ...@@ -470,7 +470,7 @@ class WebGPUTextures {
{ {
width: Math.ceil( width / blockData.width ) * blockData.width, width: Math.ceil( width / blockData.width ) * blockData.width,
height: Math.ceil( height / blockData.width ) * blockData.width, height: Math.ceil( height / blockData.width ) * blockData.width,
depth: 1, depthOrArrayLayers: 1,
} ); } );
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册