fix assertion failure upon loading invalid sound path due to extra ma_fence_release
In ma_resource_manager_data_buffer_node_acquire_critical_section, a job which releases already acquired fences is either processed or posted based on MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT. However on job post or process failure, the fences were being unconditionally released. This commit moves the fence releases in acquire_critical_section down into a nested branch which only executes if MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_WAIT_INIT is not set, causing the fence release to take place only if the job failed to post while relying on the job itself to release the fences if it processes rather than causing a duplicate ma_fence_release and thus an eventual assertion failure.
Showing
Please register or sign in to comment