Skip to content
Permalink
Browse files
iOS: fix build
  • Loading branch information
slime73 committed Jan 1, 2018
1 parent 639ea9f commit a452a08458c5274aa37faad25344c2e572de9637
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/render/metal/SDL_render_metal.m
@@ -424,7 +424,7 @@ @implementation METAL_TextureData
data.mtlpipelineprims = MakePipelineCache(data, "SDL primitives pipeline ", SDL_METAL_VERTEX_SOLID, SDL_METAL_FRAGMENT_SOLID);
data.mtlpipelinecopy = MakePipelineCache(data, "SDL texture pipeline ", SDL_METAL_VERTEX_COPY, SDL_METAL_FRAGMENT_COPY);

MTLSamplerDescriptor *samplerdesc = [[[MTLSamplerDescriptor alloc] init] autorelease];
MTLSamplerDescriptor *samplerdesc = [[MTLSamplerDescriptor alloc] init];

samplerdesc.minFilter = MTLSamplerMinMagFilterNearest;
samplerdesc.magFilter = MTLSamplerMinMagFilterNearest;
@@ -434,6 +434,10 @@ @implementation METAL_TextureData
samplerdesc.magFilter = MTLSamplerMinMagFilterLinear;
data.mtlsamplerlinear = [data.mtldevice newSamplerStateWithDescriptor:samplerdesc];

#if !__has_feature(objc_arc)
[samplerdesc release];
#endif

static const float clearverts[] = { 0, 0, 0, 3, 3, 0 };
data.mtlbufclearverts = [data.mtldevice newBufferWithBytes:clearverts length:sizeof(clearverts) options:MTLResourceCPUCacheModeWriteCombined];
data.mtlbufclearverts.label = @"SDL_RenderClear vertices";

0 comments on commit a452a08

Please sign in to comment.