Skip to content

Commit

Permalink
fix shader debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Mar 20, 2024
1 parent f8224e5 commit 7d3f10d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/webgl/src/adapter/resources/webgl-shader.ts
Expand Up @@ -76,11 +76,11 @@ export class WEBGLShader extends Shader {
// Sync case - slower, but advantage is that it throws in the constructor, making break on error more useful
if (!this.device.features.has('compilation-status-async-webgl')) {
this._getCompilationStatus();
// The `Shader` base class will determine if debug window should be opened based on this.compilationStatus
this.debugShader();
if (this.compilationStatus === 'error') {
throw new Error(`GLSL compilation errors in ${this.props.stage} shader ${this.props.id}`);
}
// The `Shader` base class will determine if debug window should be opened based on this.compilationStatus
this.debugShader();
return;
}

Expand Down

0 comments on commit 7d3f10d

Please sign in to comment.