wgpu: layout left blank should set it to "auto" in JS

This commit is contained in:
Laytan Laats
2025-02-27 22:28:15 +01:00
parent 1942a538d8
commit 19b70f5ef7

4
vendor/wgpu/wgpu.js vendored
View File

@@ -748,7 +748,7 @@ class WebGPUInterface {
const layoutIdx = this.mem.loadPtr(off(4));
return {
label: label,
layout: layoutIdx > 0 ? this.pipelineLayouts.get(layoutIdx) : undefined,
layout: layoutIdx > 0 ? this.pipelineLayouts.get(layoutIdx) : "auto",
compute: this.ProgrammableStageDescriptor(off(this.sizes.ProgrammableStageDescriptor)),
};
}
@@ -853,7 +853,7 @@ class WebGPUInterface {
const layoutIdx = this.mem.loadPtr(off(4));
return {
label: label,
layout: layoutIdx > 0 ? this.pipelineLayouts.get(layoutIdx) : undefined,
layout: layoutIdx > 0 ? this.pipelineLayouts.get(layoutIdx) : "auto",
vertex: this.VertexState(off(this.sizes.VertexState)),
primitive: this.PrimitiveState(off(this.sizes.PrimitiveState)),
depthStencil: this.DepthStencilStatePtr(off(4)),