Missing functionality was that node functions can have a NodeID that is used to reference them.
The NodeID is set in an attribute on the function.
The fix is to always extract identifiers from function attributes.
This could be made more conservative by special casing to only NodeID function attributes. I'm not sure if the added complexity is worth it.
Note also that this works for node arrays, but doesn't remove out of array references when the NodeArraySize attribute is used. That is quite a special case though (different array slices from a shared array definition).
#rb Yuriy.ODonnell
#jira UE-206206
[CL 31277592 by jeremy moore in ue5-main branch]
- add FShaderSource class which wraps source as populated by preprocessing and subsequently accessed by compilation and other debug features; this class automatically inserts zeroed padding such that 16-byte-wide SIMD string comparison operations do not require a non-SIMD tail to process any overhang.
- add typedefs for the string/view/character types and update preprocessing code to use these typedefs instead of the explicit types
- add explicit if constexprs in minifier code around char width to disable simd optimizations for char width != 2 (and subsequently skip the non-simd tail if char width == 2 since FShaderSource automatically adds the required padding)
#rb Jason.Nadro, Yuriy.ODonnell
[CL 30358137 by dan elksnitis in ue5-main branch]
* Generate line directive map during parsing
* Use xxhash instead of cityhash
* Avoid FStringView operator [] in ExtractIdentifiers
* Use TArray Reset instead of Empty where appropriate
* Vectorize SkipUntilNonIdentifierCharacter
* Vectorize ExtractBlock
* Vectorize line ending search
* Use FString directly instead of FStringBuilderBase for the final output to avoid a copy
#rb christopher.waters
#rb jason.hoerner
[CL 28699609 by yuriy odonnell in ue5-main branch]
- Before this, every typedef and the code using them was being included in the final source.
- This was primarily affecting Bindless Resources where all bindless resources were included in the minified code even if they weren't used.
#rb yuriy.odonnell
[CL 28365749 by christopher waters in ue5-main branch]
* Track namespaces for symbols
* Re-emit namespace scopes
* Conservatively include symbols from all namespaces in minified code (as if they were all global)
* Additional parsing work will be required to more accurately track used symbols based on active namespaces (i.e. handle `using` keyword, etc.)
* Added RemoveDeadCode() overload that takes an explicit list of required symbols instead of just an entry point name
#rb dan.elksnitis
#preflight 6398be5e35203bc7aa7f9b47
[CL 23494729 by Yuriy ODonnell in ue5-main branch]
Declarations like `struct { uint Param; } Foo;` were previously incorrectly removed from code.
Also report explicit error when encountering 'namespace' keyword (which is currently unsupported)
#preflight 6387c5b1f213a116ebc18c5f
#rb dan.elksnitis
[CL 23343976 by Yuriy ODonnell in ue5-main branch]