feat: complete independent tools, per-stage masks and host Metal tracking; native checks pass, prepare formal 1.4.0 build 20

这个提交包含在:
mac 于 2026-11-01 21:51:15 +08:00 提交
1 父节点 cec044f124
当前提交 659a8c540d
4 个文件已更改
+4 -2

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

@@ -33,5 +33,6 @@
mask[@"enabled"]=@YES;p.width=p.height=4;mask[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];actual=renderTools(doc,hu,nil,@"all-one-mask-render");run.record(@"all-one-mask-preserves-native-operation",difference(actual,unmasked).maximum<.001);
p.strength=0;mask[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];actual=renderTools(doc,hu,nil,@"all-zero-mask-render");run.record(@"all-zero-mask-bypasses-only-own-tool",difference(actual,noHSL).maximum<.003,measure(difference(actual,noHSL)));
error=nil;NSURL *blocked=[NSURL fileURLWithPath:[runtime stringByAppendingPathComponent:@"masked-export-must-not-exist.cube"]];BOOL exported=[renderer exportLUT:blocked uniforms:hu paths:@{} spider:nil tools:doc error:&error];run.record(@"cube-export-refuses-spatial-mask-with-clear-error",!exported&&error&&![NSFileManager.defaultManager fileExistsAtPath:blocked.path]);
DYUniforms primary=defaults;primary.cm.exposure=.6;Pixels primaryFull=render(run,renderer,source,destination,gpu,primary,@{},@"primary-mask-full-reference");DYUniforms primaryOff=primary;primaryOff.primarySectionEnabled=0;Pixels primaryBypass=render(run,renderer,source,destination,gpu,primaryOff,@{},@"primary-mask-bypass-reference");mask=DYMutablePlist(DYNewMask(DYMaskRectangle));p=DYMaskAtTime(mask,kCMTimeZero);p.feather=0;p.width=p.height=.5;mask[@"parameters"]=[NSData dataWithBytes:&p length:sizeof(p)];doc=DYMutablePlist(empty.document);doc[@"baseMasks"][@"primary"]=[NSMutableArray arrayWithObject:mask];actual=renderTools(doc,primary,nil,@"primary-cst-mask-render");BOOL primaryRegion=YES;for(NSUInteger y=0;y<height;y++)for(NSUInteger x=0;x<width;x++)for(int c=0;c<4;c++){BOOL inside=x>=width/4&&x<width*3/4&&y>=height/4&&y<height*3/4;auto i=(y*width+x)*4+c;primaryRegion&=fabs((float)actual[i]-(float)(inside?primaryFull:primaryBypass)[i])<.003;}run.record(@"primary-mask-blends-cst-only-in-selected-region",primaryRegion);
DYWriteTools(manager,empty.document,kCMTimeZero);
}