|
|
@@ -314,10 +314,11 @@ class WebGPUPipelineUtils {
|
|
|
try {
|
|
|
|
|
|
let asyncError = null;
|
|
|
+ let pipelinePromise = null;
|
|
|
|
|
|
try {
|
|
|
|
|
|
- pipelineData.pipeline = await device.createRenderPipelineAsync( _renderPipelineDescriptor );
|
|
|
+ pipelinePromise = device.createRenderPipelineAsync( _renderPipelineDescriptor );
|
|
|
|
|
|
} catch ( err ) {
|
|
|
|
|
|
@@ -325,6 +326,22 @@ class WebGPUPipelineUtils {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ _renderPipelineDescriptor.reset();
|
|
|
+
|
|
|
+ if ( pipelinePromise !== null ) {
|
|
|
+
|
|
|
+ try {
|
|
|
+
|
|
|
+ pipelineData.pipeline = await pipelinePromise;
|
|
|
+
|
|
|
+ } catch ( err ) {
|
|
|
+
|
|
|
+ asyncError = err;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
const errorScope = await device.popErrorScope();
|
|
|
|
|
|
if ( errorScope !== null || asyncError !== null ) {
|
|
|
@@ -340,8 +357,6 @@ class WebGPUPipelineUtils {
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
- _renderPipelineDescriptor.reset();
|
|
|
-
|
|
|
// Guarantee resolution so `compileAsync`'s Promise.all cannot hang on an
|
|
|
// unexpected throw from any await above.
|
|
|
resolve();
|