Commit Graph

43 Commits

Author SHA1 Message Date
devin doucette
ad1fb5d83a CompressedBuffer: Added an optional flag to decompress blocks to an intermediate buffer
#rb Daniele.Pieroni

[CL 31730467 by devin doucette in ue5-main branch]
2024-02-22 14:37:43 -05:00
Matt Peters
da707613b5 Cooker IterativeValidate: Fix diff output from DiffWriterArchive that is being logged directly rather than being sent to the MessageCallback.
#rb Zousar.Shaker
#rnx

[CL 26356735 by Matt Peters in ue5-main branch]
2023-06-30 17:32:21 -04:00
charles bloom
8057d877d4 OodleDataCompression just comments behavior nop
#rb none
#preflight none

[CL 24604196 by charles bloom in ue5-main branch]
2023-03-11 13:20:53 -05:00
charles bloom
0a198a3d1f OodleDataCompression parallel encode and decode helpers
can be swapped in with existing OodleDataCompression calls
does not add any extra header

#preflight https://horde.devtools.epicgames.com/job/640b9be070639dfc94013653
#rb fabian.giesen

[CL 24601830 by charles bloom in ue5-main branch]
2023-03-10 20:20:03 -05:00
dan thompson
4a6b8c8b00 Removal of the r.Shaders.CompressionFormat CVar, and shader group compression during UnrealPak now inherits the packaging compresison level.
Due to the fact that UnrealPak doesn't load INIs, the cvar was always its default value. This, combined with the fact that shaders don't store what codec they are compressed with means that setting this cvar to anything other than default (oodle) causes a crash in UnrealPak as DecompressShader will try to decompress with Oodle independent of the actual codec. Rather than plumb this information down through ProjectParams, I felt it prudent to just always use Oodle.

Additionally, in order to facilitate faster iteration times for development build farm jobs, the shader compression level used during UnrealPak will inherit from the overall package compression level set via Project Settings (PackageCompressionLevel_*).

This tacitly avoids patch issues as the default shader compression level happens to be the default package compression level, except now it inherits any faster levels for iteration time.

Note that we still use Mermaid as the codec as it's faster for decompressing than Kraken, which we care about for shaders.

#rb Fabian.Giesen
#rb Arciel.Rekman
#preflight 63e2f94c786751d1e0ffb290

[CL 24092953 by dan thompson in ue5-main branch]
2023-02-09 00:35:55 -05:00
henrik karlsson
cc50aa5418 [Compression]
* Fixed linker error in oodledatacompressionutil

#preflight skipped
#rb none

[CL 24067045 by henrik karlsson in ue5-main branch]
2023-02-08 00:26:34 -05:00
henrik karlsson
c8c3d0b8b2 [Core]
* Made code compatible with modules/header units. This includes following things:
   * Removed static in front of global functions/variables (static indicates it is hidden outside of module/header unit which is not what many places want...)
   * Moved dllexport from type to methods in order to get dllexport of static constexpr fields. This is supposed to work according to microsoft but since it is a good change I don't mind doing it anyway)
   * static constexpr -> static constexpr inline for member variables and methods (this makes them available outside module/headerunit)
   * Added HEADER_UNIT_IGNORE markup to includes that are circular
   * Added HEADER_UNIT_SKIP to files that can't compile by themselves

#preflight 63e2aeba3c44c83044bfcc75
#rb steve.robb

[CL 24066986 by henrik karlsson in ue5-main branch]
2023-02-08 00:25:15 -05:00
martins mozeiko
a8c418acd4 Upgrade lz4 to 1.9.4 version.
#preflight 63e17d459740e583f439d183
#rb devin.doucette

[CL 24058819 by martins mozeiko in ue5-main branch]
2023-02-07 16:03:20 -05:00
charles bloom
fe229cf1e3 OodleDataCompressionUtil : take dest buff size to ensure no overrun
#jira https://jira.it.epicgames.com/browse/FORT-546392
#preflight https://horde.devtools.epicgames.com/job/63c899cfb065224750e38076
#rb none

[CL 23768764 by charles bloom in ue5-main branch]
2023-01-18 20:24:32 -05:00
arciel rekman
1facaa88b2 Add more logging to investigate shader decompression errors (UE-159777).
- Hexdump of the whole compressed shader will be dumped if small enough (which is what we're seeing mostly).

#rb Jason.Nadro
[REVIEW] [at]Jason.Nadro
#jira UE-159777
#preflight 6335b508f76de2d4d55a858c

[CL 22262833 by arciel rekman in ue5-main branch]
2022-09-29 23:45:42 -04:00
Bryan sefcik
b4a6e947d8 Ran IWYU on Public headers under Engine/Source/Runtime/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21065896 by bryan.sefcik
#preflight 62d4b1a5a6141b6adfb0c892
#jira

#ROBOMERGE-OWNER: Bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
#ROBOMERGE-CONFLICT from-shelf

[CL 21181076 by Bryan sefcik in ue5-main branch]
2022-07-20 11:31:36 -04:00
bryan sefcik
746b7df074 Same as CL 20991367:
Updated Core code to not use CoreMinimal.h when possible.
Core public headers still will contain CoreMinimal.h if any included it before my IWYU changes.
#preflight 62c74ed0324817d81488b7ee

[CL 20993420 by bryan sefcik in ue5-main branch]
2022-07-07 17:41:31 -04:00
bryan sefcik
62489fe2b3 Ran a pass of IWYU on Core.
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.

#rb Devin Doucette and Marc Audy
#preflight 62c62086756222ced497ff95
#preflight 62c626d12f2d04691814d331
#preflight 62c630107e606620fdd64e31
#preflight 62c635c6756222ced49a13cf

[CL 20979027 by bryan sefcik in ue5-main branch]
2022-07-06 21:44:18 -04:00
Devin Doucette
006e85ab44 CompressedBuffer: Changed RawHash to FIoHash
- Only the first 20 bytes of the RawHash field in the header will be consumed.
- In a subsequent change, the last 12 bytes of the RawHash field will be set to zero for new compressed buffers.

- Leveraged composite buffers to avoid performing an extra copy of compressed blocks.
- Updated FBlockEncoder::Compress to always use ParallelFor.
- Added ParallelForWithPreWorkWithTaskContext.

#preflight 622ba3869b7ce6ea5d44b7ab
#rb Zousar.Shaker
#rnx

[CL 19360767 by Devin Doucette in ue5-main branch]
2022-03-11 16:21:11 -05:00
charles bloom
24c44d3173 OodleDataCompression VeryVerbose logging and some cleanup
#preflight 621e5072e15c51d8c5d3ded5
#rb none

[CL 19200528 by charles bloom in ue5-main branch]
2022-03-01 12:09:41 -05:00
devin doucette
74dce2d631 CompressedBuffer: Added FCompressedBufferReader::HasSource()
#rb Zousar.Shaker
#rnx
#preflight 61b11fd75238845473be0c30

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18413426 in //UE5/Release-5.0/... via CL 18413465
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18413480 by devin doucette in ue5-release-engine-test branch]
2021-12-08 17:15:25 -05:00
dan thompson
89f184e47f string helper functions for oodle enums.
#rb Fabien.Giesen
#preflight 61ae76ab2b3384289ad5be91

#ROBOMERGE-AUTHOR: dan.thompson
#ROBOMERGE-SOURCE: CL 18387813 in //UE5/Release-5.0/... via CL 18387899
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18387935 by dan thompson in ue5-release-engine-test branch]
2021-12-06 16:26:55 -05:00
devin doucette
27c1393427 CompressedBuffer: Removed partial decompression from FCompressedBuffer now that FCompressedBufferReader is available
Requiring the use of a separate reader type makes it more likely that readers will be reused, and makes it easier to audit reader usage going forward. Reusing readers is desirable to reduce the number of large temporary allocations made during partial decompression of a buffer.

- Added FCompressedBuffer::Save(FArchive&) and renamed FromCompressed(FArchive&) to Load(FArchive&).
- Added FCompressedBufferReaderSourceScope to set a buffer source within a scope.
- Added proper bounds checks to FNoneDecoder.
- Store the header checksum on the decoder context to allow raw blocks to be reused across sources.
- Decode the header on the fly to avoid a temporary header allocation when the header is in contiguous memory.

#rb Zousar.Shaker
#rnx
#preflight 61a98d53800738dbfbc84c73

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18382211 in //UE5/Release-5.0/... via CL 18382310
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18382377 by devin doucette in ue5-release-engine-test branch]
2021-12-06 10:16:05 -05:00
devin doucette
c26bedd2fa CompressedBuffer: Added FCompressedBufferReader to store decoder buffers and allow streaming from seekable archives
#rb Zousar.Shaker
#rnx
#preflight 61a5acc4ee100b68faabeecc

#ROBOMERGE-AUTHOR: devin.doucette
#ROBOMERGE-SOURCE: CL 18325071 in //UE5/Release-5.0/... via CL 18325078
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18325081 by devin doucette in ue5-release-engine-test branch]
2021-11-30 10:34:57 -05:00
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
per larsson
59ff132987 CompressedBuffer - decompress at offset
#rb Devin.Doucette, Paul.Chipchase
#rnx

#ROBOMERGE-OWNER: Devin.Doucette
#ROBOMERGE-AUTHOR: per.larsson
#ROBOMERGE-COMMAND: _robomerge UE5-Main
#ROBOMERGE-SOURCE: CL 17797770 in //UE5/Release-5.0/... via CL 17797780
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v883-17842818)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17859847 by per larsson in ue5-release-engine-test branch]
2021-10-19 09:38:07 -04:00
devin doucette
3d262ca7f0 CompressedBuffer: Removed the FormatName functionality and update its last remaining callers
#rb Paul.Chipchase, Zousar.Shaker
#rnx
#preflight 612feb940380e700016fc8e5

#ROBOMERGE-SOURCE: CL 17403021 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17403035 by devin doucette in ue5-release-engine-test branch]
2021-09-02 10:30:25 -04:00
dan thompson
5074a8efce Move replay compression functions only used in fortnite back to fortnite
Clarify interface to Oodle compressed array functions
Add support for >2gb buffers
#preflight 6109e3ff4cd793000191470d
#rb charles.bloom

#ROBOMERGE-SOURCE: CL 17075612 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17075735 by dan thompson in ue5-release-engine-test branch]
2021-08-05 16:59:34 -04:00
charles bloom
1ecb02670e Archive support CompressionFormat other than NAME_Zlib
v2 header tag to indicate format is serialized in data
writes new data, continues to load old data

#rb devin.doucette

#ROBOMERGE-SOURCE: CL 17017219 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v839-17012307)

[CL 17017233 by charles bloom in ue5-release-engine-test branch]
2021-08-02 12:28:00 -04:00
dan thompson
7884ae0b8a Convenience class for compressing/decompressing with Oodle #rb charles.bloom #pf 60f9ddad391d460001d39660
#ROBOMERGE-SOURCE: CL 16932166 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16932178 by dan thompson in ue5-release-engine-test branch]
2021-07-22 18:37:49 -04:00