Skip to content

Commit 840d448

Browse files
Merge pull request #1728 from KhronosGroup/fix-1727
Track temporary access for OpArrayLength result.
2 parents c062b6b + 5b0cafb commit 840d448

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

spirv_cross.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3282,6 +3282,10 @@ bool Compiler::AnalyzeVariableScopeAccessHandler::handle(spv::Op op, const uint3
32823282
}
32833283

32843284
case OpArrayLength:
3285+
// Only result is a temporary.
3286+
notify_variable_access(args[1], current_block->self);
3287+
break;
3288+
32853289
case OpLine:
32863290
case OpNoLine:
32873291
// Uses literals, but cannot be a phi variable or temporary, so ignore.

0 commit comments

Comments
 (0)