Struct ProgramCache
Defined in File shader-mgr.h
Inheritance Relationships
Base Types
public CE::Assets::Cache::Store< CE::Rendering::Resources::Program >(Template Struct Store)public CE::State::Singleton< ProgramCache >(Template Class Singleton)
Struct Documentation
-
struct ProgramCache : public CE::Assets::Cache::Store<CE::Rendering::Resources::Program>, public CE::State::Singleton<ProgramCache>
Declaration:
finalRetained linked programs under exact path keys.
Load/reload on the active provider/loading owner; borrowed inputs are needed only through the call. Camera/draw state is mutable program access on the backend owner.
Public Functions
-
ProgramCache() = default
Create an empty linked-program cache sharing the global provider/loading-owner policy.
-
~ProgramCache() override = default
Drop cache ownership; retained frames/readers keep their own executable handles.
-
void load(const std::filesystem::path &key, const std::vector<std::filesystem::path> &stages, CE::Rendering::Resources::Provider &provider)
Verify/bind the active loading owner and link only an absent exact key.
- Parameters:
key – Exact path cache identity, not a source-file scan request.
stages – Stage paths borrowed through synchronous compilation.
provider – Active backend on its owner/current context. Existing entries skip linking; missing entries use reload() semantics. Provider/file/compile/link/allocation errors propagate.
-
void reload(const std::filesystem::path &key, const std::vector<std::filesystem::path> &stages, CE::Rendering::Resources::Provider &provider)
Link a complete candidate before replacing/inserting one executable generation.
- Parameters:
key – Exact cache identity.
stages – Stage files borrowed through the call.
provider – Active loading-owner backend. Null programs throw failed_operation; linking/publication failures preserve the previous entry. Existing readers retain their old handles and mutable program operations still obey backend affinity.
-
ProgramCache() = default