You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3fc0cd4
Browse filesBrowse the repository at this point in the historyBrowse files
authored and
hypermist
committed
fix(shader): isolate terminating paths from loop continuations (open PR boykopovar#2311)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
if ((specialized[cursor] & 0xffffu) == spv::OpVectorShuffle) shuffled = true;
221
221
}
222
222
check(shuffled == vectorSource, vectorSource ? "extracts of one vector were not folded into a shuffle" : "extracts of a struct were folded into a vector shuffle");
223
+
voidtestLoopContinuePatchingAndEmissionRanges() {
224
+
SpirvModule module;
225
+
check(!module.FunctionHasTerminationSince(0u), "an empty emission range contains a termination");
refuses([&] { module.PatchLoopContinue(0u, newContinue); }, "a non-loop instruction was patched as a loop merge");
251
+
refuses([&] { module.PatchLoopContinue(loop, 0u); }, "a zero continue id was accepted");
252
+
refuses([&] { module.PatchLoopContinue(module.FunctionInstructionOffset(), newContinue); }, "a patch beyond the instruction range was accepted");
253
+
refuses([&] { static_cast<void>(module.FunctionHasTerminationSince(loop + 1u)); }, "a range inside an instruction was accepted");
254
+
refuses([&] { static_cast<void>(module.FunctionHasTerminationSince(module.FunctionInstructionOffset() + 1u)); }, "a range past the function end was accepted");
0 commit comments