MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / EnqueueSignal

Method EnqueueSignal

layers/state_tracker/fence_state.cpp:57–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57bool vvl::Fence::EnqueueSignal(vvl::Queue* queue_state, uint64_t next_seq) {
58 auto guard = WriteLock();
59 if (scope_ != kInternal) {
60 return true;
61 }
62
63 // Ensure that the fence's std::promise is not set when the fence is submitted to the queue.
64 // This guarantees that we can always call set_value() on the promise during Retire.
65 // (For ill-formed applications that forgot to call vkResetFences, the fence may be in the
66 // signaled state and its promise set - this would cause a crash during Retire)
67 ResetPromise();
68
69 // Mark fence in use
70 state_ = kInflight;
71 queue_ = queue_state;
72 seq_ = next_seq;
73 return false;
74}
75
76// Called from a non-queue operation, such as vkWaitForFences()|
77void vvl::Fence::NotifyAndWait(const Location& loc) {

Callers 4

PreSubmitMethod · 0.45

Calls 1

WriteLockClass · 0.85

Tested by

no test coverage detected