We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4828

Summary: SDL_render_metal.m compilation error against OS X 10.11 SDK
Product: SDL Reporter: Dominik Reichardt <sdl-bugzilla>
Component: renderAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: amaranth72
Version: HG 2.0   
Hardware: x86_64   
OS: Mac OS X 10.11   

Description Dominik Reichardt 2019-10-17 06:51:44 UTC
With current hg, I get these errors:
/Users/Whatever/Code/Merc/SDL/src/render/metal/SDL_render_metal.m:274:48: error: 
      use of undeclared identifier 'MTLStepFunctionPerVertex'; did you mean
      'MTLVertexStepFunctionPerVertex'?
            vertdesc.layouts[0].stepFunction = MTLStepFunctionPerVertex;
                                               ^~~~~~~~~~~~~~~~~~~~~~~~
                                               MTLVertexStepFunctionPerVertex
/opt/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h:77:5: note: 
      'MTLVertexStepFunctionPerVertex' declared here
    MTLVertexStepFunctionPerVertex = 1,
    ^
/Users/Whatever/Code/Merc/SDL/src/render/metal/SDL_render_metal.m:283:48: error: 
      use of undeclared identifier 'MTLStepFunctionPerVertex'; did you mean
      'MTLVertexStepFunctionPerVertex'?
            vertdesc.layouts[0].stepFunction = MTLStepFunctionPerVertex;
                                               ^~~~~~~~~~~~~~~~~~~~~~~~
                                               MTLVertexStepFunctionPerVertex
/opt/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h:77:5: note: 
      'MTLVertexStepFunctionPerVertex' declared here
    MTLVertexStepFunctionPerVertex = 1,
    ^
2 errors generated.
make: *** [build/SDL_render_metal.lo] Error 1

This was on OS X 10.14 with the 10.11 SDK but I first encountered this on a real 10.11 machine.
MACOSX_DEPLOYMENT_TARGET=10.7
Comment 1 Dominik Reichardt 2019-10-17 07:10:12 UTC
Deployment Target does mot factor in, I just tested.
SDKs 10.12 and higher do not have a problem at this point.
Comment 2 Alex Szpakowski 2019-10-17 21:49:48 UTC
Thanks for the report, this change should fix it: https://hg.libsdl.org/SDL/rev/d36bfafbe115