Fix #117169: Resolve crashing hair and curve tests in Metal

Remove divergent code paths for hair refinement. Metal
previously opted for transform-feedback based hair
refinement due to improved performance, but best
to utilise the same compute path with new engines in
mind.

Separate PRs can be made to optimize the compute
path.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/117477
This commit is contained in:
Jason Fielder 2024-01-25 05:02:19 +01:00 committed by Clément Foucault
parent 8841990764
commit 81c1490877
2 changed files with 2 additions and 10 deletions

@ -38,11 +38,7 @@ namespace blender::draw {
BLI_INLINE eParticleRefineShaderType drw_curves_shader_type_get()
{
/* 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_backend_get_type() != GPU_BACKEND_METAL)) {
if (GPU_compute_shader_support()) {
return PART_REFINE_SHADER_COMPUTE;
}
if (GPU_transform_feedback_support()) {

@ -37,11 +37,7 @@
BLI_INLINE eParticleRefineShaderType drw_hair_shader_type_get()
{
/* 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_backend_get_type() != GPU_BACKEND_METAL)) {
if (GPU_compute_shader_support()) {
return PART_REFINE_SHADER_COMPUTE;
}
if (GPU_transform_feedback_support()) {