Commit Graph

900 Commits

Author SHA1 Message Date
James Studdart
320b5e409d Fix a texture array size comparison error that caused GPU crashes and/or corrupt textures.
#preflight 62944a3f48086c40b74b719d
#jira UE-151491
#fyi zach.bethel, andrew.firth
#rb trivial

[CL 20428626 by James Studdart in ue5-main branch]
2022-05-30 01:13:50 -04:00
zach bethel
92d58d2338 Restored FTextureRenderTargetCubeResource to use a staging 2D texture as its render target. Replaced the render target clears with copies from the staging texture which mirrors the old implementation with CopyToResolveTarget. Also fixed another regression in CopyTexture that wasn't part of the unit test.
#rb mihnea.balta, jason.hoerner
#preflight 628f96ab74630984fd3f45d5
#jira UE-151491

[CL 20379819 by zach bethel in ue5-main branch]
2022-05-26 11:24:29 -04:00
benjamin rouveyrol
7a21ea463f hdr multi window/display support
This improves how the editor deals with displays that have different capabilities (some with HDR, others without).
Centralize where the CVars are accessed
Have the swapchain created in SDR when shown on a SDR display
Make sure color gamut matches the one supported by the platform/swapchain.
Allow Movie scene capture to override the gamut/output format to keep existing behaviour (MovieSceneCapture relies on swapchain data)

#preflight 628baef5183c1e13462a504d
#jira UE-150952
#rb luke.thatcher

[CL 20347067 by benjamin rouveyrol in ue5-main branch]
2022-05-24 09:04:39 -04:00
zach bethel
29d075c4c8 Deprecated GRHISupportsResolveCubemapFaces.
#preflight 62880985192a338d864ba496

[CL 20304268 by zach bethel in ue5-main branch]
2022-05-20 18:14:00 -04:00
Sebastien Hillaire
ff9a2e30f6 Strata - PDO now relies on in shader depth test to avoid UAV write or material data when the depth buffer does not match.
(we cannot rely on LateZ to cull UAV writes)

#rb luke.thatcher
#preflight 628797c78828ea88c85302dc
#fyi charles.derousiers

[CL 20301945 by Sebastien Hillaire in ue5-main branch]
2022-05-20 16:08:18 -04:00
zach bethel
acc746696b Implemented dedicated MSAA resolve code path for platforms, bypassing RHICopyToResolveTarget.
#preflight 6286ba2015019f64776e4b3e
#rb christopher.waters

[CL 20298040 by zach bethel in ue5-main branch]
2022-05-20 13:24:58 -04:00
zach bethel
f6311d1011 Cleaned up FRHIRenderPassInfo cruft and forwarded resolve operations through a common RHI core method.
#preflight 62842b5982530182724612f6

[CL 20262457 by zach bethel in ue5-main branch]
2022-05-18 12:29:26 -04:00
David Harvey
9cc4146fbc move HoloLens runtime source to platform extension folder.
#jira UE-149794
#rnx
#rb Jeff.Fisher
#preflight 6284cd49614041edb76395dc

[CL 20258963 by David Harvey in ue5-main branch]
2022-05-18 06:59:59 -04:00
christopher waters
1e01768e33 Bindless shader parameters
- Adding support for bindless resources/samplers. The loose resources have to be wrapped in a macro that generates an index and proxy resource when bindless is enabled. Reflection has to parse these differently from other resources since they're parsed as uint parameters. The runtime also has to bind these differently since they end up needing to find their real resource in the binding data and then update a constant buffer.
- To assist in conversions, the shader compiler will detect if a shader is compiled with both bindless and non-bindless resources/samplers and will emit errors if that is the case.
- Adding support for bindless Uniform Buffer resources/samplers. Because Uniform Buffers aren't per-shader, they'll always update their constants with the bindless indices of their resources.
- Adding more flags to FShaderCodePackedResourceCounts required changing all the array initializations to individual parameters since not all the new flags are used everywhere.
- No shaders have been configured to support bindless resources/samplers. Yet.

#jira UE-139616
#rb zach.bethel, arciel.rekman
#preflight 6282b8ec44349a6581a21a39

[CL 20250348 by christopher waters in ue5-main branch]
2022-05-17 16:30:48 -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
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