@@ -682,6 +682,8 @@ struct CLIArguments
682
682
bool msl_readwrite_texture_fences = true ;
683
683
bool msl_agx_manual_cube_grad_fixup = false ;
684
684
bool msl_input_attachment_is_ds_attachment = false ;
685
+ bool msl_disable_rasterization = false ;
686
+ bool msl_auto_disable_rasterization = false ;
685
687
const char *msl_combined_sampler_suffix = nullptr ;
686
688
bool glsl_emit_push_constant_as_ubo = false ;
687
689
bool glsl_emit_ubo_as_plain_uniforms = false ;
@@ -983,7 +985,9 @@ static void print_help_msl()
983
985
" \t\t All released Apple Silicon GPUs to date ignore one of the three partial derivatives\n "
984
986
" \t\t based on the selected major axis, and expect the remaining derivatives to be\n "
985
987
" \t\t partially transformed. This fixup gives correct results on Apple Silicon.\n "
986
- " \t [--msl-combined-sampler-suffix <suffix>]:\n\t\t Uses a custom suffix for combined samplers.\n " );
988
+ " \t [--msl-combined-sampler-suffix <suffix>]:\n\t\t Uses a custom suffix for combined samplers.\n "
989
+ " \t [--msl-disable-rasterization]:\n\t\t Disables rasterization and returns void from vertex-like entry points.\n "
990
+ " \t [--msl-auto-disable-rasterization]:\n\t\t Disables rasterization if BuiltInPosition is not written.\n " );
987
991
// clang-format on
988
992
}
989
993
@@ -1265,6 +1269,8 @@ static string compile_iteration(const CLIArguments &args, std::vector<uint32_t>
1265
1269
msl_opts.input_attachment_is_ds_attachment = args.msl_input_attachment_is_ds_attachment ;
1266
1270
msl_opts.readwrite_texture_fences = args.msl_readwrite_texture_fences ;
1267
1271
msl_opts.agx_manual_cube_grad_fixup = args.msl_agx_manual_cube_grad_fixup ;
1272
+ msl_opts.disable_rasterization = args.msl_disable_rasterization ;
1273
+ msl_opts.auto_disable_rasterization = args.msl_auto_disable_rasterization ;
1268
1274
msl_comp->set_msl_options (msl_opts);
1269
1275
for (auto &v : args.msl_discrete_descriptor_sets )
1270
1276
msl_comp->add_discrete_descriptor_set (v);
@@ -1830,6 +1836,8 @@ static int main_inner(int argc, char *argv[])
1830
1836
cbs.add (" --msl-replace-recursive-inputs" ,
1831
1837
[&args](CLIParser &) { args.msl_replace_recursive_inputs = true ; });
1832
1838
cbs.add (" --msl-input-attachment-is-ds-attachment" , [&args](CLIParser &) { args.msl_input_attachment_is_ds_attachment = true ; });
1839
+ cbs.add (" --msl-disable-rasterization" , [&args](CLIParser &) { args.msl_disable_rasterization = true ; });
1840
+ cbs.add (" --msl-auto-disable-rasterization" , [&args](CLIParser &) { args.msl_auto_disable_rasterization = true ; });
1833
1841
cbs.add (" --extension" , [&args](CLIParser &parser) { args.extensions .push_back (parser.next_string ()); });
1834
1842
cbs.add (" --rename-entry-point" , [&args](CLIParser &parser) {
1835
1843
auto old_name = parser.next_string ();
0 commit comments