Files
UnrealEngine/Engine/Plugins/Experimental/NNERuntimeIREE/Shaders/NNERuntimeIREEShaderFillBuffer.usf
2025-05-18 13:04:45 +08:00

22 lines
485 B
HLSL

// Copyright Epic Games, Inc. All Rights Reserved.
#include "/Engine/Public/Platform.ush"
RWByteAddressBuffer TargetBuffer;
// Fill parameters
// x: pattern
// y: pattern width
// z: fill offset in bytes
// w: fill length in bytes
uint4 Fill;
[numthreads(THREAD_GROUP_SIZE, 1, 1)]
void Main(in const uint3 DispatchThreadID : SV_DispatchThreadID)
{
const uint Address = Fill.z + DispatchThreadID.x * 4;
if (Address < Fill.z + Fill.w)
{
TargetBuffer.Store(Address, Fill.x);
}
}