This PR is setup in tandem with a corresponding PR #17974 into o3de/development and can only be merged in tandem.
It transitions the samples in the ASV to multi-device resources.
As the change set is enormous, this feature has been developed separately on a dedicated branch o3de/o3de-atom-sampleviewer at multi-device-resources (github.com) and is now ready to be merged.
This PR does essentially two things:
It transitions existing samples to multi-device resources
It introduces two new samples, namely:
RHI/MultiGPU
Shows how to do split-frame rendering with a simple triangle pass on the RHI level, copying over the result from the second device to the first device and compositing the final output there. This sets up ScopeProducers on specific devices to submit DrawItems to different GPUs and submit the corresponding CopyItems to transfer the data between GPUs
RPI/MultiGPU
This shows how to do the same example as on the RPI layer (just without the animation) using the Pass and Pipeline setups in json.
List of PRs
The following table lists all PRs that have been merged into multi-device-resources and are part of this PR.
The final merge will also include one additional commit which changes the naming scheme (the intermediate naming used MultiDeviceResource as well as SingleDeviceResource, this now changes to Resource and DeviceResource).
The table lists all PRs into o3de as well as o3de-atom-sampleviewer.
And also many thanks to the reviewers of all these PRs, as this is a huge change, the review effort also was significant and helped improve the code significantly (listed in random order)
This PR is setup in tandem with a corresponding PR #17974 into
o3de/development
and can only be merged in tandem. It transitions the samples in the ASV to multi-device resources. As the change set is enormous, this feature has been developed separately on a dedicated branch o3de/o3de-atom-sampleviewer at multi-device-resources (github.com) and is now ready to be merged.This PR does essentially two things:
RHI/MultiGPU
RHI
level, copying over the result from the second device to the first device and compositing the final output there. This sets upScopeProducers
on specific devices to submitDrawItems
to different GPUs and submit the correspondingCopyItems
to transfer the data between GPUsRPI/MultiGPU
RPI
layer (just without the animation) using thePass
andPipeline
setups injson
.List of PRs
The following table lists all PRs that have been merged into
multi-device-resources
and are part of this PR. The final merge will also include one additional commit which changes the naming scheme (the intermediate naming usedMultiDeviceResource
as well asSingleDeviceResource
, this now changes toResource
andDeviceResource
). The table lists all PRs intoo3de
as well aso3de-atom-sampleviewer
.Buffer
Image
PipelineState
Query
TransientAttachmentPool
ModelLod
Meshlets
-GemRayTracing
SwapChain
RPI::ShaderResouceGroup
use the multi-device version ofShaderResourceGroup
DrawItem
DispatchItem
-related resources by martinwinter-huawei · Pull Request #17520 · o3de/o3de (github.com)DispatchItem
AttachmentReadback
to multi-devicedeviceIndex
in theScope
classdeviceIndex
in theFrameGraphExecuteContext
and utilize thedeviceIndex
wherever possiblecontext.GetDeviceIndex()
where possible by martinwinter-huawei · Pull Request #670 · o3de/o3de-atom-sampleviewer (github.com)FrameScheduler
andFrameGraph
-related resources including the backends to support multi-device resourcesScopeProducer
s get adeviceIndex
and consequently theRenderpass
gets a deviceIndex injson
FrameGraph*
CopyPass
deviceIndex
in the PassViewerContributors & Reviewers
Many thanks to the contributors to this PR (listed in alphabetical order)
And also many thanks to the reviewers of all these PRs, as this is a huge change, the review effort also was significant and helped improve the code significantly (listed in random order)