Extend Optick GPUContextScope() with typeless prototype for runtime selection of graphics API

This commit is contained in:
Stephen Saunders 2023-05-12 02:40:05 -04:00
parent 6769126b14
commit 7c4f41bfd5

View file

@ -796,6 +796,12 @@ struct OPTICK_API GPUContextScope
prevContext = SetGpuContext(GPUContext(cmdBuffer, queue, node));
}
// SRS - add typeless void* commandHandle prototype to support runtime selection of graphics API
GPUContextScope(void* commandHandle, GPUQueueType queue = GPU_QUEUE_GRAPHICS, int node = 0)
{
prevContext = SetGpuContext(GPUContext(commandHandle, queue, node));
}
~GPUContextScope()
{
SetGpuContext(prevContext);