Commit 772e75fe authored by David Reid's avatar David Reid

Fix a bug with the lock-free job queue.

parent 7ea38278
...@@ -37908,7 +37908,7 @@ MA_API ma_result ma_slot_allocator_alloc(ma_slot_allocator* pAllocator, ma_uint6 ...@@ -37908,7 +37908,7 @@ MA_API ma_result ma_slot_allocator_alloc(ma_slot_allocator* pAllocator, ma_uint6
pAllocator->pSlots[slotIndex] += 1; pAllocator->pSlots[slotIndex] += 1;
/* Construct the output value. */ /* Construct the output value. */
*pSlot = ((ma_uint64)pAllocator->pSlots[slotIndex] << 32 | slotIndex); *pSlot = (((ma_uint64)pAllocator->pSlots[slotIndex] << 32) | slotIndex);
return MA_SUCCESS; return MA_SUCCESS;
} }
...@@ -57519,7 +57519,7 @@ MA_API ma_result ma_resource_manager_job_queue_next(ma_resource_manager_job_queu ...@@ -57519,7 +57519,7 @@ MA_API ma_result ma_resource_manager_job_queue_next(ma_resource_manager_job_queu
next = pQueue->pJobs[ma_resource_manager_job_extract_slot(head)].next; next = pQueue->pJobs[ma_resource_manager_job_extract_slot(head)].next;
if (ma_resource_manager_job_toc_to_allocation(head) == ma_resource_manager_job_toc_to_allocation(pQueue->head)) { if (ma_resource_manager_job_toc_to_allocation(head) == ma_resource_manager_job_toc_to_allocation(pQueue->head)) {
if (ma_resource_manager_job_toc_to_allocation(head) == ma_resource_manager_job_toc_to_allocation(tail)) { if (ma_resource_manager_job_extract_slot(head) == ma_resource_manager_job_extract_slot(tail)) {
if (ma_resource_manager_job_extract_slot(next) == 0xFFFF) { if (ma_resource_manager_job_extract_slot(next) == 0xFFFF) {
return MA_NO_DATA_AVAILABLE; return MA_NO_DATA_AVAILABLE;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment