mirror of
https://github.com/wolfpld/tracy.git
synced 2026-06-08 08:33:48 +00:00
redesign...
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1033,14 +1033,14 @@ PYBIND11_MODULE( TracyServerBindings, m )
|
||||
// --- GPU contexts ---
|
||||
.def( "get_gpu_contexts", []( const Worker& w ) {
|
||||
static const char* gpuTypeStr[] = {
|
||||
"Invalid", "OpenGL", "Vulkan", "OpenCL", "Direct3D12", "Direct3D11", "Metal", "Custom", "CUDA", "Rocprof" };
|
||||
"Invalid", "OpenGL", "Vulkan", "OpenCL", "Direct3D12", "Direct3D11", "Metal", "Custom", "CUDA", "Rocprof", "WebGPU" };
|
||||
std::vector<GpuContextSummary> result;
|
||||
for( const auto* ctx : w.GetGpuData() )
|
||||
{
|
||||
if( !ctx ) continue;
|
||||
const std::string name = ctx->name.Active() ? w.GetString( ctx->name ) : "";
|
||||
const uint8_t typeIdx = (uint8_t)ctx->type;
|
||||
const char* typeStr = typeIdx < 10 ? gpuTypeStr[typeIdx] : "Unknown";
|
||||
const char* typeStr = typeIdx < 11 ? gpuTypeStr[typeIdx] : "Unknown";
|
||||
result.push_back( GpuContextSummary{
|
||||
name, ctx->count, std::string( typeStr ), ctx->thread } );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user