Optimize SDF model buffer flushing to be used only if needed
This commit is contained in:
@@ -460,12 +460,6 @@ bool GlobalSignDistanceFieldPass::Render(RenderContext& renderContext, GPUContex
|
||||
}
|
||||
}
|
||||
|
||||
// Send models data to the GPU
|
||||
{
|
||||
PROFILE_GPU_CPU("Update Models");
|
||||
_modelsBuffer->Flush(context);
|
||||
}
|
||||
|
||||
// Perform batched chunks rasterization
|
||||
if (!anyDraw)
|
||||
{
|
||||
@@ -533,6 +527,13 @@ bool GlobalSignDistanceFieldPass::Render(RenderContext& renderContext, GPUContex
|
||||
}
|
||||
}
|
||||
|
||||
// Send models data to the GPU
|
||||
if (chunks.Count() != 0)
|
||||
{
|
||||
PROFILE_GPU_CPU("Update Models");
|
||||
_modelsBuffer->Flush(context);
|
||||
}
|
||||
|
||||
// Rasterize non-empty chunk (first layer so can override existing chunk data)
|
||||
for (const auto& e : chunks)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user