Scene_GPUScene_GPUSceneInstanceSceneData[Index] GPU Page Fault Crash

我们遇到了不少​Scene_GPUScene_GPUSceneInstanceSceneData[Index]的GPU崩溃,类似的崩溃出现在BasePassPixelShader.dxil和DepthOnlyVertexShader.dxil等多个地方。

​虽然我们通过将部分SSBO改为Texture规避了一部分崩溃,这个崩溃问题仍然不能根除。

[Image Removed]

​我看到有别的团队(UE5.4)也问了相同的问题,我看了一下应该和我们遇到的问题是相同的问题​

[Content removed]

之前也注意到有个团队在UE5.6版本也咨询了这个问题,但是后面他们的帖子转为私密,就无法看到后续了。

[Attachment Removed]

没有重现步骤

[Attachment Removed]

Hi,

你好,他们帖子后续转为了一个Jira,但是只有目前并没有修复,也没有看到后续有任何类似的问题,Fortnite没有类似的问题,所以怀疑新版本的某些改动修复了,我找到几个可能相关的,可以参考一下。

CL 46204395

https://github.com/EpicGames/UnrealEngine/commit/8fed94096341a1e77a13a5a8cf48e800e1ba29fc

[GPUScene] Fixed race condition in when re-allocating instances in a single frame by splitting the clear and set (new primitive ID) steps into two kernels with a barrier in between.

CL 48949840

https://github.com/EpicGames/UnrealEngine/commit/755bc3b816eb1e711add3d0ded667feb3fcc70ce

SkyAtmospehre \- fix for race condition with light setup and gpuscene light data copy.

CL 46513311

https://github.com/EpicGames/UnrealEngine/commit/96eab839f0027d77a8553c865ecb33eb4503e9b4

Prevented crash on instance upload for scenes with too many instances by skipping upload for instances outside the instance data buffer.

CL 39113397

https://github.com/EpicGames/UnrealEngine/commit/aea2bfd06791382c6fddff9706f933d205a813e7

Convert a check() to an if( ensure() ) to see if we can catch a possible out\-of\-range index causing a live crash (most likely only in the mobile renderer) I can't reproduce internally.

CL 39786520

https://github.com/EpicGames/UnrealEngine/commit/7f82fc02c65c75e37cc13103ae26352cacaddce7

MaxBufferDimensions fixed

[Attachment Removed]

Hi,

你好,谢谢你的回答。

CL 46204395

CL 46513311

以上这两个CL我们之前已经合入,但问题依然存在。我们会参考一下其余的三个CL。

另外我几个月前关注到有另外的团队(他们使用UE5.6)也咨询了类似问题,但后面他们的帖子后面转为了私密状态,只记得问题标题是“GPU crash in LoadPrimitivePrimitiveSceneDataElement() while rendering Nanite”,据他们描述他们遇到的问题只出现在50系显卡上,或许和我们遇到的问题原因不太一样,请问他们有什么进展吗?

最后请问这种问题有什么好的debug方法和思路吗?拿到GPU Dump以后我们做了不少尝试,但真正有效的工作就是用Texture替换了部分SSBO,但目前仍然无法定位问题的真正原因。

[Attachment Removed]

关于另个团队的问题,你有链接吗?因为中国地区权限的问题,凡是confidential,并且没有分到中国区的,我也搜索不到…,如果有链接的话,我可以让总部同事帮我看看情况。

这种问题表面上看,如果是GPUScene访问越界,可以试试在shader里加一些check,或者设置r.Shaders.CheckLevel 2,会触发CheckSlow,不过有些地方是误报,(checkSlow(VSM_PSD_OFFSET_LIGHT_TYPE == (CurrentLoadOffset - VSMOffset)); 移上去一行就好了),把崩溃时有问题的数值通过范围检查,判断一下是否越界。然后再看看是否可以通过cpu,还是gpu来约束 修正这些访问数据。

[Attachment Removed]

链接可能是这个

[Content removed]

[Attachment Removed]