Metal: TF more optimal for hair refinement #107166

Merged
Jeroen Bakker merged 1 commits from Jason-Fielder/blender:Metal_KeepTF_ForRefine into main 2023-04-21 12:35:33 +02:00
2 changed files with 12 additions and 2 deletions

View File

@ -33,7 +33,12 @@
BLI_INLINE eParticleRefineShaderType drw_curves_shader_type_get()
{
if (GPU_compute_shader_support() && GPU_shader_storage_buffer_objects_support()) {
/* NOTE: Curve refine is faster using transform feedback via vertex processing pipeline with
* Metal and Apple Silicon GPUs. This is also because vertex work can more easily be executed in
* parallel with fragment work, whereas compute inserts an explicit dependency,
* due to switching of command encoder types. */
if (GPU_compute_shader_support() && GPU_shader_storage_buffer_objects_support() &&
(GPU_backend_get_type() != GPU_BACKEND_METAL)) {
return PART_REFINE_SHADER_COMPUTE;
}
if (GPU_transform_feedback_support()) {

View File

@ -36,7 +36,12 @@
BLI_INLINE eParticleRefineShaderType drw_hair_shader_type_get()
{
if (GPU_compute_shader_support() && GPU_shader_storage_buffer_objects_support()) {
/* NOTE: Hair refine is faster using transform feedback via vertex processing pipeline with Metal
* and Apple Silicon GPUs. This is also because vertex work can more easily be executed in
* parallel with fragment work, whereas compute inserts an explicit dependency,
* due to switching of command encoder types. */
if (GPU_compute_shader_support() && GPU_shader_storage_buffer_objects_support() &&
(GPU_backend_get_type() != GPU_BACKEND_METAL)) {
return PART_REFINE_SHADER_COMPUTE;
}
if (GPU_transform_feedback_support()) {