29 行
824 B
Objective-C
29 行
824 B
Objective-C
//
|
|
// MetalDeviceCache.h
|
|
// 大鱼调色
|
|
//
|
|
// Created by mac on 2026/10/31.
|
|
//
|
|
|
|
#import <Metal/Metal.h>
|
|
#import <FxPlug/FxPlugSDK.h>
|
|
|
|
@class MetalDeviceCacheItem;
|
|
|
|
@interface MetalDeviceCache : NSObject
|
|
{
|
|
NSMutableArray<MetalDeviceCacheItem*>* deviceCaches;
|
|
}
|
|
|
|
+ (MetalDeviceCache*)deviceCache;
|
|
+ (MTLPixelFormat)MTLPixelFormatForImageTile:(FxImageTile*)imageTile;
|
|
|
|
- (id<MTLDevice>)deviceWithRegistryID:(uint64_t)registryID;
|
|
- (id<MTLRenderPipelineState>)pipelineStateWithRegistryID:(uint64_t)registryID
|
|
pixelFormat:(MTLPixelFormat)pixFormat;
|
|
- (id<MTLCommandQueue>)commandQueueWithRegistryID:(uint64_t)registryID
|
|
pixelFormat:(MTLPixelFormat)pixFormat;
|
|
- (void)returnCommandQueueToCache:(id<MTLCommandQueue>)commandQueue;
|
|
|
|
@end
|