MCPcopy Create free account
hub / github.com/crosire/reshade / on_execute_primary

Function on_execute_primary

examples/09-depth/generic_depth_addon.cpp:832–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

830 target_state.reset();
831}
832static void on_execute_primary(command_queue *queue, command_list *cmd_list)
833{
834 // Skip merging state when this execution event is just the immediate command list getting flushed
835 if (cmd_list == queue->get_immediate_command_list())
836 return;
837
838 auto &target_state = *queue->get_private_data<state_tracking>();
839 const auto &source_state = *cmd_list->get_private_data<state_tracking>();
840 assert(target_state.is_queue && !source_state.is_queue);
841
842 // Need to protect access to the queue state, since another thread may be in a present call, which can reset this state
843 const std::unique_lock<std::shared_mutex> lock(s_mutex);
844
845 target_state.merge(source_state);
846}
847static void on_execute_secondary(command_list *cmd_list, command_list *secondary_cmd_list)
848{
849 auto &target_state = *cmd_list->get_private_data<state_tracking>();

Callers

nothing calls this directly

Calls 2

mergeMethod · 0.80

Tested by

no test coverage detected