You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
[shaders] fixing stripped code header length calculation, and account for auto-appended null terminator
#rnx #rb Christopher.Waters [CL 32547715 by dan elksnitis in ue5-main branch]
This commit is contained in:
@@ -20,7 +20,7 @@ struct FPreprocessConstants
|
||||
|
||||
check(StrippedCodeHeaderBuilder.GetAllocatedSize() == 0);
|
||||
|
||||
StrippedCodeHeader = { StrippedCodeHeaderBuilder.GetData(), StrippedCodeHeaderBuilder.Len() };
|
||||
StrippedCodeHeader = StrippedCodeHeaderBuilder.ToView();
|
||||
}
|
||||
|
||||
static constexpr FShaderSource::FViewType DebugHashPrefix = SHADER_SOURCE_VIEWLITERAL("DebugHash_");
|
||||
@@ -39,10 +39,12 @@ private:
|
||||
static constexpr int32 HeaderLen =
|
||||
DebugHashCommentStart.Len() +
|
||||
DebugHashPrefix.Len() +
|
||||
DebugHashCommentEnd.Len() +
|
||||
2 * sizeof(FShaderCompilerInputHash::ByteArray) + // size of input hash converted to a hex string
|
||||
LineDirectiveStart.Len() +
|
||||
FilenameSentinel.Len() +
|
||||
LineDirectiveEnd.Len();
|
||||
LineDirectiveEnd.Len() +
|
||||
1; // +1 for null terminator, even though we don't need it builder always ensures there's space for one
|
||||
|
||||
FShaderSource::TStringBuilder<HeaderLen> StrippedCodeHeaderBuilder;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user