Skip to content

Commit 62c1c7f

Browse files
authored
Only validate shader vertex attributes when vertex buffers are set (#7561)
1 parent efcc046 commit 62c1c7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platform/graphics/webgl/webgl-graphics-device.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,10 +1729,10 @@ class WebglGraphicsDevice extends GraphicsDevice {
17291729
const samplers = shader.impl.samplers;
17301730
const uniforms = shader.impl.uniforms;
17311731

1732-
Debug.call(() => this.validateAttributes(this.shader, this.vertexBuffers[0]?.format, this.vertexBuffers[1]?.format));
1733-
17341732
// vertex buffers
17351733
if (!keepBuffers) {
1734+
Debug.call(() => this.validateAttributes(this.shader, this.vertexBuffers[0]?.format, this.vertexBuffers[1]?.format));
1735+
17361736
this.setBuffers();
17371737
}
17381738

0 commit comments

Comments
 (0)