WebGPU Renderer now awaits the submitted work in the old device's queue before destroying it

This commit is contained in:
Rezmason
2025-05-26 12:03:52 -07:00
parent 83f1eb07c3
commit 0884c6a4de
2 changed files with 11 additions and 6 deletions

View File

@@ -24,16 +24,16 @@ export default ({ device, cache, canvasFormat, canvasContext }) => {
const assets = [loadShader(device, cache, "shaders/wgsl/endPass.wgsl")];
const loaded = (async () => {
const [imageShader] = await Promise.all(assets);
const [endShader] = await Promise.all(assets);
renderPipeline = await device.createRenderPipelineAsync({
layout: "auto",
vertex: {
module: imageShader.module,
module: endShader.module,
entryPoint: "vertMain",
},
fragment: {
module: imageShader.module,
module: endShader.module,
entryPoint: "fragMain",
targets: [
{