test: exercise neutral GPU readback with Metal texture uploads

这个提交包含在:
mac 于 2026-11-08 16:13:35 +08:00 提交
1 父节点 ccc34734e3
当前提交 c2c71f3dbc
1 个文件已更改
+2 -2
@@ -30,7 +30,7 @@
for(NSUInteger i=0;i<wide.size();i+=4){wide[i]*=-2;wide[i+1]*=4;}
id<MTLTexture> texture=[source metalTextureForDevice:gpu];
MTLRegion region=MTLRegionMake2D(0,0,width,height);
[texture replaceRegion:region withBytes:wide.data() bytesPerRow:width*8];
[texture replaceRegion:region mipmapLevel:0 withBytes:wide.data() bytesPerRow:width*8];
Pixels previewFrame=render(run,fast,source,destination,gpu,untouched,@{},@"neutral-preview-frame");
NSError *fastError=nil;CMTime time=CMTimeMake(5,24);
BOOL rendered=[fast renderHostSource:source destination:destination uniforms:untouched paths:@{} spider:nil tools:nil colorManagement:nil hostPrimaries:-1 atTime:time error:&fastError];
@@ -46,5 +46,5 @@
run.record(@"final-scope-captured-with-neutral-output",[sample.metadata[@"timeValue"]integerValue]==5&&[sample.metadata[@"timeScale"]integerValue]==24&&sample.pixels.length==320*180*16);
[fast captureScopeTile:destination atTime:time];
run.record(@"final-scope-inline-matches-separate-capture",[sample.pixels isEqual:[[fast valueForKey:@"scopeLatest"]pixels]]);
[texture replaceRegion:region withBytes:input.data() bytesPerRow:width*8];
[texture replaceRegion:region mipmapLevel:0 withBytes:input.data() bytesPerRow:width*8];
}