Celtoys / Remotery

Single C file, Realtime CPU/GPU Profiler with Remote Web Viewer
Apache License 2.0
3.03k stars 255 forks source link

Duplicate function bodies with both D3D12 and Vulkan enabled #257

Closed Helco closed 5 months ago

Helco commented 5 months ago

When I try to compile Remotery with both D3D12 and Vulkan support enabled, I get the compiler error

error C2084: function 'rmtError AllocQueryPair(D3D12BindImpl *,rmtAtomicU32 *)' already has a body

If I just rename them to AllocD3D12QueryPair and AllocVulkanQueryPair respectively equal errors come up for CopyTimestamps.

Was this just an oversight or does Remotery generally not support multiple GPU APIs enabled?

Celtoys commented 5 months ago

Remotery should be happy supporting multiple GPU APIs, I just don't believe I've ever compiled it as such. Renaming the offending functions would be the perfect solution, if that's all it takes to fix.

Note that the CPU and GPU APIs are effectively different platforms so all the backend code definitely supports multiple compiled APIs, even at runtime.