1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:57:35 +00:00

LibSoftGPU: Add method to copy texels between images

Adds a method `copy_texels()` to class `Image` that copies a rect of
texels from source image to destination.
This commit is contained in:
Stephan Unverwerth 2021-12-23 14:13:09 +01:00 committed by Brian Gianforcaro
parent 5e9d99474d
commit c72a996542
2 changed files with 24 additions and 0 deletions

View file

@ -41,6 +41,7 @@ public:
void write_texels(unsigned layer, unsigned level, Vector3<unsigned> const& offset, Vector3<unsigned> const& size, void const* data, ImageDataLayout const& layout);
void read_texels(unsigned layer, unsigned level, Vector3<unsigned> const& offset, Vector3<unsigned> const& size, void* data, ImageDataLayout const& layout) const;
void copy_texels(Image const& source, unsigned source_layer, unsigned source_level, Vector3<unsigned> const& source_offset, Vector3<unsigned> const& size, unsigned destination_layer, unsigned destination_level, Vector3<unsigned> const& destination_offset);
private:
void const* texel_pointer(unsigned layer, unsigned level, unsigned x, unsigned y, unsigned z) const