Skip to content

Commit 689360b

Browse files
Add getter for DispatchArguments.
Necessary for using MultiDeviceDispatchItem in the ComputePass. Signed-off-by: Joerg H. Mueller <[email protected]>
1 parent f777440 commit 689360b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Gems/Atom/RHI/Code/Include/Atom/RHI/MultiDeviceDispatchItem.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,17 @@ namespace AZ::RHI
100100
return m_deviceDispatchItems.at(deviceIndex);
101101
}
102102

103+
//! Retrieve arguments specifing a dispatch type.
104+
const MultiDeviceDispatchArguments& GetArguments() const
105+
{
106+
return m_arguments;
107+
}
108+
103109
//! Arguments specific to a dispatch type.
104110
void SetArguments(const MultiDeviceDispatchArguments& arguments)
105111
{
112+
m_arguments = arguments;
113+
106114
for (auto& [deviceIndex, dispatchItem] : m_deviceDispatchItems)
107115
{
108116
dispatchItem.m_arguments = arguments.GetDeviceDispatchArguments(deviceIndex);
@@ -162,6 +170,8 @@ namespace AZ::RHI
162170
private:
163171
//! A DeviceMask denoting on which devices a device-specific DispatchItem should be generated
164172
MultiDevice::DeviceMask m_deviceMask{ MultiDevice::DefaultDevice };
173+
//! Caching the arguments for the corresponding getter.
174+
MultiDeviceDispatchArguments m_arguments;
165175
//! A map of all device-specific DispatchItem, indexed by the device index
166176
AZStd::unordered_map<int, DispatchItem> m_deviceDispatchItems;
167177
};

0 commit comments

Comments
 (0)