MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _texture_alignment

Method _texture_alignment

servers/rendering/rendering_device.cpp:1423–1430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1421}
1422
1423uint32_t RenderingDevice::_texture_alignment(Texture *p_texture) const {
1424 uint32_t alignment = get_compressed_image_format_block_byte_size(p_texture->format);
1425 if (alignment == 1) {
1426 alignment = get_image_format_pixel_size(p_texture->format);
1427 }
1428
1429 return least_common_multiple(alignment, driver->api_trait_get(RDD::API_TRAIT_TEXTURE_TRANSFER_ALIGNMENT));
1430}
1431
1432Error RenderingDevice::_texture_initialize(RID p_texture, uint32_t p_layer, const Vector<uint8_t> &p_data, RDD::TextureLayout p_dst_layout, bool p_immediate_flush) {
1433 Texture *texture = texture_owner.get_or_null(p_texture);

Callers

nothing calls this directly

Calls 2

least_common_multipleFunction · 0.85
api_trait_getMethod · 0.45

Tested by

no test coverage detected