wip(standalone): GPU step 7 -- viewer cold start 2.45 -> 1.49 s on CPU; GPU skirts missing

Resumed round: checkpoint rebuilt and re-verified (parity 3,436/3,436, walk
5,642/5,642, W1/W8 hashes 44/44, far topology 0 diffs vs CPU and WARP, far
survival PASS). Remote GPU holes were missing clipped LOD skirts: tiles with
visible skirt faces now fall back to the CPU mesh path, leaving only 16 far
tiles GPU-rendered until a GPU skirt emitter exists.

My interleaved runs (SkirtSeamVerify, process start -> whole view):
CPU 1.522/1.488/1.430 s; GPU 4.271/1.749/1.659 s. A ~2.8 s first Present
stall hit only my first GPU launch; Luna saw it on every fresh launch, so the
trigger is still unidentified. Headless CPU clipmap 0.789 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MmSoF64BbRFmk9C3p1VsBJ
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-06 22:39:40 +02:00
1 parent 41716f00b8
commit 90421d0655
28 files changed
+167 -2

No files matched your search

+18 -2
View File
@@ -1486,6 +1486,7 @@ namespace
bool bGpuFarEnabled=false;
bool bGpuFarAuditEnabled=false;
bool bGpuFarAuditReported=false;
bool bDisableVSync=false;
std::unique_ptr<FFarSurvivalAudit> GpuFarAudit;
bool bGpuFarFirstTileReported=false;
std::filesystem::path GpuFarShaderPath;
@@ -2380,13 +2381,25 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
if(!bGpuFarEnabled||!ShapeWorld||!ShapeWorld->hasFarWorld())return;
std::vector<FVoxelTileKey> CpuTiles;CpuTiles.reserve(Keys.size());
std::vector<FVoxelTileKey> Eligible;Eligible.reserve(Keys.size());
uint64 SkirtTransitionFallbackTiles=0;
for(const FVoxelTileKey& Key:Keys)
{
const VoxelForgeCore::TileKey CoreKey{{Key.Coord.X,Key.Coord.Y,Key.Coord.Z},Key.Level};
const bool NearGpuEligible=Key.Level<World->FullResClipLevels;
if(NearGpuEligible||ShapeWorld->isFarFieldTileEligible(CoreKey))
{
Eligible.push_back(Key);
const uint8 VisibleSkirtFaces=World->bGenerateSkirts
?ComputeVisibleSkirtFaceMask(Key,DesiredTileSet):0;
if(VisibleSkirtFaces!=0)
{
// CPU tiles carry the established clipped LOD skirts. The GPU field
// and marching-cubes outputs match the CPU surface, but currently do
// not emit these seam curtains. Keep tiles with exposed LOD faces on
// the reference mesh path until a GPU skirt kernel is available.
CpuTiles.push_back(Key);
++SkirtTransitionFallbackTiles;
}
else Eligible.push_back(Key);
}
else CpuTiles.push_back(Key);
}
@@ -2460,6 +2473,8 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
{return Key.Level<World->FullResClipLevels;}));
std::printf("[GpuFieldEligibility] eligible_gpu_tiles=%zu near_gpu_tiles=%zu cpu_fallback_tiles=%zu\n",
GpuFarEligibleTiles.size(),NearGpuTiles,Keys.size()-GpuFarEligibleTiles.size());
std::printf("[GpuSkirtSeamFallback] tiles=%llu reason=visible_lod_skirt_faces status=active\n",
static_cast<unsigned long long>(SkirtTransitionFallbackTiles));
}
void PumpGpuFarGeneration()
@@ -3391,7 +3406,7 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
}
CaptureRenderedFrame();
const auto BeforePresent=std::chrono::steady_clock::now();
const UINT PresentSyncInterval=1u;
const UINT PresentSyncInterval=bDisableVSync?0u:1u;
const auto PresentCallStart=std::chrono::steady_clock::now();
SwapChain->Present(PresentSyncInterval,0);
const auto PresentCallEnd=std::chrono::steady_clock::now();
@@ -5214,6 +5229,7 @@ int main(int Argc,char** Argv)
{
const std::string_view Arg=Argv[I];
if(Arg.starts_with("--capture="))App.CapturePath=std::string(Arg.substr(10));
else if(Arg=="--no-vsync")App.bDisableVSync=true;
else if(Arg=="--profile-attribution")App.bProfileAttribution=true;
else if(Arg=="--profile-detail-band")bProfileDetailBand=true;
else if(Arg=="--compare-evaluators")App.bCompareEvaluators=true;