Commit Graph

281 Commits

Author SHA1 Message Date
mihnea balta
3bdadfd747 Use FOptionalTaskTagScope instead of FTaskTagScope to avoid overwriting the current tag when task retraction kicks in.
This fixes some invalid tag ensures in FD3D11DynamicRHI::RHICreateUniformBuffer.

#rnx
#rb zach.bethel

[CL 29783616 by mihnea balta in ue5-main branch]
2023-11-16 13:12:57 -05:00
yuriy odonnell
c3ad0622c8 Add support for reserved buffer commit operation to RDG
* Add QueueCommitReservedBuffer() to FRDGBuilder
* Add GetCommittedSize() to FRDGPooledBuffer, to query the physical size of the buffer
* Change ResizeBufferIfNeeded() to issue a commit operation instead of copying when possible
* Add r.Nanite.Streaming.ReservedResources CVar (default: false) to allocate Nanite ClusterPageData.DataBuffer as a reserved resource of maximum size, which is committed in ResizeBufferIfNeeded()

Based on implementation by Zach Bethel.

#rb Zach.Bethel

[CL 29626308 by yuriy odonnell in ue5-main branch]
2023-11-09 21:34:39 -05:00
guillaume abadie
89c07ef689 Deduplicates RDG resources pointer across graph builders in DumpGPU to handle r.DumpGPU.FrameCount with many many frames
#jira UE-192501, UE-179496
[FYI] zach.bethel

[CL 28631536 by guillaume abadie in ue5-main branch]
2023-10-10 14:50:30 -04:00
zach bethel
1adbcfc6f2 Fixed assert in RDG task queue flush due to waiting on task while in a task pipe.
- Converted lock free list to locked array.

[CL 28322428 by zach bethel in ue5-main branch]
2023-09-28 13:09:55 -04:00
kenzo terelst
0b678d4693 Add SupportsResourceType to transient allocation because certain RHIs might not support all resources types
#rb Luke.Thatcher

[CL 28266473 by kenzo terelst in ue5-main branch]
2023-09-27 04:23:25 -04:00
zach bethel
df8c177da3 Removed PSO cache flush from command list flush method and manually placed it to happen after each scene render.
#rb graham.wihlidal
#jira UE-196266

[CL 28238003 by zach bethel in ue5-main branch]
2023-09-26 13:56:11 -04:00
zach bethel
7156e6f9d1 Fixed RDG AddCommandListSetupTask to support single tasks or task collections. Added IsParallelSetupEnabled() external call.
[CL 28213694 by zach bethel in ue5-main branch]
2023-09-25 20:37:06 -04:00
dmitriy dyomin
61d30a34c9 Remove UBMT_RDG_UNIFORM_BLOCK_SRV, added a UB usage flag that can be used to identify "UniformView" buffers
#rb none

[CL 27943664 by dmitriy dyomin in ue5-main branch]
2023-09-15 23:24:28 -04:00
zach bethel
1c6ffb85f7 Defer submission of AddCommandListSetupTask to batch calls to AsyncCommandListSubmit.
[CL 27833869 by zach bethel in ue5-main branch]
2023-09-13 11:48:20 -04:00
louisphilippe seguin
36c722f3c4 Fix wrong printf parameters in checkf & ensuremsgf found in engine code
#rb Fabian.Giesen, Kirill.Zorin
#rnx

[CL 27519547 by louisphilippe seguin in ue5-main branch]
2023-08-31 08:56:30 -04:00
zach bethel
b0119cd74a Added variant of QueueUploadBuffer which avoids an additional memcpy.
[FYI] yuriy.odonnell

[CL 27412370 by zach bethel in ue5-main branch]
2023-08-28 11:28:40 -04:00
zach bethel
68e18e546c Modified render target and buffer pools to be thread safe.
#jira none

[CL 27380383 by zach bethel in ue5-main branch]
2023-08-25 12:36:19 -04:00
zach bethel
ad005d7adf Fixed edge case in RDG builder where buffer would fail the transient allocator and not fall back to a pooled allocation.
[CL 27077381 by zach bethel in ue5-main branch]
2023-08-14 13:49:35 -04:00
marc audy
1b8e7f29c4 Rework GPUScene support on mobile platforms.
Platforms that do support uniform buffer objects can now provide batched primitive data through UBO. There is a limit UBO range that can be accessed in shaders, so we group instances into batches that fit into this limit. Switch uses 64KB views, other platfroms16KB views. For each primitive we allocate 512Bytes and 256Bytes for instance. Mobile platforms that do not support UBO will use a desktop version of GPUScene.
There are a few things that still missing: Dynamic mesh passes,  static lighting
#rb ola.olsson, benjamin.rouveyrol

[CL 26354848 by marc audy in ue5-main branch]
2023-06-30 16:34:38 -04:00
zach bethel
aa1b0c680f Deprecated non-command list RHI methods.
- RHICreate{Vertex, Index, Structured}Buffer
 - RHICreate{ShaderResource, UnorderedAccess}View
 - RHIUpdateUniformBuffer
 - Various initialization / locking methods for helper buffer types in RHIUtilities.h

The goal is to continue to force resource creation through command lists to avoid surprises with moving things off the render thread.

#rb christopher.waters

[CL 26183242 by zach bethel in ue5-main branch]
2023-06-22 11:08:27 -04:00
guillaume abadie
1241ede0bf Fixes VisualizeTexture not working with RDG_TEXTURE_ACCESS
#rb trivial
#jira UE-179496
[FYI] zach.bethel

[CL 25950307 by guillaume abadie in ue5-main branch]
2023-06-13 09:57:30 -04:00
tiago costa
5c93e0ec41 Disable AsyncCompute and ParallelExecute when FlushGPU is enabled.
- Previously there was a callback associated with r.RDG.Debug.FlushGPU that tried to disable AsyncCompute however it didn't work because it got reenabled by CVarRDGAsyncComputeSink.

#rb zach.bethel
#preflight 6465eb87317ee2d9d1e25325

[CL 25522735 by tiago costa in ue5-main branch]
2023-05-18 05:34:52 -04:00
aleksander netzel
03b4f30755 Fix RHI validation error for RayTracingSceneBuffer: add missing SRVMask flag.
#rb yuriy.odonnell
#jira UE-184367
#preflight 6453e6ff4574b81df47d50ad

[CL 25338279 by aleksander netzel in ue5-main branch]
2023-05-04 13:29:20 -04:00
christopher waters
6c040372a1 Minor dependency cleanup in RenderGraphBuilder.
#preflight 644944a7401d328ad908ff40

[CL 25203033 by christopher waters in ue5-main branch]
2023-04-26 13:58:21 -04:00
graham wihlidal
0fb04c0a8f Added CVar to RDG to control whether to enable expensive RDG validation in development builds (on by default).
#ushell-cherrypick of 24664569 by zach.bethel
#lockdown michal.valient
#rb graham.wihlidal, yuriy.odonnell
#preflight skip

[CL 24701530 by graham wihlidal in ue5-main branch]
2023-03-17 23:05:14 -04:00
zach bethel
becb452460 Fixed RHI validation error in virtual textures due to underlying physical textures not being transitioned to SRV.
#preflight 640faa0b3c2db400299ee0ab
#jira UE-173893
#rnx
#rb mihnea.balta
#lockdown mihnea.balta

[CL 24641083 by zach bethel in ue5-main branch]
2023-03-14 14:44:43 -04:00
luke thatcher
984a0bba79 Fix RHI validation layer error in SkeletalRenderGPUSkin.cpp
- MorphVertexBuffer was not in UAV state before being cleared with RHIClearUAVUint.

Fix RDGImmediate not uploading buffers if no render passes were enqueued.
 - Also remove stray debug string compare / debug break

#rb Zach.Bethel
#jira MH-8828
#preflight 64023e2aa726961ed9d598fe

[CL 24507908 by luke thatcher in ue5-main branch]
2023-03-03 17:05:15 -05:00
zach bethel
7ef5721365 Fixed race condition with RDG setup tasks and buffer creation callbacks.
#preflight trivial

[CL 24428159 by zach bethel in ue5-main branch]
2023-02-27 13:47:56 -05:00
zach bethel
15d39e7bd3 Always dispatch RHI thread in RDG BeginFlushResourcesRHI. Avoids a CPU induced stall when flushing the RHI thread.
#preflight trivial

[CL 24292145 by zach bethel in ue5-main branch]
2023-02-17 17:02:47 -05:00
christopher waters
1f21b73b25 Ran IWYU on RHI and RenderCore, private only.
#preflight 63d358c85c69f453c1f79c37

[CL 23889591 by christopher waters in ue5-main branch]
2023-01-27 14:54:10 -05:00