You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Removed MetalContext and MetalRenderPass. - Removed all code to restart renderpasses - Added support in the RHI for a new UploadContext which allows uploads to execute before the submission of contexts using them. - Most functionality is now within MetalRHIContext and removed dependancies so that multiple MetalRHIContext's can execute in parallel. - MetalDeviceContext has been removed and replaced with MetalDevice. - Removed the previous FrameAllocator and replaced with a temporary heap based allocator. - Metal no longer uses SubmitCommandsHint and now builds/submits command buffers through RHIFinalizeContext/RHISubmitCommandLists - Added initial support for MetalRHI parallel encoding, can be tested with -rhiparallel. - Removed addition temporary allocations when uploading to buffers #rb Luke.Thatcher #jira UE-212349 [CL 35450226 by carl lloyd in ue5-main branch]
40 lines
953 B
Plaintext
40 lines
953 B
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
UpdateDescriptorHandle.usf
|
|
=============================================================================*/
|
|
|
|
#include "Common.ush"
|
|
|
|
#if COMPILER_METAL_SHADER_CONVERTER
|
|
struct MetalDescriptor
|
|
{
|
|
uint64_t gpuVA;
|
|
uint64_t textureViewID;
|
|
uint64_t metadata;
|
|
};
|
|
typedef MetalDescriptor Descriptor;
|
|
#else
|
|
struct DefaultDescriptor
|
|
{
|
|
uint64_t gpuIndex;
|
|
};
|
|
typedef DefaultDescriptor Descriptor;
|
|
#endif
|
|
|
|
uint NumUpdates;
|
|
|
|
StructuredBuffer<uint> DescriptorIndices;
|
|
StructuredBuffer<Descriptor> DescriptorEntries;
|
|
RWStructuredBuffer<Descriptor> OutputData;
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void MainCS(uint DispatchThreadId : SV_DispatchThreadID)
|
|
{
|
|
if(DispatchThreadId < NumUpdates)
|
|
{
|
|
uint DestEntryIdx = DescriptorIndices[DispatchThreadId];
|
|
OutputData[DestEntryIdx] = DescriptorEntries[DispatchThreadId];
|
|
}
|
|
}
|