- Need to include LocalMipBias, otherwise may not be any data at AllocatedVT's MaxLevel for sparse UDIMs
- Check for overflow when adding lock requests, keep overflow requests around to try again next frame
#rb none
#jira none
[CL 16194638 by Ben Ingram in ue5-main branch]
- It's not possible to make wrapping work correctly for lower mip levels, depending on the sizes of the VTs in the stack
- Now UDIMs that are smaller than stack dimensions will just map the lowest resolution mip to out-of-bounds addresses
- Entire stack will continue to wrap, based on the stack dimensions
- End result is UDIM wrapping should no longer by relied on
#rb none
#jira none
[CL 16184868 by Ben Ingram in ue5-main branch]
Example usage in a shader:
PLATFORM_ASSERT4(GroupThread > 4321, 0xDF7DC903, GroupThread, GroupIndex, GroupBase, asuint(123.456f));
Example GPU crash report output:
LogD3D12RHI: Error: [GPUBreadCrumb] Last tracked GPU operations:
LogD3D12RHI: Error: [GPUBreadCrumb] 3D Queue 0 - Begin: Frame 348 - Scene - ReflectionIndirect - RayTracingReflections - RayTracingDeferredReflectionsShade 957x466
LogD3D12RHI: Error: [GPUBreadCrumb] Shader assertion failed! ID: 0xDF7DC903
LogD3D12RHI: Error: [GPUBreadCrumb] Payload [int32]: 416 42 172032 1123477881
LogD3D12RHI: Error: [GPUBreadCrumb] Payload [uint32]: 416 42 172032 1123477881
LogD3D12RHI: Error: [GPUBreadCrumb] Payload [hex]: 0x000001A0 0x0000002A 0x0002A000 0x42F6E979
LogD3D12RHI: Error: [GPUBreadCrumb] Payload [float]: 0.000000 0.000000 0.000000 123.456001
This works through automatic diagnostic buffer binding in D3D12 RHI, which becomes available in *any* shader as a UAV.
Opens the door for arbitrary human-readable message output from any shader in the future.
PLATFORM_ASSERT macro is always enabled and available on supported platforms. It is intended to be a low-level mechanism for a higher-level check() that would be controlled via CVars.
#rb Christopher.Waters
[CL 16167404 by Yuriy ODonnell in ue5-main branch]
* First all cards are allocated to a temporary atlas of fixed size set by r.LumenScene.CardCaptureAtlasFactor
* After cards are captured into temporary atlas, they are compressed into final BC compressed atlas. Compression can be disabled with r.LumenScene.SurfaceCache.Compress
* Atlas clears were also converted to support clearing compressed surfaces
* Atlas capture operations work on uploaded rect list, instead of a GPU generated card list
* Renamed r.LumenSurfaceCache.* to r.LumenScene.SurfaceCache.*
* Renamed LumenSceneLighting.usf to LumenSurfaceCache.usf
* Renamed LumenScenePrefilter.cpp to LumenSurfaceCache.cpp
Cuts down VRAM memory usage by 160mb
Compression performance on console: ~0.18ms for 1M texels (~0.9ms with UAV aliasing path, which is currently disabled due to missing pieces in RHI)
[CL 16160800 by Krzysztof Narkowicz in ue5-main branch]
Force IsUsingDBuffers to return false on mobile.
UE5 decal code has already been modified so that material compilation and rendering will remain correct on both mobile and mobile deferred after this change.
#rb dmitriy.dyomin
[CL 16131444 by Jeremy Moore in ue5-main branch]
- Ensure mobile scene textures are present for FXSystem to access
#rb jamie.hayes, rob.krajcarski
#jira FORT-259231
[CL 16128712 by Stu McKenna in ue5-main branch]
The following code would call the int overload rather than the name overload when passed an EName constant, which could easily lead to confusion and bugs:
using FMyId = uint8;
void DoThing(FName);
void DoThing(FMyId);
DoThing(NAME_Actor);
The change to use enum class requires that any code that actually deals with EName as an int (mostly internal name code and serialisation) be updated to explicitly cast, but prevents the implicit conversion that causes the issue above.
In order to preserve the NAME_X aliases that the old-style enum added to the global scope, new aliases have been added that point to the EName scoped versions. Unfortunately these can cause shadowing warnings if NAME_X is defined in the local scope, as the old-style enum used to allow that without shadowing, however there is no way to prevent this so we'll just need to fix any warnings that occur.
#rb Johan.Torp
#preflight 6087e06349a9840001414708
[CL 16126708 by Jamie Dale in ue5-main branch]
- FShaderMapResourceCode derives from FThreadSafeRefCountedObject which has a member that keeps track of the number of references to the object. We were doing deep copies using the Copy Constructor of FShaderMapResourceCode which resulted in a member wise copy of the num refs. This is not the behavior you'd expect.
- The offending line of code that caused the memory leak was in FShaderMapBase::AssignCopy:
- Code = new FShaderMapResourceCode(*Source.Code);
- Like FRefCountBase I've deleted the copy constructor and assignment operator for FRefCountedObject and FThreadSafeRefCountedObject to catch issues at compile time where we are copying across NumRefs incorrectly.
- To fix the issue I've manually created copy constructors for FGPUProfilerEventNodeStats and FShaderMapResourceCode.
#rb Devin.Doucette, Dave.Jones, Arciel.Rekman, Ben.Ingram
#review-16115628 @Devin.Doucette, @Dave.Jones, @Arciel.Rekman, @Ben.Ingram
#jira UE-108598, UE-113736
[CL 16116577 by Jason Nadro in ue5-main branch]
- Views are cached on RHI transient resources; view renames are no longer necessary.
- RHI Transient resources utilize a single cache per heap keyed off of the descriptor + offset. Resource caches and heaps are garbage collected.
- CPU performance is effectively equivalent to the existing pooled resource method.
- Added common RHI transient resource allocator implementation in RHI core; significantly reduces the amount of platform code.
- Resource aliasing overlaps are tracked by the RHI and submitted through an acquire operation.
- Fixed D3D12 implementation to support multi-GPU.
- Removed condition that excluded small (<64k) buffers in the transient allocator.
- RHI validation now checks that resource overlaps are valid; i.e. if an overlap occurs between resource A and B during an acquire of B, validation checks that A has been discarded.
#rb graham.wihlidal, luke.thatcher, kenzo.terelst
[CL 16076280 by zach bethel in ue5-main branch]
Clean up logic for render stages.
Removed unneccessary GBufferNormal only target mode.
Remove volumetric decal.
#jira UE-100967
#rb none
#preflight 607e1f2129083200018fd8c4
[CL 16057700 by Jeremy Moore in ue5-main branch]