mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-24 13:44:58 +00:00
ROADMAP.md
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user