|
63 | 63 | // Add option --msl_ios for target iOS MSL |
64 | 64 | // Add option --fixup_clipspace |
65 | 65 | // Add option --msl_reset_vlocs |
| 66 | +// 1.13.0 Target MSL default version to 2.0 |
66 | 67 |
|
67 | 68 | /** |
68 | 69 | * @since 1.9.5 |
|
116 | 117 | #include "../3rdparty/sjson/sjson.h" |
117 | 118 |
|
118 | 119 | #define VERSION_MAJOR 1 |
119 | | -#define VERSION_MINOR 12 |
| 120 | +#define VERSION_MINOR 13 |
120 | 121 | #define VERSION_SUB 0 |
121 | 122 |
|
122 | 123 | using namespace axslc; |
@@ -1336,6 +1337,7 @@ static int cross_compile(const cmd_args& args, std::vector<uint32_t>& spirv, |
1336 | 1337 | spirv_cross::CompilerMSL::Options msl_opts = msl->get_msl_options(); |
1337 | 1338 | msl_opts.enable_decoration_binding = true; |
1338 | 1339 | // msl_opts.enable_base_index_zero = true; |
| 1340 | + msl_opts.msl_version = args.profile_ver; |
1339 | 1341 | msl_opts.ios_support_base_vertex_instance = true; // ios-9.0+ |
1340 | 1342 | msl_opts.platform = args.msl_ios ? spirv_cross::CompilerMSL::Options::Platform::iOS : spirv_cross::CompilerMSL::Options::Platform::macOS; |
1341 | 1343 | msl->set_msl_options(msl_opts); |
@@ -2042,14 +2044,18 @@ int main(int argc, char* argv[]) |
2042 | 2044 |
|
2043 | 2045 | // Set default shader profile version |
2044 | 2046 | // HLSL: 50 (5.0) |
2045 | | - // GLSL: 200 (2.00) |
| 2047 | + // GLSL: 330 (3.3) |
| 2048 | + // ESSL: 300 (3.0) |
| 2049 | + // MSL: 20000 (2.0) |
2046 | 2050 | if (args.profile_ver == 0) { |
2047 | 2051 | if (args.lang == SHADER_LANG_ESSL) |
2048 | | - args.profile_ver = 200; |
| 2052 | + args.profile_ver = 300; |
2049 | 2053 | else if (args.lang == SHADER_LANG_HLSL) |
2050 | 2054 | args.profile_ver = 50; // D3D11 |
2051 | 2055 | else if (args.lang == SHADER_LANG_GLSL) |
2052 | 2056 | args.profile_ver = 330; |
| 2057 | + else if (args.lang == SHADER_LANG_MSL) |
| 2058 | + args.profile_ver = spirv_cross::CompilerMSL::Options::make_msl_version(2, 0); |
2053 | 2059 | } |
2054 | 2060 |
|
2055 | 2061 | #if SX_PLATFORM_WINDOWS |
|
0 commit comments