Increase size of Voodoo dirty_line array to 2048 lines, and add some

bounds checking before accessing. Fixes crash running 3DMark 2001 on
Voodoo 3.
This commit is contained in:
SarahW 2020-11-17 08:32:12 +00:00
commit 8cfb60608e
6 changed files with 13 additions and 10 deletions

View file

@ -95,7 +95,7 @@ void voodoo_wait_for_swap_complete(voodoo_t *voodoo)
if ((voodoo->swap_pending && voodoo->flush) || FIFO_FULL)
{
/*Main thread is waiting for FIFO to empty, so skip vsync wait and just swap*/
memset(voodoo->dirty_line, 1, 1024);
memset(voodoo->dirty_line, 1, sizeof(voodoo->dirty_line));
voodoo->front_offset = voodoo->params.front_offset;
if (voodoo->swap_count > 0)
voodoo->swap_count--;