mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
formatting
This commit is contained in:
parent
a0900ec433
commit
44ca1062b0
@ -63,28 +63,28 @@
|
||||
_library = l;
|
||||
_commandQueue = [_device newCommandQueue];
|
||||
_clearColor = MTLClearColorMake(0, 0, 0, 1);
|
||||
|
||||
|
||||
{
|
||||
MTLSamplerDescriptor *sd = [MTLSamplerDescriptor new];
|
||||
|
||||
|
||||
sd.label = @"NEAREST";
|
||||
_samplers[TEXTURE_FILTER_NEAREST] = [d newSamplerStateWithDescriptor:sd];
|
||||
|
||||
|
||||
sd.mipFilter = MTLSamplerMipFilterNearest;
|
||||
sd.label = @"MIPMAP_NEAREST";
|
||||
_samplers[TEXTURE_FILTER_MIPMAP_NEAREST] = [d newSamplerStateWithDescriptor:sd];
|
||||
|
||||
|
||||
sd.mipFilter = MTLSamplerMipFilterNotMipmapped;
|
||||
sd.minFilter = MTLSamplerMinMagFilterLinear;
|
||||
sd.magFilter = MTLSamplerMinMagFilterLinear;
|
||||
sd.label = @"LINEAR";
|
||||
_samplers[TEXTURE_FILTER_LINEAR] = [d newSamplerStateWithDescriptor:sd];
|
||||
|
||||
|
||||
sd.mipFilter = MTLSamplerMipFilterLinear;
|
||||
sd.label = @"MIPMAP_LINEAR";
|
||||
_samplers[TEXTURE_FILTER_MIPMAP_LINEAR] = [d newSamplerStateWithDescriptor:sd];
|
||||
}
|
||||
|
||||
|
||||
if (![self _initConversionFilters])
|
||||
return nil;
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#import <Metal/Metal.h>
|
||||
|
||||
@protocol FilterDelegate
|
||||
-(void)configure:(id<MTLCommandEncoder>)encoder;
|
||||
- (void)configure:(id<MTLCommandEncoder>)encoder;
|
||||
@end
|
||||
|
||||
@interface Filter : NSObject
|
||||
@ -18,9 +18,9 @@
|
||||
@property (nonatomic, readwrite) id<FilterDelegate> delegate;
|
||||
@property (nonatomic, readonly) id<MTLSamplerState> sampler;
|
||||
|
||||
-(void)apply:(id<MTLCommandBuffer>)cb in:(id<MTLTexture>)tin out:(id<MTLTexture>)tout;
|
||||
-(void)apply:(id<MTLCommandBuffer>)cb inBuf:(id<MTLBuffer>)tin outTex:(id<MTLTexture>)tout;
|
||||
- (void)apply:(id<MTLCommandBuffer>)cb in:(id<MTLTexture>)tin out:(id<MTLTexture>)tout;
|
||||
- (void)apply:(id<MTLCommandBuffer>)cb inBuf:(id<MTLBuffer>)tin outTex:(id<MTLTexture>)tout;
|
||||
|
||||
+(instancetype)newFilterWithFunctionName:(NSString *)name device:(id<MTLDevice>)device library:(id<MTLLibrary>)library error:(NSError **)error;
|
||||
+ (instancetype)newFilterWithFunctionName:(NSString *)name device:(id<MTLDevice>)device library:(id<MTLLibrary>)library error:(NSError **)error;
|
||||
|
||||
@end
|
||||
|
@ -10,79 +10,87 @@
|
||||
#import <Metal/Metal.h>
|
||||
|
||||
@interface Filter()
|
||||
-( instancetype)initWithKernel:(id<MTLComputePipelineState>)kernel sampler:(id<MTLSamplerState>)sampler;
|
||||
- (instancetype)initWithKernel:(id<MTLComputePipelineState>)kernel sampler:(id<MTLSamplerState>)sampler;
|
||||
@end
|
||||
|
||||
@implementation Filter {
|
||||
id<MTLComputePipelineState> _kernel;
|
||||
@implementation Filter
|
||||
{
|
||||
id<MTLComputePipelineState> _kernel;
|
||||
}
|
||||
|
||||
+(instancetype)newFilterWithFunctionName:(NSString *)name device:(id<MTLDevice>)device library:(id<MTLLibrary>)library error:(NSError **)error {
|
||||
id<MTLFunction> function = [library newFunctionWithName:name];
|
||||
id<MTLComputePipelineState> kernel = [device newComputePipelineStateWithFunction:function error:error];
|
||||
if (*error != nil) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
MTLSamplerDescriptor * sd = [MTLSamplerDescriptor new];
|
||||
sd.minFilter = MTLSamplerMinMagFilterNearest;
|
||||
sd.magFilter = MTLSamplerMinMagFilterNearest;
|
||||
sd.sAddressMode = MTLSamplerAddressModeClampToEdge;
|
||||
sd.tAddressMode = MTLSamplerAddressModeClampToEdge;
|
||||
sd.mipFilter = MTLSamplerMipFilterNotMipmapped;
|
||||
id<MTLSamplerState> sampler = [device newSamplerStateWithDescriptor:sd];
|
||||
|
||||
return [[Filter alloc] initWithKernel:kernel sampler:sampler];
|
||||
+ (instancetype)newFilterWithFunctionName:(NSString *)name device:(id<MTLDevice>)device library:(id<MTLLibrary>)library error:(NSError **)error
|
||||
{
|
||||
id<MTLFunction> function = [library newFunctionWithName:name];
|
||||
id<MTLComputePipelineState> kernel = [device newComputePipelineStateWithFunction:function error:error];
|
||||
if (*error != nil)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
MTLSamplerDescriptor *sd = [MTLSamplerDescriptor new];
|
||||
sd.minFilter = MTLSamplerMinMagFilterNearest;
|
||||
sd.magFilter = MTLSamplerMinMagFilterNearest;
|
||||
sd.sAddressMode = MTLSamplerAddressModeClampToEdge;
|
||||
sd.tAddressMode = MTLSamplerAddressModeClampToEdge;
|
||||
sd.mipFilter = MTLSamplerMipFilterNotMipmapped;
|
||||
id<MTLSamplerState> sampler = [device newSamplerStateWithDescriptor:sd];
|
||||
|
||||
return [[Filter alloc] initWithKernel:kernel sampler:sampler];
|
||||
}
|
||||
|
||||
-( instancetype)initWithKernel:(id<MTLComputePipelineState>)kernel sampler:(id<MTLSamplerState>)sampler {
|
||||
if (self = [super init]) {
|
||||
_kernel = kernel;
|
||||
_sampler = sampler;
|
||||
}
|
||||
return self;
|
||||
- (instancetype)initWithKernel:(id<MTLComputePipelineState>)kernel sampler:(id<MTLSamplerState>)sampler
|
||||
{
|
||||
if (self = [super init])
|
||||
{
|
||||
_kernel = kernel;
|
||||
_sampler = sampler;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)apply:(id<MTLCommandBuffer>)cb in:(id<MTLTexture>)tin out:(id<MTLTexture>)tout {
|
||||
id<MTLComputeCommandEncoder> ce = [cb computeCommandEncoder];
|
||||
ce.label = @"filter kernel";
|
||||
[ce pushDebugGroup:@"filter kernel"];
|
||||
|
||||
[ce setComputePipelineState:_kernel];
|
||||
|
||||
[ce setTexture:tin atIndex:0];
|
||||
[ce setTexture:tout atIndex:1];
|
||||
|
||||
[self.delegate configure:ce];
|
||||
|
||||
MTLSize size = MTLSizeMake(16, 16, 1);
|
||||
MTLSize count = MTLSizeMake((tin.width + size.width + 1) / size.width, (tin.height + size.height + 1) / size.height, 1);
|
||||
|
||||
[ce dispatchThreadgroups:count threadsPerThreadgroup:size];
|
||||
|
||||
[ce popDebugGroup];
|
||||
[ce endEncoding];
|
||||
- (void)apply:(id<MTLCommandBuffer>)cb in:(id<MTLTexture>)tin out:(id<MTLTexture>)tout
|
||||
{
|
||||
id<MTLComputeCommandEncoder> ce = [cb computeCommandEncoder];
|
||||
ce.label = @"filter kernel";
|
||||
[ce pushDebugGroup:@"filter kernel"];
|
||||
|
||||
[ce setComputePipelineState:_kernel];
|
||||
|
||||
[ce setTexture:tin atIndex:0];
|
||||
[ce setTexture:tout atIndex:1];
|
||||
|
||||
[self.delegate configure:ce];
|
||||
|
||||
MTLSize size = MTLSizeMake(16, 16, 1);
|
||||
MTLSize count = MTLSizeMake((tin.width + size.width + 1) / size.width, (tin.height + size.height + 1) / size.height,
|
||||
1);
|
||||
|
||||
[ce dispatchThreadgroups:count threadsPerThreadgroup:size];
|
||||
|
||||
[ce popDebugGroup];
|
||||
[ce endEncoding];
|
||||
}
|
||||
|
||||
-(void)apply:(id<MTLCommandBuffer>)cb inBuf:(id<MTLBuffer>)tin outTex:(id<MTLTexture>)tout {
|
||||
id<MTLComputeCommandEncoder> ce = [cb computeCommandEncoder];
|
||||
ce.label = @"filter kernel";
|
||||
[ce pushDebugGroup:@"filter kernel"];
|
||||
|
||||
[ce setComputePipelineState:_kernel];
|
||||
|
||||
[ce setBuffer:tin offset:0 atIndex:0];
|
||||
[ce setTexture:tout atIndex:0];
|
||||
|
||||
[self.delegate configure:ce];
|
||||
|
||||
MTLSize size = MTLSizeMake(32, 1, 1);
|
||||
MTLSize count = MTLSizeMake((tin.length + 00) / 32, 1, 1);
|
||||
|
||||
[ce dispatchThreadgroups:count threadsPerThreadgroup:size];
|
||||
|
||||
[ce popDebugGroup];
|
||||
[ce endEncoding];
|
||||
- (void)apply:(id<MTLCommandBuffer>)cb inBuf:(id<MTLBuffer>)tin outTex:(id<MTLTexture>)tout
|
||||
{
|
||||
id<MTLComputeCommandEncoder> ce = [cb computeCommandEncoder];
|
||||
ce.label = @"filter kernel";
|
||||
[ce pushDebugGroup:@"filter kernel"];
|
||||
|
||||
[ce setComputePipelineState:_kernel];
|
||||
|
||||
[ce setBuffer:tin offset:0 atIndex:0];
|
||||
[ce setTexture:tout atIndex:0];
|
||||
|
||||
[self.delegate configure:ce];
|
||||
|
||||
MTLSize size = MTLSizeMake(32, 1, 1);
|
||||
MTLSize count = MTLSizeMake((tin.length + 00) / 32, 1, 1);
|
||||
|
||||
[ce dispatchThreadgroups:count threadsPerThreadgroup:size];
|
||||
|
||||
[ce popDebugGroup];
|
||||
[ce endEncoding];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -27,7 +27,8 @@
|
||||
|
||||
#pragma mark - Pixel Formats
|
||||
|
||||
typedef NS_ENUM(NSUInteger, RPixelFormat) {
|
||||
typedef NS_ENUM(NSUInteger, RPixelFormat)
|
||||
{
|
||||
|
||||
RPixelFormatInvalid,
|
||||
|
||||
@ -44,7 +45,8 @@ typedef NS_ENUM(NSUInteger, RPixelFormat) {
|
||||
extern NSUInteger RPixelFormatToBPP(RPixelFormat format);
|
||||
extern NSString *NSStringFromRPixelFormat(RPixelFormat format);
|
||||
|
||||
typedef NS_ENUM(NSUInteger, RTextureFilter) {
|
||||
typedef NS_ENUM(NSUInteger, RTextureFilter)
|
||||
{
|
||||
RTextureFilterNearest,
|
||||
RTextureFilterLinear,
|
||||
|
||||
|
@ -11,15 +11,16 @@
|
||||
|
||||
NSUInteger RPixelFormatToBPP(RPixelFormat format)
|
||||
{
|
||||
switch (format) {
|
||||
switch (format)
|
||||
{
|
||||
case RPixelFormatBGRA8Unorm:
|
||||
case RPixelFormatBGRX8Unorm:
|
||||
return 4;
|
||||
|
||||
|
||||
case RPixelFormatB5G6R5Unorm:
|
||||
case RPixelFormatBGRA4Unorm:
|
||||
return 2;
|
||||
|
||||
|
||||
default:
|
||||
RARCH_ERR("[Metal]: unknown RPixel format: %d\n", format);
|
||||
return 4;
|
||||
@ -40,13 +41,14 @@ NSString *NSStringFromRPixelFormat(RPixelFormat format)
|
||||
STRING(RPixelFormatBGRA8Unorm);
|
||||
STRING(RPixelFormatBGRX8Unorm);
|
||||
#undef STRING
|
||||
|
||||
|
||||
});
|
||||
|
||||
if (format >= RPixelFormatCount) {
|
||||
|
||||
if (format >= RPixelFormatCount)
|
||||
{
|
||||
format = RPixelFormatInvalid;
|
||||
}
|
||||
|
||||
|
||||
return RPixelStrings[format];
|
||||
}
|
||||
|
||||
@ -54,19 +56,19 @@ matrix_float4x4 matrix_proj_ortho(float left, float right, float top, float bott
|
||||
{
|
||||
float near = 0;
|
||||
float far = 1;
|
||||
|
||||
|
||||
float sx = 2 / (right - left);
|
||||
float sy = 2 / (top - bottom);
|
||||
float sz = 1 / (far - near);
|
||||
float tx = (right + left) / (left - right);
|
||||
float ty = (top + bottom) / (bottom - top);
|
||||
float tz = near / (far - near);
|
||||
|
||||
|
||||
simd_float4 P = simd_make_float4(sx, 0, 0, 0);
|
||||
simd_float4 Q = simd_make_float4(0, sy, 0, 0);
|
||||
simd_float4 R = simd_make_float4(0, 0, sz, 0);
|
||||
simd_float4 S = simd_make_float4(tx, ty, tz, 1);
|
||||
|
||||
|
||||
matrix_float4x4 mat = {P, Q, R, S};
|
||||
return mat;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
CGSize _size; // size of view in pixels
|
||||
CGRect _frame;
|
||||
NSUInteger _bpp;
|
||||
|
||||
|
||||
id<MTLBuffer> _pixels; // frame buffer in _srcFmt
|
||||
bool _pixelsDirty;
|
||||
}
|
||||
@ -25,15 +25,19 @@
|
||||
- (instancetype)initWithDescriptor:(ViewDescriptor *)d context:(Context *)c
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
if (self)
|
||||
{
|
||||
_format = d.format;
|
||||
_bpp = RPixelFormatToBPP(_format);
|
||||
_filter = d.filter;
|
||||
_context = c;
|
||||
_visible = YES;
|
||||
if (_format == RPixelFormatBGRA8Unorm || _format == RPixelFormatBGRX8Unorm) {
|
||||
if (_format == RPixelFormatBGRA8Unorm || _format == RPixelFormatBGRX8Unorm)
|
||||
{
|
||||
_drawState = ViewDrawStateEncoder;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
_drawState = ViewDrawStateAll;
|
||||
}
|
||||
self.size = d.size;
|
||||
@ -44,12 +48,13 @@
|
||||
|
||||
- (void)setSize:(CGSize)size
|
||||
{
|
||||
if (CGSizeEqualToSize(_size, size)) {
|
||||
if (CGSizeEqualToSize(_size, size))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
_size = size;
|
||||
|
||||
|
||||
// create new texture
|
||||
{
|
||||
MTLTextureDescriptor *td = [MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatBGRA8Unorm
|
||||
@ -59,8 +64,9 @@
|
||||
td.usage = MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite;
|
||||
_texture = [_context.device newTextureWithDescriptor:td];
|
||||
}
|
||||
|
||||
if (_format != RPixelFormatBGRA8Unorm && _format != RPixelFormatBGRX8Unorm) {
|
||||
|
||||
if (_format != RPixelFormatBGRA8Unorm && _format != RPixelFormatBGRX8Unorm)
|
||||
{
|
||||
_pixels = [_context.device newBufferWithLength:(NSUInteger)(size.width * size.height * 2)
|
||||
options:MTLResourceStorageModeManaged];
|
||||
}
|
||||
@ -73,21 +79,22 @@
|
||||
|
||||
- (void)setFrame:(CGRect)frame
|
||||
{
|
||||
if (CGRectEqualToRect(_frame, frame)) {
|
||||
if (CGRectEqualToRect(_frame, frame))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
_frame = frame;
|
||||
|
||||
|
||||
// update vertices
|
||||
CGPoint o = frame.origin;
|
||||
CGSize s = frame.size;
|
||||
|
||||
|
||||
float l = o.x;
|
||||
float t = o.y;
|
||||
float r = o.x + s.width;
|
||||
float b = o.y + s.height;
|
||||
|
||||
|
||||
Vertex v[4] = {
|
||||
{{l, b, 0}, {0, 1}},
|
||||
{{r, b, 0}, {1, 1}},
|
||||
@ -106,15 +113,16 @@
|
||||
{
|
||||
if (_format == RPixelFormatBGRA8Unorm || _format == RPixelFormatBGRX8Unorm)
|
||||
return;
|
||||
|
||||
|
||||
if (!_pixelsDirty)
|
||||
return;
|
||||
|
||||
|
||||
[_context convertFormat:_format from:_pixels to:_texture];
|
||||
_pixelsDirty = NO;
|
||||
}
|
||||
|
||||
- (void)drawWithContext:(Context *)ctx {
|
||||
- (void)drawWithContext:(Context *)ctx
|
||||
{
|
||||
[self _convertFormat];
|
||||
}
|
||||
|
||||
@ -127,27 +135,32 @@
|
||||
|
||||
- (void)updateFrame:(void const *)src pitch:(NSUInteger)pitch
|
||||
{
|
||||
if (_format == RPixelFormatBGRA8Unorm || _format == RPixelFormatBGRX8Unorm) {
|
||||
if (_format == RPixelFormatBGRA8Unorm || _format == RPixelFormatBGRX8Unorm)
|
||||
{
|
||||
[_texture replaceRegion:MTLRegionMake2D(0, 0, (NSUInteger)_size.width, (NSUInteger)_size.height)
|
||||
mipmapLevel:0 withBytes:src
|
||||
bytesPerRow:(NSUInteger)(4 * pitch)];
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
void *dst = _pixels.contents;
|
||||
size_t len = (size_t)(_bpp * _size.width);
|
||||
assert(len <= pitch); // the length can't be larger?
|
||||
|
||||
if (len < pitch) {
|
||||
for (int i = 0; i < _size.height; i++) {
|
||||
|
||||
if (len < pitch)
|
||||
{
|
||||
for (int i = 0; i < _size.height; i++)
|
||||
{
|
||||
memcpy(dst, src, len);
|
||||
dst += len;
|
||||
src += pitch;
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
memcpy(dst, src, _pixels.length);
|
||||
}
|
||||
|
||||
|
||||
[_pixels didModifyRange:NSMakeRange(0, _pixels.length)];
|
||||
_pixelsDirty = YES;
|
||||
}
|
||||
|
@ -12,11 +12,11 @@
|
||||
|
||||
typedef NS_ENUM(NSInteger, ViewDrawState)
|
||||
{
|
||||
ViewDrawStateNone = 0x00,
|
||||
ViewDrawStateNone = 0x00,
|
||||
ViewDrawStateContext = 0x01,
|
||||
ViewDrawStateEncoder = 0x02,
|
||||
|
||||
ViewDrawStateAll = 0x03,
|
||||
ViewDrawStateAll = 0x03,
|
||||
};
|
||||
|
||||
@interface ViewDescriptor : NSObject
|
||||
|
@ -14,7 +14,8 @@
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
if (self)
|
||||
{
|
||||
_format = RPixelFormatBGRA8Unorm;
|
||||
}
|
||||
return self;
|
||||
|
@ -34,8 +34,8 @@ extern MTLPixelFormat SelectOptimalPixelFormat(MTLPixelFormat fmt);
|
||||
@property (nonatomic, readwrite) CGRect frame;
|
||||
@property (nonatomic, readwrite) CGSize size;
|
||||
@property (nonatomic, readonly) ViewDrawState drawState;
|
||||
@property (nonatomic, readonly) struct video_shader* shader;
|
||||
@property (nonatomic, readwrite) uint64_t frameCount;
|
||||
@property (nonatomic, readonly) struct video_shader *shader;
|
||||
@property (nonatomic, readwrite) uint64_t frameCount;
|
||||
|
||||
- (void)setFilteringIndex:(int)index smooth:(bool)smooth;
|
||||
- (BOOL)setShaderFromPath:(NSString *)path;
|
||||
@ -60,14 +60,14 @@ extern MTLPixelFormat SelectOptimalPixelFormat(MTLPixelFormat fmt);
|
||||
|
||||
@interface MetalDriver : NSObject<MTKViewDelegate>
|
||||
|
||||
@property (nonatomic, readonly) video_viewport_t* viewport;
|
||||
@property (nonatomic, readwrite) bool keepAspect;
|
||||
@property (nonatomic, readonly) MetalMenu* menu;
|
||||
@property (nonatomic, readonly) FrameView* frameView;
|
||||
@property (nonatomic, readonly) MenuDisplay* display;
|
||||
@property (nonatomic, readonly) Context* context;
|
||||
@property (nonatomic, readonly) Uniforms* viewportMVP;
|
||||
@property (nonatomic, readonly) Uniforms* viewportMVPNormalized;
|
||||
@property (nonatomic, readonly) video_viewport_t *viewport;
|
||||
@property (nonatomic, readwrite) bool keepAspect;
|
||||
@property (nonatomic, readonly) MetalMenu *menu;
|
||||
@property (nonatomic, readonly) FrameView *frameView;
|
||||
@property (nonatomic, readonly) MenuDisplay *display;
|
||||
@property (nonatomic, readonly) Context *context;
|
||||
@property (nonatomic, readonly) Uniforms *viewportMVP;
|
||||
@property (nonatomic, readonly) Uniforms *viewportMVPNormalized;
|
||||
|
||||
- (instancetype)initWithVideo:(const video_info_t *)video
|
||||
input:(const input_driver_t **)input
|
||||
|
@ -249,9 +249,9 @@
|
||||
RARCH_ERR("[Metal]: error creating pipeline state %s\n", err.localizedDescription.UTF8String);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
MTLFunctionConstantValues *vals;
|
||||
|
||||
|
||||
psd.label = @"snow_simple";
|
||||
ca.blendingEnabled = YES;
|
||||
{
|
||||
@ -272,7 +272,7 @@
|
||||
RARCH_ERR("[Metal]: error creating pipeline state %s\n", err.localizedDescription.UTF8String);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
psd.label = @"snow";
|
||||
ca.blendingEnabled = YES;
|
||||
{
|
||||
@ -293,7 +293,7 @@
|
||||
RARCH_ERR("[Metal]: error creating pipeline state %s\n", err.localizedDescription.UTF8String);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
psd.label = @"bokeh";
|
||||
ca.blendingEnabled = YES;
|
||||
psd.fragmentFunction = [_library newFunctionWithName:@"bokeh_fragment"];
|
||||
@ -303,7 +303,7 @@
|
||||
RARCH_ERR("[Metal]: error creating pipeline state %s\n", err.localizedDescription.UTF8String);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
psd.label = @"snowflake";
|
||||
ca.blendingEnabled = YES;
|
||||
psd.fragmentFunction = [_library newFunctionWithName:@"snowflake_fragment"];
|
||||
@ -313,7 +313,7 @@
|
||||
RARCH_ERR("[Metal]: error creating pipeline state %s\n", err.localizedDescription.UTF8String);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
psd.label = @"ribbon";
|
||||
ca.blendingEnabled = NO;
|
||||
psd.vertexFunction = [_library newFunctionWithName:@"ribbon_vertex"];
|
||||
|
Loading…
x
Reference in New Issue
Block a user