Skip to content

Commit f19664a

Browse files
authored
Merge pull request #8349 from Piyushrathoree/fix-webgpu-filter-cdn
Fix WebGPU filters in CDN builds using duck typing for nodes (closes …
2 parents 0d8f347 + 9aa5188 commit f19664a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/strands/ir_builders.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export function memberAccessNode(strandsContext, parentNode, componentNode, memb
164164
}
165165

166166
export function structInstanceNode(strandsContext, structTypeInfo, identifier, dependsOn) {
167-
const { cfg, dag, } = strandsContext;
167+
const { cfg, dag } = strandsContext;
168168
if (dependsOn.length === 0) {
169169
for (const prop of structTypeInfo.properties) {
170170
const typeInfo = prop.dataType;
@@ -202,7 +202,7 @@ function mapPrimitiveDepsToIDs(strandsContext, typeInfo, dependsOn) {
202202
let calculatedDimensions = 0;
203203
let originalNodeID = null;
204204
for (const dep of inputs.flat(Infinity)) {
205-
if (dep instanceof StrandsNode) {
205+
if (dep && dep.isStrandsNode) {
206206
const node = DAG.getNodeDataFromID(dag, dep.id);
207207
originalNodeID = dep.id;
208208
baseType = node.baseType;

src/strands/strands_node.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export class StrandsNode {
77
this.id = id;
88
this.strandsContext = strandsContext;
99
this.dimension = dimension;
10+
this.isStrandsNode = true;
1011

1112
// Store original identifier for varying variables
1213
const dag = this.strandsContext.dag;

0 commit comments

Comments
 (0)