You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- preparational step to enable HZB culling of invalidations in an uniform way. - also add FComputeShaderUtils helper to set up an indirect dispatch. #rb andrew.lauritzen #preflight 6130818017a8610001b0cfc7 #ROBOMERGE-SOURCE: CL 17400532 #ROBOMERGE-BOT: (v865-17346139) [CL 17400838 by ola olsson in ue5-main branch]
20 lines
504 B
Plaintext
20 lines
504 B
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "../Common.ush"
|
|
|
|
StructuredBuffer<uint> InputCountBuffer;
|
|
RWBuffer<uint> IndirectDispatchArgsOut;
|
|
uint Multiplier;
|
|
uint Divisor;
|
|
uint InputCountOffset;
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void InitIndirectArgs1DCS(uint3 DTID : SV_DispatchThreadID)
|
|
{
|
|
uint GroupCount = (InputCountBuffer[InputCountOffset] * Multiplier + Divisor - 1U) / Divisor;
|
|
|
|
IndirectDispatchArgsOut[0] = GroupCount;
|
|
IndirectDispatchArgsOut[1] = 1;
|
|
IndirectDispatchArgsOut[2] = 1;
|
|
}
|