Loading...
Searching...
No Matches
ReadbackStats.hpp
1#pragma once
2#include <score_plugin_gfx_export.h>
3
4#include <atomic>
5#include <cstdint>
6
7namespace score::gfx
8{
9// Counts the GPU -> CPU buffer readbacks the render graph issues itself, so a
10// test can assert that a pipeline built entirely on the GPU never stalls on
11// one. A relaxed increment per readback, which already costs a frame sync.
12//
13// `data` is a readback whose bytes the CPU then uses (the raw raster
14// indirect-draw fallback). `flush` is one whose bytes are thrown away and
15// that only exists to make QRhi flush pending host writes (the Metal native
16// copy path): it does not stall the frame.
18{
19 std::atomic<uint64_t> data{0};
20 std::atomic<uint64_t> flush{0};
21};
22
23SCORE_PLUGIN_GFX_EXPORT ReadbackStats& readbackStats() noexcept;
24}
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
Definition ReadbackStats.hpp:18