Rasagar/Library/PackageCache/com.unity.rendering.light-transport/Runtime/UnifiedRayTracing/Compute/RadeonRays/Common.cs

24 lines
592 B
C#
Raw Normal View History

2024-08-26 13:07:20 -07:00
namespace UnityEngine.Rendering.RadeonRays
{
internal class Common
{
public static uint CeilDivide(uint val, uint div)
{
return (val + div - 1) / div;
}
public static void EnableKeyword(CommandBuffer cmd, ComputeShader shader, string keyword, bool enable)
{
if (enable)
{
cmd.EnableKeyword(shader, new LocalKeyword(shader, keyword));
}
else
{
cmd.DisableKeyword(shader, new LocalKeyword(shader, keyword));
}
}
}
}