Commit Graph

137 Commits

Author SHA1 Message Date
Marc Audy
e5a303d119 Fix CIS issues
#codereview ahmed.rizwan, yujiang.wang, graham.wihlidal, Aidan.Possemiers, luke.thatcher, zach.bethel
#rnx
#preflight

[CL 20306971 by Marc Audy in ue5-main branch]
2022-05-20 20:25:42 -04:00
zach bethel
379ccdd136 Added RHICopyTexture unit tests and fixed up inconsistencies / bugs.
- A zero size now uses the source texture size adjusted to the source mip.
 - Source / dest offsets and size now properly scale with each successive mip level.
 - Fixed bug in reflection capture GPU copy due to inconsistent behavior.
 - Deprecated GRHISupportsCopyToTextureMultipleMips which is now always true.

#rb brian.white
#preflight 627fc1af3339713c4a9800da

[CL 20224824 by zach bethel in ue5-main branch]
2022-05-16 11:11:35 -04:00
christopher waters
3b18bce7f0 Fixing initial state issues after changing the FRHITextureCreateDesc creation.
#jira UE-151907
#rb mihnea.balta
#preflight 627e751b7c26e2477354c142

[CL 20182229 by christopher waters in ue5-main branch]
2022-05-13 11:45:30 -04:00
christopher waters
9ef9e2bf50 Removing the long-form create functions and constructors from FRHITextureCreateDesc in favor of the shorter versions.
#jira none
#rb luke.thatcher
#preflight 627d7c70a82f3adab8b3524e

[CL 20172685 by christopher waters in ue5-main branch]
2022-05-12 17:59:39 -04:00
Luke Thatcher
1177b6f932 Fix incorrect handling of bArray argument in FOpenGLDynamicRHI::RHICreateTextureCubeFromResource
#rb none
#preflight skip
#jira none

[CL 20145336 by Luke Thatcher in ue5-main branch]
2022-05-11 14:12:18 -04:00
Wei Liu
355707489e Refactor of mobile custom depth/stencil to line up with pc on all mobile platform.
#jira none

#rb Dmitriy.Dyomin
#fyi Serge.Bernier
#preflight 627b87a65d003338d95018bf

[CL 20135905 by Wei Liu in ue5-main branch]
2022-05-11 06:10:52 -04:00
Dmitriy Dyomin
d95b02416a Remove TextureView path in GL RHI, as it's not supported in GL ES
#rb none
#preflight 625f965e4617dd4429f9d210

[CL 19826433 by Dmitriy Dyomin in ue5-main branch]
2022-04-20 01:54:11 -04:00
dmytro vovk
74bdc5a190 Refactored usage of out of scope strings in RHICreateAliasedTexture
#jira none
#review Mihnea.Balta
#preflight 624ec8ac8e5ae00f0adc5c81

[CL 19667797 by dmytro vovk in ue5-main branch]
2022-04-07 09:20:43 -04:00
zach bethel
f457a69101 Added RHI tracked access API to remove Unknown transitions.
- New RHI command list SetTrackedAccess method for the user to supply a current whole-resource state.
 - New RHI command context GetTrackedAccess method for querying the tracked access in RHIBeginTransitions / RHIEndTransitions on the RHI thread.
 - Hooked RHICmdList.Transition and FRHICommandListExecutor::Transition to assign tracked state automatically.
 - Refactored RDG and resource pools to use new RHI tracking.
      - FRDGPooledBuffer / FRDGPooledTexture no longer contain tracked state. RDG temp-allocates state through the graph allocator instead.
      - All prologue transitions are 'Unknown', and all epilogue transitions coalesce into a whole resource state.
 - Implemented platform support for patching the 'before' state with the tracked state.
 - Implemented various RHI validation checks:
      - Asserts that the user assigned tracked state matches RHI validation tracked state, for all subresources.
      - Asserts that tracked state is not assigned or queried from a parallel translation context.
 - Added FRHIViewableResource and FRHIView base classes to RHI. FRHIView contains a pointer to an FRHIViewableResource. This is currently a raw pointer, but should be extended to a full reference in a later CL.

NOTE on RHI thread constraint:

Transition evaluation is now restricted to the RHI thread (i.e. no parallel translation contexts). Transitions aren't performed in parallel translate contexts anyway, so this is not a problem. If, however, we decide to refactor parallel translation to be more general, this implementation could be extended to track the state per context and update from the 'dispatch' thread.

#preflight 6233b4396666d7e753a16aaf
#rb kenzo.terelst

[CL 19513316 by zach bethel in ue5-main branch]
2022-03-25 11:19:10 -04:00
Luke Thatcher
ee64a28f30 Copying //UE5/Dev-ParallelRendering to //UE5/Main
This change is the copy-up of work from //UE5/Dev-ParallelRendering to unify the various RHI texture types
 - The separate RHI texture types (FRHITexture2D, FRHITexture2DArray, FRHITexture3D, FRHITextureCube, FRHITextureCubeArray) have been replaced with a single type: FRHITexture.
 - Includes the required refactoring / fixes for the various platform RHIs.

The old texture types are still supported via typedefs, but will soon be marked deprecated. Future rendering code should make use of the FRHITexture type instead.

#jira UE-139559
#rb Mihnea.Balta
#preflight 622f3af819287beb2c3047f6
#robomerge[FN_ENGINEMERGE] DEV-NC

[CL 19371962 by Luke Thatcher in ue5-main branch]
2022-03-14 09:14:58 -04:00
dmitriy dyomin
71ab9573ca Fixed: Correctly count texture and render target memory usage in OpenGL RHI
#rb allan.bentham
[FYI] peter.sauerbrei

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 19284140 via CL 19284141 via CL 19295456 via CL 19304888 via CL 19305089
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19347124 by dmitriy dyomin in ue5-main branch]
2022-03-10 21:02:22 -05:00
christopher waters
227ac32a63 Removing deprecated RHI functions
#jira none
#rb luke.thatcher, dmitriy.dyomin, florin.pascu, zach.bethel, jeannoe.morissette
#preflight 61fb00ca5e35b9215b01b7d0

[CL 18844394 by christopher waters in ue5-main branch]
2022-02-03 12:09:32 -05:00
christopher waters
239071b670 Deprecating RHIGetResourceInfo in favor of FRHIResource::GetResourceInfo
#jira none
#rb zach.bethel, kenzo.terelst, jeannoe.morissette
#preflight 61e0b550250b9537f786b332

#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 18618143 in //UE5/Release-5.0/... via CL 18618166 via CL 18618188
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18618216 by christopher waters in ue5-main branch]
2022-01-14 10:59:44 -05:00
zach bethel
0143cb41fa Deprecated defunct legacy transient resource API and removed vestiges.
#preflight 61e0a87c250b9537f7837e74
#rb christopher.waters

#ROBOMERGE-AUTHOR: zach.bethel
#ROBOMERGE-SOURCE: CL 18607884 in //UE5/Release-5.0/... via CL 18607913 via CL 18607948
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18607982 by zach bethel in ue5-main branch]
2022-01-13 17:56:22 -05:00
dmitriy dyomin
667034ee1e Fixed: DumpGPU command on mobile platforms
#jira UE-135663
#rb Guillaume.Abadie, Jack.Porter
#preflight 61dd77e18d72a407aabd881b

#ROBOMERGE-AUTHOR: dmitriy.dyomin
#ROBOMERGE-SOURCE: CL 18571322 in //UE5/Release-5.0/... via CL 18571337
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18571345 by dmitriy dyomin in ue5-release-engine-test branch]
2022-01-11 09:24:45 -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
rolando caloca
f6cd88c157 UE5 - Remove platform
#rb Steve.Smith
[FYI] Jules.Blok, Ryan.Durand, Ben.Marsh

#ROBOMERGE-SOURCE: CL 17295935 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17295945 by rolando caloca in ue5-release-engine-test branch]
2021-08-24 19:28:38 -04:00
yangke li
578ce6d0e6 add a new TextureCompressionSetting TC_LQ(BGR565/BGR555A1), which is needed in Runtime virtual texture's baked SVT
The endian of BGR555A1 texture is troublesome on Android platform, because Opengl ES doesn't support GL_UNSIGNED_SHORT_1_5_5_5_REV texture format, meanwhile VK_FORMAT_R5G5B5A1_UNORM_PACK16 is not supported on some Android devices.
#rb Dmitriy.Dyomin

#ROBOMERGE-SOURCE: CL 16966077 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16966080 by yangke li in ue5-release-engine-test branch]
2021-07-27 03:04:08 -04:00
florin pascu
5c1e32c73c RG11B10 + SceneDepthAux 16/32F + Alpha Propagate
For Forward ES31
 Default SceneColor RG11B10 + R16F\32F Depth texture
 With PropagateAlpha on RGBA16F + R16F\32F
 PostProcess we sample SceneDepthAux for Depth
For Deferred ES31
 SceneDepthAux only for Metal
 PropagateAlpha not working yet
 PostProcess we sample SceneDepthTexture for Depth

cvar to change Depth texture from 16 to 32Fr.Mobile.SceneDepthAux
cvar for AlphaPropagate r.Mobile.PropagateAlpha
#jira UE-98033
#rb Dmitriy.Dyomin, Carl.Lloyd, Jack.Porter

#ROBOMERGE-SOURCE: CL 16644095 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v833-16641396)

[CL 16644108 by florin pascu in ue5-release-engine-test branch]
2021-06-11 13:47:20 -04:00
Marc Audy
e80ea6b959 Merge from Release-Engine-Staging @ 16444985
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16445122 by Marc Audy in ue5-release-engine-test branch]
2021-05-25 02:43:26 -04:00
christopher waters
02fe0df0fd ETextureCreateFlags enum class.
#jira none
#rb luke.thatcher
#preflight 60abd0c758f02e00017a2196

[CL 16438084 by christopher waters in ue5-main branch]
2021-05-24 14:25:19 -04:00
christopher waters
87718de4a2 Adding commands to dump RHI resource info.
rhi.DumpResourceMemory dumps the memory usage of each RHI resource if the type is instrumented. Currently only fully implemented for Textures and Buffers in D3D11 and D3D12.
rhi.DumpResourceCounts dumps the counts of each resource type. Should work for all RHIs.
Repurposed FRHIResourceInfo to use for generic resource info. Removed older uses of it that didn't actually provide data.
Made ERHIResourceType required to construct an FRHIResource.
Adding Name to FRHIBuffer.
Removed the unused FVulkanBuffer.
Removed the unused FOpenGLTexture and FOpenGLBaseTexture.

#jira none
#rb kenzo.terelst
#preflight 60902efd7d9bf90001766572

[CL 16186890 by christopher waters in ue5-main branch]
2021-05-03 16:58:15 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
Thomas Engel
600826b334 Pulling in fixes to mobile mip generation (related to MFW) into UE5 ahead of automatic integration (CL 15667874)
#jira FORT-353010
#rb none

[CL 15680268 by Thomas Engel in ue5-main branch]
2021-03-11 15:52:03 -04:00
Matt Peters
8b89748bb2 Define DECLARE_LLM_MEMORY_STAT in shipping configurations as a noop rather than requiring that invocations of it be wrapped in ENABLE_LOW_LEVEL_MEM_TRACKER.
#rb Danny.Couture
#rnx

[CL 15605920 by Matt Peters in ue5-main branch]
2021-03-04 10:24:44 -04:00