Commit Graph

796 Commits

Author SHA1 Message Date
Richard Wallis
b26153140d Fix for Texture3D update region with compressed pixel formats - account for format info blocksize when performing line copies to support compressed formats. Apply the same logic for Texture2D. Some other minor tidy ups in this area to simplify buffer handling. Change intermediate buffers from Dynamic to Static - they are just temp surfaces and only update once we don't need to pay the additional cost of 3 backing buffers.
#jira UE-153907
#review-20392017 @will.damon
#preflight none
#rnx
#rb will.damon

[CL 20434971 by Richard Wallis in ue5-main branch]
2022-05-31 05:31:52 -04:00
Richard Wallis
b21a0d1f7b Speculative fix for premature release of texture view. UAV texture view is now an FMetalTexture which is getting deleted at the end of the destructor - it was an FMetalSurface which handled deferred deletion - manually add safe destruction of texture view in the new FMetalResourceViewBase class destructor.
#jira UE-151301
#review @will.damon
#rnx
#preflight none
#rb will.damon

[CL 20345541 by Richard Wallis in ue5-main branch]
2022-05-24 05:09:12 -04:00
will damon
f239b23978 Metal RHI: Add missing pixel format conversion (A8R8G8B8)
#rb richard.wallis, carl.lloyd
#jira UE-152957
#rnx
#preflight n/a

[CL 20327491 by will damon in ue5-main branch]
2022-05-23 10:26:05 -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
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
Richard Wallis
5ddded329b Fixes for Metal automation tests not running to completion and QA-Materials build lighting crashing.
- ShadingFurnaceTest MainPS() OutColor was returning float3,  need to return float4 when RGBA texture is bound on Metal otherwise we get validation errors.
- DistanceFieldShadowing; Fetch VS not PS.
- MetalRenderTargetTexture Cube resolve; cube copy to array seems to work as intended,  remove asserts to allow this area to be more fully tested.

#jira UE-120222,  UE-149106
#review-20181522 @will.damon, @Sebastien.Hillaire,  @Charles.deRousiers
#rb will.damon,  Sebastien.Hillaire,
#preflight https://horde.devtools.epicgames.com/job/627e6f609650a277337ac706
#rnx

[CL 20221500 by Richard Wallis in ue5-main branch]
2022-05-16 05:37:52 -04:00
christopher waters
b4f10f8e6e Adding missing SetInitialState calls to the Mac internal viewport textures.
#jira UE-151907
#rb mihnea.balta
#preflight skip

[CL 20181670 by christopher waters in ue5-main branch]
2022-05-13 11:11:09 -04:00
christopher waters
4da71d47ff Removing the long-form create functions and constructors from FRHITextureCreateDesc in favor of the shorter versions. Fixing Mac RHI code.
#jira none
#rb none
#preflight skip

[CL 20173916 by christopher waters in ue5-main branch]
2022-05-12 19:21:58 -04:00
christopher waters
4b9e68073c Deprecating RHICreateTexture2D and RHICreateTextureExternal2D.
#jira none
#rb zach.bethel
#preflight 627a6ec010766ef8c1f54f1e

[CL 20129702 by christopher waters in ue5-main branch]
2022-05-10 17:13:37 -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
will damon
24aee2ecd7 Metal RHI, AGXRHI: Fix ASAN report of global-buffer-overrun
#rb will.damon
#fyi luke.thatcher
#rnx
#preflight n/a

[CL 20070563 by will damon in ue5-main branch]
2022-05-06 00:41:42 -04:00
will damon
2fd04ebc8e AGXRHI: Convert FAGXResourceViewBase::TextureView type to true Metal texture type
#rb will.damon
#jira none
#rnx
#preflight n/a

[CL 20054447 by will damon in ue5-main branch]
2022-05-04 23:09:36 -04:00
will damon
ffef6d23ee AGXRHI: Convert FAGXViewport and FAGXSurface GetDrawableTexture() and GetCurrentTexture() return types to Metal native types.
#rb will.damon
#jira none
#rnx
#preflight n/a

[CL 20054287 by will damon in ue5-main branch]
2022-05-04 22:26:58 -04:00
will damon
eb6d2f5f8d AGXRHI: Fix null pointer dereference on compute shader reflection object.
#rb will.damon
#jira none
#rnx
#preflight n/a

[CL 20054161 by will damon in ue5-main branch]
2022-05-04 22:09:59 -04:00
will damon
7abbcaf31c AGXRHI: Port CL 20023804
---

Added support for per-slice texture array UAV+SRV on some platforms

---

#rb will.damon
#jira none
#rnx
#preflight n/a

[CL 20054146 by will damon in ue5-main branch]
2022-05-04 22:08:20 -04:00
guillaume abadie
3c50a8937d Added support for per-slice texture array UAV+SRV on some platforms
#rb luke.thatcher, zach.bethel, will.damon
[FYI] richard.wallis, mihnea.balta
#preflight 6261a519d929bc34a3ed5699, 6270c4cc006bd3ab9e83eb1d

#ROBOMERGE-AUTHOR: guillaume.abadie
#ROBOMERGE-SOURCE: CL 20023299 via CL 20023301 via CL 20023302
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20023804 by guillaume abadie in ue5-main branch]
2022-05-03 08:29:15 -04:00
will damon
7e8bb7f687 AGXRHI: Remove mtlpp::TextureUsage and mtlpp::PrugableState types
#rb will.damon
#jira none
#rnx
#preflight n/a

[CL 19980690 by will damon in ue5-main branch]
2022-04-29 11:57:23 -04:00
will damon
3e163b856c Restore 2DArray mapping of Cube UAVs for Metal after a refactoring pass blew it away.
- We have to support older Apple GPU Family devices (< 4), so we cannot simply use the obvious mapping. This is a quick workaround to resolve a metal validation layer error while we implement a better solution that uses the default/obvious mapping on newer/supported devices.

#rb will.damon
#author richard.wallis
#jira none
#rnx
#preflight n/a

[CL 19964331 by will damon in ue5-main branch]
2022-04-28 12:48:44 -04:00
will damon
07b16c16c5 Fix memory leak of MTLTextureDescriptor on macOS/iOS when using the RHI thread and generating the MetalRHIBuffer linear texture view - add SCOPED_AUTORELEASE_POOL to FMetalRHIBuffer::CreateLinearTexture().
#jira UE-149077
[REVIEW] [at]will.damon
#rb will.damon
#preflight n/a

#ROBOMERGE-OWNER: will.damon
#ROBOMERGE-AUTHOR: richard.wallis
#ROBOMERGE-SOURCE: CL 19940695 in //UE5/Release-5.0/... via CL 19947128
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19952427 by will damon in ue5-main branch]
2022-04-28 02:00:30 -04:00
will damon
58ea970923 AGXRHI: Remove/replace mtlpp::ResourceOptions with native Metal type
- Also, remove PermittedOptions and unnecessary option filtering.
- Also, remove texture buffer conditions, fallback and feature flag. All Metal platforms now support this and it is by far the preferred way of doing things.

#rb will.damon
#fyi richard.wallis, carl.lloyd
#rnx
#jira none
#preflight n/a

[CL 19941687 by will damon in ue5-main branch]
2022-04-27 12:27:45 -04:00
will damon
3b69d67a5e AGXRHI: Replace mtlpp::PixelFormat with MTLPixelFormat
#rb will.damon
#fyi richard.wallis, carl.lloyd
#rnx
#jira none
#preflight n/a

[CL 19902877 by will damon in ue5-main branch]
2022-04-25 11:06:04 -04:00
will damon
fcbdeda375 AGXRHI: Use MTLPrimitiveTopologyClass type
#rb will.damon
#jira none
#rnx
#preflight n/a

[CL 19867372 by will damon in ue5-main branch]
2022-04-22 13:10:00 -04:00