Liveness and completion that the browser side of one logical device publishes into memory its owning thread can read, so that thread answers its ownership, loss and completion queries without a synchronous browser call. More...
#include "donner/gpu/browser/BrowserBridge.h"
Public Attributes | |
| std::atomic< uint32_t > | status {kUnpublished} |
| One of kUnpublished, kLive or kLost. | |
| std::atomic< uint64_t > | completedSerial {0} |
| Serial of the most recent submission the browser has reported finished. | |
Static Public Attributes | |
| static constexpr uint32_t | kUnpublished = 0 |
| Status before the browser side has published anything: every query asks the browser. | |
| static constexpr uint32_t | kLive = 1 |
| Status of an owned, live device. | |
| static constexpr uint32_t | kLost = 2 |
| Status of an owned device the browser has reported lost. Permanent. | |
Liveness and completion that the browser side of one logical device publishes into memory its owning thread can read, so that thread answers its ownership, loss and completion queries without a synchronous browser call.
The browser side stores each value with a sequentially consistent atomic store, after the state it reports has changed, from the same browser task that changed it; readers load with acquire. A loaded value is therefore one the browser side held at or before the load, never one it has not reached yet, which keeps every stale read conservative:
The browser side stops storing when the logical device is released, which the bridge's destructor does before the bridge, and this state inside it, goes away. Reading it is not a browser call, so a read after the GPU owner has stopped does not fail closed by itself; the reader's next browser call does.