Use a valid seed-only analysis range at backward boundary; host deadlock fix awaiting formal validation

这个提交包含在:
mac 于 2026-11-02 01:43:59 +08:00 提交
1 父节点 b3176f854d
当前提交 123a6c8507
7 个文件已更改
+13 -10

没有与搜索条件相匹配的文件

@@ -23,7 +23,7 @@
// An expected loss must end the host job, not only our local tracking state.
DYWriteTools(base,doc,kCMTimeZero);capture(0);request(1);callbacks=[plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:nil]&&[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:nil];for(int i=0;i<3&&callbacks;i++){setFrame(i);callbacks&=[plugin analyzeFrame:frame atTime:timeAt(i) error:nil];}
Pixels flat(tw*th*4,.1f);for(size_t i=3;i<flat.size();i+=4)flat[i]=1;[[frame metalTextureForDevice:gpu]replaceRegion:MTLRegionMake2D(0,0,tw,th) mipmapLevel:0 withBytes:flat.data() bytesPerRow:tw*8];NSError *lossError=nil;stopped=![plugin analyzeFrame:frame atTime:timeAt(3) error:&lossError];drain();tracked=DYReadTools(base,kCMTimeZero).document[@"baseMasks"][@"hsl"][0];run.record(@"texture-loss-keeps-prefix-and-sends-sdk-quiet-termination",callbacks&&stopped&&[tracked[@"keys"]count]==3&&[lossError.domain isEqual:FxPlugErrorDomain]&&lossError.code==kFxError_UserCancelled);
DYWriteTools(base,doc,kCMTimeZero);capture(0);request(-1);NSError *boundaryError=nil;stopped=![plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:&boundaryError];drain();run.record(@"boundary-stop-sends-sdk-quiet-analysis-termination",stopped&&[boundaryError.domain isEqual:FxPlugErrorDomain]&&boundaryError.code==kFxError_UserCancelled);
DYWriteTools(base,doc,kCMTimeZero);capture(0);request(-1);NSError *boundaryError=nil;callbacks=[plugin desiredAnalysisTimeRange:&desired forInputWithTimeRange:inputRange error:&boundaryError]&&CMTimeCompare(desired.start,kCMTimeZero)==0&&CMTimeCompare(desired.duration,timeAt(1))==0&&[plugin setupAnalysisForTimeRange:desired frameDuration:timeAt(1) error:&boundaryError];setFrame(0);callbacks&=[plugin analyzeFrame:frame atTime:kCMTimeZero error:&boundaryError];host->_state=kFxAnalysisState_AnalysisCompleted;[plugin cleanupAnalysis:nil];drain();run.record(@"boundary-seed-only-range-completes-without-author-write-or-rejected-range",callbacks&&!boundaryError&&[DYReadTools(base,kCMTimeZero).document isEqual:doc]);
NSError *lateError=nil;stopped=![plugin analyzeFrame:frame atTime:timeAt(0) error:&lateError];run.record(@"late-analysis-frame-also-terminates-host-job-quietly",stopped&&[lateError.domain isEqual:FxPlugErrorDomain]&&lateError.code==kFxError_UserCancelled);
// A host cache hit can move the playhead without re-entering renderDestinationImage.
// Starting at a middle frame must use analyzer input even on a fresh instance.