diff options
| author | JMC47 <JMC4789@gmail.com> | 2025-06-07 15:51:34 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-07 15:51:34 -0400 |
| commit | 52fcdde4852ccab197092da37b00548e33844d85 (patch) | |
| tree | 02b438f5d1fa1c127f73bdb0a0f12c2678965435 /Source/Core/VideoCommon/Assets/CustomAssetLibrary.h | |
| parent | 5eb61024c6e94b949ce21eac81003b43587fc155 (diff) | |
| parent | c3d3b8153388866117334cdc719889d1f676a16e (diff) | |
Merge pull request #13386 from iwubcode/resource_manager_system
VideoCommon: add resource manager, tracks resources to load assets in optimal way and manage memory
Diffstat (limited to 'Source/Core/VideoCommon/Assets/CustomAssetLibrary.h')
| -rw-r--r-- | Source/Core/VideoCommon/Assets/CustomAssetLibrary.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h b/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h index b4831ea650..2ab8da408c 100644 --- a/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h +++ b/Source/Core/VideoCommon/Assets/CustomAssetLibrary.h @@ -10,10 +10,11 @@ namespace VideoCommon { +class CustomTextureData; struct MaterialData; struct MeshData; struct PixelShaderData; -struct TextureData; +struct TextureAndSamplerData; // This class provides functionality to load // specific data (like textures). Where this data @@ -21,28 +22,21 @@ struct TextureData; class CustomAssetLibrary { public: - using TimeType = std::chrono::system_clock::time_point; - // The AssetID is a unique identifier for a particular asset using AssetID = std::string; struct LoadInfo { - std::size_t m_bytes_loaded = 0; - TimeType m_load_time = {}; + std::size_t bytes_loaded = 0; }; virtual ~CustomAssetLibrary() = default; - // Loads a texture, if there are no levels, bytes loaded will be empty - virtual LoadInfo LoadTexture(const AssetID& asset_id, TextureData* data) = 0; - - // Gets the last write time for a given asset id - virtual TimeType GetLastAssetWriteTime(const AssetID& asset_id) const = 0; + // Loads a texture with a sampler and type, if there are no levels, bytes loaded will be empty + virtual LoadInfo LoadTexture(const AssetID& asset_id, TextureAndSamplerData* data) = 0; - // Loads a texture as a game texture, providing additional checks like confirming - // each mip level size is correct and that the format is consistent across the data - LoadInfo LoadGameTexture(const AssetID& asset_id, TextureData* data); + // Loads a texture, if there are no levels, bytes loaded will be empty + virtual LoadInfo LoadTexture(const AssetID& asset_id, CustomTextureData* data) = 0; // Loads a pixel shader virtual LoadInfo LoadPixelShader(const AssetID& asset_id, PixelShaderData* data) = 0; |
