donner::gpu::Device - the abstract GPU device with shared fail-closed validation.
More...
#include <chrono>
#include <cstdint>
#include <format>
#include <functional>
#include <memory>
#include <optional>
#include <span>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>
#include "donner/base/SmallVector.h"
#include "donner/base/Utils.h"
#include "donner/gpu/Commands.h"
#include "donner/gpu/Descriptors.h"
#include "donner/gpu/DeviceLost.h"
#include "donner/gpu/DeviceObserver.h"
#include "donner/gpu/GpuLimits.h"
#include "donner/gpu/GpuResult.h"
#include "donner/gpu/Handles.h"
#include "donner/gpu/TextureExport.h"
donner::gpu::Device - the abstract GPU device with shared fail-closed validation.
◆ donner::gpu::Device::MapWaitTestHooks
| struct donner::gpu::Device::MapWaitTestHooks |
Test seam for donner::gpu::Device::waitForMapping. Production callers pass none; a test injects a clock and a rest so a budget is verified deterministically and without spending it.
| Class Members |
|
function< time_point()> |
now |
Clock the budget is measured against. Defaults to std::chrono::steady_clock::now. |
|
function< void(microseconds)> |
rest |
Rests for the given duration. Defaults to std::this_thread::sleep_for. |
◆ ValidateTexelCopyInternal()
Internal: validates a texel copy layout against a copy extent and format, and returns the exclusive end byte offset the copy requires in the buffer or host memory it describes.
Shared by Device::writeTexture and CommandEncoder::copyTextureToBuffer; not part of the public API.
- Parameters
-
| layout | Row layout to validate (256-aligned bytesPerRow covering one row, and rowsPerImage covering the copy height). |
| copySize | Copy extent in texels. |
| format | Texel format of the texture side of the copy. |
| context | Operation name for diagnostics. |