Skip to content

Commit

Permalink
kramv - enable Metal 3 support (macOS 13+, iOS 16+)
Browse files Browse the repository at this point in the history
Note there isn't any specific code that requires this yet, but it's a good minspec at least on macOS.  Newer Intel macOS can still run x64, but eventually I'll just drop the universal app and only support Apple Silicon.  iOS could drop back, but that's just a library that few are using.  And I'd like it to be unified on shader support.   Can start using RT, mesh shaders, descriptor indexing, etc.
  • Loading branch information
alecazam committed Jan 28, 2024
1 parent 3765062 commit 4ad1432
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 21 deletions.
8 changes: 4 additions & 4 deletions build2/kram.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1988,8 +1988,8 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
MACOSX_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -2075,8 +2075,8 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
MACOSX_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_CFLAGS = (
Expand Down
6 changes: 2 additions & 4 deletions build2/kramc.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -262,7 +262,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_CFLAGS = (
Expand Down Expand Up @@ -293,7 +293,6 @@
GCC_WARN_SHADOW = YES;
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../libkram/kram";
MACOSX_DEPLOYMENT_TARGET = 12.0;
PRODUCT_BUNDLE_IDENTIFIER = com.hialec.kramc;
PRODUCT_NAME = kram;
};
Expand All @@ -316,7 +315,6 @@
GCC_WARN_SHADOW = YES;
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../libkram/kram";
MACOSX_DEPLOYMENT_TARGET = 12.0;
PRODUCT_BUNDLE_IDENTIFIER = com.hialec.kramc;
PRODUCT_NAME = kram;
};
Expand Down
6 changes: 4 additions & 2 deletions build2/kramv.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@
"$(PROJECT_DIR)/../libkram/kram",
"$(PROJECT_DIR)/../libkram",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
MTL_LANGUAGE_REVISION = UseDeploymentTarget;
Expand Down Expand Up @@ -636,7 +636,7 @@
"$(PROJECT_DIR)/../libkram/kram",
"$(PROJECT_DIR)/../libkram",
);
MACOSX_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
MTL_LANGUAGE_REVISION = UseDeploymentTarget;
Expand Down Expand Up @@ -681,6 +681,7 @@
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 2.0.0;
MTL_LANGUAGE_REVISION = Metal30;
PRODUCT_BUNDLE_IDENTIFIER = com.hialec.kramv;
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand Down Expand Up @@ -716,6 +717,7 @@
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 2.0.0;
MTL_LANGUAGE_REVISION = Metal30;
OTHER_CFLAGS = (
"-DNDEBUG=1",
"-DCOMPILE_FASTL=0",
Expand Down
10 changes: 4 additions & 6 deletions gtlf/GLTF/GLTF.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
MACOSX_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -463,8 +463,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
MACOSX_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "-DNDEBUG=1";
SDKROOT = macosx;
Expand All @@ -488,7 +488,6 @@
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
Expand Down Expand Up @@ -519,7 +518,6 @@
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
Expand Down
8 changes: 4 additions & 4 deletions gtlf/GLTFMTL/GLTFMTL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
MACOSX_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -325,8 +325,8 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
MACOSX_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "-DNDEBUG=1";
SDKROOT = macosx;
Expand Down
2 changes: 1 addition & 1 deletion gtlf/GLTFMTL/Source/GLTFMTLShaderBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ @implementation GLTFMTLShaderBuilder
pipelineDescriptor.vertexDescriptor = vertexDescriptor;

pipelineDescriptor.colorAttachments[0].pixelFormat = colorPixelFormat;
pipelineDescriptor.sampleCount = sampleCount;
pipelineDescriptor.rasterSampleCount = sampleCount;

if (submesh.material.alphaMode == GLTFAlphaModeBlend) {
pipelineDescriptor.colorAttachments[0].blendingEnabled = YES;
Expand Down

0 comments on commit 4ad1432

Please sign in to comment.