38 lines
1.2 KiB
Markdown
38 lines
1.2 KiB
Markdown
---
|
||
title: PSO Precache机制笔记
|
||
date: 2025-02-08 20:42:16
|
||
excerpt:
|
||
tags:
|
||
rating: ⭐
|
||
---
|
||
# 前言
|
||
- 视频
|
||
- [Unreal Engine 5: Setup Precompiling Shaders (Bundled PSO's)](https://www.youtube.com/watch?v=NVoXDgXKS5k)
|
||
- [Unreal Engine 5: Show Number Of Compiling Shaders](https://www.youtube.com/watch?v=8h1k2ViADgU)
|
||
- 文章
|
||
- [UE5.3] PSO Cache&PreCache 源码阅读:https://zhuanlan.zhihu.com/p/679832250
|
||
- [UE5.3] PSO Cache&PreCache 源码阅读(二):https://zhuanlan.zhihu.com/p/681803986
|
||
- Unreal Engine 5.2 MeshPass拓展:https://zhuanlan.zhihu.com/p/671423486
|
||
- 优化UE5的PSO卡顿:FileCache,PreCache和异步PSO https://zhuanlan.zhihu.com/p/1898646962561094034
|
||
|
||
# BundledPSO
|
||
可以使用启动命令参数来清除PSO缓存。
|
||
- 启动参数
|
||
- -logPSO
|
||
- -clearPSODriverCache
|
||
- 命令行
|
||
- r.ShaderPipelineCache.Enable=1
|
||
|
||
# 执行链
|
||
- FGraphEventArray UPrimitiveComponent::PrecachePSOs()
|
||
- void UMaterialInterface::InitDefaultMaterials()
|
||
- UMaterial::PrecachePSOs
|
||
|
||
UMaterial::PrecachePSOs => **MaterialResource->CollectPSOs()** => PrecacheMaterialPSOs() => PrecachePSOs() => CollectPSOs() => CollectPSOInitializers()
|
||
|
||
# CollectPSOInitializers()
|
||
接口IPSOCollector::CollectPSOInitializers()
|
||
|
||
## 其他MeshProcessor实现
|
||
|