mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-25 18:15:30 +00:00
more descriptive API name
This commit is contained in:
@@ -147,7 +147,7 @@ static int initWebGPU() {
|
||||
WGPUDeviceDescriptor deviceDesc = {};
|
||||
deviceDesc.uncapturedErrorCallbackInfo = errorCB;
|
||||
|
||||
TracyWebGPUSetupDevice(deviceDesc);
|
||||
TracyWebGPUSetupDeviceDescriptor(deviceDesc);
|
||||
|
||||
WGPURequestDeviceCallbackInfo deviceCB = {};
|
||||
deviceCB.mode = WGPUCallbackMode_AllowProcessEvents;
|
||||
|
||||
+1
-1
@@ -1797,7 +1797,7 @@ To stop profiling, call the \texttt{TracyCUDAStopProfiling(ctx)} macro.
|
||||
|
||||
WebGPU support is enabled by including the \texttt{public/tracy/TracyWebGPU.hpp} header file. Both major implementations of WebGPU (Dawn and wgpu-native) are supported.
|
||||
|
||||
Before creating the WebGPU device, make sure to call \texttt{TracyWebGPUSetupDevice()} to let Tracy request the necessary device features and extensions necessary for profiling. After the device is created, use the \texttt{TracyWebGPUContext()} macro to instantiate the necessary \texttt{WebGPUQueueCtx} object required for GPU instrumentation. The object should later be cleaned up with the \texttt{TracyWebGPUDestroy()} macro. To set a custom name for the context, use the \texttt{TracyWebGPUContextName()} macro.
|
||||
Before creating the WebGPU device, make sure to call \texttt{TracyWebGPUSetupDeviceDescriptor()} to let Tracy request the necessary device features and extensions necessary for profiling. After the device is created, use the \texttt{TracyWebGPUContext()} macro to instantiate the necessary \texttt{WebGPUQueueCtx} object required for GPU instrumentation. The object should later be cleaned up with the \texttt{TracyWebGPUDestroy()} macro. To set a custom name for the context, use the \texttt{TracyWebGPUContextName()} macro.
|
||||
|
||||
To instrument a GPU zone, use the various \texttt{TracyWebGPU*Zone*()} macros. Note that WebGPU only offers command instrumentation at the "pass"-level. While command-level granularity is possible through implementation-specific WebGPU extensions, Tracy does not support it at the moment. Supply the corresponding WebGPU pass descriptor to the instrumentation macro \textit{before} creating the WebGPU pass encoder.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#ifndef TRACY_ENABLE
|
||||
|
||||
#define TracyWebGPUSetupDevice(deviceDescriptor)
|
||||
#define TracyWebGPUSetupDeviceDescriptor(deviceDescriptor)
|
||||
|
||||
#define TracyWebGPUContext(instance, device, queue) nullptr
|
||||
#define TracyWebGPUDestroy(ctx)
|
||||
@@ -395,7 +395,7 @@ namespace tracy
|
||||
}
|
||||
|
||||
public:
|
||||
static bool SetupDevice(WGPUDeviceDescriptor& deviceDescriptor)
|
||||
static bool SetupDeviceDescriptor(WGPUDeviceDescriptor& deviceDescriptor)
|
||||
{
|
||||
// TODO: pass features array/size as argument to better allow for repeated calls
|
||||
static constexpr int MaxFeatures = 128;
|
||||
@@ -909,7 +909,7 @@ namespace tracy
|
||||
|
||||
using TracyWebGPUCtx = tracy::WebGPUQueueCtx*;
|
||||
|
||||
#define TracyWebGPUSetupDevice(deviceDescriptor) tracy::WebGPUQueueCtx::SetupDevice(deviceDescriptor)
|
||||
#define TracyWebGPUSetupDeviceDescriptor(deviceDescriptor) tracy::WebGPUQueueCtx::SetupDeviceDescriptor(deviceDescriptor)
|
||||
|
||||
#define TracyWebGPUContext(instance, device, queue) tracy::CreateWebGPUContext(instance, device, queue);
|
||||
#define TracyWebGPUDestroy(ctx) tracy::DestroyWebGPUContext(ctx);
|
||||
|
||||
Reference in New Issue
Block a user