| 1936 | } |
| 1937 | |
| 1938 | void RenderingDevice::_texture_clear(RID p_texture_rid, Texture *p_texture, const Color &p_color, uint32_t p_base_mipmap, uint32_t p_mipmaps, uint32_t p_base_layer, uint32_t p_layers) { |
| 1939 | _check_transfer_worker_texture(p_texture); |
| 1940 | |
| 1941 | RDD::TextureSubresourceRange range; |
| 1942 | range.aspect = p_texture->read_aspect_flags; |
| 1943 | range.base_mipmap = p_texture->base_mipmap + p_base_mipmap; |
| 1944 | range.mipmap_count = p_mipmaps; |
| 1945 | range.base_layer = p_texture->base_layer + p_base_layer; |
| 1946 | range.layer_count = p_layers; |
| 1947 | |
| 1948 | // Indicate the texture will get modified for the shared texture fallback. |
| 1949 | _texture_update_shared_fallback(p_texture_rid, p_texture, true); |
| 1950 | |
| 1951 | if (_texture_make_mutable(p_texture, p_texture_rid)) { |
| 1952 | // The texture must be mutable to be used as a clear destination. |
| 1953 | draw_graph.add_synchronization(); |
| 1954 | } |
| 1955 | |
| 1956 | draw_graph.add_texture_clear(p_texture->driver_id, p_texture->draw_tracker, p_color, range); |
| 1957 | } |
| 1958 | |
| 1959 | Vector<uint8_t> RenderingDevice::_texture_get_data(Texture *tex, uint32_t p_layer, bool p_2d) { |
| 1960 | uint32_t width, height, depth; |
nothing calls this directly
no test coverage detected