fix: close STEP-092 native validation issues
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled

This commit is contained in:
tei
2026-09-24 12:14:17 +09:00
parent b89c8c8cb4
commit 4908244d2d
2 changed files with 15 additions and 4 deletions

View File

@@ -868,10 +868,11 @@ void Renderer::Impl::render(const RenderTree& renderTree,
int32_t i = static_cast<int32_t>(layerRenderItems.size()) - 1;
for (auto it = layerRenderItems.begin(); it != layerRenderItems.end() && i >= 0; ++it, --i) {
parameters.currentLayer = i;
const RenderItem& item = *it;
const LayerRenderItem& layerItem = *it;
const RenderItem& item = layerItem;
const bool itemInLiveRange = !useRetainedRanges || !retainedMode ||
(static_cast<int32_t>(item.index) >= ranges.continuousBegin &&
static_cast<int32_t>(item.index) < ranges.continuousEndExclusive);
(static_cast<int32_t>(layerItem.index) >= ranges.continuousBegin &&
static_cast<int32_t>(layerItem.index) < ranges.continuousEndExclusive);
if (itemInLiveRange && item.hasRenderPass(parameters.pass)) {
item.render(parameters);
}

View File

@@ -125,7 +125,17 @@ void RetainedUnderlayCache::synchronizeRuntimeState(
observedControlRevision = revision;
// GPU resources are owned and released on the renderer thread. The public setter changes
// the shared enabled bit first and schedules this synchronization through Map::onUpdate().
if (valid || key) invalidate(runtimeState->isEnabled() ? "camera-or-boundary" : "runtime-disabled");
if (valid || key) {
if (runtimeState->isEnabled()) {
invalidate("camera-or-boundary");
} else {
// setEnabled(false) already records the aggregate runtime-disabled invalidation once.
// Preserve that legacy aggregate semantic while still exposing the actual range cache invalidation.
valid = false;
lastInvalidationReason = "runtime-disabled";
runtimeState->recordRangeInvalidation(role == RetainedRangeRole::Top);
}
}
releaseResources();
if (!runtimeState->isEnabled()) {
lastInvalidationReason = "runtime-disabled";