mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Metal: Fix texture_get_data other linear formats
Introduce a specialised `texture_get_data` for `RenderDeviceDriver`, which can retrieve the texture data from the GPU driver for shared textures (`TEXTURE_USAGE_CPU_READ_BIT`). Closes #108115
This commit is contained in:
parent
36b92128b1
commit
a281e91c5a
9 changed files with 253 additions and 191 deletions
|
|
@ -271,6 +271,8 @@ public:
|
|||
virtual void texture_free(TextureID p_texture) = 0;
|
||||
virtual uint64_t texture_get_allocation_size(TextureID p_texture) = 0;
|
||||
virtual void texture_get_copyable_layout(TextureID p_texture, const TextureSubresource &p_subresource, TextureCopyableLayout *r_layout) = 0;
|
||||
// Returns the data of a texture layer for a CPU texture that was created with TEXTURE_USAGE_CPU_READ_BIT.
|
||||
virtual Vector<uint8_t> texture_get_data(TextureID p_texture, uint32_t p_layer) = 0;
|
||||
virtual uint8_t *texture_map(TextureID p_texture, const TextureSubresource &p_subresource) = 0;
|
||||
virtual void texture_unmap(TextureID p_texture) = 0;
|
||||
virtual BitField<TextureUsageBits> texture_get_usages_supported_by_format(DataFormat p_format, bool p_cpu_readable) = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue