Commit Graph

888 Commits

Author SHA1 Message Date
benjamin rouveyrol
cef7b815be d3d11 editor HDR support
Converge the way we do HDR in editor for both d3d11 and d3d12. This assumes that IDXGIOutput6 is available, but AFAICT, Editor.HDRSupport / FD3D11Viewport::CheckHDRMonitorStatus was requiring it anyway (https://p4-swarm.epicgames.net/changes/8174116 - WindowsD3D11Viewport.cpp#20 FD3D11Viewport::CheckHDRMonitorStatus).
Notes for future self: Editor was initially done with HDR10 (see FD3D11Viewport constructor where it forces swapchain format to DXGI_FORMAT_R10G10B10A2_UNORM). However, it got de-hardcoded with 17369147 which was a good idea, but unfortunately GRHIHDRDisplayOutputFormat is left to the default value on d3d11, which is PF_FloatRGBA.
CheckColorSpaceSupport would now fail, not returning DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT (PF_FloatRGBA only supports scRGB, not DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020) and we would not setup the swapchain colorspace properly.
Since it looks like DXGI 1.6 was always needed for editor, I'm changing the code to be the same between d3d11 and d3d12. Both editors now use scRGB for HDR, which is consistent with ChooseHDRDeviceAndColorGamut

#jira UE-151184
#preflight 6273eaba03269096abc98cbb
#rb christopher.waters

[CL 20139224 by benjamin rouveyrol in ue5-main branch]
2022-05-11 10:13:28 -04:00
zach bethel
8753b64663 Fixed inconsistencies between RHI's with CopyTexture. Replaced implicit check for equality with an assert at the command list.
#jira UE-139646
#rb luke.thatcher
#preflight 627a99cb68422389764263b5

[CL 20129376 by zach bethel in ue5-main branch]
2022-05-10 16:53:36 -04:00
christopher waters
7f7df46ef9 Changing uses of RHIGetNativeDevice and GetNativeResource to use the per-RHI interfaces. XR Edition.
#jira none
#rb robert.srinivasiah
#preflight 6275775bbf6585e3ee7040c5

[CL 20084067 by christopher waters in ue5-main branch]
2022-05-06 16:25:38 -04:00
benjamin rouveyrol
e096addb75 undo changes to d3d11 viewport that were not supposed to be submitted
#preflight 6273cf965b05fb4f6017c0a2
#rb john.huelin

[CL 20056995 by benjamin rouveyrol in ue5-main branch]
2022-05-05 09:40:57 -04:00
benjamin rouveyrol
731de80428 Have r.HDR.Display.ColorGamut enum values defined in a single place and replaced hardcoded numbers by enum values.
#jira UE-148995
#preflight 62716752e16e280be614c38b
#rb eric.renaudhoude jeff.newquist

[CL 20056544 by benjamin rouveyrol in ue5-main branch]
2022-05-05 08:49:19 -04:00
HSeo
d6b14c30eb PR #9059: Add TexCreate_Shared to FD3D11Texture3D.
(Contributed by HSeo)

#jira UE-148581
#rb none
#preflight 6272db5f365de864c4c0fae8

[CL 20048613 by HSeo in ue5-main branch]
2022-05-04 16:33:09 -04:00
Jon Olick
7ab430f96e Bink: merge from 4.27Plus. Bink now uses RHI backend.
#preflight

[CL 19947421 by Jon Olick in ue5-main branch]
2022-04-27 17:28:31 -04:00
benjamin rouveyrol
30ea8aca4f Have r.HDR.Display.OutputDevice enum values defined in a single place and replaced hardcoded numbers by enum values.
#preflight 62559eb569015afc27ac1833
#jira UE-148598
#rb eric.mcdaniel

[CL 19784660 by benjamin rouveyrol in ue5-main branch]
2022-04-18 09:20:23 -04:00
jimmy smith
a6876f5386 Fix for rare ensure on DeviceStateChanges in WindowMMDeviceInfoCache
#rb michael.nolands
#jira https://jira.it.epicgames.com/browse/UE-145687
#preflight 62573abef7476d662c8b874e

[CL 19746026 by jimmy smith in ue5-main branch]
2022-04-13 17:16:59 -04:00
charles bloom
be238dee17 fix failures on texture import of rare cases
fix RHI upload of textures that are multiple of 4 in top mip but not in lower mips
dont pad CompressedImage sizes, store true size
clean up Texture size limits and VT conditions
better default settings for texture import
clean up initialization order of TextureFormatManagerModule

#preflight 6250814a11261bc7b23d8f4b
#rb fabian.giesen,julien.stjean

[CL 19693287 by charles bloom in ue5-main branch]
2022-04-08 16:06:54 -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
Stu McKenna
d0dc8793d5 - Fix for incorrect UAVs on Cube / Cube Arrays
#rb Mihnea.Balta
#jira UE-147331
#rnx
#preflight 62447a06df7d23dbfefa9598

[CL 19558624 by Stu McKenna in ue5-main branch]
2022-03-30 12:13:23 -04:00
Devin Doucette
292008ea35 Logging: Replaced GLog->PanicFlush() with GLog->Panic()
Panic allows only one thread to become the panic thread. In panic mode, logs are only sent to panic-safe output devices. Each call to Panic flushes buffered logs to panic-safe output devices, and flushes panic-safe output devices.

#jira UE-147152
#preflight 62424814292f228e09d8a612
#rb Zousar.Shaker
#fyi Brandon.Schaefer

[CL 19545093 by Devin Doucette in ue5-main branch]
2022-03-29 13:31:48 -04:00
Marc Audy
13c761841d Fix non-unity nopch compile errors
#rnx
#preflight 623ead83610771b0f5b67668
#preflight 623eb50f196f3ae80b533bbf

[CL 19521592 by Marc Audy in ue5-main branch]
2022-03-26 02:44:37 -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
Devin Doucette
c8d64e3c97 Logging: Added and migrated to GLog->PanicFlush() for crash handling
#preflight 623a433a10251d53d5796835
#rb Zousar.Shaker

[CL 19478551 by Devin Doucette in ue5-main branch]
2022-03-23 09:39:18 -04:00
christopher waters
6698ca0eb9 Cleaning up dxgi includes in D3D11RHI
#jira none
#rb mihnea.balta
#preflight 623351a484667926da270904

[CL 19421727 by christopher waters in ue5-main branch]
2022-03-17 11:51:00 -04:00
jeff newquist
1b91227ac0 Add EPixelFormatCapabilities::TextureStore to complete list of possible capabilities (BufferLoad, BufferStore, TextureLoad, TextureStore), since some platforms expose formats with differing capabilities.
Interpret D3D*_FORMAT_SUPPORT_BUFFER as EPixelFormatCapabilities::BufferLoad, rather than D3D*_FORMAT_SUPPORT_SHADER_LOAD, which is for texture loads.
#jira none
#rb chris.waters
#preflight 6230c93a7b5cb4076889c2d8

[CL 19404863 by jeff newquist in ue5-main branch]
2022-03-16 08:53:55 -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
christopher waters
b7f30cbbaf Adding minimal interfaces to D3D11 and D3D12 RHIs
- Adding ID3D12DynamicRHI and ID3D11DynamicRHI interfaces for plugins that want to touch DirectX resources/devices directly.
- Adding specific headers for including DirectX headers: D3D12ThirdParty.h and D3D11ThirdParty.h
- Modifying plugins that were using D3D11RHIPrivate.h and D3D12RHIPrivate.h to use the interfaces instead.
- Removing plugin references to UE Modules and ThirdParty libraries that were only needed because they included the private RHI headers.
- Removing D3D11RHI/Private and D3D12RHI/Private from plugin include paths.

#jira none
#rb jeannoe.morissette, kenzo.terelst, mihnea.balta, eric.mcdaniel
#preflight 6222395bb066ef60bbad004a

[CL 19267223 by christopher waters in ue5-main branch]
2022-03-04 11:34:00 -05:00
christopher waters
6d4ca5b847 Fixing invalid call to INTC_D3D11_GetSupportedVersions where the pSupportedExtVersionsCount argument needs to contain the correct count. This is preventing Nanite from rendering on discrete Intel video cards.
#jira UE-143610
#rb kenzo.terelst, jeannoe.morissette, lukas.hermanss
#preflight 6217b349785f20248baa3b03

#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 19115910 in //UE5/Release-5.0/... via CL 19116142
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19153312 by christopher waters in ue5-main branch]
2022-02-25 14:34:53 -05:00
aaron mcleran
158c3a5b16 Removing restricted platform names from file
#rb Maxwell.Hayes
#jira UE-130476
#preflight 6216c015a45a91013f430d08


#ROBOMERGE-AUTHOR: aaron.mcleran
#ROBOMERGE-SOURCE: CL 19106676 via CL 19107096 via CL 19107208 via CL 19107219 via CL 19110186
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19151559 by aaron mcleran in ue5-main branch]
2022-02-25 13:27:37 -05:00
christopher waters
a2503f0872 Adding ERHIInterfaceType so the public RHIs can identify themselves.
Adding templated GetDynamicRHI that makes sure we don't cast the Validation DynamicRHI by accident.

#jira none
#rb jeannoe.morissette, zach.bethel
#preflight 62169c43104496cff8a1d9df

[CL 19100864 by christopher waters in ue5-main branch]
2022-02-23 16:13:31 -05:00
christopher waters
940e858169 Finishing move to ComputePipelineState objects
- Deprecating IRHIComputeContext::RHISetComputeShader.
- Moving the fallback version of  RHISetComputePipelineState to IRHICommandContextPSOFallback.
- Making IRHIComputeContext::RHISetComputePipelineState pure virtual.
- Moving the fallback versions of RHICreateGraphicsPipelineState and RHICreateComputePipelineState into the new FDynamicRHIPSOFallback for platforms that were already using IRHICommandContextPSOFallback.
- Making FDynamicRHI::RHICreateGraphicsPipelineState and FDynamicRHI::RHICreateComputePipelineState pure virtual.

#jira none
#rb luke.thatcher, florin.pascu, will.damon, jeannoe.morissette
#preflight 621660bcc152c67496d9cc75

[CL 19095306 by christopher waters in ue5-main branch]
2022-02-23 13:17:16 -05:00
aaron mcleran
7e436c45ab Making sure codecs match up on cook vs runtime
#rb Maxwell.Hayes
#jira UE-141273
#preflight 6201b20d62420bfd049b13c3

#ROBOMERGE-AUTHOR: aaron.mcleran
#ROBOMERGE-SOURCE: CL 18911813 in //UE5/Release-5.0/... via CL 18919379 via CL 18920558
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v916-18915374)

[CL 18921347 by aaron mcleran in ue5-main branch]
2022-02-09 13:20:11 -05:00