Jump to content
Alex Niva

Enabling Metal Compute prevented Affinity Photo from launching

Recommended Posts

Affinity Photo version 1.6.11

Running macOS Mojave version 10.14.2 on a 15-inch 2017 MacBook Pro, Graphics Radeon Pro 560 4096 MB / Intel HD Graphics 630 1536 MB

After enabling metal compute acceleration in AfPhoto's options the program was no longer able to launch and the following error was printed repeatedly in the Console app: 

From /Applications/Affinity Photo.app/Contents/MacOS/Affinity Photo (/Applications/Affinity Photo.app/Contents/Frameworks/liblibraster.dylib)

Quote

 

Error Domain=MTLLibraryErrorDomain Code=3 "Compilation failed: 

 

program_source:1147:11: error: no matching function for call to 'min'

                        return min(args..., args...);

          ^~~

program_source:1948:19: note: in instantiation of function template specialization 'min<unsigned int>' requested here

            loc = min(mask_height*mask_width-1,loc);

                  ^

/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/3902/Libraries/lib/clang/902.2/include/metal/metal_integer_math:163:15: note: candidate function template not viable: requires 2 arguments, but 0 were provided

METAL_FUNC _O min(T x, U y)

              ^

program_source:1144:4: note: candidate function template not viable: requires at least 2 arguments, but 0 were provided

        T min(T val1, T val2, Args... args)

   ^

program_source:378:21: note: candidate function not viable: requires 2 arguments, but 0 were provided

        inline cmykaf_type min(cmykaf_type lhs, cmykaf_type rhs)


 

 

I've attached the metal_integer_math file that is referenced in the error. 

Solutions attempted without success:

  • Computer restart.
  • Loading application from backup.
  • Re-downloading the application.

I discovered that the program would became responsive for a couple of seconds after very long intervals and I was eventually able to disable the metal compute acceleration option during one of these brief moments of responsiveness. The program had to be force-quit but functioned as normal when relaunched.

I am hesitant to try to recreate this problem as the solution was a bit iffy.

metal_integer_math

Screen Shot 2019-01-29 at 12.34.51 AM.png

Screen Shot 2019-01-29 at 1.37.59 AM.png

Share this post


Link to post
Share on other sites

Hi Alex Niva,
Welcome to Affinity Forums :)
Can you please try the latest Beta from here: Affinity Photo Customer Beta (1.7.0.107) and check if you still have issues with the program? There was a few changes regarding Metal compute acceleration in v1.7. Keep the current retail version installed since it's needed to validate the Beta. Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.