ROADMAP.md

This commit is contained in:
2026-01-09 18:37:04 +00:00
parent 621803ed0f
commit 8c76553de9
3 changed files with 37 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ Treat JSON config as a declarative control plane that compiles into scene, resou
- [~] Explicit pass scheduling and backend submission planning (schedule only; no backend plan)
### Ultra Plan: "Probe Fortress"
- [~] Probe hooks (config/render graph/graphics reports wired; missing `OnLoadScene`, `OnDraw`, `OnPresent`, `OnFrameEnd`)
- [~] Probe hooks (config/render graph/graphics reports wired; `OnDraw`/`OnPresent`/`OnFrameEnd` now emit trace-gated runtime probes; `OnLoadScene` still missing)
- [x] Pipeline compatibility checks (mesh layout vs shader inputs) via shader pipeline validator
- [x] Sampler limits enforced from bgfx caps
- [ ] Shader uniform compatibility enforcement

View File

@@ -1168,6 +1168,11 @@ bool BgfxGraphicsBackend::EndFrame(GraphicsDeviceHandle device) {
logger_->Trace("BgfxGraphicsBackend", "EndFrame",
"frameNumber=" + std::to_string(frameNumber));
}
if (ShouldEmitRuntimeProbe()) {
const std::string details = "frameNumber=" + std::to_string(frameNumber);
ReportRuntimeProbe("FRAME_PRESENT", "Frame presented", details);
ReportRuntimeProbe("FRAME_END", "Frame end", details);
}
return true;
}
@@ -1256,6 +1261,14 @@ void BgfxGraphicsBackend::Draw(GraphicsDeviceHandle device, GraphicsPipelineHand
", indexCount=" + std::to_string(indexCount) +
", totalVertices=" + std::to_string(vb->vertexCount));
}
if (ShouldEmitRuntimeProbe()) {
ReportRuntimeProbe(
"DRAW_SUBMIT",
"Draw submitted",
"indexCount=" + std::to_string(indexCount) +
", indexOffset=" + std::to_string(indexOffset) +
", vertexOffset=" + std::to_string(vertexOffset));
}
// Validate bounds to prevent GPU driver crashes
// Based on crash analysis from sdl3_app.log where invalid parameters caused GPU segfault
@@ -1314,6 +1327,25 @@ void BgfxGraphicsBackend::Draw(GraphicsDeviceHandle device, GraphicsPipelineHand
bgfx::submit(viewId_, pipelineIt->second->program);
}
bool BgfxGraphicsBackend::ShouldEmitRuntimeProbe() const {
if (!probeService_ || !logger_) {
return false;
}
const LogLevel level = logger_->GetLevel();
return level == LogLevel::TRACE || level == LogLevel::DEBUG;
}
void BgfxGraphicsBackend::ReportRuntimeProbe(const std::string& code,
const std::string& message,
const std::string& details) const {
ProbeReport report{};
report.severity = ProbeSeverity::Info;
report.code = code;
report.message = message;
report.details = details;
probeService_->Report(report);
}
GraphicsDeviceHandle BgfxGraphicsBackend::GetPhysicalDevice() const {
return nullptr;
}

View File

@@ -163,6 +163,10 @@ private:
void DestroyPipelines();
void DestroyBuffers();
bool HasProcessedFrame() const { return frameCount_ > 0; }
bool ShouldEmitRuntimeProbe() const;
void ReportRuntimeProbe(const std::string& code,
const std::string& message,
const std::string& details = "") const;
std::shared_ptr<IConfigService> configService_;
std::shared_ptr<IPlatformService> platformService_;