redesign...

This commit is contained in:
Marcos Slomp
2026-05-12 10:47:08 -07:00
parent 0091a6b0a8
commit 7951f9a8db
2 changed files with 439 additions and 476 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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 } );
}