在mobile管线中,除了之前发现的SKM在pso收集处顶点声明逻辑和渲染逻辑不一致之外,还发现了类型的问题;
比如说NiagaraComponent收集PSO 数据的时候,顶点格式有这句,所以是9个顶点字段属性,而渲染时生成的顶点时,bAddPrimitiveIDElment 为false的时候,就只有8个顶点字段属性,
[Image Removed]
[Image Removed]
所以和case 1 类似,收集psocache顶点声明 和 渲染收集时候顶点声明的逻辑 两边没对齐,触发了missed;代码对齐之后 miss消除; 类似的问题还有,请问这是ue引擎在mobile管线中,pso 收集时候的bug吗?
Liu.Wei
(Liu.Wei)
2
Hi,
你好,bAddPrimitiveIDElment 为false好像是UseGPUScene返回false的时候,所以这总情况好像都不会添加PrimitiveIdStream?
你是想说比如在Android平台,UseGPUScene和PlatformGPUSceneUsesUniformBufferView都返回了true,所以Precache收集的时候没有PrimitiveIdStream,但是InitRHI的时候,因为bAddPrimitiveIDElment是true,所以带上了这个stream?
方便的话把复现的方式尽量描述清楚,我可以跟开发的同学反馈,感谢。
你好 我反馈这个问题的关键是,在mobile管线下,会产生一种类型的pso miss(如下所示,AttributeIndex13缓存了但是实际渲染没用),通过代码追踪,发现产生这个miss的关键渲染流程和收集pso流程逻辑不一致导致;
PSO PRECACHING MISS:
Type: MinimalPSOState
PSOPrecachingState: Missed
Material: MI_RimGlow_02
VertexFactoryType: FNiagaraMeshVertexFactory
MDCStatsCategory: NiagaraComponent
PassName: TranslucencyStandard
Shader Hashes:
VertexShader: B85E83D2728883BCE4629E8E0E29AF4AC6C14BC8
PixelShader: AD6BEDCB41EEFF0B4F6C1279A4FFC2E94CFC5DF4
ShadersOnly precache information:
Material: MI_RimGlow_02
VertexFactoryType: FNiagaraMeshVertexFactory
PassName: TranslucencyStandard
Missed Info:
- Found PSO With same shaders & different state:
VertexFactoryType: FNiagaraMeshVertexFactory
PassName: TranslucencyStandard
Differences:
- VertexDeclaration different:
- VertexElement 8 precached but not requested:
StreamIndex: 4
Offset: 0
Type: 20
AttributeIndex: 13
Stride: 4
bUseInstanceIndex: 1
具体如下:
收集PSO 数据的时候,顶点格式有这句,所以是9个顶点字段属性, AttributeIndex13包括其中
[Image Removed]渲染时生成的顶点时,是否启用 AttributeIndex13的逻辑是这样判断的,从逻辑来看,移动端的AttributeIndex13是永远禁止启用的
[Image Removed]这导致了pso miss的产生,pso miss导致了游戏的卡顿,我们要消除这些miss,我的问题是,上面这种逻辑不一致的问题,是ue的bug吗?现在产生的这种pso miss会卡顿游戏
Liu.Wei
(Liu.Wei)
4