ConfettiFX / The-Forge

The Forge Cross-Platform Rendering Framework PC Windows, Steamdeck (native), Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
Apache License 2.0
4.71k stars 493 forks source link

04_ExecuteInDirect poor performance on MacPro 2019, AMD Vega II, Catalina 10.15.3 #168

Closed camots closed 4 years ago

camots commented 4 years ago

I just compiled 04_ExecuteInDirect. The performance was very bad. There is no fluid movement of the asteroids. Frame Time 84 ms.

wolfgangfengel commented 4 years ago

Thanks for reporting this. We will look into it.

wolfgangfengel commented 4 years ago

When you measured this, did you compile in Debug or Release. We can see similar times in Debug ... which is normal.

camots commented 4 years ago

I think I was tried both: Debug and Release!

But let me check it again to be sure. Currently I’m not in the office and have no access to the machine.

I’ll let you know asap.

Best regards,

Werner

From: Wolfgang Engel notifications@github.com Reply to: ConfettiFX/The-Forge reply@reply.github.com Date: Monday, 9 March 2020 at 20:40 To: ConfettiFX/The-Forge The-Forge@noreply.github.com Cc: camots werner.volken@vsw.ch, Author author@noreply.github.com Subject: Re: [ConfettiFX/The-Forge] 04_ExecuteInDirect poor performance on MacPro 2019, AMD Vega II, Catalina 10.15.3 (#168)

When you measured this, did you compile in Debug or Release. We can see similar times in Debug ... which is normal.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

camots commented 4 years ago

Hi,

I compiled for Debug and in Release.

But the problem was actually running the program through xcode.

If I start it directly from the finder by double-click 04_ExecuteIndirect.app in the Bin/Releas or Bin/Debug directory, both versions are running smooth i.e. 7.8 ms frametime.

However the program only runs in this location. I cannot move the app to some different folder location.

The xcode archive process was successful, however the program copied to some other location crashed.

Is there also some cmake version around?

Best regards,

                Werner

From: Wolfgang Engel notifications@github.com Reply to: ConfettiFX/The-Forge reply@reply.github.com Date: Monday, 9 March 2020 at 20:40 To: ConfettiFX/The-Forge The-Forge@noreply.github.com Cc: camots werner.volken@vsw.ch, Author author@noreply.github.com Subject: Re: [ConfettiFX/The-Forge] 04_ExecuteInDirect poor performance on MacPro 2019, AMD Vega II, Catalina 10.15.3 (#168)

When you measured this, did you compile in Debug or Release. We can see similar times in Debug ... which is normal.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

wolfgangfengel commented 4 years ago

That is strange! When we tested two days ago everything worked fine. Can you provide more information? Do you have any interesting path statements? The XCode version we have on GitHub etc.. Might be also a bug in XCode.

AntoineConffx commented 4 years ago

@camots You won't be able to run the application from a different folder because of the way assets get loaded at the moment on macOS. They're not packaged inside the bundle but are loaded from a relative path to binary. So if you really want to try and run it from a different path, you'd need to either modify some of the code / project settings to bundle all the resources inside the macOS package or recreate the same folder structure including the Art or UnitTestResources wherever you would like to run that package.

camots commented 4 years ago

Hi,

I’m running Xcode Version 11.3.1 (11C504).

This is what I get on the Xcode console when running directly in Xcode:

2020-03-12 17:47:21.738333+0100 04_ExecuteIndirect[37316:1900874] Metal GPU Frame Capture Enabled

2020-03-12 17:47:21.738593+0100 04_ExecuteIndirect[37316:1900874] Metal API Validation Enabled

2020-03-12 17:47:22.168061+0100 system_profiler[37321:1901333] [default] Failed to get valid hid device for FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF

2020-03-12 17:47:22.174405+0100 system_profiler[37321:1901333] Metal API Validation Enabled

2020-03-12 17:47:22.280751+0100 system_profiler[37321:1901333] Device PreExisted [00000001000009fb] AMD Radeon Pro Vega II

2020-03-12 17:47:22.305052+0100 system_profiler[37321:1901333] [default] Failed to get valid hid device for FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF

The frame-time is 83 ms.

As already mentioned: Running by double-clicking through Finder and it looks good! 7.8ms.

However you cannot copy the app out of the bin folder. Some resources are not included within the app-Folder, but are referenced through absolute paths as can be seen from the log-file:

date       time     [thread name/id ]                   file:line    v |

2020-03-12 17:56:13 [MainThread     ]                Log.cpp:176   INFO| Opened log file 04_ExecuteIndirect.log

2020-03-12 17:56:13 [MainThread     ]       MetalRenderer.mm:1646  INFO| Current Gpu Name: AMD Radeon Pro Vega II

2020-03-12 17:56:13 [MainThread     ]       MetalRenderer.mm:1647  INFO| Current Gpu Vendor ID: 0x1002

2020-03-12 17:56:13 [MainThread     ]       MetalRenderer.mm:1648  INFO| Current Gpu Model ID: 0x66a3

2020-03-12 17:56:13 [MainThread     ]            GPUConfig.h:182   WARN| gpu.cfg could not be found, setting preset to Low as a default.

2020-03-12 17:56:13 [NoName         ]              Image.cpp:1476   ERR| "/Volumes/UnitTestResources/Textures/Skybox_right1.dds": Image file not found.

2020-03-12 17:56:13 [NoName         ]     ResourceLoader.cpp:269    ERR| Decoding failed for image at path /Volumes/UnitTestResources/Textures/Skybox_right1; texture will be NULL.

2020-03-12 17:56:13 [NoName         ]              Image.cpp:1476   ERR| "/Volumes/UnitTestResources/Textures/Skybox_left2.dds": Image file not found.

2020-03-12 17:56:13 [NoName         ]     ResourceLoader.cpp:269    ERR| Decoding failed for image at path /Volumes/UnitTestResources/Textures/Skybox_left2; texture will be NULL.

2020-03-12 17:56:13 [NoName         ]              Image.cpp:1476   ERR| "/Volumes/UnitTestResources/Textures/Skybox_top3.dds": Image file not found.

2020-03-12 17:56:13 [NoName         ]     ResourceLoader.cpp:269    ERR| Decoding failed for image at path /Volumes/UnitTestResources/Textures/Skybox_top3; texture will be NULL.

2020-03-12 17:56:13 [NoName         ]              Image.cpp:1476   ERR| "/Volumes/UnitTestResources/Textures/Skybox_bottom4.dds": Image file not found.

2020-03-12 17:56:13 [NoName         ]     ResourceLoader.cpp:269    ERR| Decoding failed for image at path /Volumes/UnitTestResources/Textures/Skybox_bottom4; texture will be NULL.

2020-03-12 17:56:13 [NoName         ]              Image.cpp:1476   ERR| "/Volumes/UnitTestResources/Textures/Skybox_front5.dds": Image file not found.

2020-03-12 17:56:13 [NoName         ]     ResourceLoader.cpp:269    ERR| Decoding failed for image at path /Volumes/UnitTestResources/Textures/Skybox_front5; texture will be NULL.

2020-03-12 17:56:13 [NoName         ]              Image.cpp:1476   ERR| "/Volumes/UnitTestResources/Textures/Skybox_back6.dds": Image file not found.

2020-03-12 17:56:13 [NoName         ]     ResourceLoader.cpp:269    ERR| Decoding failed for image at path /Volumes/UnitTestResources/Textures/Skybox_back6; texture will be NULL.

2020-03-12 17:56:14 [MainThread     ]     ResourceLoader.cpp:3056   ERR| No source shader or precompiled binary present for file basic.vert

2020-03-12 17:56:14 [MainThread     ]     ResourceLoader.cpp:3056   ERR| No source shader or precompiled binary present for file skybox.vert

2020-03-12 17:56:14 [MainThread     ]     ResourceLoader.cpp:3056   ERR| No source shader or precompiled binary present for file ExecuteIndirect.vert

2020-03-12 17:56:14 [MainThread     ]     ResourceLoader.cpp:3056   ERR| No source shader or precompiled binary present for file ComputeUpdate.comp

I was also not able to use the Xcode archive function to create a standalone app.

Best regards

Werner

From: Wolfgang Engel notifications@github.com Reply to: ConfettiFX/The-Forge reply@reply.github.com Date: Thursday, 12 March 2020 at 17:41 To: ConfettiFX/The-Forge The-Forge@noreply.github.com Cc: camots werner.volken@vsw.ch, Author author@noreply.github.com Subject: Re: [ConfettiFX/The-Forge] 04_ExecuteInDirect poor performance on MacPro 2019, AMD Vega II, Catalina 10.15.3 (#168)

That is strange! When we tested two days ago everything worked fine. Can you provide more information? Do you have any interesting path statements? The XCode version we have on GitHub etc.. Might be also a bug in XCode.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

camots commented 4 years ago

Thank you for the info!

From: Antoine Micaelian notifications@github.com Reply to: ConfettiFX/The-Forge reply@reply.github.com Date: Thursday, 12 March 2020 at 17:49 To: ConfettiFX/The-Forge The-Forge@noreply.github.com Cc: camots werner.volken@vsw.ch, Mention mention@noreply.github.com Subject: Re: [ConfettiFX/The-Forge] 04_ExecuteInDirect poor performance on MacPro 2019, AMD Vega II, Catalina 10.15.3 (#168)

@camots You won't be able to run the application from a different folder because of the way assets get loaded at the moment on macOS. They're not packaged inside the bundle but are loaded from a relative path to binary. So if you really want to try and run it from a different path, you'd need to either modify some of the code / project settings to bundle all the resources inside the macOS package or recreate the same folder structure including the Art or UnitTestResources wherever you would like to run that package.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

AntoineConffx commented 4 years ago

If it performs that much better without Xcode I would try disabling metal validation as that could be the reason.

camots commented 4 years ago

Thank you very much for this!

Disabling metal validation reduces the frame time from 83 ms to 32 ms.

So it runs quite smooth. However, without Xcode the frame time is below 8 ms.

Best regards

From: Antoine Micaelian notifications@github.com Reply to: ConfettiFX/The-Forge reply@reply.github.com Date: Thursday, 12 March 2020 at 19:26 To: ConfettiFX/The-Forge The-Forge@noreply.github.com Cc: camots werner.volken@vsw.ch, Mention mention@noreply.github.com Subject: Re: [ConfettiFX/The-Forge] 04_ExecuteInDirect poor performance on MacPro 2019, AMD Vega II, Catalina 10.15.3 (#168)

If it performs that much better without Xcode I would try disabling metal validation as that could be the reason.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

wolfgangfengel commented 4 years ago

I think we can consider this fixed?

camots commented 4 years ago

Yes!

Thank you for your help.

Best regards

From: Wolfgang Engel notifications@github.com Reply to: ConfettiFX/The-Forge reply@reply.github.com Date: Wednesday, 15 April 2020 at 19:10 To: ConfettiFX/The-Forge The-Forge@noreply.github.com Cc: camots werner.volken@vsw.ch, Mention mention@noreply.github.com Subject: Re: [ConfettiFX/The-Forge] 04_ExecuteInDirect poor performance on MacPro 2019, AMD Vega II, Catalina 10.15.3 (#168)

I think we can consider this fixed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.