diff --git a/main.cpp b/main.cpp index ee2559af..5787ac11 100644 --- a/main.cpp +++ b/main.cpp @@ -442,7 +442,6 @@ struct CLIArguments uint32_t iterations = 1; bool cpp = false; bool msl = false; - bool msl_pack_ubos = true; bool hlsl = false; bool hlsl_compat = false; bool vulkan_semantics = false; @@ -456,7 +455,7 @@ static void print_help() "[--version ] [--dump-resources] [--help] [--force-temporary] " "[--vulkan-semantics] [--flatten-ubo] [--fixup-clipspace] [--iterations iter] " "[--cpp] [--cpp-interface-name ] " - "[--msl] [--msl-no-pack-ubos] " + "[--msl] " "[--hlsl] [--shader-model] [--hlsl-enable-compat] " "[--pls-in format input-name] [--pls-out format output-name] [--remap source_name target_name " "components] [--extension ext] [--entry name] [--remove-unused-variables] " @@ -579,7 +578,6 @@ int main(int argc, char *argv[]) cbs.add("--cpp-interface-name", [&args](CLIParser &parser) { args.cpp_interface_name = parser.next_string(); }); cbs.add("--metal", [&args](CLIParser &) { args.msl = true; }); // Legacy compatibility cbs.add("--msl", [&args](CLIParser &) { args.msl = true; }); - cbs.add("--msl-no-pack-ubos", [&args](CLIParser &) { args.msl_pack_ubos = false; }); cbs.add("--hlsl", [&args](CLIParser &) { args.hlsl = true; }); cbs.add("--hlsl-enable-compat", [&args](CLIParser &) { args.hlsl_compat = true; }); cbs.add("--vulkan-semantics", [&args](CLIParser &) { args.vulkan_semantics = true; }); @@ -651,7 +649,6 @@ int main(int argc, char *argv[]) auto *msl_comp = static_cast(compiler.get()); auto msl_opts = msl_comp->get_options(); - msl_opts.pad_and_pack_uniform_structs = args.msl_pack_ubos; msl_comp->set_options(msl_opts); } else if (args.hlsl) diff --git a/spirv_msl.cpp b/spirv_msl.cpp index b38d79ac..6b1ebcab 100644 --- a/spirv_msl.cpp +++ b/spirv_msl.cpp @@ -969,9 +969,7 @@ void CompilerMSL::emit_resources() (has_decoration(type.self, DecorationBlock) || has_decoration(type.self, DecorationBufferBlock)) && !is_hidden_variable(var)) { - if (options.pad_and_pack_uniform_structs) - align_struct(type); - + align_struct(type); emit_struct(type); } } diff --git a/spirv_msl.hpp b/spirv_msl.hpp index 4c5836d7..36f528ac 100644 --- a/spirv_msl.hpp +++ b/spirv_msl.hpp @@ -78,7 +78,6 @@ public: { bool flip_vert_y = false; bool is_rendering_points = true; - bool pad_and_pack_uniform_structs = false; std::string entry_point_name; };