Add renderer texture copy command
This commit is contained in:
@@ -489,6 +489,28 @@ pp::foundation::Result<std::uint64_t> frame_capture_byte_size(TextureDesc desc)
|
||||
return texture_byte_size(desc);
|
||||
}
|
||||
|
||||
pp::foundation::Status validate_texture_copy_descs(
|
||||
TextureDesc source,
|
||||
ReadbackRegion source_region,
|
||||
TextureDesc destination,
|
||||
ReadbackRegion destination_region) noexcept
|
||||
{
|
||||
if (source.format != destination.format) {
|
||||
return pp::foundation::Status::invalid_argument("texture copy endpoints must use matching formats");
|
||||
}
|
||||
|
||||
if (source_region.width != destination_region.width || source_region.height != destination_region.height) {
|
||||
return pp::foundation::Status::invalid_argument("texture copy regions must have matching dimensions");
|
||||
}
|
||||
|
||||
const auto source_status = validate_readback_region(source, source_region);
|
||||
if (!source_status.ok()) {
|
||||
return source_status;
|
||||
}
|
||||
|
||||
return validate_readback_region(destination, destination_region);
|
||||
}
|
||||
|
||||
pp::foundation::Status validate_blit_filter(BlitFilter filter) noexcept
|
||||
{
|
||||
switch (filter) {
|
||||
|
||||
Reference in New Issue
Block a user