CARB_PROFILE_CREATE_GPU_CONTEXT

Defined in carb/profiler/Profile.h

CARB_PROFILE_CREATE_GPU_CONTEXT(name, correlatedCpuTimestampNs, correlatedGpuTimestamp, gpuTimestampPeriodNs, graphicApi)

Create a new GPU profiling context that allows injecting timestamps coming from a GPU in a deferred manner.

Parameters
  • name – name of the context

  • correlatedCpuTimestampNs – correlated GPU clock timestamp (in ns)

  • correlatedGpuTimestamp – correlated GPU clock timestamp (raw value)

  • gpuTimestampPeriodNs – is the number of nanoseconds required for a GPU timestamp query to be incremented by 1.

  • graphicApi – string of graphic API used [‘vulkan’/’d3d12’]

Returns

a valid ID or kInvalidGpuContextId if creation fails