Lines Matching defs:queue
285 QUEUE_STATE *GetQueueState(layer_data *dev_data, VkQueue queue) {
286 auto it = dev_data->queueMap.find(queue);
2102 // Verify that requested queue family is known to be valid at this point in time
2107 // Verify that requested queue count of queue family is known to be valid at this point in time
2127 ") is not less than or equal to available queue count for this pCreateInfo->pQueueCreateInfos[%" PRIu32
2370 // For the given queue, verify the queue state up to the given seq number.
2376 // sequence number we want to validate up to, per queue
2378 // sequence number we've completed validation for, per queue
2383 auto queue = worklist.back();
2386 auto target_seq = target_seqs[queue];
2387 auto seq = std::max(done_seqs[queue], queue->seq);
2388 auto sub_it = queue->submissions.begin() + int(seq - queue->seq); // seq >= queue->seq
2392 auto other_queue = GetQueueState(dev_data, wait.queue);
2394 if (other_queue == queue) continue; // semaphores /always/ point backwards, so no point here.
2399 // if this wait is for another queue, and covers new sequence
2401 // target seq and (possibly-re)add the queue to the worklist.
2427 // finally mark the point we've now validated this queue to.
2428 done_seqs[queue] = seq;
2434 // When the given fence is retired, verify outstanding queue operations through the point of the fence
2457 // Roll this queue forward, one submission at a time.
2466 auto &lastSeq = otherQueueSeqs[wait.queue];
2530 // Submit a fence to a queue, delimiting previous fences and previous untracked
2534 pFence->signaler.first = pQueue->queue;
2611 // Check that the queue family index of 'queue' matches one of the entries in pQueueFamilyIndices
2612 bool ValidImageBufferQueue(layer_data *dev_data, GLOBAL_CB_NODE *cb_node, const VK_OBJECT *object, VkQueue queue, uint32_t count,
2616 auto queue_state = GetQueueState(dev_data, queue);
2629 " which was not created allowing concurrent access to this queue family %d.",
2637 // Validate that queueFamilyIndices of primary command buffers match this queue
2639 static bool validateQueueFamilyIndices(layer_data *dev_data, GLOBAL_CB_NODE *pCB, VkQueue queue) {
2642 auto queue_state = GetQueueState(dev_data, queue);
2649 " created in queue family %d is being submitted on queue 0x%" PRIx64 " from queue family %d. %s",
2650 HandleToUint64(pCB->commandBuffer), pPool->queueFamilyIndex, HandleToUint64(queue),
2654 // Ensure that any bound images or buffers created with SHARING_MODE_CONCURRENT have access to the current queue family
2659 skip |= ValidImageBufferQueue(dev_data, pCB, &object, queue, image_state->createInfo.queueFamilyIndexCount,
2665 skip |= ValidImageBufferQueue(dev_data, pCB, &object, queue, buffer_state->createInfo.queueFamilyIndexCount,
2728 static void PostCallRecordQueueSubmit(layer_data *dev_data, VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits,
2731 auto pQueue = GetQueueState(dev_data, queue);
2739 queue,
2752 "vkQueueSubmit(): Signaling external fence 0x%" PRIx64 " on queue 0x%" PRIx64
2755 HandleToUint64(fence), HandleToUint64(queue));
2792 pSemaphore->signaler.first = queue;
2804 "vkQueueSubmit(): Signaling external semaphore 0x%" PRIx64 " on queue 0x%" PRIx64
2807 HandleToUint64(semaphore), HandleToUint64(queue));
2835 static bool PreCallValidateQueueSubmit(layer_data *dev_data, VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits,
2861 "Queue 0x%" PRIx64 " is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.",
2862 HandleToUint64(queue), HandleToUint64(semaphore));
2879 "Queue 0x%" PRIx64 " is signaling semaphore 0x%" PRIx64
2880 " that has already been signaled but not waited on by queue 0x%" PRIx64 ".",
2881 HandleToUint64(queue), HandleToUint64(semaphore), HandleToUint64(pSemaphore->signaler.first));
2895 skip |= validateQueueFamilyIndices(dev_data, cb_node, queue);
2907 skip |= function(queue);
2910 skip |= function(queue);
2918 VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, VkFence fence) {
2919 layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map);
2922 bool skip = PreCallValidateQueueSubmit(dev_data, queue, submitCount, pSubmits, fence);
2927 VkResult result = dev_data->dispatch_table.QueueSubmit(queue, submitCount, pSubmits, fence);
2930 PostCallRecordQueueSubmit(dev_data, queue, submitCount, pSubmits, fence);
3154 // it should have been submitted on a queue or during acquire next image
3164 "%s called for fence 0x%" PRIx64 " which has not been submitted on a Queue or during acquire next image.",
3175 // Fence signaller is a queue -- use this as proof that prior operations on that queue have completed.
3249 static void PostCallRecordGetDeviceQueue(layer_data *dev_data, uint32_t q_family_index, VkQueue queue) {
3250 // Add queue to tracking set only if it is new
3251 auto result = dev_data->queues.emplace(queue);
3253 QUEUE_STATE *queue_state = &dev_data->queueMap[queue];
3254 queue_state->queue = queue;
3268 static bool PreCallValidateQueueWaitIdle(layer_data *dev_data, VkQueue queue, QUEUE_STATE **queue_state) {
3269 *queue_state = GetQueueState(dev_data, queue);
3278 VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle(VkQueue queue) {
3279 layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map);
3282 bool skip = PreCallValidateQueueWaitIdle(dev_data, queue, &queue_state);
3285 VkResult result = dev_data->dispatch_table.QueueWaitIdle(queue);
3297 for (auto &queue : dev_data->queueMap) {
3298 skip |= VerifyQueueStateToSeq(dev_data, &queue.second, queue.second.seq + queue.second.submissions.size());
3304 for (auto &queue : dev_data->queueMap) {
3305 RetireWorkOnQueue(dev_data, &queue.second, queue.second.seq + queue.second.submissions.size());
6941 bool setEventStageMask(VkQueue queue, VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) {
6947 auto queue_data = dev_data->queueMap.find(queue);
7137 // Secondary CBs can have null framebuffer so queue up validation in that case 'til FB is known
7317 static const char *vu_summary[] = {"Source or destination queue family must be ignored.",
7318 queue family must be special or ignored.",
7319 "Destination queue family must be ignored if source queue family is.",
7320 "Destination queue family must be valid, ignored, or special.",
7321 "Source queue family must be valid, ignored, or special.",
7322 "Source and destination queue family must both be ignored.",
7323 "Source and destination queue family must both be ignore or both valid.",
7324 "Source or destination queue family must match submit queue family, if not ignored."};
7402 static bool ValidateAtQueueSubmit(const VkQueue queue, const layer_data *device_data, uint32_t src_family, uint32_t dst_family,
7404 auto queue_data_it = device_data->queueMap.find(queue);
7413 HandleToUint64(queue), __LINE__, val_code, "DS",
7414 "%s: Barrier submitted to queue with family index %u, using %s 0x%" PRIx64
7436 // Descriptive text for the various types of queue family index
7517 // to a local queue of update_state_actions or something.
7518 cb_state->eventUpdates.emplace_back([device_data, src_queue_family, dst_queue_family, val](VkQueue queue) {
7519 return ValidatorState::ValidateAtQueueSubmit(queue, device_data, src_queue_family, dst_queue_family, val);
7627 // Validate buffer barrier queue family indices
7654 bool validateEventStageMask(VkQueue queue, GLOBAL_CB_NODE *pCB, uint32_t eventCount, size_t firstEventIndex,
7658 layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map);
7661 auto queue_data = dev_data->queueMap.find(queue);
7733 "%s(): %s flag %s is not compatible with the queue family properties of this command buffer. %s",
7750 // Any pipeline stage included in srcStageMask or dstStageMask must be supported by the capabilities of the queue family
7877 static bool setQueryState(VkQueue queue, VkCommandBuffer commandBuffer, QueryObject object, bool value) {
7883 auto queue_data = dev_data->queueMap.find(queue);
7987 static bool validateQuery(VkQueue queue, GLOBAL_CB_NODE *pCB, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) {
7990 auto queue_data = GetQueueState(dev_data, queue);
9141 " created in queue family %d has secondary command buffer 0x%" PRIx64 " created in queue family %d.",
9626 // Host setting event is visible to all queues immediately so update stageMask for any queue that's seen this event
9639 static bool PreCallValidateQueueBindSparse(layer_data *dev_data, VkQueue queue, uint32_t bindInfoCount,
9663 "Queue 0x%" PRIx64 " is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.",
9664 HandleToUint64(queue), HandleToUint64(semaphore));
9681 "Queue 0x%" PRIx64 " is signaling semaphore 0x%" PRIx64
9682 " that has already been signaled but not waited on by queue 0x%" PRIx64 ".",
9683 HandleToUint64(queue), HandleToUint64(semaphore), HandleToUint64(pSemaphore->signaler.first));
9737 static void PostCallRecordQueueBindSparse(layer_data *dev_data, VkQueue queue, uint32_t bindInfoCount,
9741 auto pQueue = GetQueueState(dev_data, queue);
9747 // No work to do, just dropping a fence in the queue by itself.
9758 "vkQueueBindSparse(): Signaling external fence 0x%" PRIx64 " on queue 0x%" PRIx64
9761 HandleToUint64(fence), HandleToUint64(queue));
9821 pSemaphore->signaler.first = queue;
9833 "vkQueueBindSparse(): Signaling external semaphore 0x%" PRIx64 " on queue 0x%" PRIx64
9836 HandleToUint64(semaphore), HandleToUint64(queue));
9851 VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo *pBindInfo,
9853 layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map);
9855 bool skip = PreCallValidateQueueBindSparse(dev_data, queue, bindInfoCount, pBindInfo, fence);
9860 VkResult result = dev_data->dispatch_table.QueueBindSparse(queue, bindInfoCount, pBindInfo, fence);
9863 PostCallRecordQueueBindSparse(dev_data, queue, bindInfoCount, pBindInfo, fence);
10089 // All physical devices and queue families are required to be able
10094 // TODO: should restrict search only to queue families of VkDeviceQueueCreateInfos, not whole phys. device
10105 "this surface for at least one queue family of this device. %s",
10495 VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) {
10496 layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map);
10500 auto queue_state = GetQueueState(dev_data, queue);
10507 "Queue 0x%" PRIx64 " is waiting on semaphore 0x%" PRIx64 " that has no way to be signaled.",
10508 HandleToUint64(queue), HandleToUint64(pPresentInfo->pWaitSemaphores[i]));
10545 HandleToUint64(queue), __LINE__, VALIDATION_ERROR_11200a20, "DS",
10554 // All physical devices and queue families are required to be able
10570 "vkQueuePresentKHR: Presenting image on queue that cannot present to this surface. %s",
10637 VkResult result = dev_data->dispatch_table.QueuePresentKHR(queue, pPresentInfo);
10665 // Note: even though presentation is directed to a queue, there is no
10803 pFence->signaler.first = VK_NULL_HANDLE; // ANI isn't on a queue, so this can't participate in a completion proof.
10945 } else { // Save queue family properties