The Voodoos now correctly lock and unlock mutexes.

This commit is contained in:
OBattler
2020-11-18 16:15:01 +01:00
parent 9fb3a3ed56
commit 889c19c650
5 changed files with 26 additions and 0 deletions

View File

@@ -100,8 +100,10 @@ void voodoo_reg_writel(uint32_t addr, uint32_t val, void *p)
if (!(val & 1))
{
banshee_set_overlay_addr(voodoo->p, voodoo->leftOverlayBuf);
thread_wait_mutex(voodoo->swap_mutex);
if (voodoo->swap_count > 0)
voodoo->swap_count--;
thread_release_mutex(voodoo->swap_mutex);
voodoo->frame_count++;
}
else if (TRIPLE_BUFFER)
@@ -146,8 +148,10 @@ void voodoo_reg_writel(uint32_t addr, uint32_t val, void *p)
{
memset(voodoo->dirty_line, 1, sizeof(voodoo->dirty_line));
voodoo->front_offset = voodoo->params.front_offset;
thread_wait_mutex(voodoo->swap_mutex);
if (voodoo->swap_count > 0)
voodoo->swap_count--;
thread_release_mutex(voodoo->swap_mutex);
}
else if (TRIPLE_BUFFER)
{