diff --git a/aurora/lib/gfx/gx.cpp b/aurora/lib/gfx/gx.cpp index 68df28e08..08d98f15d 100644 --- a/aurora/lib/gfx/gx.cpp +++ b/aurora/lib/gfx/gx.cpp @@ -1279,7 +1279,12 @@ void shutdown() noexcept { // TODO we should probably store this all in g_state.gx instead sUniformBindGroupLayouts.clear(); sTextureBindGroupLayouts.clear(); - g_gxState.textures.fill({}); + for (auto& item : g_gxState.textures) { + item.texObj.ref.reset(); + } + for (auto& item : g_gxState.tluts) { + item.ref.reset(); + } g_gxCachedShaders.clear(); }