MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / cgpu_get_queue

Function cgpu_get_queue

modules/engine/graphics/src/common/cgpu.c:456–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454}
455
456CGPUQueueId cgpu_get_queue(CGPUDeviceId device, ECGPUQueueType type, uint32_t index)
457{
458 cgpu_assert(device != CGPU_NULLPTR && "fatal: call on NULL device!");
459 cgpu_assert(device->proc_table_cache->free_device && "free_device Proc Missing!");
460
461 CGPUQueueId created = cgpu_runtime_table_try_get_queue(device, type, index);
462 if (created != NULL)
463 {
464 cgpu_warn("You should not call cgpu_get_queue "
465 "with a specific index & type for multiple times!\n"
466 " Please get for only once and reuse the handle!\n");
467 return created;
468 }
469 CGPUQueue* queue = (CGPUQueue*)device->proc_table_cache->get_queue(device, type, index);
470 queue->index = index;
471 queue->type = type;
472 queue->device = device;
473 cgpu_runtime_table_add_queue(queue, type, index);
474 return queue;
475}
476
477void cgpu_submit_queue(CGPUQueueId queue, const struct CGPUQueueSubmitDescriptor* desc)
478{

Callers 15

create_api_objectsMethod · 0.85
initMethod · 0.85
initializeFunction · 0.85
initializeFunction · 0.85
ComputeFuncFunction · 0.85
initializeFunction · 0.85
initializeFunction · 0.85
create_api_objectsMethod · 0.85
create_api_objectsMethod · 0.85
create_api_objectsFunction · 0.85
create_api_objectsFunction · 0.85
create_api_objectsMethod · 0.85

Calls 3

get_queueMethod · 0.80

Tested by 1

test_allMethod · 0.68