Skip to content

Commit 6ca0cfc

Browse files
Add Metal 4 Deployment Target
Adds the Metal4 deployment target for MSL.
1 parent fec4a72 commit 6ca0cfc

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

Sources/SWBApplePlatform/Specs/MetalCompiler.xcspec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@
252252
Metal30,
253253
Metal31,
254254
Metal32,
255+
Metal40,
255256
);
256257
Category = BuildOptions;
257258
},
@@ -272,6 +273,7 @@
272273
Metal30,
273274
Metal31,
274275
Metal32,
276+
Metal40,
275277
);
276278
CommandLineArgs = {
277279
UseDeploymentTarget = ( );
@@ -286,6 +288,7 @@
286288
Metal30 = ( "-std=metal3.0", );
287289
Metal31 = ( "-std=metal3.1", );
288290
Metal32 = ( "-std=metal3.2", );
291+
Metal40 = ( "-std=metal4.0", );
289292
};
290293
},
291294
{

Sources/SWBApplePlatform/Specs/MetalLinker.xcspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
Metal30 = ( "-std=metal3.0", );
8484
Metal31 = ( "-std=metal3.1", );
8585
Metal32 = ( "-std=metal3.2", );
86+
Metal40 = ( "-std=metal4.0", );
8687
};
8788
},
8889
{

Sources/SWBApplePlatform/Specs/en.lproj/com.apple.compilers.metal.strings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
"[MTL_LANGUAGE_REVISION]-description-[Metal31]" = "Metal 3.1";
9191
"[MTL_LANGUAGE_REVISION]-value-[Metal32]" = "Metal 3.2";
9292
"[MTL_LANGUAGE_REVISION]-description-[Metal32]" = "Metal 3.2";
93+
"[MTL_LANGUAGE_REVISION]-value-[Metal40]" = "Metal 4.0";
94+
"[MTL_LANGUAGE_REVISION]-description-[Metal40]" = "Metal 4.0";
9395

9496
"[MTL_ENABLE_DEBUG_INFO]-name" = "Produce Debugging Information";
9597
"[MTL_ENABLE_DEBUG_INFO]-description" = "Debugging information is required for shader debugging and profiling.";

Tests/SWBTaskConstructionTests/BuildToolTaskConstructionTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,7 @@ fileprivate struct BuildToolTaskConstructionTests: CoreBasedTests {
15671567
["macosx", "Metal30"] : "-std=metal3.0",
15681568
["macosx", "Metal31"] : "-std=metal3.1",
15691569
["macosx", "Metal32"] : "-std=metal3.2",
1570+
["macosx", "Metal40"] : "-std=metal4.0",
15701571

15711572
["iphoneos", "UseDeploymentTarget"] : "",
15721573
["iphoneos", "iOSMetal10"] : "-std=ios-metal1.0",
@@ -1580,6 +1581,7 @@ fileprivate struct BuildToolTaskConstructionTests: CoreBasedTests {
15801581
["iphoneos", "Metal30"] : "-std=metal3.0",
15811582
["iphoneos", "Metal31"] : "-std=metal3.1",
15821583
["iphoneos", "Metal32"] : "-std=metal3.2",
1584+
["iphoneos", "Metal40"] : "-std=metal4.0",
15831585

15841586
["appletvos", "UseDeploymentTarget"] : "",
15851587
["appletvos", "Metal11"] : "-std=ios-metal1.1",
@@ -1592,10 +1594,12 @@ fileprivate struct BuildToolTaskConstructionTests: CoreBasedTests {
15921594
["appletvos", "Metal30"] : "-std=metal3.0",
15931595
["appletvos", "Metal31"] : "-std=metal3.1",
15941596
["appletvos", "Metal32"] : "-std=metal3.2",
1597+
["appletvos", "Metal40"] : "-std=metal4.0",
15951598

15961599
["xros", "UseDeploymentTarget"] : "",
15971600
["xros", "Metal31"] : "-std=metal3.1",
15981601
["xros", "Metal32"] : "-std=metal3.2",
1602+
["xros", "Metal40"] : "-std=metal4.0",
15991603
]
16001604

16011605
for (language, expectedOption) in optionForLanguage {

0 commit comments

Comments
 (0)