Function gpa::metrics::GetGpuIdForGraphicsDevice
Defined in File gpu-id-helpers.h
Function Documentation
-
Result gpa::metrics::GetGpuIdForGraphicsDevice(GraphicsApi graphicsApi, void *graphicsInstance, void *graphicsDevice, gpa::metrics::GpuId *pGpuId)
Used to determine the GPU's id associated with a graphics API device.
- Parameters
graphicsApi -- [in] Graphics API associated with the provided device.
graphicsInstance -- [in] Graphics instance whose type is based on the specified API. For D3D11, D3D12 and Metal must be a nullptr. For Vulkan must be a VkInstance.
graphicsDevice -- [in] Device whose type is based on the specified API. For D3D11 must be an ID3D11Device pointer. For D3D12 must be an ID3D12Device pointer. For Metal must be a MTLDevice. For Vulkan must be a VkPhysicalDevice.
pGpuId -- [inout] Pointer to a GpuId that is set to the GPU's id.
- Returns
Upon success, kSuccess is returned and the GpuId pointed to by pGpuId is initialized with the GPU's id associated with the provided graphics device. Otherwise, a failure result code is returned.