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

Method Submit

layers/core_checks/cc_state_tracker.cpp:1334–1375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1332}
1333
1334void CommandBufferSubState::Submit(vvl::Queue& queue_state, uint32_t perf_submit_pass, const Location& loc) {
1335 for (auto& func : queue_submit_functions) {
1336 func(queue_state, base);
1337 }
1338
1339 // Update global vvl:Event state with signaling state at the end of the command buffer
1340 for (const auto& [event, signal_state] : event_signal_states) {
1341 if (auto event_state = base.dev_data.Get<vvl::Event>(event)) {
1342 if (signal_state.signaled) {
1343 const bool can_signal = !event_state->signaled || signal_state.was_reset;
1344 if (can_signal) {
1345 event_state->signaled = true;
1346 event_state->signal_src_stage_mask = signal_state.signal_src_stage_mask;
1347 event_state->signal_dependency_info = signal_state.signal_dependency_info;
1348 event_state->signaling_queue = queue_state.VkHandle();
1349 event_state->last_signaling_command = signal_state.last_signaling_command;
1350 }
1351 } else {
1352 event_state->signaled = false;
1353 event_state->signal_src_stage_mask = VK_PIPELINE_STAGE_NONE;
1354 event_state->signal_dependency_info.reset();
1355 event_state->signaling_queue = VK_NULL_HANDLE;
1356 event_state->last_signaling_command = signal_state.last_signaling_command; // CmdReset
1357 }
1358 }
1359 }
1360
1361 // Update vvl::QueryPool with a query state at the end of the command buffer.
1362 // Ultimately, it tracks the final query state for the entire submission.
1363 {
1364 VkQueryPool first_pool = VK_NULL_HANDLE;
1365 QueryMap local_query_to_state_map;
1366 for (auto& function : query_updates) {
1367 function(base, /*do_validate*/ false, first_pool, perf_submit_pass, &local_query_to_state_map);
1368 }
1369 for (const auto& [query_object, query_state] : local_query_to_state_map) {
1370 auto query_pool_state = base.dev_data.Get<vvl::QueryPool>(query_object.pool);
1371 if (!query_pool_state) continue;
1372 query_pool_state->SetQueryState(query_object.slot, query_object.perf_pass, query_state);
1373 }
1374 }
1375}
1376
1377void QueueSubState::PreSubmit(std::vector<vvl::QueueSubmission>& submissions) {
1378 for (auto& submission : submissions) {

Callers

nothing calls this directly

Calls 3

SetQueryStateMethod · 0.80
VkHandleMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected