Probe: padded targets without Metal's optimized layout
Blits moved only some texels of a private padded target in Metal's optimized (compressed) layout: a write mask of no channel stored the uploaded word in 36% of an R10Unorm_X6 target, in blocks. The targets now set allowGPUOptimizedContents to NO, which changes the memory layout alone. (cherry picked from commit 8e418e5df5a36114ad13b30c86d85efa913a2b3a)
This commit is contained in:
1 parent
00e16d8612
commit
13467f9bca
1 file changed
+3
@@ -246,6 +246,9 @@ static id<MTLTexture> target(const Format *f) {
|
||||
td.height = H;
|
||||
td.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead;
|
||||
td.storageMode = MTLStorageModePrivate;
|
||||
// Blits move only some of a padded texture's texels where Metal keeps it in its optimized
|
||||
// (compressed) layout.
|
||||
td.allowGPUOptimizedContents = NO;
|
||||
return [gDevice newTextureWithDescriptor:td];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user