Add renderer frame capture contract

This commit is contained in:
2026-06-02 15:18:04 +02:00
parent d37145660a
commit 818014127a
9 changed files with 138 additions and 14 deletions

View File

@@ -231,6 +231,16 @@ pp::foundation::Result<std::uint64_t> readback_byte_size(TextureDesc desc, Readb
return pp::foundation::Result<std::uint64_t>::success(bytes);
}
pp::foundation::Result<std::uint64_t> frame_capture_byte_size(TextureDesc desc) noexcept
{
if (!desc.render_target) {
return pp::foundation::Result<std::uint64_t>::failure(
pp::foundation::Status::invalid_argument("frame capture source must be a render target"));
}
return texture_byte_size(desc);
}
const char* texture_format_name(TextureFormat format) noexcept
{
switch (format) {