using System; using System.Collections.Generic; using Unity.Collections; using UnityEngine.Assertions; namespace UnityEngine.Rendering { internal struct InstanceCullerViewStats { public BatchCullingViewType viewType; public int viewInstanceID; public int splitIndex; public int visibleInstances; public int drawCommands; } internal enum InstanceOcclusionEventType { OcclusionTest, OccluderUpdate, } internal struct InstanceOcclusionEventStats { public int viewInstanceID; public InstanceOcclusionEventType eventType; public int occluderVersion; public int subviewMask; public OcclusionTest occlusionTest; public int visibleInstances; public int culledInstances; } internal struct DebugOccluderStats { public int viewInstanceID; public int subviewCount; public Vector2Int occluderMipLayoutSize; } internal class DebugRendererBatcherStats : IDisposable { public bool enabled; public NativeList instanceCullerStats; public NativeList instanceOcclusionEventStats; public NativeList occluderStats; public bool occlusionOverlayEnabled; public bool occlusionOverlayCountVisible; public bool overrideOcclusionTestToAlwaysPass; public DebugRendererBatcherStats() { instanceCullerStats = new NativeList(Allocator.Persistent); instanceOcclusionEventStats = new NativeList(Allocator.Persistent); occluderStats = new NativeList(Allocator.Persistent); } public void Dispose() { if (instanceCullerStats.IsCreated) instanceCullerStats.Dispose(); if (instanceOcclusionEventStats.IsCreated) instanceOcclusionEventStats.Dispose(); if (occluderStats.IsCreated) occluderStats.Dispose(); } } internal struct OcclusionCullingDebugOutput { public RTHandle occluderDepthPyramid; public GraphicsBuffer occlusionDebugOverlay; public OcclusionCullingDebugShaderVariables cb; } }