| 1031 | } |
| 1032 | |
| 1033 | void SyncOpSetEvent::DoRecord(QueueId queue_id, ResourceUsageTag tag, const std::shared_ptr<const AccessContext>& access_context, |
| 1034 | SyncEventsContext& events_context) const { |
| 1035 | auto* sync_event = events_context.GetFromShared(event_); |
| 1036 | if (!sync_event) { |
| 1037 | return; |
| 1038 | } |
| 1039 | |
| 1040 | // What happens with two SetEvent is that one cannot know what group of operations will be waited for. |
| 1041 | // Given: |
| 1042 | // Stuff1; SetEvent; Stuff2; SetEvent; WaitEvents; |
| 1043 | // WaitEvents cannot know which of Stuff1, Stuff2, or both has completed execution. |
| 1044 | |
| 1045 | if (!sync_event->HasBarrier(src_exec_scope_.stage_mask, src_exec_scope_.exec_scope)) { |
| 1046 | sync_event->unsynchronized_set = sync_event->last_command; |
| 1047 | sync_event->ResetFirstScope(); |
| 1048 | } else if (!sync_event->first_scope) { |
| 1049 | // We only set the scope if there isn't one |
| 1050 | sync_event->scope = src_exec_scope_; |
| 1051 | |
| 1052 | // Save the shared_ptr to copy of the access_context present at set time (sent us by the caller) |
| 1053 | sync_event->first_scope = access_context; |
| 1054 | sync_event->unsynchronized_set = vvl::Func::Empty; |
| 1055 | sync_event->first_scope_tag = tag; |
| 1056 | } |
| 1057 | // TODO: Store dep_info_ shared ptr in sync_state for WaitEvents2 validation |
| 1058 | sync_event->last_command = command_; |
| 1059 | sync_event->last_command_tag = tag; |
| 1060 | sync_event->barriers = 0U; |
| 1061 | } |
| 1062 | |
| 1063 | SyncOpBeginRenderPass::SyncOpBeginRenderPass(vvl::Func command, const SyncValidator& sync_state, |
| 1064 | const VkRenderPassBeginInfo* pRenderPassBegin, |
nothing calls this directly
no test coverage detected