Plugin crashes during startup when `-RHIValidation` is enabled
Observed in Unreal Engine 5.4 and 5.5; I haven't tested older versions to see how they differ.
When -RHIValidation is passed to the engine, the GDynamicRHI global variable points at a proxy RHI implementation.
However, the XeSS Unreal Plugin in several places tries to static_cast<...>(GDynamicRHI), which produces an invalid result and crashes when -RHIValidation is in-use.
Instead, I believe it is safe all the way back to 4.27 to use static_cast<...>(GDynamicRHI->GetNonValidationRHI()).
Thank you for reporting, we'll investigate the issue, and fix it in the next release.
GDynamicRHI->GetNonValidationRHI() should be introduced in Unreal 5.0, but we still need to support Unreal 4.26 and 4.27.
To make it simple, we can disable XeSS when -RHIValidation is used, another reason is that we don't do plugin tests with -RHIValidation.
does it work for you? @TBBle
The issue has been fixed, and will be available in the next release, thank you for reporting!
Fixed in https://github.com/GameTechDev/XeSSUnrealPlugin/releases/tag/v2.2.0