Skip to content

Commit

Permalink
Added metal availability attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaW0x committed Dec 10, 2024
1 parent bd906e3 commit 144efe3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gpu/metal/SDL_gpu_metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ static MTLDepthClipMode SDLToMetal_DepthClipMode(

typedef struct MetalPipelineCache
{
id<MTLBinaryArchive> pipelineCache;
@available(macOS 11.0, iOS 14.0, tvOS 14.0, *) id<MTLBinaryArchive> pipelineCache;
size_t checksumSize;
void* checksumData;
size_t cacheBlobSize;
Expand Down Expand Up @@ -1120,7 +1120,7 @@ static void METAL_ReleasePipelineCache(
pipelineDescriptor = [MTLRenderPipelineDescriptor new];

/*
if(@available(macOS 11.0, *))
if(@available(macOS 11.0, iOS 14.0, tvOS 14.0, *))
{
if(pipelineCache->pipelineCache != nil)
{
Expand Down Expand Up @@ -1217,7 +1217,7 @@ static void METAL_ReleasePipelineCache(
}

/*
if(@available(macOS 11.0, *))
if(@available(macOS 11.0, iOS 14.0, tvOS 14.0, *))
{
if(pipelineCache != NULL){
[pipelineCache->pipelineCache addRenderPipelineFunctionsWithDescriptor:pipelineDescriptor error:&error];
Expand Down Expand Up @@ -1260,7 +1260,7 @@ static void METAL_ReleasePipelineCache(
{
// Implementing it is easy, but there's not way to get the binary data out of MTLBinaryArchive without bouncing it to a file first
/*
if(@available(macOS 11.0, *)){
if(@available(macOS 11.0, iOS 14.0, tvOS 14.0, *)){
@autoreleasepool {
MetalRenderer* renderer = (MetalRenderer*)driverData;
MetalPipelineCache* pipelineCache = (MetalPipelineCache*)SDL_malloc(sizeof(MetalPipelineCache));
Expand Down

0 comments on commit 144efe3

Please sign in to comment.