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:
Stuart Carnie
2025-07-09 07:52:44 +10:00
parent 36b92128b1
commit a281e91c5a
9 changed files with 253 additions and 191 deletions

View File

@@ -347,7 +347,6 @@ public:
uint32_t texture_upload_region_size_px = 0;
uint32_t texture_download_region_size_px = 0;
Vector<uint8_t> _texture_get_data(Texture *tex, uint32_t p_layer, bool p_2d = false);
uint32_t _texture_layer_count(Texture *p_texture) const;
uint32_t _texture_alignment(Texture *p_texture) const;
Error _texture_initialize(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, RDD::TextureLayout p_dst_layout, bool p_immediate_flush);