The facts a backend supplies about its own buffers so BufferMappingTable can decide when a mapping is readable and which bytes it names. More...
#include "donner/gpu/BufferMappingTable.h"
Public Member Functions | |
| virtual | ~BufferMappingHost ()=default |
| Virtual destructor; the table never owns a host. | |
| virtual std::span< const uint8_t > | mappableBytes (uint32_t bufferSlotIndex) const =0 |
| Host-visible bytes of a live buffer slot, or an empty span when the slot holds no live mappable allocation. | |
| virtual uint64_t | completedSubmissionSerial () const =0 |
| Highest submission serial the device has completed. A backend publishes a submission's failure, through deviceLost, before the serial that completes it. | |
| virtual MapWaitKind | waitForSubmission (uint64_t serial, double sliceSeconds)=0 |
Waits at most sliceSeconds for serial to complete, and reports how it spent the slice. | |
| virtual bool | deviceLost () const =0 |
| Whether the device has taken a terminal failure, after which no submission can ever complete. | |
The facts a backend supplies about its own buffers so BufferMappingTable can decide when a mapping is readable and which bytes it names.
Only these four answers are backend-specific. When a range is ready, what a stale or invalidated handle does, and which error a caller sees are decisions the table makes for every backend, so two backends cannot drift into two different mapping contracts.
|
pure virtual |
Host-visible bytes of a live buffer slot, or an empty span when the slot holds no live mappable allocation.
The span aliases the backend's allocation and stays valid only while that allocation does, so the table re-asks rather than caching it.
| bufferSlotIndex | Slot of the buffer. |
|
pure virtual |
Waits at most sliceSeconds for serial to complete, and reports how it spent the slice.
Whether the submission completed is not reported here: the table re-reads readiness afterwards anyway, because a wait hands control to the backend and the mapped buffer can be retired while the slice is blocked. What only this call can say is whether it blocked on a completion signal or rechecked readiness itself, which is the difference the readback statistics carry.
| serial | Submission serial to wait for. |
| sliceSeconds | Longest this call may block; zero polls without calling the host wait. |