We’re using this UDN guide to make our cooks deterministic: [Deterministic Builds and [Content removed]
We’re also using the -diffonly flag to investigate specific issues.
When doing a binary comparison between two cooks, we’re running into some issues that we can repro in a stock UE 5.5.4 build using the EngineTest project.
The set of nondeterministic files is always the same, noted in the screenshot below. Of most concern is the ushaderbytecode differences, but I’m also interested in any insights into the .uexp file differences in the test folder.
Are differences in the ushaderbytecode files expected? If not, what problems should we be looking for?
What would cause .uexp files to be different in a stock build?
[Image Removed]
Steps to Reproduce
Using a stock UE 5.5.4:
- .\Engine\Binaries\Win64\UnrealEditor-Cmd.exe EngineTest.uproject -run=cook -clean -targetplatform=Windows -nop4 -noxge -buildmachine -NoRemoteShaderCompile -unattended
- Rename the EngineTest\Saved\Cooked\Windows folder.
- Run command #1 again
- Do a binary compare between the renamed folder and the new EngineTest\Saved\Cooked\Windows
There are differences between .ushaderbytecode files and .uexp files. It is the same files each time.
I see differences regardless of whether bDeterministicShaderCodeOrder is set.
Hello there,
The default engine configuration does not specify that the shader order is deterministic. Is bDeterministicShaderCodeOrder set to true in your tests?
Best regards,
Chris
It would appear as though there are a few issues related to cook determinism at the moment.
bDeterministicShaderCodeOrder may not have much impact on the final order, and in terms of shader bytecode determinism, you may wish to look at [Content removed]
The uexp files may be the result of packages needing resaving, and I would encourage you to test this first as it’s relatively non-intrusive to rule out. I cannot replicate the uexp behaviour on assets saved in the same version of the engine as is cooking, but my test project is different and these issues can be asset specific.
There is also Unreal Engine Issues and Bug Tracker (UE\-220376) that can impact cook determinism, and that may be relevant to you outside of the test project.
Best regards,
Chris
There is also the following case that may be of interest: [Content removed]
It’s a platform-specific case, so it may be inaccessible.
Best regards,
Chris