Class RangeValidator
Defined in File range-validator.h
Class Documentation
-
class RangeValidator
Public Types
-
enum ResultMaskBits
Values:
-
enumerator kValid
Cache and range is valid.
-
enumerator kInvalidCache
Cache is null or unusable.
-
enumerator kInvalidRange
first-last range is invalid or out of bounds for provided cache
-
enumerator kMultiplePrimaryCommandBuffersInRange
More than one primary command buffer object is used in range.
-
enumerator kFirstRangeCallIsBoundary
First call is command buffer initialization call (i.e. vkBeginCommandBuffer)
-
enumerator kLastRangeCallIsBoundary
Last call is command buffer finalization call (i.e. vkEndCommandBuffer)
-
enumerator kValid
Public Functions
-
RangeValidator(CallableCache *cache)
-
~RangeValidator()
-
bool IsValidRangeForMeasurements(uint64_t first, uint64_t last, uint32_t *reason = nullptr, bool checkForNativeCalls = true, bool checkForSingleCmdBuf = true)
Returns true if range [first, last] is measurable.
You can avoid iterating an entire range if you skip the checks checkForNativeCalls, checkForSingleCmdBuf by setting them to false. This will decrease the number of CPU cache misses and improve performance. But you have to perform these checks in the calling function.
-
void *GetNativeCommandBufferKeyFromCall(uint64_t index)
-
enum ResultMaskBits