perf: 降低 Desktop Duplication 捕获模式的 GPU 占用

This commit is contained in:
Xu Liu 2022-04-10 18:53:24 +08:00
commit dba3c5566f
8 changed files with 105 additions and 57 deletions

View file

@ -18,7 +18,7 @@ static constexpr const size_t MAX_CACHE_COUNT = 128;
// 缓存版本
// 当缓存文件结构有更改时将更新它,使得所有旧缓存失效
static constexpr const UINT CACHE_VERSION = 5;
static constexpr const UINT CACHE_VERSION = 6;
// 缓存的压缩等级
static constexpr const int CACHE_COMPRESSION_LEVEL = 1;
@ -148,7 +148,7 @@ void serialize(Archive& ar, EffectPassDesc& o) {
template<typename Archive>
void serialize(Archive& ar, EffectDesc& o) {
ar& o.name& o.outSizeExpr& o.params& o.textures& o.samplers& o.passes& o.flags;
ar& o.name& o.outSizeExpr& o.params& o.textures& o.samplers& o.passes& o.flags& o.isUseDynamic;
}
void EffectCacheManager::_AddToMemCache(const std::wstring& cacheFileName, const EffectDesc& desc) {