o3de / o3de-atom-sampleviewer

Atom sample viewer project for the Open 3D Engine
https://o3de.org
Other
32 stars 37 forks source link

Multi-GPU RHI & RPI samples #677

Closed martinwinter-huawei closed 6 months ago

martinwinter-huawei commented 6 months ago

This PR introduces sample multi-GPU sample implementation for both RHI & RPI, both are based on the TriangleExampleComponent, which simply renders a triangle (the RHI sample also animates the position of the triangle).

Both cases split the screen in the middle, render the left half on device 0 and the right half on device 1. The right half is then copied over from device 1 to device 0 (either via a copy-ScopeProducer in the RHI sample or using the CopyPass in case of RPI) and composited there for the final output.

This PR also includes some commits that are already present in development, but not yet in multi-device-resources and will be removed in a rebase. Also, some fixes are included as well, the full list of commits is

  1. https://github.com/o3de/o3de-atom-sampleviewer/commit/234d1c289610ce14c6f70d45791ef7c0d7e91c74 (rebase remove)
  2. https://github.com/o3de/o3de-atom-sampleviewer/commit/193f75cff9e8407ecd487c4d62e5375d39ea29fb (rebase remove)
  3. Fixes for the build (mostly release build)
  4. RHI Sample
  5. RPI Sample
  6. Fixes for IndirectRenderingExample
  7. Rewrite deviceMasks from DefaultDevice to AllDevices to work correctly