Skip to content

Commit a22de2e

Browse files
fix: correctly set stencilLoadOp and stencilStoreOp in javascript.
Works fine on my machine
1 parent ad0c7c4 commit a22de2e

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

wgpu/to_js.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,13 @@ func (g *RenderPassColorAttachment) toJS() any {
175175

176176
func (g *RenderPassDepthStencilAttachment) toJS() any {
177177
return map[string]any{
178-
"view": pointerToJS(g.View),
179-
"depthLoadOp": enumToJS(g.DepthLoadOp),
180-
"depthStoreOp": enumToJS(g.DepthStoreOp),
181-
"depthClearValue": g.DepthClearValue,
182-
"depthReadOnly": g.DepthReadOnly,
183-
// TODO(kai): these cause errors if passed
184-
// "stencilLoadOp": enumToJS(g.StencilLoadOp),
185-
// "stencilStoreOp": enumToJS(g.StencilStoreOp),
178+
"view": pointerToJS(g.View),
179+
"depthLoadOp": enumToJS(g.DepthLoadOp),
180+
"depthStoreOp": enumToJS(g.DepthStoreOp),
181+
"depthClearValue": g.DepthClearValue,
182+
"depthReadOnly": g.DepthReadOnly,
183+
"stencilLoadOp": enumToJS(g.StencilLoadOp),
184+
"stencilStoreOp": enumToJS(g.StencilStoreOp),
186185
"stencilClearValue": g.StencilClearValue,
187186
"stencilReadOnly": g.StencilReadOnly,
188187
}

0 commit comments

Comments
 (0)