wip(standalone): GPU step 14 -- warm-up 2.04 -> 1.05 s; cold path now waits on streaming, not shaders

Per-kernel fences in the production viewer put 1.73-1.98 s on the near-detail
Flush (shader creation 17-19 ms, dispatch calls ~0): skipping only that
dispatch cut idle warm-up 1.893 -> 0.521 s. Near detail rewritten with a
shared owner-roughness loop and shared Perlin samples: DXBC 448,588 -> 120,860
bytes, cold first use 1,596 -> 709 ms. Warm-up median 1.052 s, yet whole view
is unchanged (CPU 1.352 s vs hybrid 3.196 s): after input export the hybrid
spends 1.78-2.00 s streaming 1,082 GPU + 1,144 CPU-fallback tiles.
Audits: 0 diffs near/far vs CPU and WARP, hashes, walk 5,642/5,642, survival.

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-07 08:03:00 +02:00
1 parent a96fd0b95b
commit f322b1c089
14 files changed
+774 -38

No files matched your search

+5 -1
View File
@@ -1491,6 +1491,7 @@ namespace
bool bGpuFarShaderPrewarm=false,bDisableGpuWarmupPresentHold=false;
bool bGpuFarWarmupResourcesOnly=false;
bool bGpuFarWarmupNormalPriority=false,bGpuFarWarmupBeforeWorkers=false;
bool bGpuFarWarmupKernelFences=false;
bool bGpuFarWarmupOnly=false;
std::string GpuWarmupEntryFilter;
std::thread GpuShaderWarmupThread;
@@ -1897,6 +1898,7 @@ float3 Lit=Rock*(Ambient+0.88*Diffuse)+float3(0.50,0.69,0.82)*Head*0.75;
}
bGpuShaderWarmupQueueSucceeded=VoxelForgeGpuFarViewer::QueueFarShaderWarmup(
Device,Context,GpuFarShaderPath,!bGpuFarWarmupResourcesOnly,GpuWarmupEntryFilter,
bGpuFarWarmupKernelFences,
GpuShaderWarmupQueueError);
});
std::printf("[GpuShaderWarmup] queue_thread=started overlap=%s\n",
@@ -5620,6 +5622,8 @@ int main(int Argc,char** Argv)
App.bGpuFarEnabled=true,App.bGpuFarShaderPrewarm=true,App.bGpuFarWarmupBeforeWorkers=true,
App.bShapeWorld=true,App.bForceGenerate=true,App.bPresentCpuFrameBeforeGpu=true,
App.bHoldCpuFrameDuringGpuWarmup=true;
else if(Arg=="--gpu-far-warmup-kernel-fences")
App.bGpuFarWarmupKernelFences=true;
else if(Arg=="--gpu-far-warmup-only")
App.bGpuFarEnabled=true,App.bGpuFarShaderPrewarm=true,App.bGpuFarWarmupOnly=true,
App.bShapeWorld=true,App.bForceGenerate=true;
@@ -5891,7 +5895,7 @@ int main(int Argc,char** Argv)
const auto WarmupOnlyStart=std::chrono::steady_clock::now();
std::string WarmupError;
if(!VoxelForgeGpuFarViewer::QueueFarShaderWarmup(App.Device,App.Context,App.GpuFarShaderPath,
true,App.GpuWarmupEntryFilter,WarmupError))
true,App.GpuWarmupEntryFilter,App.bGpuFarWarmupKernelFences,WarmupError))
{std::fprintf(stderr,"[GpuShaderWarmupError] queue: %s\n",WarmupError.c_str());return 5;}
if(!VoxelForgeGpuFarViewer::CompleteFarShaderWarmup(App.Device,App.Context,
App.GpuFarShaderPath,WarmupError))