#include "state_tracker/semaphore_state.h"
#include "state_tracker/queue_state.h"
#include "state_tracker/state_tracker.h"
static VkExternalSemaphoreHandleTypeFlags GetExportHandleTypes(const VkSemaphoreCreateInfo *pCreateInfo) { … }
void vvl::Semaphore::TimePoint::Notify() const { … }
vvl::Semaphore::Semaphore(ValidationStateTracker &dev, VkSemaphore handle, const VkSemaphoreTypeCreateInfo *type_create_info,
const VkSemaphoreCreateInfo *pCreateInfo)
: … { … }
enum vvl::Semaphore::Scope vvl::Semaphore::Scope() const { … }
void vvl::Semaphore::EnqueueSignal(const SubmissionReference &signal_submit, uint64_t &payload) { … }
void vvl::Semaphore::EnqueueWait(const SubmissionReference &wait_submit, uint64_t &payload) { … }
void vvl::Semaphore::EnqueueAcquire(vvl::Func acquire_command) { … }
std::optional<vvl::Semaphore::SemOp> vvl::Semaphore::LastOp(const std::function<bool(OpType, uint64_t, bool)> &filter) const { … }
std::optional<vvl::SubmissionReference> vvl::Semaphore::GetPendingBinarySignalSubmission() const { … }
std::optional<vvl::SubmissionReference> vvl::Semaphore::GetPendingBinaryWaitSubmission() const { … }
uint64_t vvl::Semaphore::CurrentPayload() const { … }
bool vvl::Semaphore::CanBinaryBeSignaled() const { … }
bool vvl::Semaphore::CanBinaryBeWaited() const { … }
void vvl::Semaphore::Notify(uint64_t payload) { … }
void vvl::Semaphore::Retire(vvl::Queue *current_queue, const Location &loc, uint64_t payload) { … }
std::shared_future<void> vvl::Semaphore::Wait(uint64_t payload) { … }
void vvl::Semaphore::NotifyAndWait(const Location &loc, uint64_t payload) { … }
void vvl::Semaphore::Import(VkExternalSemaphoreHandleTypeFlagBits handle_type, VkSemaphoreImportFlags flags) { … }
void vvl::Semaphore::Export(VkExternalSemaphoreHandleTypeFlagBits handle_type) { … }
std::optional<VkExternalSemaphoreHandleTypeFlagBits> vvl::Semaphore::ImportedHandleType() const { … }
#ifdef VK_USE_PLATFORM_METAL_EXT
bool vvl::Semaphore::GetMetalExport(const VkSemaphoreCreateInfo *info) {
bool retval = false;
auto export_metal_object_info = vku::FindStructInPNextChain<VkExportMetalObjectCreateInfoEXT>(info->pNext);
while (export_metal_object_info) {
if (export_metal_object_info->exportObjectType == VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT) {
retval = true;
break;
}
export_metal_object_info = vku::FindStructInPNextChain<VkExportMetalObjectCreateInfoEXT>(export_metal_object_info->pNext);
}
return retval;
}
#endif
bool SemaphoreSubmitState::CannotWaitBinary(const vvl::Semaphore &semaphore_state) const { … }
VkQueue SemaphoreSubmitState::AnotherQueueWaits(const vvl::Semaphore &semaphore_state) const { … }
bool SemaphoreSubmitState::CannotSignalBinary(const vvl::Semaphore &semaphore_state, VkQueue &other_queue,
vvl::Func &other_command) const { … }
bool SemaphoreSubmitState::CheckSemaphoreValue(
const vvl::Semaphore &semaphore_state, std::string &where, uint64_t &bad_value,
std::function<bool(const vvl::Semaphore::OpType, uint64_t, bool is_pending)> compare_func) { … }