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

@ -1363,8 +1363,9 @@ skip_pixel:
voodoo->texel_count[odd_even] += state->texel_count;
voodoo->fbiPixelsIn += state->pixel_count;
if (voodoo->params.draw_offset == voodoo->params.front_offset)
if (voodoo->params.draw_offset == voodoo->params.front_offset && (real_y >> 1) < 2048)
voodoo->dirty_line[real_y >> 1] = 1;
next_line:
if (SLI_ENABLED)
{