载入中...
搜索中...
未找到
MeshVfxBatchSubmission.cpp
浏览该文件的文档.
2
3namespace eve::stylize {
4namespace {
5
6void markPartial(MeshVfxSubmissionReport& report) {
7 if (report.status == MeshVfxQueueSubmitStatus::Complete) {
9 }
10}
11
12} // namespace
13
15 IMeshVfxBatchSink& sink) const {
17 for (const auto& batch : queue.batches) {
18 const auto begin = sink.beginBatch(batch.key);
21 return report;
22 }
25 return report;
26 }
28 ++report.skippedBatches;
29 report.skippedDraws += static_cast<std::uint32_t>(batch.draws.size());
30 markPartial(report);
31 continue;
32 }
33
34 ++report.acceptedBatches;
35 for (const auto& draw : batch.draws) {
36 const auto submitted = sink.submitDraw(draw);
39 return report;
40 }
41 if (submitted == MeshVfxSubmitStatus::Failed) {
42 ++report.failedDraws;
44 return report;
45 }
46 if (submitted == MeshVfxSubmitStatus::Skipped) {
47 ++report.skippedDraws;
48 markPartial(report);
49 } else {
50 ++report.acceptedDraws;
51 }
52 }
53
54 const auto end = sink.endBatch();
57 return report;
58 }
61 return report;
62 }
64 markPartial(report);
65 }
66 }
67 return report;
68}
69
70} // namespace eve::stylize
MeshVfxBatchedDraw draw
float begin
Immediate graphics-backend contract for a mesh VFX render queue.
virtual MeshVfxSubmitStatus endBatch()=0
Ends the active batch and flushes backend-local state if needed.
virtual MeshVfxSubmitStatus submitDraw(const MeshVfxBatchedDraw &draw)=0
Submits one ordered instance in the active batch.
virtual MeshVfxSubmitStatus beginBatch(const MeshVfxBatchKey &key)=0
Begins a consecutive group sharing immutable GPU state.
MeshVfxSubmissionReport submit(const MeshVfxRenderQueue &queue, IMeshVfxBatchSink &sink) const
Submits all batches in order until completion or device loss.
Complete deterministic queue consumed by a graphics backend.
std::vector< MeshVfxRenderBatch > batches
Counters and terminal state produced by queue execution.