Optimize renderer memory allocations with RenderListAllocation (mem pooling)

This commit is contained in:
Wojtek Figat
2021-07-08 00:34:36 +02:00
parent 4765e1af12
commit 38bf3d87ed
4 changed files with 120 additions and 4 deletions

View File

@@ -174,7 +174,7 @@ private:
};
typedef Array<struct BatchedDrawCall, InlinedAllocation<8>> DrawCallsList;
typedef Dictionary<DrawKey, struct BatchedDrawCall, HeapAllocation> BatchedDrawCalls;
typedef Dictionary<DrawKey, struct BatchedDrawCall, class RenderListAllocation> BatchedDrawCalls;
void DrawInstance(RenderContext& renderContext, FoliageInstance& instance, FoliageType& type, Model* model, int32 lod, float lodDitherFactor, DrawCallsList* drawCallsLists, BatchedDrawCalls& result) const;
void DrawCluster(RenderContext& renderContext, FoliageCluster* cluster, FoliageType& type, DrawCallsList* drawCallsLists, BatchedDrawCalls& result) const;
#else