浏览代码

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

Laytan Laats 6 月之前
父节点
当前提交
19b70f5ef7
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      vendor/wgpu/wgpu.js

+ 2 - 2
vendor/wgpu/wgpu.js

@@ -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)),