mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-13 07:33:34 +00:00
fixing allocation issues with texts
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/03/31 18:03:35 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/11 01:20:29 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/18 10:18:22 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -155,6 +155,7 @@ namespace mlx
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
Image::destroy();
|
||||
_set.destroy();
|
||||
if(_buf_map.has_value())
|
||||
_buf_map->destroy();
|
||||
_vbo.destroy();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/07 16:40:09 by maldavid #+# #+# */
|
||||
/* Updated: 2023/12/31 00:52:01 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/18 10:18:08 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -51,5 +51,6 @@ namespace mlx
|
||||
void TextureAtlas::destroy() noexcept
|
||||
{
|
||||
Image::destroy();
|
||||
_set.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/04/07 16:36:33 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/08 21:42:31 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/18 02:47:30 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -30,7 +30,8 @@ namespace mlx
|
||||
void destroy() noexcept override;
|
||||
|
||||
inline void setDescriptor(DescriptorSet&& set) noexcept { _set = set; }
|
||||
inline VkDescriptorSet getSet() noexcept { return _set.isInit() ? _set.get() : VK_NULL_HANDLE; }
|
||||
inline VkDescriptorSet getVkSet() noexcept { return _set.isInit() ? _set.get() : VK_NULL_HANDLE; }
|
||||
inline DescriptorSet getSet() noexcept { return _set; }
|
||||
inline void updateSet(int binding) noexcept { _set.writeDescriptor(binding, *this); _has_been_updated = true; }
|
||||
inline bool hasBeenUpdated() const noexcept { return _has_been_updated; }
|
||||
inline constexpr void resetUpdate() noexcept { _has_been_updated = false; }
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/01/25 11:59:07 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/07 01:17:54 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/18 09:47:26 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -252,16 +252,16 @@ namespace mlx
|
||||
void Image::destroy() noexcept
|
||||
{
|
||||
// not creating destroyer in `create` as some image may be copied (and so `this` will be invalid)
|
||||
CmdResource::setDestroyer([this]()
|
||||
{
|
||||
//CmdResource::setDestroyer([this]()
|
||||
//{
|
||||
destroySampler();
|
||||
destroyImageView();
|
||||
|
||||
if(_image != VK_NULL_HANDLE)
|
||||
Render_Core::get().getAllocator().destroyImage(_allocation, _image);
|
||||
_image = VK_NULL_HANDLE;
|
||||
});
|
||||
CmdResource::requireDestroy();
|
||||
//});
|
||||
//CmdResource::requireDestroy();
|
||||
}
|
||||
|
||||
uint32_t formatSize(VkFormat format)
|
||||
|
||||
Reference in New Issue
Block a user