Skip to content

Commit 6f4da77

Browse files
authored
Revert "WebGPURenderer: use devices preferred canvas format (#28873)" (#28876)
This reverts commit 03ea6f2.
1 parent 99e9de0 commit 6f4da77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/renderers/webgpu/WebGPUBackend.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import 'https://greggman.github.io/webgpu-avoid-redundant-state-setting/webgpu-check-redundant-state-setting.js';
33
//*/
44

5-
import { GPUFeatureName, GPULoadOp, GPUStoreOp, GPUIndexFormat, GPUTextureViewDimension } from './utils/WebGPUConstants.js';
5+
import { GPUFeatureName, GPUTextureFormat, GPULoadOp, GPUStoreOp, GPUIndexFormat, GPUTextureViewDimension } from './utils/WebGPUConstants.js';
66

77
import WGSLNodeBuilder from './nodes/WGSLNodeBuilder.js';
88
import Backend from '../common/Backend.js';
@@ -110,7 +110,7 @@ class WebGPUBackend extends Backend {
110110

111111
this.context.configure( {
112112
device: this.device,
113-
format: navigator.gpu.getPreferredCanvasFormat(),
113+
format: GPUTextureFormat.BGRA8Unorm,
114114
usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC,
115115
alphaMode: alphaMode
116116
} );

0 commit comments

Comments
 (0)