75 lines
2.2 KiB
C++
75 lines
2.2 KiB
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
namespace mln {
|
|
|
|
struct RetainedUnderlayDiagnostics {
|
|
bool enabled = true;
|
|
uint64_t build = 0;
|
|
uint64_t reuse = 0;
|
|
uint64_t fallback = 0;
|
|
uint64_t invalidation = 0;
|
|
std::string lastReason;
|
|
bool rangeConfigured = false;
|
|
bool rangeValid = false;
|
|
std::string startLayerId;
|
|
std::string endLayerId;
|
|
int32_t startIndex = -1;
|
|
int32_t endIndex = -1;
|
|
int32_t continuousBegin = -1;
|
|
int32_t continuousEndExclusive = -1;
|
|
bool bottomPresent = false;
|
|
std::string bottomCacheState{"disabled"};
|
|
uint64_t bottomBuild = 0;
|
|
uint64_t bottomReuse = 0;
|
|
uint64_t bottomInvalidation = 0;
|
|
std::string bottomLastInvalidationReason{"none"};
|
|
uint64_t bottomTextureCreate = 0;
|
|
uint64_t bottomCompositeCreate = 0;
|
|
uint64_t bottomResourceRelease = 0;
|
|
bool topPresent = false;
|
|
std::string topCacheState{"disabled"};
|
|
uint64_t topBuild = 0;
|
|
uint64_t topReuse = 0;
|
|
uint64_t topInvalidation = 0;
|
|
std::string topLastInvalidationReason{"none"};
|
|
uint64_t topTextureCreate = 0;
|
|
uint64_t topCompositeCreate = 0;
|
|
uint64_t topResourceRelease = 0;
|
|
bool rangeFallback = false;
|
|
bool fastPathEligible = false;
|
|
bool fastPathActive = false;
|
|
std::string fastPathFallbackReason{"no-prepared-tree"};
|
|
uint64_t fastPathHit = 0;
|
|
uint64_t fastPathMiss = 0;
|
|
uint64_t fullCpuFrame = 0;
|
|
};
|
|
|
|
struct ContinuousLayerRangeConfig {
|
|
bool configured = false;
|
|
std::string startLayerId;
|
|
std::string endLayerId;
|
|
uint64_t revision = 0;
|
|
};
|
|
|
|
struct ContinuousLayerRangeResolution {
|
|
bool configured = false;
|
|
bool valid = false;
|
|
std::string startLayerId;
|
|
std::string endLayerId;
|
|
int32_t startIndex = -1;
|
|
int32_t endIndex = -1;
|
|
uint64_t configRevision = 0;
|
|
std::string reason{"not-configured"};
|
|
|
|
int32_t begin() const noexcept { return startIndex; }
|
|
int32_t endExclusive() const noexcept { return valid ? endIndex + 1 : -1; }
|
|
bool bottomPresent() const noexcept { return valid && startIndex > 0; }
|
|
bool topPresent(int32_t layerCount) const noexcept { return valid && endExclusive() < layerCount; }
|
|
};
|
|
|
|
} // namespace mln
|