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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user