VideoCommon: error if the same asset id is used with a different type

This commit is contained in:
iwubcode
2026-11-04 19:27:06 -06:00
committed by OatmealDome
parent 879d19e9db
commit 3c83881413
6 changed files with 49 additions and 11 deletions

View File

@@ -26,6 +26,9 @@ CustomAsset::TimeType TextureDataResource::GetLoadTime() const
Resource::TaskComplete TextureDataResource::CollectPrimaryData()
{
if (!m_texture_asset) [[unlikely]]
return Resource::TaskComplete::Error;
const auto last_load_time = m_texture_asset->GetLastLoadedTime();
const auto asset = m_texture_asset->GetData();
if (!asset)
@@ -38,11 +41,15 @@ Resource::TaskComplete TextureDataResource::CollectPrimaryData()
void TextureDataResource::MarkAsActive()
{
if (!m_texture_asset) [[unlikely]]
return;
m_resource_context.asset_cache->MarkAssetActive(m_texture_asset);
}
void TextureDataResource::MarkAsPending()
{
if (!m_texture_asset) [[unlikely]]
return;
m_resource_context.asset_cache->MarkAssetPending(m_texture_asset);
}
} // namespace VideoCommon