Skip to content

Commit

Permalink
Update NativeClient.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
rdw-software committed Feb 5, 2024
1 parent 46192c1 commit abce044
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Core/NativeClient/NativeClient.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@ function NativeClient:StartRenderLoop()
self.fpsDisplayTicker = C_Timer.NewTicker(2500, function()
print(PerformanceMetricsOverlay:GetFormattedMetricsString())
PerformanceMetricsOverlay:StartMeasuring()
local report = ffi.new("WGPUGlobalReport")
require("webgpu").bindings.wgpu_generate_report(Renderer.wgpuInstance, report)
printf("Global report for backend type %s:", report.backendType)
printf([[Surfaces:
Allocated: %d
Kept: %d
Released: %d
Error: %d
Count: %d
]],
report.surfaces.numAllocated,
report.surfaces.numKeptFromUser,
report.surfaces.numReleasedFromUser,
report.surfaces.numError,
report.surfaces.elementSize
)
end)

while glfw.bindings.glfw_window_should_close(self.mainWindow) == 0 do
Expand Down

0 comments on commit abce044

Please sign in to comment.