tiny.tracy.GpuContext
Defined in tiny.tracy.
API (16)
Actions
Public operations.
annotateannotationNamecalibratenextQuerysetNamesynctimezonezoneAtzoneColorzoneColorAtzoneDynamiczoneQueryzoneQueryAt
Fields and members
Public fields and members.
Source
Source: lib/tracy/src/runtime.zig:155
zig
pub const GpuContext = struct { id: u32 = 0, active: bool = false, pub inline fn zone(self: GpuContext, comptime name: [:0]const u8) GpuZone { return self.zoneAt(name, @src()); } pub inline fn zoneAt(self: GpuContext, comptime name: [:0]const u8, comptime src: std.builtin.SourceLocation) GpuZone { if (enabled and self.active) return global.beginGpuZone(self.id, name, src, null, 0); return .{}; } pub inline fn zoneColor(self: GpuContext, comptime name: [:0]const u8, comptime color: u32) GpuZone { return self.zoneColorAt(name, color, @src()); } pub inline fn zoneColorAt(self: GpuContext, comptime name: [:0]const u8, comptime color: u32, comptime src: std.builtin.SourceLocation) GpuZone { if (enabled and self.active) return global.beginGpuZone(self.id, name, src, color, 0); return .{}; } pub inline fn zoneQuery(self: GpuContext, comptime name: [:0]const u8, query: u32) GpuZone { return self.zoneQueryAt(name, query, @src()); } pub inline fn zoneQueryAt(self: GpuContext, comptime name: [:0]const u8, query: u32, comptime src: std.builtin.SourceLocation) GpuZone { if (enabled and self.active) return global.beginGpuZone(self.id, name, src, null, query); return .{}; } pub inline fn zoneDynamic(self: GpuContext, name: []const u8) GpuZone { if (enabled and self.active) return global.beginGpuZoneDynamic(self.id, name, 0); return .{}; } pub inline fn setName(self: GpuContext, name: []const u8) void { if (enabled and self.active) global.gpuContextName(self.id, name); } pub inline fn nextQuery(self: GpuContext) u32 { if (enabled and self.active) return global.nextGpuQuery(); return 0; } pub inline fn time(self: GpuContext, query: u32, gpu_time: i64) void { if (enabled and self.active) global.gpuTime(self.id, query, gpu_time); } pub inline fn sync(self: GpuContext, gpu_time: i64) void { if (enabled and self.active) global.gpuTimeSync(self.id, gpu_time); } pub inline fn calibrate(self: GpuContext, gpu_time: i64, cpu_delta_ns: i64) void { if (enabled and self.active) global.gpuCalibration(self.id, gpu_time, cpu_delta_ns); } pub inline fn annotationName(self: GpuContext, id: i64, name: []const u8) void { if (enabled and self.active) global.gpuAnnotationName(self.id, id, name); } pub inline fn annotate(self: GpuContext, id: i64, value: f64) void { if (enabled and self.active) global.gpuAnnotation(self.id, 0, id, value); }};Source: lib/tracy/src/root.zig:73
zig
pub const GpuContext = runtime.GpuContext;Audit
| Definitions | 15 |
|---|---|
| Public names | 15 |
| Members | 2 |
| Version | 26.7.0 |
| Revision | daab053ee433 |